Is there a way to compare instances at certain coordinates. I
am making a program to create an Or-Chain with a user provided number
of inputs. I have the inputs and the number of orgates created
perfectly as well as the first level of routing. However, as I
progress to the second and third levels it would be easier to just use
a while loop and create the next routing level based on the instances
on a previous level.
Basically I am wondering if there is a command saying if the instance at (x,y) == " blahblah" then dbCreateInst(1 2 3).
Also if the command exists how is an instance compared? By name?
Nothing like this exists off the shelf.
There are several ways to do what you want. If you are building the array all at once, you can keep a list of the origin points (point cellName) so you can look up the cell which has been placed. Parse this list to decide your next cell.
The second way is to use dbGetTrueOvelaps at the point of placement to find the placement at that point.
Your comparison would be the cellName as the name is a logical instance name on the instance and not corresponding to the cell.
You may have to make some type of data structure which maps the previous placement to the next placement, I would probably make this an assoc list (placedCellName newCellName).
In reply to Austin CAD Guy:
Thanks. I think that keeping a list of each row would probably
be the easiest method, since the routing of the next level depends on
the entire previous row as opposed to just the point above it.
I'll look into the code for keeping a list and comparing instance names.