private String showComponent(Component comp) { String ret = comp.toString(); for (Port port : comp.getPorts()) { String value = port.getValue() == null ? "null" : port.getValue().debug(); if (port == comp.getGoPort() || port == comp.getClockPort() || port == comp.getResetPort()) ; else ret = ret + " p:" + value; /* * if (port == getGoPort()) ret = ret + " go:" + val; else if (port * == getClockPort()) ret = ret + " ck:" + val; else if (port == * getResetPort()) ret = ret + " rs:" + val; else ret = ret + " p:" * + val; */ } for (Exit exit : comp.getExits()) { for (Bus bus : exit.getBuses()) { String value = bus.getValue() == null ? "null" : bus.getValue().debug(); if (bus == exit.getDoneBus()) // ret = ret + " done:" + val; ; else ret = ret + " data:" + value; } } return ret; }
/** Responsible for traversing within a Module */ @Override protected void traverse(Module module) { // Define all feedback points as having 0 depth on their exits // in order to break the iterative computation. for (Component comp : module.getFeedbackPoints()) { for (Exit exit : comp.getExits()) { exitToGateDepthMap.put(exit, new Integer(0)); } } if (!findUnknownGateDepthOnInputs(module)) { if (_schedule.db) _schedule.ln(_schedule.GDA, "Module Traversal " + module); if (isForward()) { traverseModuleForward(module, module.getFeedbackPoints()); } else { traverseModuleReverse(module, module.getFeedbackPoints()); } LinkedList<Component> revisitComponents = new LinkedList<Component>(); while (true) { while (!unresolvedGateDepthComponents.isEmpty()) { if (unresolvedGateDepthComponents.peek().getOwner() == module) { revisitComponents.add(unresolvedGateDepthComponents.pop()); } else { break; } } if (revisitComponents.isEmpty()) { break; } revisitUnknownGateDepthComponents(revisitComponents); } } }