Beispiel #1
0
 /**
  * @return an NetNameProxy[][]. NetNameProxy[d][n] gives the nth net of the dth design.
  *     NetNameProxy[a][n] is NCC equivalent to NetNameProxy[b][n] for all a and b.
  */
 public NetNameProxy[][] getEquivalentNets() {
   int numDes = getNumNetlistsBeingCompared();
   NetNameProxy[][] equivNets = new NetNameProxy[numDes][];
   int numMatched = wireLeafRecs.numMatched();
   for (int i = 0; i < numDes; i++) {
     equivNets[i] = new NetNameProxy[numMatched];
   }
   int wireNdx = 0;
   for (Iterator<EquivRecord> it = wireLeafRecs.getMatched(); it.hasNext(); wireNdx++) {
     EquivRecord er = it.next();
     int cktNdx = 0;
     for (Iterator<Circuit> cit = er.getCircuits(); cit.hasNext(); cktNdx++) {
       Circuit ckt = cit.next();
       Job.error(ckt.numNetObjs() != 1, "not matched?");
       Wire w = (Wire) ckt.getNetObjs().next();
       equivNets[cktNdx][wireNdx] = w.getNameProxy().getNetNameProxy();
     }
   }
   return equivNets;
 }
Beispiel #2
0
 /**
  * @return an NodableNameProxy[][]. NodableNameProxy[d][n] gives the nth net of the dth design.
  *     NetNameProxy[a][n] is NCC equivalent to NetNameProxy[b][n] for all a and b.
  */
 public NodableNameProxy[][] getEquivalentNodes() {
   int numDes = getNumNetlistsBeingCompared();
   NodableNameProxy[][] equivParts = new NodableNameProxy[numDes][];
   int numMatched = partLeafRecs.numMatched();
   for (int i = 0; i < numDes; i++) {
     equivParts[i] = new NodableNameProxy[numMatched];
   }
   int partNdx = 0;
   for (Iterator<EquivRecord> it = partLeafRecs.getMatched(); it.hasNext(); partNdx++) {
     EquivRecord er = it.next();
     int cktNdx = 0;
     for (Iterator<Circuit> cit = er.getCircuits(); cit.hasNext(); cktNdx++) {
       Circuit ckt = cit.next();
       Job.error(ckt.numNetObjs() != 1, "not matched?");
       Part p = (Part) ckt.getNetObjs().next();
       equivParts[cktNdx][partNdx] = p.getNameProxy().getNodableNameProxy();
     }
   }
   return equivParts;
 }
Beispiel #3
0
 private EquivRecord buildEquivRec(int code, List<NccNetlist> nccNets) {
   boolean atLeastOneNetObj = false;
   List<Circuit> ckts = new ArrayList<Circuit>();
   for (NccNetlist nets : nccNets) {
     List<NetObject> netObjs = getNetObjs(code, nets);
     if (netObjs.size() != 0) atLeastOneNetObj = true;
     ckts.add(Circuit.please(netObjs));
   }
   if (!atLeastOneNetObj) return null;
   return EquivRecord.newLeafRecord(code, ckts, this);
 }