Skip to content

Commit 5a8d56f

Browse files
authored
Merge pull request #646 from gdsfactory/fix-vlsir-tests-new-gdsfactory
2 parents 6b1eb3f + 4ba1c10 commit 5a8d56f

6 files changed

Lines changed: 177 additions & 89 deletions

File tree

gplugins/vlsir/tests/resources/pads_correct.cir

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
; Generated by `vlsirtools.XyceNetlister`
33
;
44

5-
.SUBCKT taper_L10_W100_W10_LNon_43bc52bd
5+
.SUBCKT taper_gdsfactorypcomponentsptapersptaper_L10_W100_W10_L_e6a63921
66
+ 1
77
; No parameters
88

99
.ENDS
1010

11-
.SUBCKT pad_S100_100_LMTOP_BLNo_163fd346
11+
.SUBCKT pad_gdsfactorypcomponentsppadsppad_S100_100_LMTOP_BLNon_457de54c
1212
+ 1 2
1313
; No parameters
1414

@@ -20,42 +20,42 @@
2020

2121
x1
2222
+ tl,tr tl
23-
+ pad_S100_100_LMTOP_BLNo_163fd346
23+
+ pad_gdsfactorypcomponentsppadsppad_S100_100_LMTOP_BLNon_457de54c
2424
+ ; No parameters
2525

2626
x2
2727
+ tl,tr
28-
+ taper_L10_W100_W10_LNon_43bc52bd
28+
+ taper_gdsfactorypcomponentsptapersptaper_L10_W100_W10_L_e6a63921
2929
+ ; No parameters
3030

3131
x3
3232
+ tl,tr tr
33-
+ pad_S100_100_LMTOP_BLNo_163fd346
33+
+ pad_gdsfactorypcomponentsppadsppad_S100_100_LMTOP_BLNon_457de54c
3434
+ ; No parameters
3535

3636
x4
3737
+ tl,tr
38-
+ taper_L10_W100_W10_LNon_43bc52bd
38+
+ taper_gdsfactorypcomponentsptapersptaper_L10_W100_W10_L_e6a63921
3939
+ ; No parameters
4040

4141
x5
4242
+ bl,br br
43-
+ pad_S100_100_LMTOP_BLNo_163fd346
43+
+ pad_gdsfactorypcomponentsppadsppad_S100_100_LMTOP_BLNon_457de54c
4444
+ ; No parameters
4545

4646
x6
4747
+ bl,br bl
48-
+ pad_S100_100_LMTOP_BLNo_163fd346
48+
+ pad_gdsfactorypcomponentsppadsppad_S100_100_LMTOP_BLNon_457de54c
4949
+ ; No parameters
5050

5151
x7
5252
+ bl,br
53-
+ taper_L10_W100_W10_LNon_43bc52bd
53+
+ taper_gdsfactorypcomponentsptapersptaper_L10_W100_W10_L_e6a63921
5454
+ ; No parameters
5555

5656
x8
5757
+ bl,br
58-
+ taper_L10_W100_W10_LNon_43bc52bd
58+
+ taper_gdsfactorypcomponentsptapersptaper_L10_W100_W10_L_e6a63921
5959
+ ; No parameters
6060

6161
.ENDS

gplugins/vlsir/tests/resources/pads_correct.scs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
// Generated by `vlsirtools.SpectreNetlister`
33
//
44

5-
subckt taper_L10_W100_W10_LNon_43bc52bd
5+
subckt taper_gdsfactorypcomponentsptapersptaper_L10_W100_W10_L_e6a63921
66
+ 1
77
+ // No parameters
88

99

1010
ends
1111

12-
subckt pad_S100_100_LMTOP_BLNo_163fd346
12+
subckt pad_gdsfactorypcomponentsppadsppad_S100_100_LMTOP_BLNon_457de54c
1313
+ 1 2
1414
+ // No parameters
1515

@@ -23,49 +23,49 @@ subckt pads_correct_Ppad_CSmetal3
2323
1
2424
+ // Ports:
2525
+ ( tl,tr tl )
26-
+ pad_S100_100_LMTOP_BLNo_163fd346
26+
+ pad_gdsfactorypcomponentsppadsppad_S100_100_LMTOP_BLNon_457de54c
2727
+ // No parameters
2828

2929
2
3030
+ // Ports:
3131
+ ( tl,tr )
32-
+ taper_L10_W100_W10_LNon_43bc52bd
32+
+ taper_gdsfactorypcomponentsptapersptaper_L10_W100_W10_L_e6a63921
3333
+ // No parameters
3434

3535
3
3636
+ // Ports:
3737
+ ( tl,tr tr )
38-
+ pad_S100_100_LMTOP_BLNo_163fd346
38+
+ pad_gdsfactorypcomponentsppadsppad_S100_100_LMTOP_BLNon_457de54c
3939
+ // No parameters
4040

4141
4
4242
+ // Ports:
4343
+ ( tl,tr )
44-
+ taper_L10_W100_W10_LNon_43bc52bd
44+
+ taper_gdsfactorypcomponentsptapersptaper_L10_W100_W10_L_e6a63921
4545
+ // No parameters
4646

4747
5
4848
+ // Ports:
4949
+ ( bl,br br )
50-
+ pad_S100_100_LMTOP_BLNo_163fd346
50+
+ pad_gdsfactorypcomponentsppadsppad_S100_100_LMTOP_BLNon_457de54c
5151
+ // No parameters
5252

5353
6
5454
+ // Ports:
5555
+ ( bl,br bl )
56-
+ pad_S100_100_LMTOP_BLNo_163fd346
56+
+ pad_gdsfactorypcomponentsppadsppad_S100_100_LMTOP_BLNon_457de54c
5757
+ // No parameters
5858

5959
7
6060
+ // Ports:
6161
+ ( bl,br )
62-
+ taper_L10_W100_W10_LNon_43bc52bd
62+
+ taper_gdsfactorypcomponentsptapersptaper_L10_W100_W10_L_e6a63921
6363
+ // No parameters
6464

6565
8
6666
+ // Ports:
6767
+ ( bl,br )
68-
+ taper_L10_W100_W10_LNon_43bc52bd
68+
+ taper_gdsfactorypcomponentsptapersptaper_L10_W100_W10_L_e6a63921
6969
+ // No parameters
7070

7171

gplugins/vlsir/tests/resources/pads_correct.sp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
* Generated by `vlsirtools.SpiceNetlister`
33
*
44

5-
.SUBCKT taper_L10_W100_W10_LNon_43bc52bd
5+
.SUBCKT taper_gdsfactorypcomponentsptapersptaper_L10_W100_W10_L_e6a63921
66
+ 1
77
* No parameters
88

99
.ENDS
1010

11-
.SUBCKT pad_S100_100_LMTOP_BLNo_163fd346
11+
.SUBCKT pad_gdsfactorypcomponentsppadsppad_S100_100_LMTOP_BLNon_457de54c
1212
+ 1 2
1313
* No parameters
1414

@@ -20,49 +20,49 @@
2020

2121
x1
2222
+ tl,tr tl
23-
+ pad_S100_100_LMTOP_BLNo_163fd346
23+
+ pad_gdsfactorypcomponentsppadsppad_S100_100_LMTOP_BLNon_457de54c
2424
* No parameters
2525

2626

2727
x2
2828
+ tl,tr
29-
+ taper_L10_W100_W10_LNon_43bc52bd
29+
+ taper_gdsfactorypcomponentsptapersptaper_L10_W100_W10_L_e6a63921
3030
* No parameters
3131

3232

3333
x3
3434
+ tl,tr tr
35-
+ pad_S100_100_LMTOP_BLNo_163fd346
35+
+ pad_gdsfactorypcomponentsppadsppad_S100_100_LMTOP_BLNon_457de54c
3636
* No parameters
3737

3838

3939
x4
4040
+ tl,tr
41-
+ taper_L10_W100_W10_LNon_43bc52bd
41+
+ taper_gdsfactorypcomponentsptapersptaper_L10_W100_W10_L_e6a63921
4242
* No parameters
4343

4444

4545
x5
4646
+ bl,br br
47-
+ pad_S100_100_LMTOP_BLNo_163fd346
47+
+ pad_gdsfactorypcomponentsppadsppad_S100_100_LMTOP_BLNon_457de54c
4848
* No parameters
4949

5050

5151
x6
5252
+ bl,br bl
53-
+ pad_S100_100_LMTOP_BLNo_163fd346
53+
+ pad_gdsfactorypcomponentsppadsppad_S100_100_LMTOP_BLNon_457de54c
5454
* No parameters
5555

5656

5757
x7
5858
+ bl,br
59-
+ taper_L10_W100_W10_LNon_43bc52bd
59+
+ taper_gdsfactorypcomponentsptapersptaper_L10_W100_W10_L_e6a63921
6060
* No parameters
6161

6262

6363
x8
6464
+ bl,br
65-
+ taper_L10_W100_W10_LNon_43bc52bd
65+
+ taper_gdsfactorypcomponentsptapersptaper_L10_W100_W10_L_e6a63921
6666
* No parameters
6767

6868

gplugins/vlsir/tests/test_vlsir.py

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,25 @@ def pkg() -> Package:
1818
return kdb_vlsir(kdbnet, domain="gplugins.klayout.example")
1919

2020

21-
def test_kdb_vlsir(pkg) -> None:
22-
"""Test the conversion from KLayout DB Netlist to VLSIR Package."""
23-
packages = [
24-
"taper_L10_W100_W10_LNon_43bc52bd",
25-
"pad_S100_100_LMTOP_BLNo_163fd346",
21+
@pytest.mark.parametrize(
22+
"expected_module_name",
23+
[
24+
"taper_gdsfactorypcomponentsptapersptaper_L10_W100_W10_L_e6a63921",
25+
"pad_gdsfactorypcomponentsppadsppad_S100_100_LMTOP_BLNon_457de54c",
2626
"pads_correct_Ppad_CSmetal3",
27-
]
28-
27+
],
28+
)
29+
def test_kdb_vlsir(pkg: Package, expected_module_name: str) -> None:
30+
"""Test the conversion from KLayout DB Netlist to VLSIR Package."""
2931
assert pkg is not None, "Package should not be None"
30-
assert len(pkg.modules) == 3, "Expected 3 modules in the package"
31-
for i in range(3):
32-
assert pkg.modules[i].name == packages[i], (
33-
f"Module[{i}] name should be {packages[i]}"
34-
)
32+
module_names = (module.name for module in pkg.modules)
33+
assert expected_module_name in module_names, (
34+
f"Expected module '{expected_module_name}' in package modules"
35+
)
3536

3637

3738
@pytest.mark.parametrize("spice_format", ["spice", "spectre", "xyce", "verilog"])
38-
def test_export_netlist(pkg, spice_format) -> None:
39+
def test_export_netlist(pkg: Package, spice_format: str) -> None:
3940
"""Test the export of a VLSIR Package to a netlist in the supported formats."""
4041
if spice_format == "verilog":
4142
with pytest.raises(NotImplementedError):

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ classifiers = [
1313
"Operating System :: OS Independent"
1414
]
1515
dependencies = [
16-
"gdsfactory>=9.3.5",
16+
"gdsfactory>=9.15.1",
1717
"pint",
1818
"tqdm",
1919
"numpy==2.2", # numpy 2.2 is required for numba

0 commit comments

Comments
 (0)