Net
We use net
statements to make electrical connections inside modules. Nets can connect both individual pins and entire bundles. Optionally, nets can be assigned names.
Syntax
pcb-module my-module :
net (a-inst.p b-inst.p)
net GND (my-inst.gnd)
net (GND power-inst.gnd)
net (a-inst.i2c b-inst.i2c)
net SYS-BUS:can[10]
for i in 0 to 10 do :
net (my-inst[i].can SYS-BUS[i])
Description
net (a-inst.p b-inst.p)
Electrically connect the p
pin of a-inst
to the p
pin of b-inst
.
net GND (my-inst.gnd)
net (GND power-inst.gnd)
Create a net named GND
that has the pin my-inst.gnd
.
net (a-inst.i2c b-inst.i2c)
Connect an i2c
bundle from a-inst
to an i2c
bundle from b-inst
. Only identical bundles can be connected with a net
statement. When they are connected, each pin of one bundle will be wired to the identically named pin on the other bundle.
net SYS-BUS:can[10]
for i in 0 to 10 do :
net (my-inst[i].can SYS-BUS[i])
If we want to name a collection of nets, create the named nets first and then connect to them later in the design.