Examples of PrimitiveType


Examples of com.mattinsler.guiceymongo.data.generator.type.PrimitiveType

    builder.append(template.toString());
  }
 
  @Override
  public void createWrapperMethod(Appendable builder, PrimitiveProperty property, int indentCount) throws IOException {
    PrimitiveType type = property.getType();

    String s =
        "/**\n" +
        " * $p.comment$\n" +
        " */\n" +
View Full Code Here

Examples of com.sun.mirror.type.PrimitiveType

    }

    // Check suported types (int, long, float, String)
    TypeMirror field_type = field.getType();
    if ( field_type instanceof PrimitiveType ) {
      PrimitiveType field_type_prim = (PrimitiveType)field_type;
      PrimitiveType.Kind field_kind = field_type_prim.getKind();
      if ( field_kind != PrimitiveType.Kind.INT
           && field_kind != PrimitiveType.Kind.LONG
           && field_kind != PrimitiveType.Kind.FLOAT ) {
        throw new RuntimeException("Field " + field.getSimpleName() + " is not of type 'int', 'long' or 'float'");
      }
View Full Code Here

Examples of com.sun.mirror.type.PrimitiveType

    }

    // Check suported types (int, long, float, String)
    TypeMirror field_type = field.getType();
    if ( field_type instanceof PrimitiveType ) {
      PrimitiveType field_type_prim = (PrimitiveType)field_type;
      PrimitiveType.Kind field_kind = field_type_prim.getKind();
      if ( field_kind != PrimitiveType.Kind.INT
           && field_kind != PrimitiveType.Kind.LONG
           && field_kind != PrimitiveType.Kind.FLOAT
           && field_kind != PrimitiveType.Kind.BYTE ) {
        throw new RuntimeException("Field " + field.getSimpleName() + " is not of type 'int', 'long' or 'float'");
View Full Code Here

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

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

          }
        }
        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

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

        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

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

       
        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

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

    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

Examples of eu.admire.dispel.types.PrimitiveType

        if (result == null) result = caseCommentable(namespaceClassifierReference);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case TypesPackage.PRIMITIVE_TYPE: {
        PrimitiveType primitiveType = (PrimitiveType)theEObject;
        T result = casePrimitiveType(primitiveType);
        if (result == null) result = caseType(primitiveType);
        if (result == null) result = caseTypeReference(primitiveType);
        if (result == null) result = caseCommentable(primitiveType);
        if (result == null) result = defaultCase(theEObject);
View Full Code Here

Examples of eu.admire.dispel.types.PrimitiveType

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetPrimitiveType(PrimitiveType newPrimitiveType, NotificationChain msgs) {
    PrimitiveType oldPrimitiveType = primitiveType;
    primitiveType = newPrimitiveType;
    if (eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ReferencesPackage.PRIMITIVE_TYPE_REFERENCE__PRIMITIVE_TYPE, oldPrimitiveType, newPrimitiveType);
      if (msgs == null) msgs = notification; else msgs.add(notification);
    }
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.