Exemplo n.º 1
0
 private boolean findUnknownGateDepthOnInputs(Component component) {
   for (Port port : component.getPorts()) {
     // assert (port.isConnected() &&
     // this.exitToGateDepthMap.containsKey(port.getBus().getOwner()));
     if (port.isConnected() && !exitToGateDepthMap.containsKey(port.getBus().getOwner())) {
       unresolvedGateDepthComponents.push(component);
       return true;
     }
   }
   return false;
 }
Exemplo n.º 2
0
 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;
 }