Alexandre Rusev <cybe...@gmail.com>: Nov 28 07:11PM +0300
Converted MOCMOS tech to library, then removed scalable and NPN transistors
and and encountered the same issue for *all* resistors:
Number of cut-s supposed to be different for different size-of-resistor
examples due to infer scaling rules for amount of vias later.
But current implementation of associateExamples(...) verifies that number
of instances of "similar layer" is the same in all examples.
This equality is intentionally NOT right for cuts in resistor examples ,
and possibly also not right for vias in case of capacitors
What is right approach to fix it?
Cell node-Hi-Res-Poly2-Resistor{lay}, node artwork:Filled-Box[art@23]: *Layer
Poly-Cut found 2 times in main example, 6 in others*
Failed to convert the library to a technology
private boolean associateExamples(List<Example> neList, Cell np)
{
// if there is only one example, no association
if (neList.size() <= 1) return false;
// associate each example "ne" with the original in "neList"
Example firstEx = neList.get(0);
for(int n=1; n<neList.size(); n++)
{
Example ne = neList.get(n);
// clear associations for every sample "ns" in the example "ne"
for(Sample ns : ne.samples)
ns.assoc = null;
// associate every sample "ns" in the example "ne"
for(Sample ns : ne.samples)
{
if (ns.assoc != null) continue;
// cannot have center in other examples
if (ns.layer == Generic.tech().cellCenterNode)
{
error.markError(ns.node, np, "Grab point should only be in main example");
return true;
}
// count number of similar layers in original example "neList"
int total = 0;
Sample nsFound = null;
for(Sample nsList : firstEx.samples)
{
if (nsList.layer != ns.layer) continue;
total++;
nsFound = nsList;
}
// no similar layer found in the original: error
if (total == 0)
{
error.markError(ns.node, np, "Layer " + Info.getSampleName(ns.layer) + "
not found in main example");
return true;
}
// just one in the original: simple association
if (total == 1)
{
ns.assoc = nsFound;
continue;
}
// if it is a port, associate by port name
if (ns.layer == Generic.tech().portNode)
{
String name = Info.getPortName(ns.node);
if (name == null)
{
error.markError(ns.node, np, "Port does not have a name");
return true;
}
// search the original for that port
boolean found = false;
for(Sample nsList : firstEx.samples)
{
if (nsList.layer == Generic.tech().portNode)
{
String otherName = Info.getPortName(nsList.node);
if (otherName == null)
{
error.markError(nsList.node, np, "Port does not have a name");
return true;
}
if (!name.equalsIgnoreCase(otherName)) continue;
ns.assoc = nsList;
found = true;
break;
}
}
if (!found)
{
error.markError(null, np, "Could not find port " + name + " in all
examples");
return true;
}
continue;
}
// count the number of this layer in example "ne"
int i = 0;
for(Sample nsList : ne.samples)
{
if (nsList.layer == ns.layer) i++;
}
// if number of similar layers differs: error
if (total != i)
{
*error.markError(ns.node, np, "Layer " + Info.getSampleName(ns.layer) + "
found " + total + " times in main example, " + i + " in others");*
return true;
}
[image: image.png]
|