Quantcast
Channel: Cadence Custom IC Skill Forum
Viewing all articles
Browse latest Browse all 5066

How to determine the direction of a wire out of a symbol pin in schematic

$
0
0

Hi,

I would like to write some SKILL to add wire stubs and labels to a certain symbol instantiated and selected in a schematic cellView.

I think I have the basics in place, i.e. reference to a selected cellView with geGetSelectedSet() and then dig into its instTerms and

from there to each instTerm~>term~>pins~>fig~>bBox, then transform it to the bBox relative to the cellview with dbTransformBBox()

basically:

cv = geGetSelSet()

foreach(instTerm cv~>instTerms

instTermBbox=car(instTerm~>term~>pins~>fig~>bBox)
instTermBboxInCv=dbTransformBBox(instTermBbox
                           car(inst~>transform))

)

code might need some polishing, especially when extracting the right item from the list returned by - for  instance - inst~>transform or ...~>bBox.

So from here, I can use schCreateWire() and schCreateLabel() to add a wire and label.

The point where I'm puzzled is: how to determine the direction of the wire? How do I determine the position of the pin within the shape?
I am thinking of using the symbol's bBox to infer whether the pin is on its top, bottom, left or right side, however when I query the bBox of the selected shape, I get something weird.

I have placed a single vcvs on an otherwise empty schematic. I select it in the window, and then call cv = geGetSelSet().

cv~>bBox returns the following:

(((-0.48125 -0.2125)
(0.91875 0.26875)
)

The strange thing about this bBox is that the y coords (I'm assuming they are the second elements in each tuple) are more or less correct, i.e. they correspond roughly to the bottom and top pin extremes, whereas the the x coords are further away from the boundaries of the symbol.

So I'm wondering what this means and how to interpret it.

Thanks for any help,

Michele


Viewing all articles
Browse latest Browse all 5066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>