Пример #1
0
 /**
  * Method to make an entry into the primitive input table for the specified node. This table keeps
  * track of the primitives which use this node as an input for event driven simulation. Returns
  * true on error.
  *
  * <p>Calling Arguments: modHead = pointer to the model structure from which the primitive is
  * being created nodeName = pointer to a char string containing the name of the node whose input
  * list is being updated nodeHead = pointer to the node data structure allocated for this node
  */
 private void createPinEntry(ALS.Model modHead, String nodeName, ALS.Node nodeHead) {
   for (ALS.Load pinPtr1 : nodeHead.pinList) {
     if (pinPtr1.ptr == primPtr2) return;
   }
   ALS.Load pinPtr2 = new ALS.Load();
   pinPtr2.ptr = primPtr2;
   nodeHead.pinList.add(pinPtr2);
   nodeHead.load += findLoadValue(modHead, nodeName);
 }
Пример #2
0
 /**
  * Method to make an entry into the database for an output which is connected to the specified
  * node. Statistics are maintained for each output that is connected to a node. Returns zero on
  * error.
  *
  * <p>Calling Arguments: modHead = pointer to the model structure from which the primitive is
  * being created nodeName = pointer to a char string containing the name of the node whose output
  * list is being updated nodeHead = pointer to the node data structure allocated for this node
  */
 private ALS.Stat createStatEntry(ALS.Model modHead, String nodeName, ALS.Node nodeHead) {
   for (Stat statPtr1 : nodeHead.statList) {
     if (statPtr1.primPtr == primPtr2) return statPtr1;
   }
   ALS.Stat statPtr2 = new ALS.Stat();
   statPtr2.primPtr = primPtr2;
   statPtr2.nodePtr = nodeHead;
   nodeHead.statList.add(statPtr2);
   nodeHead.load += findLoadValue(modHead, nodeName);
   return statPtr2;
 }
Пример #3
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;
  }
Пример #4
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;
  }