Exemple #1
0
  /**
   * Method to call a series of routines which convert the hierarchical network description into a
   * flattened database representation. The actual simulation must take place on the flattened
   * network. Returns true on error.
   */
  boolean flattenNetwork(Cell cell) {
    /*
     * create a "dummy" level to use as a mixed signal destination for plotting and
     * screen display.  This level should be bypassed for structure checking and general
     * simulation, however, so in the following code, references to "als.cellRoot"
     * have been changed to als.cellRoot.next (pointing to mainCell).
     * Peter Gallant July 16, 1990
     */
    als.cellRoot = new ALS.Connect();
    als.cellRoot.instName = "[MIXED_SIGNAL_LEVEL]";
    als.cellRoot.modelName = als.cellRoot.instName;
    als.cellRoot.exList = new ArrayList<ALS.ALSExport>();
    als.cellRoot.parent = null;
    als.cellRoot.child = null;
    als.cellRoot.next = null;
    ALS.Connect tempRoot = als.cellRoot;

    // get upper-case version of main proto
    String mainName = cell.getName().toUpperCase();

    als.cellRoot = new ALS.Connect();
    als.cellRoot.instName = mainName;
    als.cellRoot.modelName = als.cellRoot.instName;
    als.cellRoot.exList = new ArrayList<ALS.ALSExport>();
    als.cellRoot.parent = null;
    als.cellRoot.child = null;
    als.cellRoot.next = null;

    // these lines link the mixed level as the head followed by mainCell PJG
    tempRoot.next = als.cellRoot; // shouldn't this be null? ... smr
    tempRoot.child = als.cellRoot;
    als.cellRoot = tempRoot;

    // this code checks to see if model mainCell is present in the netlist PJG
    ALS.Model modHead = findModel(mainName);
    if (modHead == null) return true;
    for (ALS.ALSExport exHead : modHead.exList) {
      findXRefEntry(als.cellRoot.next, (String) exHead.nodeName);
    }

    if (flattenModel(als.cellRoot.next)) return true;

    for (ALS.Node nodeHead : als.nodeList) {
      if (nodeHead.load < 1) nodeHead.load = 1;
    }
    return false;
  }
Exemple #2
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;
  }