I am trying to write a simple SKILL script to do the following:
1. Look for a particular output port in symbol A,
2.Follow the net connected to this port and the input of symbol B
3.Report the outputs of symbol B.
Please let me know if there are predefined function that do some kind of a read port, find connected net tasks. I am very new to SKILL and would greatly appreciate any help.
Sorry, I dont think that was a clear request at all. I want the script to open a given schematic, locate a symbol (A), follow a net connected to one particular output port(say X), follow that net to another symbol (B) and then report B's outputs.
THe algorithm ,you can see is fairly simple but I can't seem to locate the functions to do the following tasks
Read ports of a symbol in a given schematic
Check for a matching net name on the port of another symbol
In reply to tenderfoot:
There is not one particular function to do what you are looking for. You will need to do it in pieces.
To open your schematic:;In the following, you must provide the libName cellName and viewNamecv = dbOpenCellViewByType("libName" "cellName" "viewName" "schematic" "r")
;In this example, it simply uses the current cellview that is opencv = geGetEditCellView()
To find your cell or instance:Next, you need to find your symbol. You said you want to find symbol A. If A is the cellName, you could have more than one placement of it. You could get all placements of cell A this way:insts = setof(x cv~>instances x~>cellName=="A")Since insts will be a list, you will need to loop through the list:foreach(inst insts do something with inst)
Or, if your instance is named A, you could find the instance this way:inst = dbFindAnyInstByName(cv "A")
To get the connection to X on the instance:;since setof returns a list, we need the first (only) item on the list using carinstTerm = car(setof(x inst~>instTerms x~>term~>name=="X"))
To follow the net connected to the terminal:net = instTerm~>net;From here you can see all instance terminals that the net connects with. We want all except the one where we startedconns = setof(x net~>instTerms neq(x instTerm));If we want instance B's instance terminal onlyinstTermOnB = car(setof(x net~>instTerms x~>inst~>name=="B"))instB = instTermOnB~>inst
To get the outputs on B:outputTerms = setof(x instB~>master~>terminals x~>direction=="output")outputTermNames = outputTerms~>name
To see all the attribute names on a database object in your CIW:cv = geGetEditCellView()cv~>?To see all attributes and their values:cv~>??
To speed things up when coding/debugging, you can select an item in your schematic and get its object id like this:obj = car(selectedSet())orobj = css()Take a look at this post to find some other tips. In particular, the last posting has a link to a dataBrowser.il file that is very useful for graphically traversing database objects, their attributes and their values./forums/p/3600/3605.aspx#3605