torc-master
|
Importer from XDL format into a physical design. More...
#include <XdlImporter.hpp>
Public Member Functions | |
XdlImporter (void) | |
Construct the parser importer context. More... | |
virtual | ~XdlImporter (void) |
Virtual destructor. More... | |
DEPRECATED bool | import (istream &in, const string &name="stream input") |
Import XDL from an input stream. More... | |
bool | operator() (istream &in, const string &name="stream input") |
Import XDL from an input stream. More... | |
DEPRECATED bool | import (const string &input, const string &name="string stream") |
Import XDL from a string. More... | |
bool | operator() (const string &input, const string &name="string stream") |
Import XDL from a string. More... | |
DEPRECATED bool | import (const boost::filesystem::path &filename) |
Import XDL from a file. More... | |
bool | operator() (const boost::filesystem::path &filename) |
Import XDL from a file. More... | |
void | error (const location &l, const string &m) |
Error handling with associated line number. More... | |
void | error (const string &m) |
General error handling. More... | |
void | failure (void) |
Signals a parsing failure by deasserting the success flag. More... | |
DesignSharedPtr | getDesignPtr (void) |
Returns a shared pointer for the design. More... | |
Data Fields | |
bool | mTraceScanning |
Enable debug output in the flex scanner. More... | |
bool | mTraceParsing |
Enable debug output in the bison parser. More... | |
string | mStreamName |
Name of file or input stream for error messages. More... | |
class torc::XdlScanner * | lexer |
Pointer to the current lexer instance. More... | |
Protected Types | |
enum | EPipType { ePipTypeRegular = 0, ePipTypeRoutethrough } |
The pip type, either regular or routethrough. More... | |
Protected Member Functions | |
virtual void | initializeDatabase (void) |
Initialize the database if applicable. More... | |
virtual void | bind (torc::physical::InstancePinSharedPtr &) |
Bind the given instance pin to its database Tilewire if applicable. More... | |
virtual void | bind (torc::physical::Pip &, EPipType) |
Bind the given pip to the database arc and wire usage if applicable. More... | |
Protected Attributes | |
bool | mSuccess |
Flag signaling parsing success. More... | |
string | mDesignName |
Name of the design. More... | |
string | mDesignPart |
Device, package, and speed grade specified for the design. More... | |
string | mDesignDevice |
Device specified for the design. More... | |
string | mDesignPackage |
Package specified for the design. More... | |
string | mDesignSpeedGrade |
Speed grade specified for the design. More... | |
string | mDesignXdlVersion |
XDL version read in by the design. More... | |
DesignSharedPtr | mDesignPtr |
Shared pointer to the design. More... | |
CircuitWeakPtr | mCircuitPtr |
Weak pointer to the circuit. More... | |
boost::uint32_t | mModuleCount |
Number of modules read for the design. More... | |
string | mModuleName |
Name of the module. More... | |
string | mModuleAnchor |
Module anchor instance name. More... | |
string | mModuleInstance |
Name of instantiating instance for module reference. More... | |
ModuleSharedPtr | mModulePtr |
Shared pointer to the current module. More... | |
string | mReferenceInstantiation |
Name under which the module was instantiated. More... | |
string | mReferenceModule |
Name of the referenced module. More... | |
string | mReferenceInstance |
Name of the referenced instance. More... | |
ModuleSharedPtr | mReferenceModulePtr |
Shared pointer to the referenced module. More... | |
InstanceSharedPtr | mReferenceInstancePtr |
Shared pointer to the referenced instance. More... | |
InstanceReferenceSharedPtr | mInstanceReferencePtr |
Shared pointer to instance reference. More... | |
string | mPortName |
Name of the port. More... | |
string | mPortInstance |
Current port instance name. More... | |
string | mPortPin |
Current port pin name. More... | |
PortTempVector | mPortTempVector |
Vector of ports not yet mapped to instances. More... | |
boost::uint32_t | mInstanceCount |
Number of instances read for the design. More... | |
string | mInstanceName |
Current instance name. More... | |
TileTypeName | mInstanceType |
Current instance type. More... | |
SiteName | mInstanceSite |
Current instance site name. More... | |
TileName | mInstanceTile |
Current instance tile name. More... | |
torc::physical::EInstanceBonding | mInstanceBonding |
Current instance bonding. More... | |
InstanceSharedPtr | mInstancePtr |
Shared pointer to the current instance. More... | |
boost::uint32_t | mNetCount |
Number of nets read for the design. More... | |
torc::physical::ENetType | mNetType |
Current net type. More... | |
string | mNetName |
Current net name. More... | |
NetSharedPtr | mNetPtr |
Shared pointer to the current net. More... | |
InstanceName | mPinInstance |
Current pin instance name. More... | |
PinName | mPinName |
Current pin name. More... | |
torc::physical::EPinDirection | mPinDirection |
Current pin direction. More... | |
TileName | mPipTile |
Current pip tile name. More... | |
WireName | mPipSource |
Current pip source wire name. More... | |
WireName | mPipSink |
Current pip sink wire name. More... | |
torc::physical::EPipDirection | mPipDirection |
Current pip directionality. More... | |
string | mRoutethroughConfigSetting |
Current routethrough config setting. More... | |
string | mRoutethroughConfigName |
Current routethrough config name. More... | |
string | mRoutethroughConfigValue |
Current routethrough config value. More... | |
string | mRoutethroughInstance |
Current routethrough Instance name. More... | |
WireName | mRoutethroughSource |
Current routethrough source wire name. More... | |
WireName | mRoutethroughSink |
Current routethrough sink wire name. More... | |
boost::uint32_t | mConfigCount |
Number of configurations read for the design. More... | |
ConfigMap | mConfigMap |
Current config map. More... | |
string | mConfigSetting |
Current config setting. More... | |
string | mConfigName |
Current config name. More... | |
string | mConfigValue |
Current config value. More... | |
Private Types | |
typedef std::string | string |
Imported type name. More... | |
typedef std::istream | istream |
Imported type name. More... | |
Friends | |
class | torc::physical::physical::XdlImporterUnitTest |
The unit test class has access to our internals. More... | |
class | torc::XdlParser |
The XdlParse has access to our members. More... | |
Importer from XDL format into a physical design.
The XdlImporter creates the XdlParser and XdlScanner classes and connects them. The input stream is then fed into the scanner object, which delivers a sequence of tokens to the parser. The importer is also available as a parameter to the grammar rules.
Definition at line 48 of file physical/XdlImporter.hpp.
|
private |
Imported type name.
Definition at line 58 of file physical/XdlImporter.hpp.
|
private |
Imported type name.
Definition at line 56 of file physical/XdlImporter.hpp.
|
protected |
The pip type, either regular or routethrough.
Enumerator | |
---|---|
ePipTypeRegular | |
ePipTypeRoutethrough |
Definition at line 152 of file physical/XdlImporter.hpp.
torc::physical::XdlImporter::XdlImporter | ( | void | ) |
Construct the parser importer context.
Definition at line 30 of file physical/XdlImporter.cpp.
|
inlinevirtual |
Virtual destructor.
Reimplemented in torc::architecture::XdlImporter.
Definition at line 65 of file physical/XdlImporter.hpp.
|
inlineprotectedvirtual |
Bind the given instance pin to its database Tilewire if applicable.
Reimplemented in torc::architecture::XdlImporter.
Definition at line 236 of file physical/XdlImporter.hpp.
|
inlineprotectedvirtual |
Bind the given pip to the database arc and wire usage if applicable.
Reimplemented in torc::architecture::XdlImporter.
Definition at line 238 of file physical/XdlImporter.hpp.
Error handling with associated line number.
This can be modified to output the error in another manner, for example to a dialog box.
Definition at line 79 of file physical/XdlImporter.cpp.
void torc::physical::XdlImporter::error | ( | const string & | m | ) |
General error handling.
This can be modified to output the error in another manner, for example to a dialog box.
Definition at line 84 of file physical/XdlImporter.cpp.
|
inline |
Signals a parsing failure by deasserting the success flag.
Definition at line 138 of file physical/XdlImporter.hpp.
|
inline |
Returns a shared pointer for the design.
This design is created and populated during XDL import process.
Definition at line 143 of file physical/XdlImporter.hpp.
|
inline |
Import XDL from an input stream.
in | Input stream. |
name | Stream name to use for error messages. |
Definition at line 92 of file physical/XdlImporter.hpp.
|
inline |
Import XDL from a string.
input | Input stream. |
name | Stream name to use for error messages. |
Definition at line 106 of file physical/XdlImporter.hpp.
|
inline |
Import XDL from a file.
filename | Input file name. |
Definition at line 118 of file physical/XdlImporter.hpp.
|
inlineprotectedvirtual |
Initialize the database if applicable.
Only the torc::architecture::XdlImporter subclass actually initializes the database.
Reimplemented in torc::architecture::XdlImporter.
Definition at line 234 of file physical/XdlImporter.hpp.
Import XDL from an input stream.
in | Input stream. |
name | Stream name to use for error messages. |
Definition at line 48 of file physical/XdlImporter.cpp.
bool torc::physical::XdlImporter::operator() | ( | const string & | input, |
const string & | name = "string stream" |
||
) |
Import XDL from a string.
input | Input stream. |
name | Stream name to use for error messages. |
Definition at line 74 of file physical/XdlImporter.cpp.
bool torc::physical::XdlImporter::operator() | ( | const boost::filesystem::path & | filename | ) |
Import XDL from a file.
filename | Input file name. |
Definition at line 67 of file physical/XdlImporter.cpp.
|
friend |
The unit test class has access to our internals.
Definition at line 52 of file physical/XdlImporter.hpp.
|
friend |
The XdlParse has access to our members.
Definition at line 148 of file physical/XdlImporter.hpp.
class torc::XdlScanner* torc::physical::XdlImporter::lexer |
Pointer to the current lexer instance.
This serves to connect the parser to the scanner, and is used by the yylex macro.
Definition at line 77 of file physical/XdlImporter.hpp.
|
protected |
Weak pointer to the circuit.
Definition at line 166 of file physical/XdlImporter.hpp.
|
protected |
Number of configurations read for the design.
Definition at line 224 of file physical/XdlImporter.hpp.
|
protected |
Current config map.
Definition at line 225 of file physical/XdlImporter.hpp.
|
protected |
Current config name.
Definition at line 227 of file physical/XdlImporter.hpp.
|
protected |
Current config setting.
Definition at line 226 of file physical/XdlImporter.hpp.
|
protected |
Current config value.
Definition at line 228 of file physical/XdlImporter.hpp.
|
protected |
Device specified for the design.
Definition at line 161 of file physical/XdlImporter.hpp.
|
protected |
Name of the design.
Definition at line 159 of file physical/XdlImporter.hpp.
|
protected |
Package specified for the design.
Definition at line 162 of file physical/XdlImporter.hpp.
|
protected |
Device, package, and speed grade specified for the design.
Definition at line 160 of file physical/XdlImporter.hpp.
|
protected |
Shared pointer to the design.
Definition at line 165 of file physical/XdlImporter.hpp.
|
protected |
Speed grade specified for the design.
Definition at line 163 of file physical/XdlImporter.hpp.
|
protected |
XDL version read in by the design.
Definition at line 164 of file physical/XdlImporter.hpp.
|
protected |
Current instance bonding.
Definition at line 195 of file physical/XdlImporter.hpp.
|
protected |
Number of instances read for the design.
Definition at line 190 of file physical/XdlImporter.hpp.
|
protected |
Current instance name.
Definition at line 191 of file physical/XdlImporter.hpp.
|
protected |
Shared pointer to the current instance.
Definition at line 196 of file physical/XdlImporter.hpp.
|
protected |
Shared pointer to instance reference.
Definition at line 181 of file physical/XdlImporter.hpp.
|
protected |
Current instance site name.
Definition at line 193 of file physical/XdlImporter.hpp.
|
protected |
Current instance tile name.
Definition at line 194 of file physical/XdlImporter.hpp.
|
protected |
Current instance type.
Definition at line 192 of file physical/XdlImporter.hpp.
|
protected |
Module anchor instance name.
Definition at line 171 of file physical/XdlImporter.hpp.
|
protected |
Number of modules read for the design.
Definition at line 169 of file physical/XdlImporter.hpp.
|
protected |
Name of instantiating instance for module reference.
Definition at line 172 of file physical/XdlImporter.hpp.
|
protected |
Name of the module.
Definition at line 170 of file physical/XdlImporter.hpp.
|
protected |
Shared pointer to the current module.
Definition at line 173 of file physical/XdlImporter.hpp.
|
protected |
Number of nets read for the design.
Definition at line 199 of file physical/XdlImporter.hpp.
|
protected |
Current net name.
Definition at line 201 of file physical/XdlImporter.hpp.
|
protected |
Shared pointer to the current net.
Definition at line 202 of file physical/XdlImporter.hpp.
|
protected |
Current net type.
Definition at line 200 of file physical/XdlImporter.hpp.
|
protected |
Current pin direction.
Definition at line 207 of file physical/XdlImporter.hpp.
|
protected |
Current pin instance name.
Definition at line 205 of file physical/XdlImporter.hpp.
|
protected |
Current pin name.
Definition at line 206 of file physical/XdlImporter.hpp.
|
protected |
Current pip directionality.
Definition at line 213 of file physical/XdlImporter.hpp.
|
protected |
Current pip sink wire name.
Definition at line 212 of file physical/XdlImporter.hpp.
|
protected |
Current pip source wire name.
Definition at line 211 of file physical/XdlImporter.hpp.
|
protected |
Current pip tile name.
Definition at line 210 of file physical/XdlImporter.hpp.
|
protected |
Current port instance name.
Definition at line 185 of file physical/XdlImporter.hpp.
|
protected |
Name of the port.
Definition at line 184 of file physical/XdlImporter.hpp.
|
protected |
Current port pin name.
Definition at line 186 of file physical/XdlImporter.hpp.
|
protected |
Vector of ports not yet mapped to instances.
Definition at line 187 of file physical/XdlImporter.hpp.
|
protected |
Name of the referenced instance.
Definition at line 178 of file physical/XdlImporter.hpp.
|
protected |
Shared pointer to the referenced instance.
Definition at line 180 of file physical/XdlImporter.hpp.
|
protected |
Name under which the module was instantiated.
Definition at line 176 of file physical/XdlImporter.hpp.
|
protected |
Name of the referenced module.
Definition at line 177 of file physical/XdlImporter.hpp.
|
protected |
Shared pointer to the referenced module.
Definition at line 179 of file physical/XdlImporter.hpp.
|
protected |
Current routethrough config name.
Definition at line 217 of file physical/XdlImporter.hpp.
|
protected |
Current routethrough config setting.
Definition at line 216 of file physical/XdlImporter.hpp.
|
protected |
Current routethrough config value.
Definition at line 218 of file physical/XdlImporter.hpp.
|
protected |
Current routethrough Instance name.
Definition at line 219 of file physical/XdlImporter.hpp.
|
protected |
Current routethrough sink wire name.
Definition at line 221 of file physical/XdlImporter.hpp.
|
protected |
Current routethrough source wire name.
Definition at line 220 of file physical/XdlImporter.hpp.
string torc::physical::XdlImporter::mStreamName |
Name of file or input stream for error messages.
Definition at line 73 of file physical/XdlImporter.hpp.
|
protected |
Flag signaling parsing success.
Definition at line 156 of file physical/XdlImporter.hpp.
bool torc::physical::XdlImporter::mTraceParsing |
Enable debug output in the bison parser.
Definition at line 71 of file physical/XdlImporter.hpp.
bool torc::physical::XdlImporter::mTraceScanning |
Enable debug output in the flex scanner.
Definition at line 69 of file physical/XdlImporter.hpp.