コード例 #1
0
ファイル: test_pdk.py プロジェクト: pretl/ALIGN-public
def test_one():
    m1 = LayerMetal(
        name="M1",
        gds_layer_number=1,
        direction="v",
        min_length=1000,
        min_end_to_end=400,
        offset=0,
        width=[600],
        space=[400],
        stop_pitch=1000,
        stop_point=200,
        stop_offset=0
        )
    m2 = LayerMetal(
        name="M2",
        gds_layer_number=2,
        direction="h",
        min_length=500,
        min_end_to_end=300,
        offset=0,
        width=[400, 500, 500, 600, 600, 500, 500],
        space=[300, 300, 400, 400, 400, 300, 300],
        stop_pitch=1000,
        stop_point=350,
        stop_offset=0
        )
    v1 = LayerVia(
        name="V1",
        gds_layer_number=21,
        stack=['M1', 'M2'],
        width_x=600,
        width_y=500,
        space_x=100,
        space_y=100
        )
    pdk = PDK(name= "Mock", layers={'M1': m1, 'M2': m2, 'V1': v1})

    with open(my_dir/"test_pdk_one-cand.json", "wt") as fp:
        fp.write(json.dumps(pdk.dict(), indent=2) + '\n')
コード例 #2
0
ファイル: test_pdk.py プロジェクト: pretl/ALIGN-public
def test_three():
    m1 = LayerMetal(
        name="M1",
        gds_layer_number=1,
        direction="v",
        min_length=1000,
        min_end_to_end=400,
        offset=0,
        width=[600],
        space=[400],
        stop_pitch=1000,
        stop_point=200,
        stop_offset=0
        )
    m2 = LayerMetal(
        name="M2",
        gds_layer_number=2,
        direction="h",
        min_length=500,
        min_end_to_end=300,
        offset=0,
        width=[400, 500, 500, 600, 600, 500, 500],
        space=[300, 300, 400, 400, 400, 300, 300],
        stop_pitch=1000,
        stop_point=350,
        stop_offset=0
        )
    v1 = LayerVia(
        name="V1",
        gds_layer_number=21,
        stack=['M1', 'M2'],
        width_x=600,
        width_y=500,
        space_x=100,
        space_y=100
        )
    pdk = PDK(name= "Mock", layers={'M1': m1, 'M2': m2, 'V1': v1})
    pdk.generate_adr_collaterals(my_dir, 1080, 4, 900, 7, [0, 0, 10*1080, 10*900])
コード例 #3
0
ファイル: test_pdk.py プロジェクト: pretl/ALIGN-public
def test_two():
    # upper metal not found 
    m1 = LayerMetal(
        name="M1",
        gds_layer_number=1,
        direction="v",
        min_length=1000,
        min_end_to_end=400,
        offset=0,
        width=[600],
        space=[400],
        stop_pitch=1000,
        stop_point=200,
        stop_offset=0
        )
    v1 = LayerVia(
        name="V1",
        gds_layer_number=21,
        stack=['M1', 'M3'],
        width_x=600,
        width_y=500,
        space_x=100,
        space_y=100
        )
    with pytest.raises(Exception):
        pdk = PDK(name= "Mock", layers={'M1': m1, 'V1': v1})

    # lower metal not found 
    v1 = LayerVia(
        name="V1",
        gds_layer_number=21,
        stack=['M0', 'M1'],
        width_x=600,
        width_y=500,
        space_x=100,
        space_y=100
    )
    with pytest.raises(Exception):
        pdk = PDK(name= "Mock", layers={'M1': m1, 'V1': v1})

    # metals not orthogonal 
    m1 = LayerMetal(
        name="M1",
        gds_layer_number=1,
        direction="v",
        min_length=1000,
        min_end_to_end=400,
        offset=0,
        width=[600],
        space=[400],
        stop_pitch=1000,
        stop_point=200,
        stop_offset=0
    )
    m2 = LayerMetal(
        name="M2",
        gds_layer_number=2,
        direction="v",
        min_length=500,
        min_end_to_end=300,
        offset=0,
        width=[400, 500, 500, 600, 600, 500, 500],
        space=[300, 300, 400, 400, 400, 300, 300],
        stop_pitch=1000,
        stop_point=350,
        stop_offset=0
    )
    v1 = LayerVia(
        name="V1",
        gds_layer_number=21,
        stack=['M1', 'M2'],
        width_x=600,
        width_y=500,
        space_x=100,
        space_y=100
    )
    with pytest.raises(Exception):
        pdk = PDK(name= "Mock", layers={'M1': m1, 'M2': m2, 'V1': v1})
コード例 #4
0
ファイル: test_pdk.py プロジェクト: prtx/ALIGN-public
def test_one():
    m1 = LayerMetal(name="M1",
                    gds_layer_number=1,
                    direction="v",
                    min_length=1000,
                    min_end_to_end=400,
                    offset=0,
                    width=[600],
                    space=[400],
                    stop_pitch=1000,
                    stop_point=200,
                    stop_offset=0)
    m2 = LayerMetal(
        name="M2",
        gds_layer_number=2,
        direction="h",
        min_length=500,
        min_end_to_end=300,
        offset=0,
        width=[400, 500, 500, 600, 600, 500, 500],
        space=[300, 300, 400, 400, 400, 300, 300],
        stop_pitch=1000,
        stop_point=350,
        stop_offset=0,
    )
    m3 = LayerMetal(name="M3",
                    gds_layer_number=3,
                    direction="v",
                    min_length=1000,
                    min_end_to_end=400,
                    offset=0,
                    width=[800, 1000],
                    space=[600, 600],
                    color=["a", "b"],
                    stop_pitch=1000,
                    stop_point=500,
                    stop_offset=0)
    m4 = LayerMetal(
        name="M4",
        gds_layer_number=4,
        direction="h",
        min_length=500,
        min_end_to_end=300,
        offset=0,
        width=[400, 500, 500, 600, 600, 500, 500],
        space=[300, 300, 400, 400, 400, 300, 300],
        stop_pitch=1000,
        stop_point=350,
        stop_offset=0,
    )
    m5 = LayerMetal(name="M5",
                    gds_layer_number=5,
                    direction="v",
                    min_length=1000,
                    min_end_to_end=400,
                    offset=0,
                    width=[800, 1000],
                    space=[600, 600],
                    color=["a", "b"],
                    stop_pitch=1000,
                    stop_point=500,
                    stop_offset=0)

    v1 = LayerVia(
        name="V1",
        gds_layer_number=21,
        stack=('M1', 'M2'),
        width_x=600,
        width_y=500,
        space_x=100,
        space_y=100,
    )
    v1_set = LayerViaSet(name="V1", gds_layer_number=21, default_via=v1)

    pdk = PDK(name="""Mock FinFET technology with non-uniform metal grids.\
This PDK is for development and not functional yet.\
This file is auto-generated using tests/schema/test_pdk.py""",
              layers={
                  'M1': m1,
                  'M2': m2,
                  'M3': m3,
                  'M4': m4,
                  'M5': m5,
                  'V1': v1_set
              })

    # pprint.pprint(pdk.dict())
    with open(my_dir / "layers.json", "wt") as fp:
        fp.write(json.dumps(pdk.dict(), indent=2) + '\n')
コード例 #5
0
ファイル: canvas.py プロジェクト: pretl/ALIGN-public
    def _define_pdk(self):
        m1 = LayerMetal(name="M1",
                        gds_layer_number=1,
                        direction="v",
                        min_length=1300,
                        min_end_to_end=500,
                        offset=0,
                        width=[600],
                        space=[480],
                        stop_pitch=900,
                        stop_point=200,
                        stop_offset=0)
        m2 = LayerMetal(
            name="M2",
            gds_layer_number=2,
            direction="h",
            min_length=2160,
            min_end_to_end=1080,
            offset=0,
            width=[400],
            space=[500],
            stop_pitch=1080,
            stop_point=540,
            stop_offset=0,
        )
        m3 = LayerMetal(name="M3",
                        gds_layer_number=3,
                        direction="v",
                        min_length=1500,
                        min_end_to_end=1000,
                        offset=0,
                        width=[600],
                        space=[480],
                        stop_pitch=900,
                        stop_point=200,
                        stop_offset=0)
        m4 = LayerMetal(
            name="M4",
            gds_layer_number=4,
            direction="h",
            min_length=2160,
            min_end_to_end=1080,
            offset=0,
            width=[400],
            space=[500],
            stop_pitch=1080,
            stop_point=540,
            stop_offset=0,
        )
        m5 = LayerMetal(name="M5",
                        gds_layer_number=5,
                        direction="v",
                        min_length=1500,
                        min_end_to_end=1000,
                        offset=0,
                        width=[600],
                        space=[480],
                        stop_pitch=900,
                        stop_point=200,
                        stop_offset=0)
        m6 = LayerMetal(
            name="M6",
            gds_layer_number=6,
            direction="h",
            min_length=2160,
            min_end_to_end=1080,
            offset=0,
            width=[400],
            space=[500],
            stop_pitch=1080,
            stop_point=540,
            stop_offset=0,
        )
        v1 = LayerVia(name="V1",
                      gds_layer_number=21,
                      stack=('M1', 'M2'),
                      width_x=600,
                      width_y=400,
                      space_x=600,
                      space_y=300)
        v2 = LayerVia(name="V2",
                      gds_layer_number=22,
                      stack=('M2', 'M3'),
                      width_x=600,
                      width_y=400,
                      space_x=300,
                      space_y=600)
        v3 = LayerVia(name="V3",
                      gds_layer_number=23,
                      stack=('M3', 'M4'),
                      width_x=600,
                      width_y=400,
                      space_x=600,
                      space_y=300)
        v4 = LayerVia(name="V4",
                      gds_layer_number=24,
                      stack=('M4', 'M5'),
                      width_x=600,
                      width_y=400,
                      space_x=300,
                      space_y=600)
        v5 = LayerVia(name="V5",
                      gds_layer_number=24,
                      stack=('M5', 'M6'),
                      width_x=600,
                      width_y=400,
                      space_x=600,
                      space_y=300)

        self.pdk_v2 = PDK(
            name="""Mock FinFET technology with non-uniform metal grids. \
                       This file is auto-generated using tests/schema/test_pdk.py""",
            layers={
                'M1': m1,
                'M2': m2,
                'M3': m3,
                'M4': m4,
                'M5': m5,
                'M6': m6,
                'V1': v1,
                'V2': v2,
                'V3': v3,
                'V4': v4,
                'V5': v5
            })

        my_dir = pathlib.Path(__file__).resolve().parent
        with open(my_dir / "layers_cand.json", "wt") as fp:
            fp.write(json.dumps(self.pdk_v2.dict(), indent=2) + '\n')
コード例 #6
0
    def _define_pdk(self):
        m1 = LayerMetal(name="M1",
                        gds_layer_number=1,
                        direction="v",
                        min_length=1000,
                        min_end_to_end=400,
                        offset=0,
                        width=[600],
                        space=[400],
                        stop_pitch=1000,
                        stop_point=200,
                        stop_offset=0)
        m2 = LayerMetal(
            name="M2",
            gds_layer_number=2,
            direction="h",
            min_length=500,
            min_end_to_end=300,
            offset=0,
            width=[400, 500, 500, 600, 600, 500, 500],
            space=[300, 300, 400, 400, 400, 300, 300],
            stop_pitch=1000,
            stop_point=350,
            stop_offset=0,
        )
        m3 = LayerMetal(name="M3",
                        gds_layer_number=3,
                        direction="v",
                        min_length=1000,
                        min_end_to_end=400,
                        offset=0,
                        width=[800, 1000],
                        space=[600, 600],
                        color=["a", "b"],
                        stop_pitch=1000,
                        stop_point=500,
                        stop_offset=0)
        m4 = LayerMetal(
            name="M4",
            gds_layer_number=4,
            direction="h",
            min_length=500,
            min_end_to_end=300,
            offset=0,
            width=[400, 500, 500, 600, 600, 500, 500],
            space=[300, 300, 400, 400, 400, 300, 300],
            stop_pitch=1000,
            stop_point=350,
            stop_offset=0,
        )
        m5 = LayerMetal(name="M5",
                        gds_layer_number=5,
                        direction="v",
                        min_length=1000,
                        min_end_to_end=400,
                        offset=0,
                        width=[800, 1000],
                        space=[600, 600],
                        color=["a", "b"],
                        stop_pitch=1000,
                        stop_point=500,
                        stop_offset=0)

        v1 = LayerViaSet(name="V1",
                         gds_layer_number=21,
                         default_via=LayerVia(
                             name="V1",
                             gds_layer_number=21,
                             stack=('M1', 'M2'),
                             width_x=600,
                             width_y=500,
                             space_x=100,
                             space_y=100,
                         ))

        v2 = LayerViaSet(name="V2",
                         gds_layer_number=22,
                         default_via=LayerVia(
                             name="V2",
                             gds_layer_number=22,
                             stack=('M2', 'M3'),
                             width_x=600,
                             width_y=500,
                             space_x=100,
                             space_y=100,
                         ))

        v3 = LayerViaSet(name="V3",
                         gds_layer_number=23,
                         default_via=LayerVia(
                             name="V3",
                             gds_layer_number=23,
                             stack=('M3', 'M4'),
                             width_x=600,
                             width_y=500,
                             space_x=100,
                             space_y=100,
                         ))

        v4 = LayerViaSet(name="V4",
                         gds_layer_number=24,
                         default_via=LayerVia(
                             name="V4",
                             gds_layer_number=24,
                             stack=('M3', 'M4'),
                             width_x=600,
                             width_y=500,
                             space_x=100,
                             space_y=100,
                         ))

        self.pdk = PDK(
            name="""Mock FinFET technology with non-uniform metal grids.\
This PDK is for development and not functional yet.\
This file is auto-generated using tests/schema/test_pdk.py""",
            layers={
                'M1': m1,
                'M2': m2,
                'M3': m3,
                'M4': m4,
                'M5': m5,
                'V1': v1,
                'V2': v2,
                'V3': v3,
                'V4': v4,
            })

        my_dir = pathlib.Path(__file__).resolve().parent
        with open(my_dir / "layers_auto.json", "wt") as fp:
            fp.write(json.dumps(self.pdk.dict(), indent=2) + '\n')