Symbol¶
The symbol
statement is a means of associating a single-pin "Net Symbol" with a a particular net. This most obvious example is for the ground symbol.
This statement is only valid in the pcb-module
context.
Signature¶
symbol(<NET>) = <SYMB>
<NET>
- A ref to a single net in the current module's context.<SYMB
- A pcb-symbol definition
Usage¶
pcb-symbol ground-sym :
pin p[0] at Point(0.0, 0.0)
...
pcb-module top-level:
net GND (MCU.gnd, sensor.gnd)
symbol(GND) = ground-sym
The symbol()
statement in the pcb-module
context allows the user to associate a single pin pcb-symbol
definition with a net.
Here the net GND
is defined by connecting two other components ground ports together. Then
we apply the ground-sym
to that NET with the symbol()
statement.
This results in the creation of this "Net Symbol" in the schematic.
This symbol will be present in the circuit where ever this net is used. In the example of the ground symbol, this will likely have been defined at the top level of the design and then distributed to all sub-modules. This means it will likely be present on all schematic sheets of the design.
If the symbol()
statement is used on a net that is only part of a given sub-module, then that net symbol will only be present within the schematic group of that module.
Not Used on Ports¶
Notice that the symbol()
statement does not apply to port
objects. If you attempt to apply the symbol()
statement to a port of a module or component, you will encounter an error:
Uncaught Exception: ... Must set a net symbol's net with a single net (received a single pin). in main
Duplicate symbol()
statements¶
Currently, if you apply the symbol()
statement twice to a given net in a design, then the last applied pcb-symbol
will apply to that net.