/** * Method to step through the event driving input list for a function and enters the function into * the primitive input list for the particular node. In addition to this task the procedure sets * up the calling argument node list for the function when it is called. Returns true on error. * * <p>Calling Arguments: cellHead = pointer to the cross reference data structure for the model * that is going to be flattened modHead = pointer to the data structure containing the * hierarchical node references */ private boolean processFunction(ALS.Connect cellHead, ALS.Model modHead) { primPtr2 = new ALS.Model(modHead.name, 'F'); primPtr2.ptr = new ALS.Func(); primPtr2.priority = modHead.priority; primPtr2.level = als.computePathName(cellHead); als.primList.add(primPtr2); ALS.Func funcHead = (ALS.Func) modHead.ptr; ALS.Func funcPtr2 = (ALS.Func) primPtr2.ptr; funcPtr2.procPtr = ALS.UserProc.getFunctionAddress(modHead.name); if (funcPtr2.procPtr == null) return true; funcPtr2.inList = new ArrayList<ALS.ALSExport>(); funcPtr2.delta = funcHead.delta; funcPtr2.linear = funcHead.linear; funcPtr2.exp = funcHead.exp; funcPtr2.abs = funcHead.abs; funcPtr2.random = funcHead.random; funcPtr2.userPtr = null; for (ALS.ALSExport exHead : modHead.exList) { ALS.ALSExport xRefHead = findXRefEntry(cellHead, (String) exHead.nodeName); als.exPtr2 = new ALS.ALSExport(); if (exHead.nodePtr != null) { als.exPtr2.nodeName = createStatEntry(modHead, (String) exHead.nodeName, xRefHead.nodePtr); } else { als.exPtr2.nodeName = null; } als.exPtr2.nodePtr = xRefHead.nodePtr; primPtr2.exList.add(als.exPtr2); } for (ALS.ALSExport exHead : funcHead.inList) { ALS.ALSExport xRefHead = findXRefEntry(cellHead, (String) exHead.nodeName); als.exPtr2 = new ALS.ALSExport(); als.exPtr2.nodePtr = xRefHead.nodePtr; primPtr2.exList.add(als.exPtr2); createPinEntry(modHead, (String) exHead.nodeName, xRefHead.nodePtr); } return false; }
/** * Method to step through the gate truth tables and examines all node references to insure that * they have been included in the cross reference table for the model. Returns true on error. * * <p>Calling Arguments: cellHead = pointer to the cross reference data structure for the model * that is going to be flattened modHead = pointer to the dtat structure containing the * hierarchical node references */ private void processGate(ALS.Connect cellHead, ALS.Model modHead) { primPtr2 = new ALS.Model(modHead.name, 'G'); primPtr2.fanOut = modHead.fanOut; primPtr2.priority = modHead.priority; primPtr2.level = als.computePathName(cellHead); als.primList.add(primPtr2); ALS.Row rowHead = (ALS.Row) modHead.ptr; ALS.Row last = null; while (rowHead != null) { ALS.Row rowPtr2 = new ALS.Row(); rowPtr2.inList = new ArrayList<Object>(); rowPtr2.outList = new ArrayList<Object>(); rowPtr2.delta = rowHead.delta; rowPtr2.linear = rowHead.linear; rowPtr2.exp = rowHead.exp; rowPtr2.abs = rowHead.abs; rowPtr2.random = rowHead.random; rowPtr2.delay = rowHead.delay; if (rowHead.delay == null) rowPtr2.delay = null; else rowPtr2.delay = rowHead.delay; rowPtr2.next = null; if (last == null) { primPtr2.ptr = rowPtr2; } else { last.next = rowPtr2; } last = rowPtr2; als.ioPtr1 = rowPtr2.inList; processIOEntry(modHead, cellHead, rowHead.inList, 'I'); als.ioPtr1 = rowPtr2.outList; processIOEntry(modHead, cellHead, rowHead.outList, 'O'); rowHead = rowHead.next; } }