Skip to content

Commit 41faef9

Browse files
committed
Remove pin_defs from stdlib generics
Use symbol's native signal names directly in pins dict. The io() names (P1, P2) remain unchanged.
1 parent bc5e99f commit 41faef9

5 files changed

Lines changed: 11 additions & 31 deletions

File tree

stdlib/generics/Capacitor.zen

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,9 @@ Component(
130130
footprint=File(_footprint(mount, package)),
131131
properties=properties,
132132
type="capacitor",
133-
pin_defs={
134-
"P1": "1",
135-
"P2": "2",
136-
},
137133
pins={
138-
"P1": P1,
139-
"P2": P2,
134+
"1": P1,
135+
"2": P2,
140136
},
141137
spice_model=SpiceModel(
142138
"spice/Capacitor.lib",

stdlib/generics/FerriteBead.zen

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,9 @@ Component(
106106
symbol=Symbol(**_symbol(package)),
107107
footprint=File(_footprint(package)),
108108
prefix="FB",
109-
pin_defs={
110-
"P1": "1",
111-
"P2": "2",
112-
},
113109
pins={
114-
"P1": P1,
115-
"P2": P2,
110+
"1": P1,
111+
"2": P2,
116112
},
117113
spice_model=SpiceModel(
118114
"spice/FerriteBead.lib",

stdlib/generics/Resistor.zen

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,9 @@ Component(
111111
symbol=Symbol(**_symbol(mount, package, use_us_symbol)),
112112
footprint=File(_footprint(mount, package)),
113113
prefix="R",
114-
pin_defs={
115-
"P1": "1",
116-
"P2": "2",
117-
},
118114
pins={
119-
"P1": P1,
120-
"P2": P2,
115+
"1": P1,
116+
"2": P2,
121117
},
122118
spice_model=SpiceModel(
123119
"spice/Resistor.lib",

stdlib/generics/SolderJumper.zen

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,20 +85,16 @@ def _symbol(pin_count):
8585

8686

8787
def _pins_and_connections(pin_count):
88-
# pin_defs: mapping of pin name to pin number as string
89-
# pins: mapping of pin name to net (if connected)
90-
pin_defs = {}
9188
pins = {}
9289
nets = P
9390
for i in range(pin_count):
9491
pin_name = str(i + 1)
95-
pin_defs[pin_name] = str(i + 1)
9692
net = nets[i]
9793
if net != None:
9894
pins[pin_name] = net
99-
return pins, pin_defs
95+
return pins
10096

101-
pins, pin_defs = _pins_and_connections(pin_count)
97+
pins = _pins_and_connections(pin_count)
10298

10399
Component(
104100
name="SJ",

stdlib/generics/Thermistor.zen

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
load("../interfaces.zen", "Net")
2-
load("./SolderJumper.zen", "pin_defs")
2+
33
load("../units.zen", "Capacitance", "Inductance", "Resistance", "Voltage")
44
load("../utils.zen", "format_value")
55

@@ -95,13 +95,9 @@ Component(
9595
symbol=Symbol(**_symbol(mount, package, temperature_coefficient, use_us_symbol)),
9696
footprint=File(_footprint(mount, package)),
9797
prefix="TH",
98-
pin_defs={
99-
"P1": "1",
100-
"P2": "2",
101-
},
10298
pins={
103-
"P1": P1,
104-
"P2": P2,
99+
"1": P1,
100+
"2": P2,
105101
},
106102
spice_model=SpiceModel(
107103
"spice/Thermistor.lib",

0 commit comments

Comments
 (0)