torc::physical::XdlImporter Class Reference

Importer from XDL format into a physical design. More...

#include <XdlImporter.hpp>

Inheritance diagram for torc::physical::XdlImporter:

Inheritance graph
[legend]
Collaboration diagram for torc::physical::XdlImporter:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 XdlImporter (void)
 Construct the parser importer context.
virtual ~XdlImporter (void)
 Virtual destructor.
DEPRECATED bool import (istream &in, const string &name="stream input")
 Import XDL from an input stream.
bool operator() (istream &in, const string &name="stream input")
 Import XDL from an input stream.
DEPRECATED bool import (const string &input, const string &name="string stream")
 Import XDL from a string.
bool operator() (const string &input, const string &name="string stream")
 Import XDL from a string.
DEPRECATED bool import (const boost::filesystem::path &filename)
 Import XDL from a file.
bool operator() (const boost::filesystem::path &filename)
 Import XDL from a file.
void error (const location &l, const string &m)
 Error handling with associated line number.
void error (const string &m)
 General error handling.
void failure (void)
 Signals a parsing failure by deasserting the success flag.
DesignSharedPtr getDesignPtr (void)
 Returns a shared pointer for the design.

Public Attributes

bool mTraceScanning
 Enable debug output in the flex scanner.
bool mTraceParsing
 Enable debug output in the bison parser.
string mStreamName
 Name of file or input stream for error messages.
class torc::XdlScanner * lexer
 Pointer to the current lexer instance.

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.
virtual void bind (torc::physical::InstancePinSharedPtr &)
 Bind the given instance pin to its database Tilewire if applicable.
virtual void bind (torc::physical::Pip &, EPipType)
 Bind the given pip to the database arc and wire usage if applicable.

Protected Attributes

bool mSuccess
 Flag signaling parsing success.
string mDesignName
 Name of the design.
string mDesignPart
 Device, package, and speed grade specified for the design.
string mDesignDevice
 Device specified for the design.
string mDesignPackage
 Package specified for the design.
string mDesignSpeedGrade
 Speed grade specified for the design.
string mDesignXdlVersion
 XDL version read in by the design.
DesignSharedPtr mDesignPtr
 Shared pointer to the design.
CircuitWeakPtr mCircuitPtr
 Weak pointer to the circuit.
boost::uint32_t mModuleCount
 Number of modules read for the design.
string mModuleName
 Name of the module.
string mModuleAnchor
 Module anchor instance name.
string mModuleInstance
 Name of instantiating instance for module reference.
ModuleSharedPtr mModulePtr
 Shared pointer to the current module.
string mReferenceInstantiation
 Name under which the module was instantiated.
string mReferenceModule
 Name of the referenced module.
string mReferenceInstance
 Name of the referenced instance.
ModuleSharedPtr mReferenceModulePtr
 Shared pointer to the referenced module.
InstanceSharedPtr mReferenceInstancePtr
 Shared pointer to the referenced instance.
InstanceReferenceSharedPtr mInstanceReferencePtr
 Shared pointer to instance reference.
string mPortName
 Name of the port.
string mPortInstance
 Current port instance name.
string mPortPin
 Current port pin name.
PortTempVector mPortTempVector
 Vector of ports not yet mapped to instances.
boost::uint32_t mInstanceCount
 Number of instances read for the design.
string mInstanceName
 Current instance name.
TileTypeName mInstanceType
 Current instance type.
SiteName mInstanceSite
 Current instance site name.
TileName mInstanceTile
 Current instance tile name.
torc::physical::EInstanceBonding mInstanceBonding
 Current instance bonding.
InstanceSharedPtr mInstancePtr
 Shared pointer to the current instance.
boost::uint32_t mNetCount
 Number of nets read for the design.
torc::physical::ENetType mNetType
 Current net type.
string mNetName
 Current net name.
NetSharedPtr mNetPtr
 Shared pointer to the current net.
InstanceName mPinInstance
 Current pin instance name.
PinName mPinName
 Current pin name.
torc::physical::EPinDirection mPinDirection
 Current pin direction.
TileName mPipTile
 Current pip tile name.
WireName mPipSource
 Current pip source wire name.
WireName mPipSink
 Current pip sink wire name.
torc::physical::EPipDirection mPipDirection
 Current pip directionality.
string mRoutethroughConfigSetting
 Current routethrough config setting.
string mRoutethroughConfigName
 Current routethrough config name.
string mRoutethroughConfigValue
 Current routethrough config value.
string mRoutethroughInstance
 Current routethrough Instance name.
WireName mRoutethroughSource
 Current routethrough source wire name.
WireName mRoutethroughSink
 Current routethrough sink wire name.
boost::uint32_t mConfigCount
 Number of configurations read for the design.
ConfigMap mConfigMap
 Current config map.
string mConfigSetting
 Current config setting.
string mConfigName
 Current config name.
string mConfigValue
 Current config value.

Private Types

typedef std::string string
 Imported type name.
typedef std::istream istream
 Imported type name.

Friends

class torc::physical::physical::XdlImporterUnitTest
 The unit test class has access to our internals.
class torc::XdlParser
 The XdlParse has access to our members.


Detailed Description

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 XdlImporter.hpp.


Member Typedef Documentation

typedef std::string torc::physical::XdlImporter::string [private]

Imported type name.

Definition at line 56 of file XdlImporter.hpp.

typedef std::istream torc::physical::XdlImporter::istream [private]

Imported type name.

Definition at line 58 of file XdlImporter.hpp.


Member Enumeration Documentation

The pip type, either regular or routethrough.

Definition at line 152 of file XdlImporter.hpp.


Constructor & Destructor Documentation

torc::physical::XdlImporter::XdlImporter ( void   ) 

Construct the parser importer context.

Reimplemented in torc::architecture::XdlImporter.

Definition at line 30 of file XdlImporter.cpp.

virtual torc::physical::XdlImporter::~XdlImporter ( void   )  [inline, virtual]

Virtual destructor.

Reimplemented in torc::architecture::XdlImporter.

Definition at line 65 of file XdlImporter.hpp.


Member Function Documentation

DEPRECATED bool torc::physical::XdlImporter::import ( istream in,
const string name = "stream input" 
) [inline]

Import XDL from an input stream.

Parameters:
in Input stream.
name Stream name to use for error messages.
Returns:
true if successfully parsed.
Deprecated:
Please use operator()(...) instead of import(...). i.e. importer(stream, name);

Definition at line 92 of file XdlImporter.hpp.

bool torc::physical::XdlImporter::operator() ( istream in,
const string name = "stream input" 
)

Import XDL from an input stream.

Parameters:
in Input stream.
name Stream name to use for error messages.
Returns:
true if successfully parsed.

Definition at line 48 of file XdlImporter.cpp.

DEPRECATED bool torc::physical::XdlImporter::import ( const string input,
const string name = "string stream" 
) [inline]

Import XDL from a string.

Parameters:
input Input stream.
name Stream name to use for error messages.
Returns:
true if successfully parsed.
Deprecated:
Please use operator()(...) instead of import(...). i.e. importer(input, name);

Definition at line 106 of file XdlImporter.hpp.

bool torc::physical::XdlImporter::operator() ( const string input,
const string name = "string stream" 
)

Import XDL from a string.

Parameters:
input Input stream.
name Stream name to use for error messages.
Returns:
true if successfully parsed.

Definition at line 68 of file XdlImporter.cpp.

DEPRECATED bool torc::physical::XdlImporter::import ( const boost::filesystem::path &  filename  )  [inline]

Import XDL from a file.

Parameters:
filename Input file name.
Returns:
true if successfully parsed.
Deprecated:
Please use operator()(...) instead of import(...). i.e. importer(filename);

Definition at line 118 of file XdlImporter.hpp.

bool torc::physical::XdlImporter::operator() ( const boost::filesystem::path &  filename  ) 

Import XDL from a file.

Parameters:
filename Input file name.
Returns:
true if successfully parsed.

Definition at line 61 of file XdlImporter.cpp.

void torc::physical::XdlImporter::error ( const location &  l,
const string m 
)

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 73 of file 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 78 of file XdlImporter.cpp.

void torc::physical::XdlImporter::failure ( void   )  [inline]

Signals a parsing failure by deasserting the success flag.

Definition at line 138 of file XdlImporter.hpp.

DesignSharedPtr torc::physical::XdlImporter::getDesignPtr ( void   )  [inline]

Returns a shared pointer for the design.

This design is created and populated during XDL import process.

Definition at line 143 of file XdlImporter.hpp.

virtual void torc::physical::XdlImporter::initializeDatabase ( void   )  [inline, protected, virtual]

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 XdlImporter.hpp.

virtual void torc::physical::XdlImporter::bind ( torc::physical::InstancePinSharedPtr  )  [inline, protected, virtual]

Bind the given instance pin to its database Tilewire if applicable.

Reimplemented in torc::architecture::XdlImporter.

Definition at line 236 of file XdlImporter.hpp.

virtual void torc::physical::XdlImporter::bind ( torc::physical::Pip ,
EPipType   
) [inline, protected, virtual]

Bind the given pip to the database arc and wire usage if applicable.

Reimplemented in torc::architecture::XdlImporter.

Definition at line 238 of file XdlImporter.hpp.


Friends And Related Function Documentation

friend class torc::physical::physical::XdlImporterUnitTest [friend]

The unit test class has access to our internals.

Definition at line 52 of file XdlImporter.hpp.

friend class torc::XdlParser [friend]

The XdlParse has access to our members.

Definition at line 148 of file XdlImporter.hpp.


Member Data Documentation

Enable debug output in the flex scanner.

Definition at line 69 of file XdlImporter.hpp.

Enable debug output in the bison parser.

Definition at line 71 of file XdlImporter.hpp.

Name of file or input stream for error messages.

Definition at line 73 of file 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 XdlImporter.hpp.

Flag signaling parsing success.

Definition at line 156 of file XdlImporter.hpp.

Name of the design.

Definition at line 159 of file XdlImporter.hpp.

Device, package, and speed grade specified for the design.

Definition at line 160 of file XdlImporter.hpp.

Device specified for the design.

Definition at line 161 of file XdlImporter.hpp.

Package specified for the design.

Definition at line 162 of file XdlImporter.hpp.

Speed grade specified for the design.

Definition at line 163 of file XdlImporter.hpp.

XDL version read in by the design.

Definition at line 164 of file XdlImporter.hpp.

Shared pointer to the design.

Definition at line 165 of file XdlImporter.hpp.

Weak pointer to the circuit.

Definition at line 166 of file XdlImporter.hpp.

boost::uint32_t torc::physical::XdlImporter::mModuleCount [protected]

Number of modules read for the design.

Definition at line 169 of file XdlImporter.hpp.

Name of the module.

Definition at line 170 of file XdlImporter.hpp.

Module anchor instance name.

Definition at line 171 of file XdlImporter.hpp.

Name of instantiating instance for module reference.

Definition at line 172 of file XdlImporter.hpp.

Shared pointer to the current module.

Definition at line 173 of file XdlImporter.hpp.

Name under which the module was instantiated.

Definition at line 176 of file XdlImporter.hpp.

Name of the referenced module.

Definition at line 177 of file XdlImporter.hpp.

Name of the referenced instance.

Definition at line 178 of file XdlImporter.hpp.

Shared pointer to the referenced module.

Definition at line 179 of file XdlImporter.hpp.

Shared pointer to the referenced instance.

Definition at line 180 of file XdlImporter.hpp.

Shared pointer to instance reference.

Definition at line 181 of file XdlImporter.hpp.

Name of the port.

Definition at line 184 of file XdlImporter.hpp.

Current port instance name.

Definition at line 185 of file XdlImporter.hpp.

Current port pin name.

Definition at line 186 of file XdlImporter.hpp.

Vector of ports not yet mapped to instances.

Definition at line 187 of file XdlImporter.hpp.

boost::uint32_t torc::physical::XdlImporter::mInstanceCount [protected]

Number of instances read for the design.

Definition at line 190 of file XdlImporter.hpp.

Current instance name.

Definition at line 191 of file XdlImporter.hpp.

Current instance type.

Definition at line 192 of file XdlImporter.hpp.

Current instance site name.

Definition at line 193 of file XdlImporter.hpp.

Current instance tile name.

Definition at line 194 of file XdlImporter.hpp.

Current instance bonding.

Definition at line 195 of file XdlImporter.hpp.

Shared pointer to the current instance.

Definition at line 196 of file XdlImporter.hpp.

boost::uint32_t torc::physical::XdlImporter::mNetCount [protected]

Number of nets read for the design.

Definition at line 199 of file XdlImporter.hpp.

Current net type.

Definition at line 200 of file XdlImporter.hpp.

Current net name.

Definition at line 201 of file XdlImporter.hpp.

Shared pointer to the current net.

Definition at line 202 of file XdlImporter.hpp.

Current pin instance name.

Definition at line 205 of file XdlImporter.hpp.

Current pin name.

Definition at line 206 of file XdlImporter.hpp.

Current pin direction.

Definition at line 207 of file XdlImporter.hpp.

Current pip tile name.

Definition at line 210 of file XdlImporter.hpp.

Current pip source wire name.

Definition at line 211 of file XdlImporter.hpp.

Current pip sink wire name.

Definition at line 212 of file XdlImporter.hpp.

Current pip directionality.

Definition at line 213 of file XdlImporter.hpp.

Current routethrough config setting.

Definition at line 216 of file XdlImporter.hpp.

Current routethrough config name.

Definition at line 217 of file XdlImporter.hpp.

Current routethrough config value.

Definition at line 218 of file XdlImporter.hpp.

Current routethrough Instance name.

Definition at line 219 of file XdlImporter.hpp.

Current routethrough source wire name.

Definition at line 220 of file XdlImporter.hpp.

Current routethrough sink wire name.

Definition at line 221 of file XdlImporter.hpp.

boost::uint32_t torc::physical::XdlImporter::mConfigCount [protected]

Number of configurations read for the design.

Definition at line 224 of file XdlImporter.hpp.

Current config map.

Definition at line 225 of file XdlImporter.hpp.

Current config setting.

Definition at line 226 of file XdlImporter.hpp.

Current config name.

Definition at line 227 of file XdlImporter.hpp.

Current config value.

Definition at line 228 of file XdlImporter.hpp.


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

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