class | UL_CLASS |
column | string (see note) |
name | string (NET_NAME_LENGTH) |
row | string (see note) |
portrefs() | UL_PORTREF |
pinrefs() | UL_PINREF (see note) |
segments() | UL_SEGMENT (see note) |
See also UL_SHEET, UL_SCHEMATIC
NET_NAME_LENGTH | max. recommended length of a net name (used in formatted output only) |
The pinrefs() loop member can only be used if the net is in a schematic context. The segments() loop member can only be used if the net is in a sheet context.
The column and row members return the column and row locations within the frame on the sheet on which this net is drawn. Since a net can extend over a certain area, each of these functions returns two values, separated by a blank. In case of column these are the left- and rightmost columns touched by the net, and in case of row it's the top- and bottommost row.
When determining the column and row of a net on a sheet, first the column and then the row within that column is taken into account. Here XREF labels take precedence over normal labels, which again take precedence over net wires.
If there is no frame on that sheet, "? ?" (two question marks) is returned. If any part of the net is placed outside the frame, either of the values may be '?' (question mark). These members can only be used in a sheet context.
If the net is retrieved with UL_SCHEMATIC.allnets() the valid members are: name, class and pinrefs(). The pinrefs() loop member loops also through the virtual pinrefs generated by module instances.
schematic(S) {
S.nets(N) {
printf("Net: %s\n", N.name);
// N.segments(SEG) will NOT work here!
}
// or with virt. nets:
S.allnets(N) {
printf("Net: %s\n", N.name);
}
}
schematic(S) {
S.sheets(SH) {
SH.nets(N) {
printf("Net: %s\n", N.name);
N.segments(SEG) {
SEG.wires(W) {
printf("\tWire: (%f %f) (%f %f)\n",
u2mm(W.x1), u2mm(W.y1), u2mm(W.x2), u2mm(W.y2));
}
}
}
}
}