torc::architecture::DDB Class Reference

Device database, including complete wiring and logic support. More...

#include <DDB.hpp>

Collaboration diagram for torc::architecture::DDB:

Collaboration graph
[legend]

List of all members.

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

 DDB (const string &inDeviceName, const string &inPackageName="")
 Public constructor.
 DDB (const torc::common::DeviceDesignator &inDeviceDesignator)
 Public constructor.
const stringgetDeviceName (void) const
 Returns the device name.
const stringgetFamilyName (void) const
 Returns the family name.
const StringVectorgetSpeedGrades (void) const
 Returns a constant reference to a vector of speed grades.
const SegmentsgetSegments (void) const
 Returns a constant reference to the device segment data.
const SitesgetSites (void) const
 Returns a constant reference to the family and device site data.
const TilesgetTiles (void) const
 Returns a constant reference to the family and device tile data.
ArcUsagegetArcUsage (void)
 Returns a constant reference to the design arc usage.
WireUsagegetWireUsage (void)
 Returns a constant reference to the design wire usage.
void clearUsage (void)
 Clears all arc and wire usage, effectively restaring with an empty device.
void useArc (const Arc &inArc)
 Marks the arc and all of its source and sink segment wires as used.
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.
void useSegment (const Tilewire &inTilewire)
 Marks all wires on the segment as used.
void releaseSegment (const Tilewire &inTilewire)
 Marks all wires on the segment as unused.
void expandSegment (const Tilewire &inTilewire, TilewireVector &outTilewires, EExpandDirection inExpandDirection=eExpandDirectionNone)
 Expands the given tilewire's segment.
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.
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 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.
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.
Tilewire sitePinToTilewire (const std::string &inSiteName, const std::string &inPinName)
 Returns the tilewire for the specified site and pin name pair.
Arc tilePipToArc (const std::string &inTileName, const std::string &inSourceWireName, const std::string &inSinkWireName)
 Returns the arc for the specified pip tile and wires.
Tilewire lookupTilewire (const std::string &inTileName, const std::string &inWireName)
 Returns the tilewire for the specified tile and wire names.

Protected Types

typedef std::string string
 Imported type name.
typedef std::vector< stringStringVector
 Imported type name.
typedef xilinx::SiteIndex SiteIndex
 Imported type name.
typedef xilinx::WireIndex WireIndex
 Imported type name.
typedef xilinx::TileIndex TileIndex
 Imported type name.
typedef xilinx::TileOffset TileOffset
 Imported type name.
typedef xilinx::TileTypeIndex TileTypeIndex
 Imported type name.

Protected Member Functions

size_t readFamilyName (class DigestStream &inStream)
 Reads the family name from a device DigestStream.
size_t readSpeedGrades (class DigestStream &inStream)
 Reads the supported speed grades from a device DigestStream.
void initialize (const string &inDeviceName, const string &inPackageName)
 Initializes the database.

Protected Attributes

string mDeviceName
 The name of the device.
string mFamilyName
 The name of the family.
Versions mDeviceVersion
 The device database version.
Versions mFamilyVersion
 The family database version.
StringVector mSpeedGrades
 The supported speed grades.
Segments mSegments
 The device segment data.
Sites mSites
 The family and device site data.
Tiles mTiles
 The family and device tile data.
ArcUsage mArcUsage
 The design arc usage.
WireUsage mWireUsage
 The design wire usage.


Detailed Description

Device database, including complete wiring and logic support.

Definition at line 39 of file DDB.hpp.


Member Typedef Documentation

typedef std::string torc::architecture::DDB::string [protected]

Imported type name.

Definition at line 42 of file DDB.hpp.

typedef std::vector<string> torc::architecture::DDB::StringVector [protected]

Imported type name.

Definition at line 43 of file DDB.hpp.

Imported type name.

Definition at line 44 of file DDB.hpp.

Imported type name.

Definition at line 45 of file DDB.hpp.

Imported type name.

Definition at line 46 of file DDB.hpp.

Imported type name.

Definition at line 47 of file DDB.hpp.

Imported type name.

Definition at line 48 of file DDB.hpp.


Member Enumeration Documentation

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.

Definition at line 85 of file DDB.hpp.


Constructor & Destructor Documentation

torc::architecture::DDB::DDB ( const string inDeviceName,
const string inPackageName = "" 
) [inline]

Public constructor.

Parameters:
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.

Definition at line 95 of file DDB.hpp.

torc::architecture::DDB::DDB ( const torc::common::DeviceDesignator inDeviceDesignator  )  [inline]

Public constructor.

Definition at line 98 of file DDB.hpp.


Member Function Documentation

size_t torc::architecture::DDB::readFamilyName ( class DigestStream inStream  )  [protected]

Reads the family name from a device DigestStream.

Todo:
Throw a proper exception.

Definition at line 99 of file DDB.cpp.

size_t torc::architecture::DDB::readSpeedGrades ( class DigestStream inStream  )  [protected]

Reads the supported speed grades from a device DigestStream.

Todo:
Throw a proper exception.

Definition at line 122 of file DDB.cpp.

void torc::architecture::DDB::initialize ( const string inDeviceName,
const string inPackageName 
) [protected]

Initializes the database.

Definition at line 31 of file DDB.cpp.

const string& torc::architecture::DDB::getDeviceName ( void   )  const [inline]

Returns the device name.

Definition at line 105 of file DDB.hpp.

const string& torc::architecture::DDB::getFamilyName ( void   )  const [inline]

Returns the family name.

Definition at line 107 of file DDB.hpp.

const StringVector& torc::architecture::DDB::getSpeedGrades ( void   )  const [inline]

Returns a constant reference to a vector of speed grades.

Definition at line 109 of file DDB.hpp.

const Segments& torc::architecture::DDB::getSegments ( void   )  const [inline]

Returns a constant reference to the device segment data.

Definition at line 111 of file DDB.hpp.

const Sites& torc::architecture::DDB::getSites ( void   )  const [inline]

Returns a constant reference to the family and device site data.

Definition at line 113 of file DDB.hpp.

const Tiles& torc::architecture::DDB::getTiles ( void   )  const [inline]

Returns a constant reference to the family and device tile data.

Definition at line 115 of file DDB.hpp.

ArcUsage& torc::architecture::DDB::getArcUsage ( void   )  [inline]

Returns a constant reference to the design arc usage.

Definition at line 117 of file DDB.hpp.

WireUsage& torc::architecture::DDB::getWireUsage ( void   )  [inline]

Returns a constant reference to the design wire usage.

Definition at line 119 of file DDB.hpp.

void torc::architecture::DDB::clearUsage ( void   )  [inline]

Clears all arc and wire usage, effectively restaring with an empty device.

Definition at line 122 of file DDB.hpp.

void torc::architecture::DDB::useArc ( const Arc inArc  )  [inline]

Marks the arc and all of its source and sink segment wires as used.

Definition at line 127 of file DDB.hpp.

void torc::architecture::DDB::releaseArc ( const Arc inArc,
bool  releaseSource = true,
bool  releaseSink = true 
) [inline]

Marks the arc and all of its source and sink segment wires as unused.

Definition at line 133 of file DDB.hpp.

void torc::architecture::DDB::useSegment ( const Tilewire inTilewire  )  [inline]

Marks all wires on the segment as used.

Definition at line 139 of file DDB.hpp.

void torc::architecture::DDB::releaseSegment ( const Tilewire inTilewire  )  [inline]

Marks all wires on the segment as unused.

Definition at line 147 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 155 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 215 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 265 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 315 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 337 of file DDB.cpp.

Tilewire torc::architecture::DDB::sitePinToTilewire ( const std::string &  inSiteName,
const std::string &  inPinName 
) [inline]

Returns the tilewire for the specified site and pin name pair.

Definition at line 190 of file DDB.hpp.

Arc torc::architecture::DDB::tilePipToArc ( const std::string &  inTileName,
const std::string &  inSourceWireName,
const std::string &  inSinkWireName 
) [inline]

Returns the arc for the specified pip tile and wires.

Definition at line 197 of file DDB.hpp.

Tilewire torc::architecture::DDB::lookupTilewire ( const std::string &  inTileName,
const std::string &  inWireName 
) [inline]

Returns the tilewire for the specified tile and wire names.

Todo:
Add to unit tests.

Definition at line 211 of file DDB.hpp.


Member Data Documentation

The name of the device.

Definition at line 51 of file DDB.hpp.

The name of the family.

Definition at line 53 of file DDB.hpp.

The device database version.

Definition at line 55 of file DDB.hpp.

The family database version.

Definition at line 57 of file DDB.hpp.

The supported speed grades.

Definition at line 59 of file DDB.hpp.

The device segment data.

Definition at line 61 of file DDB.hpp.

The family and device site data.

Definition at line 63 of file DDB.hpp.

The family and device tile data.

Definition at line 65 of file DDB.hpp.

The design arc usage.

Definition at line 67 of file DDB.hpp.

The design wire usage.

Definition at line 69 of file DDB.hpp.


The documentation for this class was generated from the following files:

Generated on Thu Oct 13 16:49:31 2011 for TORC by  doxygen 1.5.6