19 #ifndef TORC_ARCHITECTURE_DDB_HPP
20 #define TORC_ARCHITECTURE_DDB_HPP
37 namespace architecture {
83 void initialize(
const string& inDeviceName,
const string& inPackageName);
112 DDB(
const string& inDeviceName,
const string& inPackageName,
154 inConsoleStreams.
mErr(), inConsoleStreams.
mLog());
179 void releaseArc(
const Arc& inArc,
bool releaseSource =
true,
bool releaseSink =
true) {
188 TilewireVector::const_iterator p = segment.begin();
189 TilewireVector::const_iterator e = segment.end();
196 TilewireVector::const_iterator p = segment.begin();
197 TilewireVector::const_iterator e = segment.end();
212 bool inUseTied =
true,
bool inUseRegular =
true,
bool inUseIrregular =
true,
213 bool inUseRoutethrough =
true);
219 bool inUseTied =
true,
bool inUseRegular =
true,
bool inUseIrregular =
true,
220 bool inUseRoutethrough =
true);
227 bool inUseRegular =
true,
bool inUseIrregular =
true,
bool inUseRoutethrough =
true);
234 bool inUseRegular =
true,
bool inUseIrregular =
true,
bool inUseRoutethrough =
true);
264 return Tilewire(tileIndex, wireIndex);
271 #endif // TORC_ARCHITECTURE_DDB_HPP
WireUsage & getWireUsage(void)
Returns a constant reference to the design wire usage.
static void dissociate(const class DDB &ddb)
Dissociate the given device database from any stream.
Encapsulation of a tile index in an unsigned 32-bit integer.
virtual void setConsoleStreams(istream &inIn, ostream &inOut, ostream &inErr, ostream &inLog)
Sets all of the database console streams.
string mDeviceName
The name of the device.
Forward declaration of template basic_istream.
EExpandDirection
Enumeration to indicate in which directions segments should be expanded.
Encapsulation of an arc between two tilewires.
void releaseSegment(const Tilewire &inTilewire)
Marks all wires on the segment as unused.
std::vector< Tilewire > TilewireVector
Vector of Tilewire objects.
Header for the Segments class.
void clear(void)
Marks all arcs as being unused, without releasing the bitset objects.
Encapsulation of a device designator and its constituent elements.
const string & getDeviceName(void) const
Returns the device name.
Tiles mTiles
The family and device tile data.
Header for the WireUsage class.
Device database, including complete wiring and logic support.
xilinx::TileOffset TileOffset
Imported type name.
const string & getFamilyName(void) const
Returns the family name.
Arc tilePipToArc(const std::string &inTileName, const std::string &inSourceWireName, const std::string &inSinkWireName)
Returns the arc for the specified pip tile and wires.
const Tiles & getTiles(void) const
Returns a constant reference to the family and device tile data.
ArcUsage & getArcUsage(void)
Returns a constant reference to the design arc usage.
DDB(const string &inDeviceName, const string &inPackageName, DDBConsoleStreams inDDBConsoleStreams=DDBConsoleStreams())
Public constructor.
const TileInfo & getTileInfo(TileIndex inTileIndex) const
Returns the TileInfo object for the specified tile.
Encapsulation the design wire usage.
xilinx::SiteIndex SiteIndex
Imported type name.
Header for the Sites class.
Header for the Arc class.
boost::filesystem::path mDevicePath
the device database path.
void releaseArc(const Arc &inArc, bool releaseSource=true, bool releaseSink=true)
Marks the arc and all of its source and sink segment wires as unused.
Header for the DeviceDesignator class.
Header for the DDBStreamHelper class.
const Tilewire getPinTilewire(const std::string &inName) const
Returns the Tilewire associated with the specified pin name.
xilinx::TileIndex TileIndex
Imported type name.
Device database console streams class.
ostream & mErr(void)
Returns the database console error stream.
void expandSegmentSinks(const Tilewire &inTilewire, ArcVector &outSinks, EExpandDirection inExpandDirection=eExpandDirectionNone, bool inUseTied=true, bool inUseRegular=true, bool inUseIrregular=true, bool inUseRoutethrough=true)
Expands all sink arcs for the given tilewire's segment.
Encapsulation of a wire index in an unsigned 16-bit integer.
void useArc(const Arc &inArc)
Marks the arc and all of its source and sink segment wires as used.
Forward declaration of template basic_ostream.
const Sites & getSites(void) const
Returns a constant reference to the family and device site data.
std::vector< Arc > ArcVector
Vector of Arc objects.
const StringVector & getSpeedGrades(void) const
Returns a constant reference to a vector of speed grades.
Encapsulation of a tile offset in an unsigned 32-bit integer.
const Tilewire & getSourceTilewire(void) const
Returns the source tilewire.
void clear(void)
Marks all wires as being unused, without releasing the bitset objects.
void expandTilewireSinks(const Tilewire &inTilewire, TilewireVector &outSinks, bool inUseTied=true, bool inUseRegular=true, bool inUseIrregular=true, bool inUseRoutethrough=true)
Expands the given tilewire's arc sinks.
Tilewire sitePinToTilewire(const std::string &inSiteName, const std::string &inPinName)
Returns the tilewire for the specified site and pin name pair.
void clearUsage(void)
Clears all arc and wire usage, effectively restaring with an empty device.
const Tilewire & getSinkTilewire(void) const
Returns the sink tilewire.
void use(const Arc &inArc)
Marks the specified arc as being used.
Header for the DDBConsoleStreams class.
size_t readFamilyName(class DigestStream &inStream)
Reads the family name from a device DigestStream.
Site type and population data for the family and the device.
string mFamilyName
The name of the family.
Encapsulation of a device tile and wire pair.
const boost::filesystem::path & getFamilyPath(void) const
Returns the family database path.
Encapsulation the design arc usage.
Tile map, tile type, and wire information for the family and device.
Header for the Versions class.
const boost::filesystem::path & getDevicePath(void) const
Returns the device database path.
std::string string
Imported type name.
DDB(const torc::common::DeviceDesignator &inDeviceDesignator, DDBConsoleStreams inDDBConsoleStreams=DDBConsoleStreams())
Public constructor.
void expandTilewireSources(const Tilewire &inTilewire, TilewireVector &outSources, bool inUseTied=true, bool inUseRegular=true, bool inUseIrregular=true, bool inUseRoutethrough=true)
Expands the given tilewire's arc sources.
void expandSegmentSources(const Tilewire &inTilewire, ArcVector &outSources, EExpandDirection inExpandDirection=eExpandDirectionNone, bool inUseTied=true, bool inUseRegular=true, bool inUseIrregular=true, bool inUseRoutethrough=true)
Expands all source arcs for the given tilewire's segment.
Header for the ArcUsage class.
xilinx::TileTypeIndex TileTypeIndex
Imported type name.
Encapsulation of a tile within a device tile map.
SiteIndex findSiteIndex(const string &inName) const
Returns the site index for the given site name.
DDBConsoleStreams(void)
Null constructor.
Tilewire lookupTilewire(const std::string &inTileName, const std::string &inWireName)
Returns the tilewire for the specified tile and wire names.
boost::filesystem::path path
const TileTypeIndex & getTypeIndex(void) const
Returns the tile type index for this tile.
void use(const Tilewire &inTilewire)
Marks the specified tilewire as being used.
ArcUsage mArcUsage
The design arc usage.
Header for the ExtendedWireInfo class.
const Site & getSite(SiteIndex inSiteIndex) const
Returns the site for the specified index.
xilinx::WireIndex WireIndex
Imported type name.
void useSegment(const Tilewire &inTilewire)
Marks all wires on the segment as used.
ostream & mOut(void)
Returns the database console output stream.
TileIndex findTileIndex(const string &inName) const
Returns the tile index for the given tile name.
ostream & mLog(void)
Returns the database console log stream.
Encapsulation of database version information.
boost::filesystem::path mFamilyPath
the family database path.
Segments mSegments
The device segment data.
Encapsulation of a site index in an unsigned 32-bit integer.
WireIndex findWireIndex(TileTypeIndex inTileTypeIndex, const string &inName) const
Returns the wire index for the given wire name in the given tile type.
const string & getDevicePackage(void) const
Returns the device package.
virtual void setConsoleStreams(DDBConsoleStreams inConsoleStreams)
Sets all of the database console streams.
Encapsulation of a tile type index in an unsigned 16-bit integer.
void release(const Tilewire &inTilewire)
Marks the specified tilewire as being unused.
const string & getDeviceName(void) const
Returns the device name.
StringVector mSpeedGrades
The supported speed grades.
void release(const Arc &inArc)
Marks the specified arc as being unused.
static const Tilewire sInvalid
bool isUndefined(void) const
Sites mSites
The family and device site data.
void initialize(const string &inDeviceName, const string &inPackageName)
Initializes the database.
std::vector< string > StringVector
Imported type name.
Encapsulation of a device or family digest stream.
Header for the Tiles class.
Segment and irregular arc data for the device.
istream & mIn(void)
Returns the database console input stream.
WireUsage mWireUsage
The design wire usage.
size_t readSpeedGrades(class DigestStream &inStream)
Reads the supported speed grades from a device DigestStream.
virtual void setConsoleStreams(istream &inIn, ostream &inOut, ostream &inErr, ostream &inLog)
Sets all of the database console streams.
Versions mFamilyVersion
The family database version.
void expandSegment(const Tilewire &inTilewire, TilewireVector &outTilewires, EExpandDirection inExpandDirection=eExpandDirectionNone)
Expands the given tilewire's segment.
const Segments & getSegments(void) const
Returns a constant reference to the device segment data.
Versions mDeviceVersion
The device database version.