32 #ifndef GENERATE_STATIC_DEVICE_INFO
49 using namespace torc::common;
87 typedef std::map<TileTypeIndex, std::string> TileTypeIndexToName;
88 typedef std::map<std::string, TileTypeIndex> TileTypeNameToIndex;
89 TileTypeIndexToName tileTypeIndexToName;
90 TileTypeNameToIndex tileTypeNameToIndex;
92 for(TileTypeIndex tileTypeIndex(0); tileTypeIndex < tileTypeCount; tileTypeIndex++) {
94 tileTypeIndexToName[tileTypeIndex] = tileTypeName;
95 tileTypeNameToIndex[tileTypeName] = tileTypeIndex;
102 columnTypes.resize(colCount);
105 for(TileCol col; col < colCount; col++) {
109 TileTypeIndexToColumnType::iterator ttwp = ttwe;
110 for(TileRow row; row < rowCount; row++) {
122 columnTypes[col] =
static_cast<EColumnType>(ttwp->second);
130 if(blockType == 2)
break;
135 std::fstream tilemapStream(generatedMap.string().c_str(), std::ios::out);
136 for(TileRow row; row < rowCount; row++) {
137 for(TileCol col; col < colCount; col++) {
142 if(col + 1 < colCount) tilemapStream <<
",";
144 tilemapStream << std::endl;
146 tilemapStream.close();
149 setDeviceInfo(DeviceInfo(tileCount, rowCount, colCount, columnTypes));
180 prepareFrames(col, frameCount, frameIndex, blockType, farMajor, width);
188 for(
int j = 1; j < center; j++) {
189 for(
int k = -1; k < 2; k += 2) {
190 col = center - (j * k);
192 prepareFrames(col, frameCount, frameIndex, blockType, farMajor, width);
200 if(col == finalColumn) {
210 if(col == finalColumn)
218 for(
int j = center; j < (center + 1); j++) {
219 for(
int k = -1; k < 2; k += 2) {
220 col = center - (j * k);
221 prepareFrames(col, frameCount, frameIndex, blockType, farMajor, width);
228 if(col == finalColumn) {
238 if(col == finalColumn)
246 for(
int j = 1; j < center; j++) {
247 for(
int k = -1; k < 2; k += 2) {
248 col = center - (j * k);
250 prepareFrames(col, frameCount, frameIndex, blockType, farMajor, width);
258 if(col == finalColumn) {
268 if(col == finalColumn)
278 for(
int j = 1; j <= (numClbs + numBrams) / 2; j++) {
279 for(
int k = -1; k < 2; k += 2) {
280 col = center - (j * k);
281 prepareFrames(col, frameCount, frameIndex, blockType, farMajor, width);
288 if(col == finalColumn) {
298 if(col == finalColumn)
306 for(
int j = center; j < (center + 1); j++) {
307 for(
int k = -1; k < 2; k += 2) {
308 col = center - (j * k);
309 prepareFrames(col, frameCount, frameIndex, blockType, farMajor, width);
316 if(col == finalColumn) {
326 if(col == finalColumn)
342 std::cout <<
"Bit Value at index: (" << i <<
", " << j <<
") : " <<
mBitColumnIndexes[i][j] << std::endl;
344 std::cout <<
"Xdl Value at index: (" << i <<
", " << k <<
") : " <<
mXdlColumnIndexes[i][k] << std::endl;
ColumnDefVector mColumnDefs
Column type widths.
Encapsulation of a tile row in an unsigned 16-bit integer.
Header for the VirtexE class.
TileTypeNameToColumnType mTileTypeNameToColumnType
uint32_t mFrameIndexBounds
Frame index bounds count.
Encapsulation of a tile column in an unsigned 16-bit integer.
Device database, including complete wiring and logic support.
TileTypeCount getTileTypeCount(void) const
Returns the tile type count for this device.
TileRow getRowCount(void) const
Returns the row count for this device.
Header for the DirectoryTree class.
IndexVector mXdlColumnIndexes[Virtex::eFarBlockTypeCount]
Vector to store frame indexes of Bitstream columns.
const TileInfo & getTileInfo(TileIndex inTileIndex) const
Returns the TileInfo object for the specified tile.
virtual void initializeDeviceInfo(const std::string &inDeviceName)
Initialize the device information.
TileTypeIndexToColumnType mTileTypeIndexToColumnType
uint16_t getColCount(void) const
Returns the column count.
void prepareFrames(ColumnIndex &inCol, int &inFrameCount, int &inFrameIndex, EFarBlockType &inBlockType, int &inFarMajor, int &inWidth)
TileCount getTileCount(void) const
Returns the tile count for this device.
EDevice mDevice
Bitstream device enumeration.
boost::uint32_t uint32_t
Imported type name.
uint32_t mBlockFrameIndexBounds[Virtex::eFarBlockTypeCount]
Array to hold frame index boundaries for blocks.
IndexVector mBitColumnIndexes[Virtex::eFarBlockTypeCount]
Vector to store frame indexes of XDL columns.
DeviceInfo mDeviceInfo
Device information.
Tile map, tile type, and wire information for the family and device.
std::map< uint32_t, uint32_t > mXdlColumnToBitColumn
Map of XDL column indexes to bitstream column indexes.
Encapsulation of a tile count in an unsigned 32-bit integer.
Encapsulation of a tile within a device tile map.
const char * getTileTypeName(TileTypeIndex inTileTypeIndex) const
Returns the tile type name for the given tile type index.
const ColumnTypeVector & getColumnTypes(void) const
Returns the column type vector.
boost::filesystem::path path
const TileTypeIndex & getTypeIndex(void) const
Returns the tile type index for this tile.
EFarBlockType
Frame Address Register block type constants.
static const boost::filesystem::path & getWorkingPath(void)
Returns the absolute path to the working directory.
Encapsulation of a tile type count in an unsigned 16-bit integer.
TileCol getColCount(void) const
Returns the column count for this device.
Encapsulation of a tile type index in an unsigned 16-bit integer.
boost::uint32_t uint32_t
Imported type name.
boost::uint16_t uint16_t
Imported type name.
Header for the DDB class.
Template base for encapsulated integers, to enforce strong typing.
virtual void initializeFrameMaps(void)
Initialize the maps between frame indexes and frame addresses. This is generally only useful for int...
void setDeviceInfo(const DeviceInfo &rhs)
Assign static device information for the current bitstream.
TileIndex getTileIndex(TileRow inRow, TileCol inCol) const
Returns the tile index for the given [row,column] pair.
EColumnType
Major column types.
Device database types for Xilinx architectures.