Package edu.byu.ece.rapidSmith.design

Examples of edu.byu.ece.rapidSmith.design.Net


          break;
        }
        subModels[0].removeRows(0, subModels[0].rowCount());
        subModels[1].removeRows(0, subModels[1].rowCount());
       
        Net net = explorer.design.getNet(proxyModel.data(index.row(),0).toString());
        // Populate Pins
        for(Pin pin : net.getPins()){
          ArrayList<QStandardItem> items = new ArrayList<QStandardItem>();
          items.add(new DesignItem(pin.getPinType().toString().toLowerCase(), pin));
          items.add(createNewHyperlinkItem(pin.getInstanceName(), pin));
          items.add(new DesignItem(pin.getName(), pin));
          subModels[0].appendRow(items);
        }
        subViews[0].setSortingEnabled(true);
        subViews[0].sortByColumn(0, Qt.SortOrder.AscendingOrder);
        // Populate PIPs
        for(PIP pip : net.getPIPs()){
          ArrayList<QStandardItem> items = new ArrayList<QStandardItem>();
          items.add(createNewHyperlinkItem(pip.getTile().getName(), pip));
          items.add(new DesignItem(pip.getStartWireName(explorer.we), pip));
          items.add(new DesignItem(pip.getEndWireName(explorer.we), pip));
          subModels[1].appendRow(items);
View Full Code Here


            }
          }
        }
       
        // Find the correct net corresponding to this TIEOFF if it exists
        Net matchingNet = null;
        for(Net net : inst.getNetList()){
          if(net.getType().equals(ss.pin.getNet().getType()) && !net.getSource().getName().equals("KEEP1")){
            matchingNet = net;
            break;
          }
        }
        if(matchingNet == null){
          matchingNet = createNewNet(ss.pin.getNet(), ss.pin);
          finalStaticNets.add(matchingNet);
          inst.addToNetList(matchingNet);
          createAndAddPin(matchingNet, inst, true);
        }
        else{
          matchingNet.addPin(ss.pin);
          ss.pin.getInstance().addToNetList(matchingNet);
        }
      }
     
      for(StaticSink ss : ps.attemptTIEOFF){
        Instance inst = updateTIEOFF(ss.switchMatrixSink.tile, ss.pin.getNet(), false);
        // Special case with CLK pins BRAMs on Virtex5 devices, when competing for FANs against GND Nets
        if(dev.getFamilyType().equals(FamilyType.VIRTEX5)){
          int switchBoxSink = ss.switchMatrixSink.wire;     
         
          if(we.getWireName(ss.switchMatrixSink.getWire()).startsWith("BYP_B")){
            Node nn = new Node(inst.getTile(), we.getWireEnum(we.getWireName(switchBoxSink).replace("_B","")), null, 0);
            if(!addReservedGNDVCCNode(nn, ss.pin)){
              // we need to use a SLICE
              ps.useSLICE.add(ss);
              continue;
            }
          }
          else if(switchBoxSink == v5ctrlWires[0] || switchBoxSink == v5ctrlWires[1] || switchBoxSink == v5ctrlWires[2] || switchBoxSink == v5ctrlWires[3]){
            Node nn = new Node(inst.getTile(), we.getWireEnum(we.getWireName(switchBoxSink).replace("_B","")), null, 0);
            if(!addReservedGNDVCCNode(nn, ss.pin)){
              // we need to use a SLICE
              ps.useSLICE.add(ss);
              continue;
            }
          }else if(ss.pin.getInstance().getPrimitiveSite().getType().equals(PrimitiveType.DSP48E) && ss.pin.getName().contains("CEP")){
            Node nn = new Node(inst.getTile(), we.getWireEnum("CTRL1"), null, 0);
            if(!addReservedGNDVCCNode(nn, ss.pin)){
              // we need to use a SLICE
              ps.useSLICE.add(ss);
              continue;
            }
          }
          else if(ss.pin.getName().contains("ENBL")){
            Node nn = new Node(inst.getTile(), we.getWireEnum("CTRL2"), null, 0);
            if(!addReservedGNDVCCNode(nn, ss.pin)){
              // we need to use a SLICE
              ps.useSLICE.add(ss);
              continue;
            }
          }
        }
       
        Net matchingNet = null;
       
        // Find the correct net corresponding to this TIEOFF if it exists
        for(Net net : inst.getNetList()){
          if(net.getType().equals(ss.pin.getNet().getType()) && !net.getSource().getName().equals("HARD1")){
            matchingNet = net;
            break;
          }
        }
        if(matchingNet == null){
          matchingNet = createNewNet(ss.pin.getNet(), ss.pin);
          finalStaticNets.add(matchingNet);
          inst.addToNetList(matchingNet);
          createAndAddPin(matchingNet, inst, false);
        }
        else{
          matchingNet.addPin(ss.pin);
          ss.pin.getInstance().addToNetList(matchingNet);
        }
      }
     
      if(ps.useSLICE.size() > 0){
        ArrayList<Pin> gnds = new ArrayList<Pin>();
        ArrayList<Pin> vccs = new ArrayList<Pin>();
        for(StaticSink ss : ps.useSLICE){
          if(ss.pin.getNet().getType().equals(NetType.GND)){
            gnds.add(ss.pin);
          }
          else if(ss.pin.getNet().getType().equals(NetType.VCC)){
            vccs.add(ss.pin);
          }
        }   
       
        if(gnds.size() > 0){
          // Create the new net
          Net newNet = createNewNet(NetType.GND, gnds);
          finalStaticNets.add(newNet);

          // Create new instance of SLICE primitive to get source
          Instance currInst = findClosestAvailableSLICE(ps.useSLICE.get(0).switchMatrixSink.tile, NetType.GND);
          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);         
          }
        }
        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);
          }
        }
      }
    }
   
View Full Code Here

   * @param type NetType to create new net from
   * @param newPinList The new set of pins for the new net
   * @return The newly created net
   */
  private Net createNewNet(NetType type, ArrayList<Pin> newPinList){
    Net newNet = type.equals(NetType.VCC) ? new Net("GLOBAL_LOGIC1_" + netCount, type) : new Net("GLOBAL_LOGIC0_" + netCount, type) ;
    newNet.setPins(newPinList);
    netCount++;
    return newNet;
  }
View Full Code Here

   * @param staticNet Parent net to create new net from
   * @param newPin The new pin of the new net
   * @return The newly created net
   */
  private Net createNewNet(Net staticNet, Pin newPin){
    Net newNet = new Net();
    newNet.addPin(newPin);
    newPin.getInstance().addToNetList(newNet);
    newNet.setName(staticNet.getName() + "_" + netCount);
    newNet.setType(staticNet.getType());
    netCount++;
    return newNet;
  }
View Full Code Here

TOP

Related Classes of edu.byu.ece.rapidSmith.design.Net

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.