newNet.addPin(currStaticSourcePin);
}
else{
router.design.addInstance(currInst);
currInst.addToNetList(newNet);
Pin source = new Pin(true, slicePin, currInst);
newNet.addPin(source);
}
}
if(vccs.size() > 0){
// Create the new net
Net newNet = createNewNet(NetType.VCC, vccs);
finalStaticNets.add(newNet);
// Create new instance of SLICE primitive to get source
Instance currInst = findClosestAvailableSLICE(ps.useSLICE.get(0).switchMatrixSink.tile, NetType.VCC);
if(currStaticSourcePin != null){
currInst.addToNetList(newNet);
newNet.addPin(currStaticSourcePin);
}
else{
router.design.addInstance(currInst);
currInst.addToNetList(newNet);
Pin source = new Pin(true, slicePin, currInst);
newNet.addPin(source);
}
}
}
}
//===================================================================//
// Step 4: Finalize node reservations and re-order and assemble nets
// for router
//===================================================================//
for(Node n : reservedGNDVCCResources.keySet()){
Pin pinToReserve = reservedGNDVCCResources.get(n);
addReservedNode(n, pinToReserve.getNet());
}
finalStaticNets = orderGNDNetsFirst(finalStaticNets);
finalStaticNets.addAll(netList);
router.netList = finalStaticNets;