torc-master
|
AST visitor to convert structural Verilog into a generic design. More...
#include <VerilogImporterVisitor.hpp>
Public Member Functions | |
VerilogImporterVisitor (ObjectFactorySharedPtr inObjectFactoryPtr, RootSharedPtr inRootPtr) | |
Public constructor. More... | |
Protected Types | |
typedef std::string | string |
Imported type name. More... | |
typedef map< string, ViewSharedPtr > | StringToViewMap |
A map from string to view shared pointer. More... | |
typedef map< string, NetSharedPtr > | StringToNetMap |
A map from string to net shared pointer. More... | |
typedef map< CellSharedPtr, bool > | CellToBoolMap |
A map of cell shared pointers to booleans. More... | |
typedef vector< NetSharedPtr > | NetSharedPtrVector |
A vector of net shared pointers. More... | |
typedef vector< size_t > | IndexVector |
A vector of element indices. More... | |
Protected Member Functions | |
virtual void | visit (AstNetlist *nodePtr, AstNUser *userPtr) |
Visit the top-level netlist. More... | |
virtual void | visit (AstModule *nodePtr, AstNUser *userPtr) |
Visit a Verilog module, and create an EDIF cell and view. More... | |
virtual void | visit (AstCell *nodePtr, AstNUser *userPtr) |
Visit a Verilog instance, and create and EDIF instance with populated pins. More... | |
virtual void | visit (AstPin *nodePtr, AstNUser *userPtr) |
Visit a Verilog pin, and add an endpoint to the corresponding EDIF net. More... | |
virtual void | visit (AstPort *nodePtr, AstNUser *userPtr) |
Visit a Verilog port, and create an EDIF port. More... | |
virtual void | visit (AstSelBit *nodePtr, AstNUser *userPtr) |
Visit a Verilog bit index. More... | |
virtual void | visit (AstSelExtract *nodePtr, AstNUser *userPtr) |
virtual void | visit (AstRange *nodePtr, AstNUser *userPtr) |
Visit a Verilog range. More... | |
virtual void | visit (AstDefParam *nodePtr, AstNUser *userPtr) |
virtual void | visit (AstVar *nodePtr, AstNUser *userPtr) |
Visit a Verilog variable, and create an EDIF wire or port. More... | |
virtual void | visit (AstAssignW *nodePtr, AstNUser *userPtr) |
Visit a Verilog assignment, and add an appropriate EDIF property. More... | |
virtual void | visit (AstParseRef *nodePtr, AstNUser *userPtr) |
virtual void | visit (AstText *nodePtr, AstNUser *userPtr) |
Visit a text node and store it. More... | |
virtual void | visit (AstConst *nodePtr, AstNUser *userPtr) |
Visit a constant node and store it. More... | |
virtual void | visit (AstNot *nodePtr, AstNUser *userPtr) |
Visit a NOT node and store it. More... | |
virtual void | visit (AstNotFoundModule *nodePtr, AstNUser *userPtr) |
virtual void | visit (AstBasicDType *nodePtr, AstNUser *userPtr) |
virtual void | visit (AstConcat *nodePtr, AstNUser *userPtr) |
virtual void | visit (AstNode *nodePtr, AstNUser *userPtr) |
ViewSharedPtr | findMasterView (std::string inMasterName, std::string inOriginalName, bool inCreate) |
Find the specified view, or optionally create it. More... | |
void | createDesigns (void) |
Create top-level designs for all Verilog modules that are never instantiated. More... | |
Protected Attributes | |
ObjectFactorySharedPtr | mObjectFactoryPtr |
The object factory shared pointer. More... | |
RootSharedPtr | mRootPtr |
The root shared pointer. More... | |
LibrarySharedPtr | mInferredBlackBoxesLibraryPtr |
The inferred black-box library shared pointer. More... | |
LibrarySharedPtr | mImportedCellLibraryPtr |
The cell library shared pointer. More... | |
LibrarySharedPtr | mCurrentLibraryPtr |
The current library shared pointer. More... | |
CellSharedPtr | mCurrentCellPtr |
The current cell shared pointer. More... | |
ViewSharedPtr | mCurrentViewPtr |
The current view shared pointer. More... | |
InstanceSharedPtr | mCurrentInstancePtr |
The current instance shared pointer. More... | |
NetSharedPtr | mCurrentNetPtr |
The current net shared pointer;. More... | |
NetSharedPtrVector | mCurrentNetPtrVector |
The current net vector. More... | |
string | mCurrentConstStr |
The current constant string. More... | |
int32_t | mCurrentConstInt |
The current constant signed integer. More... | |
V3Number | mCurrentConstNum |
The current constant number object. More... | |
string | mCurrentText |
The current text string. More... | |
bool | mCurrentNotFlag |
The current inversion flag. More... | |
bool | mCurrentConcatFlag |
The current concatenation flag. More... | |
int32_t | mCurrentRange [2] |
The current range. More... | |
IndexVector | mCurrentIndices |
The current array indices. More... | |
StringToViewMap | mMasterNameToView |
A map from module name to master view pointer. More... | |
uint32_t | mCurrentIndex |
A unique index to avoid name collisions. More... | |
StringToNetMap | mVectorBitNameToNet |
A map of net bit names to net shared pointers. More... | |
CellToBoolMap | mCellInstantiationFlag |
A map of cell shared pointers to instantiation settings. More... | |
bool | mImportLibraryCells |
A flag to indicate whether we should currently allow library cells. More... | |
Static Protected Attributes | |
static const int32_t | cUndefined = INT_MIN |
Undefined index constant. More... | |
static FileLine | sNullFileLine |
Initial file line information. More... | |
Friends | |
class | torc::generic::generic::VerilogImporterUnitTest |
The unit test class has access to our internals. More... | |
AST visitor to convert structural Verilog into a generic design.
Definition at line 39 of file VerilogImporterVisitor.hpp.
|
protected |
A map of cell shared pointers to booleans.
Definition at line 52 of file VerilogImporterVisitor.hpp.
|
protected |
A vector of element indices.
Definition at line 56 of file VerilogImporterVisitor.hpp.
|
protected |
A vector of net shared pointers.
Definition at line 54 of file VerilogImporterVisitor.hpp.
|
protected |
Imported type name.
Definition at line 46 of file VerilogImporterVisitor.hpp.
|
protected |
A map from string to net shared pointer.
Definition at line 50 of file VerilogImporterVisitor.hpp.
|
protected |
A map from string to view shared pointer.
Definition at line 48 of file VerilogImporterVisitor.hpp.
|
inline |
Public constructor.
inRootPtr | A torc::generic Root shared pointer to populate. |
Definition at line 160 of file VerilogImporterVisitor.hpp.
|
protected |
Create top-level designs for all Verilog modules that are never instantiated.
Definition at line 44 of file VerilogImporterVisitor.cpp.
|
inlineprotected |
Find the specified view, or optionally create it.
Definition at line 130 of file VerilogImporterVisitor.hpp.
|
protectedvirtual |
Visit the top-level netlist.
Definition at line 61 of file VerilogImporterVisitor.cpp.
|
protectedvirtual |
Visit a Verilog module, and create an EDIF cell and view.
Definition at line 79 of file VerilogImporterVisitor.cpp.
|
protectedvirtual |
Visit a Verilog instance, and create and EDIF instance with populated pins.
Definition at line 108 of file VerilogImporterVisitor.cpp.
|
protectedvirtual |
Visit a Verilog pin, and add an endpoint to the corresponding EDIF net.
Definition at line 139 of file VerilogImporterVisitor.cpp.
|
protectedvirtual |
Visit a Verilog port, and create an EDIF port.
Definition at line 291 of file VerilogImporterVisitor.cpp.
|
protectedvirtual |
Visit a Verilog bit index.
Definition at line 298 of file VerilogImporterVisitor.cpp.
|
protectedvirtual |
Definition at line 313 of file VerilogImporterVisitor.cpp.
|
protectedvirtual |
Visit a Verilog range.
Definition at line 333 of file VerilogImporterVisitor.cpp.
|
protectedvirtual |
Definition at line 342 of file VerilogImporterVisitor.cpp.
|
protectedvirtual |
Visit a Verilog variable, and create an EDIF wire or port.
Definition at line 374 of file VerilogImporterVisitor.cpp.
|
protectedvirtual |
Visit a Verilog assignment, and add an appropriate EDIF property.
Definition at line 456 of file VerilogImporterVisitor.cpp.
|
protectedvirtual |
Definition at line 489 of file VerilogImporterVisitor.cpp.
|
protectedvirtual |
Visit a text node and store it.
Definition at line 715 of file VerilogImporterVisitor.cpp.
|
protectedvirtual |
Visit a constant node and store it.
Definition at line 726 of file VerilogImporterVisitor.cpp.
|
protectedvirtual |
Visit a NOT node and store it.
Definition at line 746 of file VerilogImporterVisitor.cpp.
|
protectedvirtual |
Definition at line 755 of file VerilogImporterVisitor.cpp.
|
protectedvirtual |
Definition at line 764 of file VerilogImporterVisitor.cpp.
|
protectedvirtual |
Definition at line 774 of file VerilogImporterVisitor.cpp.
|
protectedvirtual |
Definition at line 783 of file VerilogImporterVisitor.cpp.
|
friend |
The unit test class has access to our internals.
Definition at line 43 of file VerilogImporterVisitor.hpp.
|
staticprotected |
Undefined index constant.
Definition at line 59 of file VerilogImporterVisitor.hpp.
|
protected |
A map of cell shared pointers to instantiation settings.
Definition at line 104 of file VerilogImporterVisitor.hpp.
|
protected |
The current cell shared pointer.
Definition at line 72 of file VerilogImporterVisitor.hpp.
|
protected |
The current concatenation flag.
Definition at line 92 of file VerilogImporterVisitor.hpp.
|
protected |
The current constant signed integer.
Definition at line 84 of file VerilogImporterVisitor.hpp.
|
protected |
The current constant number object.
Definition at line 86 of file VerilogImporterVisitor.hpp.
|
protected |
The current constant string.
Definition at line 82 of file VerilogImporterVisitor.hpp.
|
protected |
A unique index to avoid name collisions.
Definition at line 100 of file VerilogImporterVisitor.hpp.
|
protected |
The current array indices.
Definition at line 96 of file VerilogImporterVisitor.hpp.
|
protected |
The current instance shared pointer.
Definition at line 76 of file VerilogImporterVisitor.hpp.
|
protected |
The current library shared pointer.
Definition at line 70 of file VerilogImporterVisitor.hpp.
|
protected |
The current net shared pointer;.
Definition at line 78 of file VerilogImporterVisitor.hpp.
|
protected |
The current net vector.
Definition at line 80 of file VerilogImporterVisitor.hpp.
|
protected |
The current inversion flag.
Definition at line 90 of file VerilogImporterVisitor.hpp.
|
protected |
The current range.
Definition at line 94 of file VerilogImporterVisitor.hpp.
|
protected |
The current text string.
Definition at line 88 of file VerilogImporterVisitor.hpp.
|
protected |
The current view shared pointer.
Definition at line 74 of file VerilogImporterVisitor.hpp.
|
protected |
The cell library shared pointer.
Definition at line 68 of file VerilogImporterVisitor.hpp.
|
protected |
A flag to indicate whether we should currently allow library cells.
Definition at line 106 of file VerilogImporterVisitor.hpp.
|
protected |
The inferred black-box library shared pointer.
Definition at line 66 of file VerilogImporterVisitor.hpp.
|
protected |
A map from module name to master view pointer.
Definition at line 98 of file VerilogImporterVisitor.hpp.
|
protected |
The object factory shared pointer.
Definition at line 62 of file VerilogImporterVisitor.hpp.
|
protected |
The root shared pointer.
Definition at line 64 of file VerilogImporterVisitor.hpp.
|
protected |
A map of net bit names to net shared pointers.
Definition at line 102 of file VerilogImporterVisitor.hpp.
|
staticprotected |
Initial file line information.
Definition at line 108 of file VerilogImporterVisitor.hpp.