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; }
private int getMaxInputGateDepth(Component component) { int maxGateDepth = 0; component = (component instanceof InBuf) ? component.getOwner() : component; for (Port port : component.getPorts()) { if (port == component.getClockPort() || port == component.getResetPort()) { continue; } int gateDepth = port.isConnected() ? exitToGateDepthMap.get(port.getBus().getOwner()).intValue() : 0; maxGateDepth = Math.max(maxGateDepth, gateDepth); } return maxGateDepth; }