GET_PIN_COUNT_ON_NET

The GET_PIN_COUNT_ON_NET function returns the number of pins on a net. If the net is directly connected to others to form linked nets, e.g. via a series resistors, the total number of pins on all the connected nets is returned.

Syntax

GET_PIN_COUNT_ON_NET( STRING netName )

Parameters

netName

A string identifying a net in the form 'board.net', e.g. a string returned from GET_NET_FROM_PIN. The board name is optional, but the net name must uniquely identify the net, so if there is any ambiguity then the board name must be supplied.

Return value

An INT value specifying the total number of pins on the supplied net.

Errors

If the netName supplied does not contain a board name and matches more than one net, then an error occurs. If the expression is constant, the error will occur at compile-time. Otherwise, the error will occur at run-time, when the function is run.

Example

STRING groundNet := "XJDemo.GND";
INT pinsGround := GET_PIN_COUNT_ON_NET(groundNet);
INT pinsData0 := GET_PIN_COUNT_ON_NET(GET_NET_FROM_PIN(DATA[0]));
PRINT(pinsGround, "\n", pinsData0);

Output

93
7