schTraceNet
schTraceNet( ?topCellViewtd_topCellView?nettd_net[ ?viewListt_viewList] [ ?hierPathlt_hierPath] ?traceCBsu_traceCB) => t / nil
Description
Traces a schematic hierarchical net through the design hierarchy and calls a user-defined callback at each level of the hierarchy where the net is present. The user-defined callback is passed as an argument, a user type describing the occurrence of the net being traced at a specific location in the design hierarchy.
schTraceNet to calculate the connected area of a net, see Probing and Calculating the Area of a Net.Arguments
|
The design cellview to be searched within. The cellview can be specified by database ID |
|
|
The net to be traced. Specify the database ID or a string; for example, |
|
|
The hierarchical path to the master cellview, specified either as a string or a list:
|
|
|
A user-defined callback that is called when a net is found during hierarchy traversal. It is specified using either a symbol representing the user specified callback or a lambda function:
The All instances are traced, including ignored instances that are not displayed in the Navigator. |
|
Value Returned
|
The net trace failed. This can be due to it missing the cellview, missing the net, no hierarchy to traverse. |
Examples
In the following example, the callback TraceNetCB is predefined to return the name, length, and width of each instance encountered during the trace.
defun( TraceNetCB (netStruct)
let( ( inst (insts makeTable("visited" nil) ) )
foreach(instTerm netStruct->net~>allInstTerms
inst = instTerm~>inst
unless(insts[inst]
insts[inst] = t
when(inst~>w &&inst~>l
info("Instance: %s length: %s width: %s\n" \
strcat(netStruct->pathToNet "/" inst~>name) \
inst~>w inst~>l)
)
)
)
)
)
The schTraceNet call below traces schematic net ‘avss’ through the design hierarchy and calls the callback TraceNetCB at each level where the net is found.
schTraceNet(?topCellView cv ?net "avss" ?traceCB 'TraceNetCB)
It uses the lambda function u_traceCB which uses the predefined netStruct as lambda( (netStruct) info("%s\n" netStruct->netName ). This uses SKILL and contains the following fields: pathToNet, netName (strings) and hierPath and net.
Results similar to the following are returned:
Instance: /I1/m9 length: 2.5 width: 3.5
Instance: /I1/m7 length: 2.5 width: 3.5
Instance: /I1/m5 length: 2.5 width: 3.5
Instance: /I1/m3 length: 2.5 width: 3.5
Instance: /I1/m1 length: 2.5 width: 3.5
Related Topics
Return to top