23 namespace architecture {
28 char scratch[1 << 10];
35 if(sectionName !=
">>>>TileType>>>>")
throw -1;
44 inStream.
read(nameLength);
46 if(nameLength >
sizeof(scratch))
throw -1;
47 inStream.
read(scratch, nameLength);
48 scratch[nameLength] = 0;
61 char scratch[1 << 10];
73 if(sectionName !=
">>>>TileNode>>>>")
throw -1;
76 inStream.
read(typeCount);
88 inStream.
read(wireCount);
89 mWires[i].setSize(wireCount);
100 for(
WireCount j; j < wireCount; j++) { sourceCounts[j] = tiedSourceCounts[j]
101 = irregularSourceCounts[j] = routethroughSourceCounts[j] = 0; }
111 inStream.
read(nameLength);
113 if(nameLength >
sizeof(scratch))
throw -1;
114 inStream.
read(scratch, nameLength);
115 scratch[nameLength] = 0;
116 wireInfo.
mName = strdup(scratch);
121 inStream.
read(sinkCount);
126 tiedSourceCounts[sink]++;
129 inStream.
read(sinkCount);
135 sourceCounts[sink]++;
140 inStream.
read(sinkCount);
146 irregularSourceCounts[sink]++;
150 inStream.
read(sinkCount);
156 routethroughSourceCounts[sink]++;
179 tiedSourceCounts[tiedSink]--;
181 .mTiedSources[tiedSourceCounts[tiedSink]]) =
WireIndex(j);
188 sourceCounts[sink]--;
190 .mSources[sourceCounts[sink]]) =
WireIndex(j);
196 const WireIndex irregularSink = irregularSinks[k];
197 irregularSourceCounts[irregularSink]--;
198 const_cast<WireIndex&
>(wires[irregularSink]
199 .mIrregularSources[irregularSourceCounts[irregularSink]]) =
WireIndex(j);
205 const WireIndex routethroughSink = routethroughSinks[k];
206 routethroughSourceCounts[routethroughSink]--;
207 const_cast<WireIndex&
>(wires[routethroughSink]
208 .mRoutethroughSources[routethroughSourceCounts[routethroughSink]])
229 char scratch[1 << 10];
239 if(sectionName !=
">>>>TileMap >>>>")
throw -1;
252 mOut() <<
"\tReading tile map for " <<
mTileCount <<
" tiles (" << mRowCount
253 <<
" rows x " <<
mColCount <<
" columns)..." << std::endl;
260 inStream.
read(nameLength);
262 if(nameLength >
sizeof(scratch))
throw -1;
263 inStream.
read(scratch, nameLength);
264 scratch[nameLength] = 0;
267 mTileMap[row][col] = i;
WireArray mTiedSinks
The tied sink array for this wire.
TileRow mRowCount
The tile row count for this device.
Encapsulation of a tile index in an unsigned 32-bit integer.
Encapsulation of a tile row in an unsigned 16-bit integer.
WireArray mRoutethroughSinks
The routethrough sink array for this wire.
std::istream & read(uint8_t &outValue)
Read and return a uint8_t.
WireArray mSinks
The sink array for this wire.
Encapsulation of a tile column in an unsigned 16-bit integer.
std::pair< std::string, xilinx::WireIndex > WireNameIndexPair
Wrapper for a wire name with corresponding wire index.
WireArray mIrregularSinks
The irregular sink array for this wire.
static bool CompareWirePairByName(const WireNameIndexPair &inA, const WireNameIndexPair &inB)
Compare wire pairs by name, for ordering purposes.
T * end(void)
Returns the non-constant end iterator.
Array< const CharStringWrapper > mTileTypeNames
The tile type names for this family.
const WireArray & getIrregularSinks(void) const
Returns the irregular sink array for this wire.
TileCol mColCount
The tile column count for this device.
WireArray mIrregularSources
The irregular source array for this wire.
WireArray mSources
The source array for this wire.
size_t readTileWireInfo(DigestStream &inStream)
Read the family wire info.
size_t readTileTypes(DigestStream &inStream)
Read the family tile types.
TileTypeCount mTileTypeCount
The number of tile types for this family.
Encapsulation of a wire index in an unsigned 16-bit integer.
Wrapper around char* for use with the Array template.
uint16_t mArcOffset
This wire's offset into the arc usage bitset.
WireFlags mFlags
The attribute flags for this wire.
Array< const TileInfo > mTiles
The tile information for this device.
WireArray mTiedSources
The tied source array for this wire.
Encapsulation of a wire count in an unsigned 16-bit integer.
const WireArray & getSinks(void) const
Returns the sink array for this wire.
Encapsulation of a tile within a device tile map.
Array2D< const WireNameIndexPair > mOrderedWireNames
The wire name to wire index mapping for each tile type for this family.
TileCount mTileCount
The tile count for this device.
const WireArray & getRoutethroughSinks(void) const
Returns the routethrough sink array for this wire.
void readSectionHeader(string &outHeader)
Read and return a section header.
ostream & mOut(void)
Returns the database console output stream.
TileIndex ** mTileMap
The two-dimensional tile map for this device.
static bool CompareTilePairByName(const TileNameIndexPair &inA, const TileNameIndexPair &inB)
Compare tile pairs by name, for ordering purposes.
Encapsulation of a tile type count in an unsigned 16-bit integer.
const char * mName
The name for this wire.
Encapsulation of a tile type index in an unsigned 16-bit integer.
T * begin(void)
Returns the non-constant begin iterator.
T * iterator
Non-constant T iterator type.
const WireArray & getTiedSinks(void) const
Returns the tied sink array for this wire.
void setSize(uint32_t inSize)
Discards all contents and resizes the array.
Encapsulation of a wire within a tile type.
Array2D< const WireInfo > mWires
The wire information for this family.
std::pair< std::string, xilinx::TileIndex > TileNameIndexPair
Wrapper for a tile name with corresponding tile index.
Encapsulation of a device or family digest stream.
Header for the Tiles class.
size_t readTileMap(DigestStream &inStream)
Read the device tile map.
size_t getBytesRead(void) const
Returns the number of bytes read.
boost::uint16_t uint16_t
Imported type name.
WireArray mRoutethroughSources
The routethrough source array for this wire.
xilinx::WireIndex WireIndex
Imported type name.
Array< const TileNameIndexPair > mOrderedTileNames
The tile name to tile index mapping for this device.
Encapsulation of a static array.
uint32_t getSize(void) const
Returns the array size.
boost::uint16_t pod
Alias for the encapsulated Plain-Old-Data type.