Hello,
This is what I want to do:
- Create a pcell that instantiates other pcells (layout)
- Perform various "measurements" on this new instance (i.e.: retrieve the bounding box)
- This information has to be used lateron in the pcell code
I'd like to store this information in a table, where each cell is a defstruct.The code looks like this:
procedure( genCurMir( ... )
let( ()
...
curMirInst = makeTable( "curMirInst" nil )
defstruct( instance boundingBox gateCenter drainCenter sourceCentre )
curMirInst["CELL1"] = make_instance()
...
curMirInst["CELL1"]->boundingBox = instID~>bBox
...
) ;;; end of let
) ;;; end of procedure genCurMir
After generating the pcell (loading the code containing the command "pcDefinePCell") weird things happen: I am unable to open any view (layout/schematic/symbol/...).Entering commands in the CIW will result (9 out of 10 times) in an error, which is the same error when trying to open any cell-view:
*Error* setq/set: Variable is protected and cannot be assigned to - instance
I have tried creating the defstruct with an other name (blablablabla, definitely not used anywhere else), but the same error, only "instance" replaced by "blablablabla". I have to restart Cedence to regain control.
Furthermore, this created defstruct seems to be global, whereas I created it inside a let. I'd like to keep it local though.
So my question is:
Is it possible to use defstructs in pcells?
If so, what am I doing wrong?
I'd realy like to use this method (table of defstructs) since it is very conveniant.
Any help is highly appreciated.
Thanks in advance,
Sjoerd