Esempio n. 1
0
  /**
   * Method to step through the connection list specified by the connection list pointer (conHead).
   * Values are entered into the cross reference table for the present level of hierarchy and new
   * data structures are created for the lower level of hierarchy to store their cross reference
   * tables. Returns true on error.
   *
   * <p>Calling Arguments: cellHead = pointer to the cross reference data structure for the model
   * that is going to be flattened conHead = pointer to a list of connection statements for the
   * model that is being flattened by this procedure
   */
  private boolean processConnectList(ALS.Connect cellHead, ALS.Connect conHead) {
    while (conHead != null) {
      ALS.Connect cellPtr2 = new ALS.Connect();
      cellPtr2.instName = conHead.instName;
      cellPtr2.modelName = conHead.modelName;
      cellPtr2.exList = new ArrayList<ALS.ALSExport>();
      cellPtr2.parent = cellHead;
      cellPtr2.child = null;
      cellPtr2.next = cellHead.child;
      cellHead.child = cellPtr2;

      ALS.Model modHead = findModel(conHead.modelName);
      if (modHead == null) return true;
      Iterator<ALS.ALSExport> it = modHead.exList.iterator();
      for (ALS.ALSExport exHead : conHead.exList) {
        if (!it.hasNext()) break;
        als.exPtr2 = it.next();
        ALS.ALSExport xRefHead = findXRefEntry(cellHead, (String) exHead.nodeName);

        if (als.exPtr2 == null) {
          System.out.println(
              "Insufficient parameters declared for model '" + conHead.modelName + "' in netlist");
          return true;
        }

        for (ALS.ALSExport xRefPtr1 : cellPtr2.exList) {
          if (xRefPtr1.nodeName.equals(als.exPtr2.nodeName)) {
            System.out.println(
                "Node '"
                    + als.exPtr2.nodeName
                    + "' in model '"
                    + conHead.modelName
                    + "' connected more than once");
            return true;
          }
        }
        ALS.ALSExport xRefPtr2 = new ALS.ALSExport();
        xRefPtr2.nodeName = als.exPtr2.nodeName;
        xRefPtr2.nodePtr = xRefHead.nodePtr;
        cellPtr2.exList.add(xRefPtr2);
      }

      conHead = conHead.next;
    }
    return false;
  }
Esempio n. 2
0
  /**
   * Method to return the flattened database node number for the specified model and node name.
   *
   * <p>Calling Arguments: cellHead = pointer to the xref table for the model being processed name =
   * pointer to a char string containing the node name
   */
  private ALS.ALSExport findXRefEntry(ALS.Connect cellHead, String name) {
    for (ALS.ALSExport xRefPtr1 : cellHead.exList) {
      if (xRefPtr1.nodeName.equals(name)) return xRefPtr1;
    }
    ALS.ALSExport xRefPtr2 = new ALS.ALSExport();
    xRefPtr2.nodeName = name;
    cellHead.exList.add(xRefPtr2);

    ALS.Node nodePtr2 = new ALS.Node();
    nodePtr2.cellPtr = cellHead;
    nodePtr2.statList = new ArrayList<Stat>();
    nodePtr2.pinList = new ArrayList<ALS.Load>();
    nodePtr2.load = -1;
    nodePtr2.visit = 0;
    nodePtr2.traceNode = false;
    als.nodeList.add(nodePtr2);
    xRefPtr2.nodePtr = nodePtr2;
    return xRefPtr2;
  }