Examples of FamilyType


Examples of edu.byu.ece.rapidSmith.util.FamilyType

   
    HashMap<FamilyType, QTreeWidgetItem> familyItems = new HashMap<FamilyType, QTreeWidgetItem>();
    HashMap<String, QTreeWidgetItem> subFamilyItems = new HashMap<String, QTreeWidgetItem>();
   
    for(String partName : FileTools.getAvailableParts()){
      FamilyType type = PartNameTools.getFamilyTypeFromPart(partName);
      QTreeWidgetItem familyItem = familyItems.get(type);
      if(familyItem == null){
        familyItem = new QTreeWidgetItem(treeWidget);
        familyItem.setText(0, PartNameTools.getFormalFamilyNameFromType(type));
        familyItems.put(type, familyItem);
      }
      String subFamilyName = PartNameTools.getSubFamilyFromPart(partName);
      QTreeWidgetItem partItem = null;
      QTreeWidgetItem parent = familyItem;
      if(subFamilyName != null){
        QTreeWidgetItem subFamilyItem = subFamilyItems.get(type.toString() + subFamilyName);
        if(subFamilyItem == null){
          subFamilyItem = new QTreeWidgetItem(parent);
          subFamilyItem.setText(0, subFamilyName);
          subFamilyItems.put(type.toString() + subFamilyName, subFamilyItem);
        }
        parent = subFamilyItem;
      }
      partItem = new QTreeWidgetItem(parent);
      partItem.setText(0, partName);
View Full Code Here

Examples of edu.byu.ece.rapidSmith.util.FamilyType

    }
  }
 
 
  public static void main(String[] args) {
    FamilyType familyType = FamilyType.VIRTEX5;
    PrimitiveDefList list = FileTools.loadPrimitiveDefs(familyType);
   
    switch(familyType){
      case VIRTEX5:
        // Add missing IOB information
View Full Code Here

Examples of edu.byu.ece.rapidSmith.util.FamilyType

  public static void main(String[] args){
    //createTestBashScript("testRapidSmithFiles.sh");
    if(args.length < 2 && args.length > 3){
      MessageGenerator.briefMessageAndExit("USAGE: -<d|w|p (d:Device, w:WireEnumerator, p:PrimitiveDefs)> <partname|familyName> [-verbose]")
    }
    FamilyType familyType = null;
    long initial_usage, total_usage;
    long start, stop;
    Device dev;
    WireEnumerator we;
    PrimitiveDefList list;
   
    if(args[0].equals("-w") || args[0].equals("-p")){
      familyType = FamilyType.valueOf(args[1].toUpperCase());
    }
   
    // Measure Initial Heap Size
    Runtime rt = Runtime.getRuntime();
    System.gc();
    initial_usage = rt.totalMemory() - rt.freeMemory();

    // Start Timer
    start = System.nanoTime();

    if(args[0].equals("-d")){
      dev = FileTools.loadDevice(args[1]);
    }
    else if(args[0].equals("-w")){
      we = FileTools.loadWireEnumerator(familyType);
    }
    else if(args[0].equals("-p")){
      list = FileTools.loadPrimitiveDefs(familyType);
    }
   
    // Stop Timer
    stop = System.nanoTime();
   
    // Measure Final Heap Size
    System.gc();
    total_usage = rt.totalMemory() - rt.freeMemory() - initial_usage;

    // Print out header if verbose switch is passed in
    if(args.length > 2 && args[2].equals("-verbose")){
      System.out.println("--------------------------------------------------------------------")
      System.out.println("| Family    | Part Name       | File Size | Heap Usage | Load Time |");
      System.out.println("--------------------------------------------------------------------");
    }
   
    // Calculate file size
    long fileSize = 0;
    if(args[0].equals("-d")){
      fileSize = new File(FileTools.getDeviceFileName(args[1])).length();
    }
    else if(args[0].equals("-w")){
      fileSize = new File(FileTools.getWireEnumeratorFileName(familyType)).length();
    }
    else if(args[0].equals("-p")){
      fileSize = new File(FileTools.getPrimitiveDefsFileName(familyType)).length();
    }
   
    if(args[0].equals("-d")){
      System.out.printf(" %-12s %-16s   %6dKB       %4dMB     %6.3fs\n",
          familyType==null ? PartNameTools.getExactFamilyNameFromPart(args[1]) : familyType.toString().toUpperCase(),
          args[1],
          fileSize/1024,
          total_usage/(1024*1024),
          ((stop-start)/1000000000.0));
     
    }
    else{
      System.out.printf(" %-12s %-16s   %6dKB       %4.1fMB     %6.3fs\n",
          familyType==null ? PartNameTools.getExactFamilyNameFromPart(args[1]) : familyType.toString().toUpperCase(),
          " ",
          fileSize/1024,
          total_usage/(1024.0*1024.0),
          ((stop-start)/1000000000.0));
     
 
View Full Code Here

Examples of edu.byu.ece.rapidSmith.util.FamilyType

  public static WireEnumerator getInstance(FamilyType familyType){
    if(singleton == null){
      return singleton = new WireEnumerator();
    }
   
    FamilyType baseFamilyType =
      PartNameTools.getBaseTypeFromFamilyType(singleton.familyType);
    familyType = PartNameTools.getBaseTypeFromFamilyType(familyType);
    if(!baseFamilyType.equals(familyType)){
      singleton = new WireEnumerator();
    }
    return singleton;
  }
View Full Code Here

Examples of edu.byu.ece.rapidSmith.util.FamilyType

    if(type.equals(otherType)){
      return true;
    }
    // If its not an exact match, lets check if this site can accommodate
    // the otherType
    FamilyType baseFamilyType = tile.getDevice().getFamilyType();
    PrimitiveType[] compatibleTypes = compatibleTypesArray[baseFamilyType.ordinal()].get(otherType);
    if(compatibleTypes == null){
      return false;
    }
    // Check if this site is in the compatible type list for otherType
    // (NOTE: These arrays are generally very short, so hopefully this will
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.