19 #ifndef TORC_ARCHITECTURE_ARCUSAGE_HPP
20 #define TORC_ARCHITECTURE_ARCUSAGE_HPP
26 #include <boost/dynamic_bitset.hpp>
29 namespace architecture {
31 namespace architecture {
class ArcUsageUnitTest; }
81 if(sinks[i] == wire2)
return offset;
87 if(irregularSinks[i] == wire2)
return offset;
93 if(routethroughSinks[i] == wire2)
return offset;
99 if(tiedSinks[i] == wire2)
return offset;
151 if(wires.
getSize() == 0)
return;
178 if(tileIndex1 != tileIndex2)
throw -1;
182 if(bitset == 0)
return;
185 bitset->set(
getArcOffset(inTilewire1, inTilewire2),
false);
203 if(bitset == 0)
continue;
218 if(tileIndex1 != tileIndex2)
throw -1;
222 if(bitset == 0)
return false;
225 return bitset->test(
getArcOffset(inTilewire1, inTilewire2));
229 uint32_t usageCount = 0;
238 if(bitset == 0)
continue;
240 usageCount += bitset->count();
254 #endif // TORC_ARCHITECTURE_ARCUSAGE_HPP
xilinx::TileIndex TileIndex
Imported type name.
const WireIndex & getWireIndex(void) const
Returns the wire index.
Encapsulation of a tile index in an unsigned 32-bit integer.
Encapsulation of an arc between two tilewires.
void autosize(void)
Size the wire usage according to the number of device tiles.
const Tiles & mTiles
Reference to the database Tiles object.
void clear(void)
Marks all arcs as being unused, without releasing the bitset objects.
~ArcUsage(void)
Non-virtual destructor.
Array< dynamic_bitset * > mBitsets
The wire usage bitset array.
TileCount getTileUsageCount(void) const
Returns the number of tiles that have been touched.
uint32_t mBitCount
The number of bits allocated by the usage bitsets.
const TileInfo & getTileInfo(TileIndex inTileIndex) const
Returns the TileInfo object for the specified tile.
const uint16_t getArcOffset(void) const
Returns this wire's offset into the arc usage bitset.
ArcUsage(const Tiles &inTiles)
Public constructor.
friend class torc::architecture::architecture::ArcUsageUnitTest
Our unit test class has access to our internals.
Header for the Arc class.
const WireArray & getIrregularSinks(void) const
Returns the irregular sink array for this wire.
uint32_t getArcUsageCount(void) const
Returns the number of arcs in use.
uint32_t getArcOffset(const Tilewire &inTilewire1, const Tilewire &inTilewire2) const
Returns the offset into the bitset for the specified arc.
const Array< const WireInfo > & getWireInfo(TileTypeIndex inTileTypeIndex) const
Returns the WireInfo array for the specified tile type.
void use(const Tilewire &inTilewire1, const Tilewire &inTilewire2)
Marks the specified arc as being used.
Encapsulation of a wire index in an unsigned 16-bit integer.
TileCount getTileCount(void) const
Returns the tile count for this device.
const Tilewire & getSourceTilewire(void) const
Returns the source tilewire.
bool isUsed(const Tilewire &inTilewire1, const Tilewire &inTilewire2) const
Determines whether the specified arc is in use.
const Tilewire & getSinkTilewire(void) const
Returns the sink tilewire.
xilinx::WireIndex WireIndex
Imported type name.
uint32_t getBitCount(void) const
Returns the number of bits allocated.
void use(const Arc &inArc)
Marks the specified arc as being used.
Encapsulation of a device tile and wire pair.
Encapsulation the design arc usage.
Tile map, tile type, and wire information for the family and device.
Encapsulation of a tile count in an unsigned 32-bit integer.
const WireArray & getSinks(void) const
Returns the sink array for this wire.
Encapsulation of a tile within a device tile map.
xilinx::TileCount TileCount
Imported type name.
const TileTypeIndex & getTypeIndex(void) const
Returns the tile type index for this tile.
const WireArray & getRoutethroughSinks(void) const
Returns the routethrough sink array for this wire.
Header for the Tilewire class.
dynamic_bitset mTileDirty
The mask of tile bitsets that contain changes.
Header for the Array class.
Encapsulation of a tile type index in an unsigned 16-bit integer.
xilinx::TileTypeIndex TileTypeIndex
Imported type name.
void release(const Tilewire &inTilewire1, const Tilewire &inTilewire2)
Marks the specified arc as being unused.
const WireArray & getTiedSinks(void) const
Returns the tied sink array for this wire.
const TileIndex & getTileIndex(void) const
Returns the tile index.
void setSize(uint32_t inSize)
Discards all contents and resizes the array.
void release(const Arc &inArc)
Marks the specified arc as being unused.
Encapsulation of a wire within a tile type.
bool isUndefined(void) const
Header for the Tiles class.
bool isUsed(const Arc &inArc)
Determines whether the specified arc is in use.
boost::dynamic_bitset dynamic_bitset
Imported type name.
TileCount mTileUsageCount
The number of tiles for which bitsets are allocated.
uint32_t getSize(void) const
Returns the array size.