torc-master
|
Utility class to modularize/flatten designs. More...
#include <ModuleTransformer.hpp>
Public Member Functions | |
ModuleTransformer (DesignSharedPtr &inDesignPtr) | |
Public constructor. More... | |
bool | modularize (const InstanceSharedPtrVector &inInstances, const string &inModuleDefinitionName, const string &inModuleInstanceName, bool inKeepPlacement=false, bool inKeepRouting=false) |
Group a set of instances into a module. More... | |
bool | flatten (const string &inModuleInstanceName, bool inKeepPlacement=false, bool inKeepRouting=false) |
Flatten a module instance in a design. More... | |
Protected Types | |
enum | ENetConnectivity { eNetConnectivityNotConnected = 0, eNetConnectivityInternal, eNetConnectivityExternal } |
Net connectivity with respect to module instance, either not connected to module, internal to module, or external to module. More... | |
typedef Design::InstanceSharedPtrConstIterator | InstanceSharedPtrConstIterator |
Imported type. More... | |
typedef Design::NetSharedPtrIterator | NetSharedPtrIterator |
Imported type. More... | |
typedef Design::ModuleSharedPtrIterator | ModuleSharedPtrIterator |
Imported type. More... | |
typedef Design::InstanceSharedPtrIterator | InstanceSharedPtrIterator |
Imported type. More... | |
typedef Module::PortSharedPtrConstIterator | PortSharedPtrConstIterator |
Imported type. More... | |
typedef Net::InstancePinSharedPtrIterator | InstancePinSharedPtrIterator |
Imported type. More... | |
typedef Net::InstancePinSharedPtrConstIterator | InstancePinSharedPtrConstIterator |
Imported type. More... | |
typedef Net::PipConstIterator | PipConstIterator |
Imported type. More... | |
Protected Attributes | |
DesignSharedPtr | mDesignPtr |
Design pointer. More... | |
Static Protected Attributes | |
static const string | sHierarchySeparator = "/" |
Hierarchy separator. More... | |
static const string | sPortIndexSeparator = "_" |
Port index separator. More... | |
static const boost::regex | sValidPinNameCharactersRegEx |
Valid characters in a pin name. More... | |
static const boost::regex | sInvalidPinNameFirstCharactersRegEx |
Invalid first characters in a pin name. More... | |
Private Member Functions | |
ENetConnectivity | getNetConnectivity (InstanceSharedPtrConstIterator inInstanceSharedPtrConstBegin, InstanceSharedPtrConstIterator inInstanceSharedPtrConstEnd, NetSharedPtr inNetPtr) |
Generate net connectivity type based on module boundary. More... | |
string | sanitizePinName (string inPinName) |
Sanitize a pin name. More... | |
InstanceSharedPtr | cloneInstance (InstanceSharedPtr inIntancePtr, const string &inCloneInstanceName) |
Clone an instance. More... | |
NetSharedPtr | cloneNet (NetSharedPtr inNetPtr, const string &inNetCloneName, const string &inModuleInstanceName) |
Clone a net. More... | |
Utility class to modularize/flatten designs.
Definition at line 34 of file ModuleTransformer.hpp.
|
protected |
Imported type.
Definition at line 51 of file ModuleTransformer.hpp.
|
protected |
Imported type.
Definition at line 49 of file ModuleTransformer.hpp.
|
protected |
Imported type.
Definition at line 39 of file ModuleTransformer.hpp.
|
protected |
Imported type.
Definition at line 45 of file ModuleTransformer.hpp.
|
protected |
Imported type.
Definition at line 43 of file ModuleTransformer.hpp.
|
protected |
Imported type.
Definition at line 41 of file ModuleTransformer.hpp.
|
protected |
Imported type.
Definition at line 53 of file ModuleTransformer.hpp.
|
protected |
Imported type.
Definition at line 47 of file ModuleTransformer.hpp.
|
protected |
Net connectivity with respect to module instance, either not connected to module, internal to module, or external to module.
Enumerator | |
---|---|
eNetConnectivityNotConnected | |
eNetConnectivityInternal | |
eNetConnectivityExternal |
Definition at line 68 of file ModuleTransformer.hpp.
|
inline |
Public constructor.
inDesignPtr | Pointer to the design. |
Definition at line 76 of file ModuleTransformer.hpp.
|
inlineprivate |
Clone an instance.
inIntancePtr | A pointer to the instance to be cloned. |
inCloneInstanceName | The name of the clone. |
Clone an instance and its configuration. This function does not clone the instance pins. Instance pins are handled when cloning nets, in function cloneNet.
Definition at line 872 of file ModuleTransformer.hpp.
|
inlineprivate |
Clone a net.
inNetPtr | A pointer to the net to be cloned. |
inNetCloneName | The name of the clone. |
inModuleInstanceName | The module instance name. |
Clone a net, its configuration, its sources, sinks and pips. For pips, the routethrough instances are droppped and not cloned.
Definition at line 916 of file ModuleTransformer.hpp.
|
inline |
Flatten a module instance in a design.
inModuleInstanceName | The name of the module instance to be flattened. |
inKeepPlacement | A flag specifying whether placement should be retained after flattening. Default to false. |
inKeepRouting | A flag specifying whether routing should be retained afer flattening. Defaults to false. |
Definition at line 481 of file ModuleTransformer.hpp.
|
inlineprivate |
Generate net connectivity type based on module boundary.
inInstanceSharedPtrConstBegin | A begin iterator to instances contained in module. |
inInstanceSharedPtrConstEnd | An end iterator to instances contained in module. |
inNetPtr | A pointer to a net. |
Definition at line 760 of file ModuleTransformer.hpp.
|
inline |
Group a set of instances into a module.
inInstances | The vector of instances to group. |
inModuleDefinitionName | The module definition name. |
inModuleInstanceName | The module instance name. |
inKeepPlacement | A flag specifying whether placement should be retained after modularization. Default to false. |
inKeepRouting | A flag specifying whether routing should be retained afer modularization. Defaults to false. |
Definition at line 147 of file ModuleTransformer.hpp.
|
inlineprivate |
Sanitize a pin name.
inPinName | The pin name to be sanitized. |
Definition at line 840 of file ModuleTransformer.hpp.
|
protected |
Design pointer.
Definition at line 56 of file ModuleTransformer.hpp.
|
staticprotected |
Hierarchy separator.
Definition at line 58 of file ModuleTransformer.hpp.
|
staticprotected |
Invalid first characters in a pin name.
Definition at line 64 of file ModuleTransformer.hpp.
|
staticprotected |
Port index separator.
Definition at line 60 of file ModuleTransformer.hpp.
|
staticprotected |
Valid characters in a pin name.
Definition at line 62 of file ModuleTransformer.hpp.