Node¶
The node
statement creates an artificial electrical attachment point.
The node
statement is only valid from within a pcb-module
context.
Signature¶
; Single Node Instance
node <NAME>:<TYPE>
; Array Node Instance
node <NAME>:<TYPE>[<ARRAY:Int|Tuple>]
<NAME>
- Symbol name for the node in this context. This name must be unique in the current context.<TYPE>
- The type of port to construct. This can be the keywordpin
for a single pin type or any declaredpcb-bundle
type.<ARRAY:Int|Tuple>
- Optional array initializer argument. This value can be:Int
-PortArray
type constructed with lengthARRAY
. This array is constructed as a contiguous zero-index array of nodes.Tuple
-PortArray
constructed with an explicit set of indices. This array is not guaranteed to be contiguous.
Watch Out! - There is no space between
<TYPE>
and the[
opening bracket of the array initializer.
Usage¶
The node
is often a tool for creating intermediate connection points in a circuit. You will see this functionality used for:
- Fanout - Given a port on a component instance, a node array can fanout that signal to multiple connection points.
- Return Values - When writing generators using the
inside pcb-module:
syntax, it is often useful to be able to return a port-like object.
The utility of a node
statement is often abstract and doesn't have a physical component associated with it.
Example - Reverse Differential Pair¶
defn reverse-pair (p:JITXObject) :
inside pcb-module:
node temp:diff-pair
topo-net(p.P, temp.N)
topo-net(p.N, temp.P)
temp
This function assumes that the argument p
is a diff-pair
port. This generator function constructs a node and then swaps the P
and N
ports of the input diff-pair before assignment.
Notice that this function is using topo-net but that isn't a requirement. A simple net
statement would also work if signal integrity constraints aren't required.