Package edu.byu.ece.rapidSmith.device

Examples of edu.byu.ece.rapidSmith.device.PrimitiveSite


         
            break;
          case 6:
            System.out.println("Enter tile name: ");
            String siteName = br.readLine().trim();
            PrimitiveSite site = dev.getPrimitiveSite(siteName);
            if(site == null){
              System.out.println("No primitive site called \"" + siteName +  "\" exists.");
            }
            else {
              System.out.println(site.getTile());
            }
            break;
          case 7:
            System.exit(0);
           
View Full Code Here


    int maxY = yAvg+1;
    int minX = xAvg-1;
    int minY = yAvg;
    direction dir = direction.down;
   
    PrimitiveSite s = null;
   
    while(true){
      if((s = design.getDevice().getPrimitiveSites().get("SLICE_X" + Integer.toString(x) + "Y" + Integer.toString(y)))!=null){       
        if(!sliceLocations.contains(s)){
            slice.place(s);
View Full Code Here

              token + " on line " + lineNumber);
        }
        state = ParserState.INSTANCE_SITE;
        break;
      case INSTANCE_SITE:
        PrimitiveSite site = dev.getPrimitiveSite(token);
        if(site == null){
          MessageGenerator.briefErrorAndExit("XDL Design Parser Error in file: "+ fileName +", Invalid primitive site " +
              token + " on line " + lineNumber);
        }
        if(currModule != null){
View Full Code Here

    if(proposedAnchorSite == null || dev == null){
      return false;
    }

    // Do some error checking on the newAnchorSite
    PrimitiveSite p = anchor.getPrimitiveSite();
    Tile t = proposedAnchorSite.getTile();
    PrimitiveSite newValidSite = Device.getCorrespondingPrimitiveSite(p, anchor.getType(), t);
    if(!proposedAnchorSite.equals(newValidSite)){
      return false;
    }
   
    //=======================================================//
    /* Check instances at proposed location                  */
    //=======================================================//
    for(Instance inst : getInstances()){
      PrimitiveSite templateSite = inst.getPrimitiveSite();
      Tile newTile = getCorrespondingTile(templateSite.getTile(), proposedAnchorSite.getTile(), dev);
      if(newTile == null){
        return false;
      }
      if(Device.getCorrespondingPrimitiveSite(templateSite, inst.getType(), newTile) == null){
        return false;
View Full Code Here

   * location.
   * @return A list of valid anchor sites for the module instance to be placed.
   */
  public ArrayList<PrimitiveSite> getAllValidPlacements(){
    ArrayList<PrimitiveSite> validSites = new ArrayList<PrimitiveSite>();
    PrimitiveSite originalSite = getAnchor().getPrimitiveSite();
    Design design = getDesign();
    PrimitiveSite[] sites = design.getDevice().getAllCompatibleSites(getAnchor().getType());
    for(PrimitiveSite newAnchorSite : sites){
      if(place(newAnchorSite, design.getDevice())){
        validSites.add(newAnchorSite);
View Full Code Here

    if(newAnchorSite == null || dev == null){
      return false;
    }
   
    // Do some error checking on the newAnchorSite
    PrimitiveSite p = module.getAnchor().getPrimitiveSite();
    Tile t = newAnchorSite.getTile();
    PrimitiveSite newValidSite = Device.getCorrespondingPrimitiveSite(p, module.getAnchor().getType(), t);
    if(!newAnchorSite.equals(newValidSite)){
      //MessageGenerator.briefError("New anchor site (" + newAnchorSite.getName() +
      //    ") is incorrect.  Should be " + newValidSite.getName());
      //this.unplace();
      return false;
    }
   
    // save original placement in case new placement is invalid
    HashMap<Instance, PrimitiveSite> originalSites;
    originalSites = isPlaced() ? new HashMap<Instance, PrimitiveSite>() : null;

    //=======================================================//
    /* Place instances at new location                       */
    //=======================================================//
    for(Instance inst : instances){
      PrimitiveSite templateSite = inst.getModuleTemplateInstance().getPrimitiveSite();
      Tile newTile = module.getCorrespondingTile(templateSite.getTile(), newAnchorSite.getTile(), dev);
      PrimitiveSite newSite = Device.getCorrespondingPrimitiveSite(templateSite, inst.getType(), newTile);

      if(newSite == null){
        //MessageGenerator.briefError("ERROR: No matching primitive site found." +
        //  " (Template Primitive:"  + templateSite.getName() +
        //  ", Template Tile:" + templateSite.getTile() +
View Full Code Here

    }
    return true;
  }
 
  public static PrimitiveSite readPrimitiveSite(Hessian2Input dis, Device device, ArrayList<HashMap<String,Integer>> primitivePinMaps, PrimitiveType[] typeValues){
    PrimitiveSite p = new PrimitiveSite();
   
    try {
      p.setName(dis.readString());
      p.setType(typeValues[dis.readInt()]);
      Tile t = device.getTile(dis.readInt());
      p.setTile(t);
      p.setPins(primitivePinMaps.get(dis.readInt()));

    } catch (IOException e) {
      return null;
    }
    return p;
View Full Code Here

TOP

Related Classes of edu.byu.ece.rapidSmith.device.PrimitiveSite

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.