Package edu.byu.ece.rapidSmith.device

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


    // Determine which columns and rows to not draw
    TreeSet<Integer> colsToSkip = new TreeSet<Integer>();
    TreeSet<Integer> rowsToSkip = new TreeSet<Integer>();
    for(Tile[] tileRow : device.getTiles()){
      for(Tile tile : tileRow){
        TileType type = tile.getType();
        if(tileColumnTypesToHide.contains(type)){
          colsToSkip.add(tile.getColumn());
        }
        if(tileRowTypesToHide.contains(type)){
          rowsToSkip.add(tile.getRow());
        }
      }
    }
   
    // Create new tile layout without hidden tiles
    int i=0,j=0;
    drawnTiles = new Tile[rows-rowsToSkip.size()][cols-colsToSkip.size()];
    tileXMap = new HashMap<Tile, Integer>();
    tileYMap = new HashMap<Tile, Integer>();
    for(int row = 0; row < rows; row++) {
      if(rowsToSkip.contains(row)) continue;
      for (int col = 0; col < cols; col++) {
        if(colsToSkip.contains(col)) continue;
        Tile tile = device.getTile(row, col);
        drawnTiles[i][j] = tile;
        tileXMap.put(tile, j);
        tileYMap.put(tile, i);
        j++;
      }
      i++;
      j=0;
    }
    rows = rows-rowsToSkip.size();
    cols = cols-colsToSkip.size();
   
    //Draw dashed lines where rows/columns have been removed
    QPen missingTileLinePen = new QPen(QColor.lightGray, 2, PenStyle.DashLine);
    painter.setPen(missingTileLinePen);
    i = 0;
    for(int col : colsToSkip){
      int realCol = col - i;
      painter.drawLine(tileSize*realCol-1, 0, tileSize*realCol-1, rows*tileSize-3);
      i++;
    }
    i=0;
    for(int row : rowsToSkip){
      int realRow = row - i;
      painter.drawLine(0,tileSize*realRow-1, cols*tileSize-3,tileSize*realRow-1);
      i++;
    }
   
    // Draw the tile layout
    int offset = (int) Math.ceil((lineWidth / 2.0));
   
    for(int y = 0; y < rows; y++){
      for(int x = 0; x < cols; x++){
        Tile tile = drawnTiles[y][x];
        TileType tileType = tile.getType();

        // Set pen color based on current tile
        QColor color = TileColors.getSuggestedTileColor(tile);
        painter.setPen(color);
       
View Full Code Here


          / scene.tileSize);
      if (x >= scene.cols || y >= scene.rows || x < 0 || y < 0){
        System.out.println("ERROR - Moved out of bounds:"+this.moduleInstance.getName());
        break;
      }
      TileType myType = hmTile.getTile().getType();
      //if (myType.toString().startsWith("DSP")
      //    || myType.toString().startsWith("BRAM")) {
      //  y += 3;
      //}
      //TileType devType = fpScene.device.getTile(y, x).getType();
     
      occupiedTilesX.add(x);
      occupiedTilesY.add(y);
      HashSet<GuiModuleInstance> gmiSet = scene.tileOccupantCount[y][x];
      newCollidingGMIs.addAll(gmiSet);
      gmiSet.add(this);
      int tileOccupation = gmiSet.size();
      if(tileOccupation > 1)
        tileColliding = true;
     
      TileType devType = scene.drawnTiles[y][x].getType();
      if (myType.equals(devType)
          || myType.equals(TileType.CLBLL) && devType.equals(TileType.CLBLM)
          || myType.equals(TileType.CLBLM) && devType.equals(TileType.CLBLL) && !hmTile.containsSLICEM()
          || switchboxTypes.contains(myType) && switchboxTypes.contains(devType)){
        if(tileColliding){
          hmTile.setState(GuiShapeState.COLLIDING);
          isColliding = true;
        }else{
View Full Code Here

        }
        else if(newPip.getStartWire() == llCout && newPipTile.getType().equals(TileType.CLBLM)){
          newPip.setStartWire(mCout);
        }
        else if(newPip.getEndWire() == wl5beg_s0){
          TileType check = dev.getTile(newPipTile.getRow(), newPipTile.getColumn()-1).getType();
          TileType check2 = dev.getTile(newPipTile.getRow(), newPipTile.getColumn()-2).getType();
          if(check.equals(TileType.INT_BUFS_R) || check2.equals(TileType.INT_BUFS_R)){
            int currWire = wl5beg_s0;
            WireConnection[] wcs = newPipTile.getWireConnections(currWire);
            Tile currTile = newPipTile;
            while(wcs.length == 1){
              if(wcs[0].isPIP()){
View Full Code Here

TOP

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

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.