Package edu.byu.ece.rapidSmith.device

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


        for(String primitiveSiteName : familyDir.list()){
          File primitiveDir = new File(familyDir.getAbsoluteFile() + File.separator + primitiveSiteName);
          checkDir(primitiveDir);
          for(String primitiveName : primitiveDir.list()){
            String fileName = primitiveDir.getAbsoluteFile() + File.separator + primitiveName;
            PrimitiveType type = Utils.createPrimitiveType(primitiveName.replace(".txt", ""));
            bw.write("\t\tmap = new HashMap<String, String>();" + nl);
            bw.write("\t\tpatch.put(PrimitiveType."+type+", map);" + nl);
            ArrayList<String> lines = FileTools.getLinesFromTextFile(fileName);
            for(String line : lines){
              String[] tokens = line.split("[(\\s)]+");
View Full Code Here


          }
        }
        state = ParserState.INSTANCE_TYPE;
        break;
      case INSTANCE_TYPE:
          PrimitiveType t = Utils.createPrimitiveType(token);
          if(t == null){
            MessageGenerator.briefErrorAndExit("XDL Design Parser Error in file: "+ fileName +", Failed parsing Instance type: \"" + token + "\"");
          }
          currInstance.setType(t);
          state = ParserState.INSTANCE_PLACED;
View Full Code Here

        if(addComments){
          int sliceCount = 0;
          int bramCount = 0;
          int dspCount = 0;
          for(Instance instance : instances.values()){
            PrimitiveType type = instance.getType();
            if(sliceTypes.contains(type)){
              sliceCount++;
            }
            else if(dspTypes.contains(type)){
              dspCount++;
            }
            else if(bramTypes.contains(type)){
              bramCount++;
            }
          }
         
          bw.write("# ======================================================="+nl);
          bw.write("# SUMMARY"+nl);
          bw.write("# Number of Module Defs: " + modules.size() + nl);
          bw.write("# Number of Module Insts: " + moduleInstances.size() + nl);
          bw.write("# Number of Primitive Insts: "+ instances.size() +nl);
          bw.write("#     Number of SLICES: "+ sliceCount +nl);
          bw.write("#     Number of DSP48s: "+ dspCount +nl);
          bw.write("#     Number of BRAMs: "+ bramCount +nl);
          bw.write("# Number of Nets: " + nets.size() + nl);
          bw.write("# ======================================================="+nl+nl+nl);
        }
      }
      else{
        if(addComments){
          Module mod = getHardMacro();
          bw.write("# ======================================================="+nl);
          bw.write("# MACRO SUMMARY"+nl);
          bw.write("# Number of Module Insts: " + mod.getInstances().size() + nl);
          HashMap<PrimitiveType,Integer> instTypeCount = new HashMap<PrimitiveType,Integer>();
          for(Instance inst : mod.getInstances()){
            Integer count = instTypeCount.get(inst.getType());
            if(count == null){
              instTypeCount.put(inst.getType(),1);
            }
            else{
              count++;
              instTypeCount.put(inst.getType(),count);
            }
          }
          for(PrimitiveType type : instTypeCount.keySet()){
            bw.write("#   Number of " + type.toString() + "s: " + instTypeCount.get(type) + nl);
          }
          bw.write("# Number of Module Ports: " + mod.getPorts().size() + nl);
          bw.write("# Number of Module Nets: "+ mod.getNets().size() +nl);
          bw.write("# ======================================================="+nl+nl+nl);
        }
View Full Code Here

       
        int sliceCount = 0;
        int bramCount = 0;
        int dspCount = 0;
        for(Instance instance : instances.values()){
          PrimitiveType type = instance.getType();
          if(sliceTypes.contains(type)){
            sliceCount++;
          }
          else if(dspTypes.contains(type)){
            dspCount++;
          }
          else if(bramTypes.contains(type)){
            bramCount++;
          }
        }
       
        bw.write("# ======================================================="+nl);
        bw.write("# SUMMARY"+nl);
        bw.write("# Number of Module Defs: " + modules.size() + nl);
        bw.write("# Number of Module Insts: " + moduleInstances.size() + nl);
        bw.write("# Number of Primitive Insts: "+ instances.size() +nl);
        bw.write("#     Number of SLICES: "+ sliceCount +nl);
        bw.write("#     Number of DSP48s: "+ dspCount +nl);
        bw.write("#     Number of BRAMs: "+ bramCount +nl);
        bw.write("# Number of Nets: " + nets.size() + nl);
        bw.write("# ======================================================="+nl+nl+nl);
      }
      else{
        Module mod = getHardMacro();
        bw.write("# ======================================================="+nl);
        bw.write("# MACRO SUMMARY"+nl);
        bw.write("# Number of Module Insts: " + mod.getInstances().size() + nl);
        HashMap<PrimitiveType,Integer> instTypeCount = new HashMap<PrimitiveType,Integer>();
        for(Instance inst : mod.getInstances()){
          Integer count = instTypeCount.get(inst.getType());
          if(count == null){
            instTypeCount.put(inst.getType(),1);
          }
          else{
            count++;
            instTypeCount.put(inst.getType(),count);
          }
        }
        for(PrimitiveType type : instTypeCount.keySet()){
          bw.write("#   Number of " + type.toString() + "s: " + instTypeCount.get(type) + nl);
        }
        bw.write("# Number of Module Ports: " + mod.getPorts().size() + nl);
        bw.write("# Number of Module Nets: "+ mod.getNets().size() +nl);
        bw.write("# ======================================================="+nl+nl+nl);
      }
View Full Code Here

    UPPERCASE = UPPERCASE.substring(0, UPPERCASE.indexOf(" RANGE="));
    String group_name = c.substring(UPPERCASE.indexOf("AREA_GROUP ") + 12, UPPERCASE.length() - 1);
//    System.out.println("parseAreaGroupRange(): group_name:" + group_name);
   
    String range_type_string;
    PrimitiveType range_type;
    int ll_x = Integer.parseInt(range_string.substring(range_string.indexOf("X") + 1, range_string.indexOf("Y")));
    int ll_y = Integer.parseInt(range_string.substring(range_string.indexOf("Y") + 1, range_string.indexOf(":")));
    int ur_x = Integer.parseInt(range_string.substring(range_string.lastIndexOf("X") + 1, range_string.lastIndexOf("Y")));
    int ur_y = Integer.parseInt(range_string.substring(range_string.lastIndexOf("Y") + 1, range_string.length()));
   
View Full Code Here

TOP

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

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.