void MegatileLayerGridXY::setSpecialMegaTile( unsigned int layer, unsigned int tile, double sizex, double sizey, double offsetx, double offsety, unsigned int ncellsx, unsigned int ncellsy ) { std::pair <int, int> tileid(layer, tile); segInfo sinf; sinf.megaTileSizeX = sizex; sinf.megaTileSizeY = sizey; sinf.megaTileOffsetX = offsetx; sinf.megaTileOffsetY = offsety; sinf.nCellsX = ncellsx; sinf.nCellsY = ncellsy; specialMegaTiles_layerWafer[tileid] = sinf; }
void MegatileLayerGridXY::getSegInfo( unsigned int layerIndex, unsigned int waferIndex) const { std::pair < unsigned int, unsigned int > tileid(layerIndex, waferIndex); if ( specialMegaTiles_layerWafer.find( tileid ) == specialMegaTiles_layerWafer.end() ) { // standard megatile _currentSegInfo.megaTileSizeX = _megaTileSizeX; _currentSegInfo.megaTileSizeY = _megaTileSizeY; _currentSegInfo.megaTileOffsetX = _megaTileOffsetX; _currentSegInfo.megaTileOffsetY = _megaTileOffsetY; if ( _unif_nCellsX>0 && _unif_nCellsY>0 ) { _currentSegInfo.nCellsX = _unif_nCellsX; _currentSegInfo.nCellsY = _unif_nCellsY; } else { assert ( layerIndex<_nCellsX.size() && "MegatileLayerGridXY ERROR: too high layer index?" ); _currentSegInfo.nCellsX = _nCellsX[layerIndex]; _currentSegInfo.nCellsY = _nCellsY[layerIndex]; } } else { // special megatile _currentSegInfo = specialMegaTiles_layerWafer.find( tileid )->second; } }
tile_id tileid(const std::string& name) { return tileid(name.c_str()); }
TileEntry& tile(const char* name) { return tile(tileid(name)); }