I found an annoying behavior (bug?) of rodGetObj(...)
For IC6 I implemented a new VXL interface for layout generators (pcells which display generated/stored layout), which avoids wrapping menus. Unfortunately, all cells which are generated over this new interface (e.g. pick from schematic) don't have ROD handles, which are needed for higher level generators...
I seems, that rodGetObj("" cellView) does not create the ROD-object in the specified cellView but in pcCellView, when called from the body of a pcell...
In the documentation there is a note, that the second argument (cellView) is optional, if rodGetObj(..) is called from pcell context.
So I was sure that "optional" means something different from "is beeing ignored", isn't it?
My question is: Is this behavior intended? Is there a workaround (e.g pretend non-pcell context)?
rodGetObj works as documented. The first argument is the shape ROD name, the second argument is a cellView ID for the search. The ROD name can be hierarchical INV1/M1/leftDiffPin. rodShape = rodGetObj("M14/leftDiffPin") or rodShape = rodGetObj( "leftDiffPin" instId) are the same (provided instId points to the M14 instance). Use rodGetNamedShapes to find the ROD shapes in your cellView.
ROD applies to shapes and not to instances. If you are using rodAlign to align the instances, you have to pick a ROD shape in the instance. The shape has handles on it. You can use rodNameShape to create a ROD object from an existing shape.
If you are using instances, you possibly would want to use the prBoundary object (not a ROD shape) as your abutment/alignment object. Since it is a design object, I don't think it can be a ROD shape. Use the bBox to calculate the edges.
If you want to use rodAlign, create a recognition layer rectangle ROD shape and have use its handles to align.
In reply to Austin CAD Guy:
You can make a master a ROD object using rodGetObj. Inside the pcell you have to open the cellView master for append and add the RODness and handles directly to the master:
cv2 = dbOpenCellViewByType( "PDK_devices" "rodTest2" "layout" "maskLayout" "a" ) newObj = rodGetObj( "" cv2 ) rodCreateHandle( ?name "alignLowerLeft" ?rodObj cv2 ?type "point" ?value car(cv2~>bBox) ) dbSave( cv2 )
The master has to be open for edit, you only have to create the handle(s) once in the master, all other instances will have that handle.
I tried this compact code also inside if my pcell code... and cv2 still has ROD handles after re-opening. (modification: behind ?rodObj I put newObj instead of cv2) That means ROD should be o.k.
So I need to look deeper, why my ROD handles vanish, when the generator was called from the pcell. Basically I do exactly the same in my code. Before the dbSave I still have handles, but if I re-open the layout later from the libManager I don't find userHandles...
we made an error!
Please put a dbPurge(cv2) after dbSave(cv2) and look later if you find any userHandle!
If this few lines are called from a pcell then the RODId is not stored.
It seems that I have to report this as a bug.
My problem is that I have no workaround right now. Replacing ROD by own functionality is a lot of work...