torc-master
|
Device database, including complete wiring and logic support. More...
#include <DDB.hpp>
Public Types | |
enum | EExpandDirection { eExpandDirectionNone = 0, eExpandDirectionSinkward = 1, eExpandDirectionSourceward = 2, eExpandDirectionBidirectional = eExpandDirectionSinkward | eExpandDirectionSourceward } |
Enumeration to indicate in which directions segments should be expanded. More... | |
Public Member Functions | |
mWireUsage (mTiles) | |
DDB (const string &inDeviceName, const string &inPackageName, DDBConsoleStreams inDDBConsoleStreams=DDBConsoleStreams()) | |
Public constructor. More... | |
DDB (const torc::common::DeviceDesignator &inDeviceDesignator, DDBConsoleStreams inDDBConsoleStreams=DDBConsoleStreams()) | |
Public constructor. More... | |
~DDB (void) | |
Destructor. More... | |
const string & | getDeviceName (void) const |
Returns the device name. More... | |
const string & | getFamilyName (void) const |
Returns the family name. More... | |
const boost::filesystem::path & | getDevicePath (void) const |
Returns the device database path. More... | |
const boost::filesystem::path & | getFamilyPath (void) const |
Returns the family database path. More... | |
const StringVector & | getSpeedGrades (void) const |
Returns a constant reference to a vector of speed grades. More... | |
const Segments & | getSegments (void) const |
Returns a constant reference to the device segment data. More... | |
const Sites & | getSites (void) const |
Returns a constant reference to the family and device site data. More... | |
const Tiles & | getTiles (void) const |
Returns a constant reference to the family and device tile data. More... | |
ArcUsage & | getArcUsage (void) |
Returns a constant reference to the design arc usage. More... | |
WireUsage & | getWireUsage (void) |
Returns a constant reference to the design wire usage. More... | |
virtual void | setConsoleStreams (DDBConsoleStreams inConsoleStreams) |
Sets all of the database console streams. More... | |
virtual void | setConsoleStreams (istream &inIn, ostream &inOut, ostream &inErr, ostream &inLog) |
Sets all of the database console streams. More... | |
void | clearUsage (void) |
Clears all arc and wire usage, effectively restaring with an empty device. More... | |
void | useArc (const Arc &inArc) |
Marks the arc and all of its source and sink segment wires as used. More... | |
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. More... | |
void | useSegment (const Tilewire &inTilewire) |
Marks all wires on the segment as used. More... | |
void | releaseSegment (const Tilewire &inTilewire) |
Marks all wires on the segment as unused. More... | |
void | expandSegment (const Tilewire &inTilewire, TilewireVector &outTilewires, EExpandDirection inExpandDirection=eExpandDirectionNone) |
Expands the given tilewire's segment. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
Tilewire | sitePinToTilewire (const std::string &inSiteName, const std::string &inPinName) |
Returns the tilewire for the specified site and pin name pair. More... | |
Arc | tilePipToArc (const std::string &inTileName, const std::string &inSourceWireName, const std::string &inSinkWireName) |
Returns the arc for the specified pip tile and wires. More... | |
Tilewire | lookupTilewire (const std::string &inTileName, const std::string &inWireName) |
Returns the tilewire for the specified tile and wire names. More... | |
Data Fields | |
__pad0__: mArcUsage(mTiles) | |
Public constructor. More... | |
Protected Types | |
typedef std::string | string |
Imported type name. More... | |
typedef std::vector< string > | StringVector |
Imported type name. More... | |
typedef xilinx::SiteIndex | SiteIndex |
Imported type name. More... | |
typedef xilinx::WireIndex | WireIndex |
Imported type name. More... | |
typedef xilinx::TileIndex | TileIndex |
Imported type name. More... | |
typedef xilinx::TileOffset | TileOffset |
Imported type name. More... | |
typedef xilinx::TileTypeIndex | TileTypeIndex |
Imported type name. More... | |
Protected Member Functions | |
size_t | readFamilyName (class DigestStream &inStream) |
Reads the family name from a device DigestStream. More... | |
size_t | readSpeedGrades (class DigestStream &inStream) |
Reads the supported speed grades from a device DigestStream. More... | |
void | initialize (const string &inDeviceName, const string &inPackageName) |
Initializes the database. More... | |
Protected Attributes | |
string | mDeviceName |
The name of the device. More... | |
string | mFamilyName |
The name of the family. More... | |
boost::filesystem::path | mDevicePath |
the device database path. More... | |
boost::filesystem::path | mFamilyPath |
the family database path. More... | |
Versions | mDeviceVersion |
The device database version. More... | |
Versions | mFamilyVersion |
The family database version. More... | |
StringVector | mSpeedGrades |
The supported speed grades. More... | |
Segments | mSegments |
The device segment data. More... | |
Sites | mSites |
The family and device site data. More... | |
Tiles | mTiles |
The family and device tile data. More... | |
ArcUsage | mArcUsage |
The design arc usage. More... | |
WireUsage | mWireUsage |
The design wire usage. More... | |
Private Types | |
typedef std::basic_istream< char > | istream |
Internal typedef of istream;. More... | |
typedef std::basic_ostream< char > | ostream |
Internal typedef of ostream;. More... | |
Private Member Functions | |
istream & | mIn (void) |
Returns the database console input stream. More... | |
ostream & | mOut (void) |
Returns the database console output stream. More... | |
ostream & | mErr (void) |
Returns the database console error stream. More... | |
ostream & | mLog (void) |
Returns the database console log stream. More... | |
istream & | getConsoleIn (void) |
Returns the database console input stream. More... | |
ostream & | getConsoleOut (void) |
Returns the database console output stream. More... | |
ostream & | getConsoleErr (void) |
Returns the database console error stream. More... | |
ostream & | getConsoleLog (void) |
Returns the database console log stream. More... | |
void | setConsoleIn (istream &inStream) |
Sets the database console input stream. More... | |
void | setConsoleOut (ostream &inStream) |
Sets the database console output stream. More... | |
void | setConsoleErr (ostream &inStream) |
Sets the database console error stream. More... | |
void | setConsoleLog (ostream &inStream) |
Sets the database console log stream. More... | |
Private Attributes | |
istream * | mInPtr |
Pointer to the database console input stream. More... | |
ostream * | mOutPtr |
ostream * | mErrPtr |
ostream * | mLogPtr |
Static Private Attributes | |
static DDBConsoleStreams | sDefaultConsoleStreams |
static DDBConsoleStreams | sNullConsoleStreams |
Device database, including complete wiring and logic support.
|
inherited |
Internal typedef of istream;.
Definition at line 41 of file DDBConsoleStreams.hpp.
|
inherited |
Internal typedef of ostream;.
Definition at line 43 of file DDBConsoleStreams.hpp.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Enumeration to indicate in which directions segments should be expanded.
Segment expansion direction only makes sense when device databases include tied wires (or "fake pips"). When tied wires are present, the caller can request that segment expansions include no tied wires, include tied wires in the sinkward direction, include tied wires in the sourceward direction, or include tied wires in both directions.
Enumerator | |
---|---|
eExpandDirectionNone | |
eExpandDirectionSinkward | |
eExpandDirectionSourceward | |
eExpandDirectionBidirectional |
Definition at line 92 of file DDB.hpp.
|
inline |
Public constructor.
inDeviceName | The name of the device to open. This name should not include any package or speed grade information, nor any extension. Examples are xc2vp100, xc4vfx60, xc5vlx30, et cetera. |
inPackageName | The name of the package to use. |
inDDBConsoleStreams | The console streams that the database should use. |
Definition at line 112 of file DDB.hpp.
|
inline |
Public constructor.
inDeviceDesignator | A designator for the device to open. |
inDDBConsoleStreams | The console streams that the database should use. |
Definition at line 119 of file DDB.hpp.
|
inline |
Destructor.
Definition at line 126 of file DDB.hpp.
|
inline |
Clears all arc and wire usage, effectively restaring with an empty device.
Definition at line 168 of file DDB.hpp.
void torc::architecture::DDB::expandSegment | ( | const Tilewire & | inTilewire, |
TilewireVector & | outTilewires, | ||
EExpandDirection | inExpandDirection = eExpandDirectionNone |
||
) |
Expands the given tilewire's segment.
Given a tilewire belonging to a segment, this function populates the supplied vector with all of the tilewires on the segment. An optional parameter allows the expansion to continue in the sinkward or sourceward directions in cases where tied sources or sinks are available.
Definition at line 154 of file DDB.cpp.
void torc::architecture::DDB::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.
The optional inUseTied, inUseRegular, inUseIrregular, and inUseRoutethrough flags determine whether the corresponding arc types will be included. Note that tied arcs (or "fake pips") are not currently available in the databases.
Definition at line 314 of file DDB.cpp.
void torc::architecture::DDB::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.
The optional inUseTied, inUseRegular, inUseIrregular, and inUseRoutethrough flags determine whether the corresponding arc types will be included. Note that tied arcs (or "fake pips") are not currently available in the databases.
Definition at line 336 of file DDB.cpp.
void torc::architecture::DDB::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.
The optional inUseTied, inUseRegular, inUseIrregular, and inUseRoutethrough flags determine whether the corresponding arc types will be included. Note that tied arcs (or "fake pips") are not currently available in the databases.
Definition at line 214 of file DDB.cpp.
void torc::architecture::DDB::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.
The optional inUseTied, inUseRegular, inUseIrregular, and inUseRoutethrough flags determine whether the corresponding arc types will be included. Note that tied arcs (or "fake pips") are not currently available in the databases.
Definition at line 264 of file DDB.cpp.
|
inline |
|
inlineinherited |
Returns the database console error stream.
Definition at line 69 of file DDBConsoleStreams.hpp.
|
inlineinherited |
Returns the database console input stream.
Definition at line 65 of file DDBConsoleStreams.hpp.
|
inlineinherited |
Returns the database console log stream.
Definition at line 71 of file DDBConsoleStreams.hpp.
|
inlineinherited |
Returns the database console output stream.
Definition at line 67 of file DDBConsoleStreams.hpp.
|
inline |
Returns the device name.
Definition at line 132 of file DDB.hpp.
|
inline |
Returns the device database path.
Definition at line 136 of file DDB.hpp.
|
inline |
Returns the family name.
Definition at line 134 of file DDB.hpp.
|
inline |
Returns the family database path.
Definition at line 138 of file DDB.hpp.
|
inline |
|
inline |
|
inline |
Returns a constant reference to a vector of speed grades.
Definition at line 140 of file DDB.hpp.
|
inline |
|
inline |
Returns a constant reference to the design wire usage.
Definition at line 150 of file DDB.hpp.
|
protected |
Initializes the database.
Definition at line 31 of file DDB.cpp.
|
inline |
Returns the tilewire for the specified tile and wire names.
Definition at line 257 of file DDB.hpp.
|
inlineinherited |
Returns the database console error stream.
Definition at line 61 of file DDBConsoleStreams.hpp.
|
inlineinherited |
Returns the database console input stream.
Definition at line 57 of file DDBConsoleStreams.hpp.
|
inlineinherited |
Returns the database console log stream.
Definition at line 63 of file DDBConsoleStreams.hpp.
|
inlineinherited |
Returns the database console output stream.
Definition at line 59 of file DDBConsoleStreams.hpp.
|
inline |
Definition at line 104 of file DDB.hpp.
|
protected |
Reads the family name from a device DigestStream.
Definition at line 98 of file DDB.cpp.
|
protected |
Reads the supported speed grades from a device DigestStream.
Definition at line 121 of file DDB.cpp.
|
inline |
Marks the arc and all of its source and sink segment wires as unused.
Definition at line 179 of file DDB.hpp.
|
inline |
Marks all wires on the segment as unused.
Definition at line 193 of file DDB.hpp.
|
inlineinherited |
Sets the database console error stream.
Definition at line 77 of file DDBConsoleStreams.hpp.
|
inlineinherited |
Sets the database console input stream.
Definition at line 73 of file DDBConsoleStreams.hpp.
|
inlineinherited |
Sets the database console log stream.
Definition at line 79 of file DDBConsoleStreams.hpp.
|
inlineinherited |
Sets the database console output stream.
Definition at line 75 of file DDBConsoleStreams.hpp.
|
inlinevirtual |
Sets all of the database console streams.
Definition at line 152 of file DDB.hpp.
|
inlinevirtual |
Sets all of the database console streams.
Reimplemented from torc::architecture::DDBConsoleStreams.
Definition at line 157 of file DDB.hpp.
|
inline |
Returns the tilewire for the specified site and pin name pair.
Definition at line 236 of file DDB.hpp.
|
inline |
Returns the arc for the specified pip tile and wires.
Definition at line 243 of file DDB.hpp.
|
inline |
Marks the arc and all of its source and sink segment wires as used.
Definition at line 173 of file DDB.hpp.
|
inline |
Marks all wires on the segment as used.
Definition at line 185 of file DDB.hpp.
torc::architecture::DDB::__pad0__ |
Public constructor.
inDeviceName | The name of the device to open. This name should not include any package or speed grade information, nor any extension. Examples are xc2vp100, xc4vfx60, xc5vlx30, et cetera. |
inDDBConsoleStreams | The console streams that the database should use. |
|
protected |
|
protected |
|
protected |
|
protected |
|
protectedinherited |
Definition at line 96 of file DDBConsoleStreams.hpp.
|
protected |
|
protected |
|
protected |
|
protectedinherited |
Pointer to the database console input stream.
Definition at line 94 of file DDBConsoleStreams.hpp.
|
protectedinherited |
Definition at line 97 of file DDBConsoleStreams.hpp.
|
protectedinherited |
Definition at line 95 of file DDBConsoleStreams.hpp.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticinherited |
Definition at line 45 of file DDBConsoleStreams.hpp.
|
staticinherited |
Definition at line 46 of file DDBConsoleStreams.hpp.