Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 13 additions & 19 deletions interfaces.zen
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
load("units.zen", "VoltageRange")

Analog = interface(
NET=using(Net()),
Power = builtin.net_type(
"Power",
symbol=field(Symbol, default=Symbol(library="@kicad-symbols/power.kicad_sym", name="VCC")),
voltage=VoltageRange,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

voltage_range? range? Worried about the confusion of not allowing a raw Voltage here

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I guess we already committed to this, hm. never mind.

)

Ground = builtin.net_type(
"Ground",
symbol=field(Symbol, default=Symbol(library="@kicad-symbols/power.kicad_sym", name="GND")),
)

Analog = builtin.net_type("Analog")
Pwm = builtin.net_type("Pwm")
Gpio = builtin.net_type("Gpio")

Can = interface(
CAN_H=Net(),
CAN_L=Net(),
Expand Down Expand Up @@ -116,14 +127,6 @@ Ethernet_1000BaseT = interface(
BI_DD_N=Net(),
)

Gpio = interface(
NET=using(Net()),
)

Ground = interface(
NET=using(Net("GND", symbol=Symbol(library="@kicad-symbols/power.kicad_sym", name="GND"))),
)

Hdmi = interface(
CLK_P=Net(),
CLK_N=Net(),
Expand Down Expand Up @@ -312,15 +315,6 @@ PcieGen3x2Lane = interface(
CLK_REQ_N=Net(),
)

Power = interface(
NET=using(Net("VCC", symbol=Symbol(library="@kicad-symbols/power.kicad_sym", name="VCC"))),
voltage=field(VoltageRange | None, None),
)

Pwm = interface(
NET=using(Net()),
)

QLink = interface(
CLK_P=Net(),
CLK_N=Net(),
Expand Down