#include <SimInit.h>
Public Types | |
| typedef NetlistParser::StimulusMapType | StimulusMapType |
| typedef SimObject::Graph | Graph |
| typedef SimObject::GNode | GNode |
| typedef SimObject::EventTy | EventTy |
Public Member Functions | |
| SimInit (Graph &graph, const char *netlistFile) | |
| Instantiates a new simulation initializer. | |
| ~SimInit () | |
| const Graph & | getGraph () const |
| Gets the graph. | |
| const std::vector< EventTy > & | getInitEvents () const |
| Gets the inits the events. | |
| const std::vector< std::string > & | getInputNames () const |
| Gets the input names. | |
| const std::vector< SimObject * > & | getInputObjs () const |
| Gets the input objs. | |
| const std::vector< std::string > & | getOutputNames () const |
| Gets the output names. | |
| const std::vector< SimObject * > | getOutputObjs () const |
| Gets the output objs. | |
| const std::map< std::string, LogicVal > & | getOutValues () const |
| Gets the out values. | |
| size_t | getNumEdges () const |
| Gets the number edges. | |
| size_t | getNumNodes () const |
| Gets the number of nodes. | |
| const std::vector< GNode > & | getInputNodes () const |
| Gets the input nodes. | |
Private Member Functions | |
| void | createInputObjs () |
| Creates the input simulation objs. | |
| void | createOutputObjs () |
| Creates the output simulation objs. | |
| void | createInitEvents () |
| Creates the initial events. | |
| void | createGateObjs () |
| Creates the gate objs. | |
| void | createGraphNodes (const std::vector< SimObject * > &simObjs) |
| helper function, which creates graph nodes corresponding to any simulation object and add the node to the graph. | |
| void | createConnections () |
| Creates the connections i.e. | |
| void | initialize () |
| Initialize. | |
| void | destroy () |
| destructor helper | |
Static Private Member Functions | |
| static const std::map < std::string, OneInputFunc * > | oneInputFuncMap () |
| A mapping from string name (in the netlist) to functor that implements the corresponding functionality. | |
| static const std::map < std::string, TwoInputFunc * > | twoInputFuncMap () |
| A mapping from string name (in the netlist) to functor that implements the corresponding functionality. | |
| static std::string | addInPrefix (const std::string &name) |
| static std::string | addOutPrefix (const std::string &name) |
| template<typename T > | |
| static void | destroyVec (std::vector< T * > &vec) |
| freeing pointers in a vector before the vector itself is destroyed | |
Private Attributes | |
| Graph & | graph |
| The graph. | |
| NetlistParser | parser |
| The netlist parser. | |
| std::vector< SimObject * > | inputObjs |
| The input simulation objs. | |
| std::vector< GNode > | inputNodes |
| The input nodes. | |
| std::vector< SimObject * > | outputObjs |
| The output simulation objs. | |
| std::vector< EventTy > | initEvents |
| The initial events. | |
| std::vector< SimObject * > | gateObjs |
| The gates i.e. | |
| size_t | numEdges |
| The num edges. | |
| size_t | numNodes |
| The num nodes. | |
| size_t | simObjCntr |
| Counter for SimObject's. | |
| typedef SimObject::EventTy SimInit::EventTy |
| typedef SimObject::GNode SimInit::GNode |
| typedef SimObject::Graph SimInit::Graph |
| SimInit::SimInit | ( | Graph & | graph, | |
| const char * | netlistFile | |||
| ) | [inline] |
Instantiates a new simulation initializer.
| graph | the graph | |
| netlistFile | the netlist file |
| SimInit::~SimInit | ( | ) | [inline] |
| static std::string SimInit::addInPrefix | ( | const std::string & | name | ) | [inline, static, private] |
| static std::string SimInit::addOutPrefix | ( | const std::string & | name | ) | [inline, static, private] |
| void SimInit::createConnections | ( | ) | [inline, private] |
Creates the connections i.e.
edges in the graph An edge is created whenever a gate's output is connected to another gate's input.
| void SimInit::createGateObjs | ( | ) | [inline, private] |
Creates the gate objs.
| void SimInit::createGraphNodes | ( | const std::vector< SimObject * > & | simObjs | ) | [inline, private] |
helper function, which creates graph nodes corresponding to any simulation object and add the node to the graph.
No connections made yet
| void SimInit::createInitEvents | ( | ) | [inline, private] |
Creates the initial events.
| void SimInit::createInputObjs | ( | ) | [inline, private] |
Creates the input simulation objs.
| void SimInit::createOutputObjs | ( | ) | [inline, private] |
Creates the output simulation objs.
| void SimInit::destroy | ( | ) | [inline, private] |
destructor helper
| static void SimInit::destroyVec | ( | std::vector< T * > & | vec | ) | [inline, static, private] |
freeing pointers in a vector before the vector itself is destroyed
| const Graph& SimInit::getGraph | ( | ) | const [inline] |
Gets the graph.
| const std::vector<EventTy >& SimInit::getInitEvents | ( | ) | const [inline] |
Gets the inits the events.
| const std::vector<std::string>& SimInit::getInputNames | ( | ) | const [inline] |
Gets the input names.
| const std::vector<GNode>& SimInit::getInputNodes | ( | ) | const [inline] |
Gets the input nodes.
| const std::vector<SimObject*>& SimInit::getInputObjs | ( | ) | const [inline] |
Gets the input objs.
| size_t SimInit::getNumEdges | ( | ) | const [inline] |
Gets the number edges.
| size_t SimInit::getNumNodes | ( | ) | const [inline] |
Gets the number of nodes.
| const std::vector<std::string>& SimInit::getOutputNames | ( | ) | const [inline] |
Gets the output names.
| const std::vector<SimObject*> SimInit::getOutputObjs | ( | ) | const [inline] |
Gets the output objs.
| const std::map<std::string, LogicVal>& SimInit::getOutValues | ( | ) | const [inline] |
Gets the out values.
| void SimInit::initialize | ( | ) | [inline, private] |
Initialize.
Processing steps create the input and output objects and add to netlistArrays create the gate objects connect the netlists by populating the fanout lists create a list of initial events
| static const std::map<std::string, OneInputFunc* > SimInit::oneInputFuncMap | ( | ) | [inline, static, private] |
A mapping from string name (in the netlist) to functor that implements the corresponding functionality.
Helps in initialization
| static const std::map<std::string, TwoInputFunc*> SimInit::twoInputFuncMap | ( | ) | [inline, static, private] |
A mapping from string name (in the netlist) to functor that implements the corresponding functionality.
Helps in initialization
std::vector<SimObject*> SimInit::gateObjs [private] |
The gates i.e.
other than input and output ports.
Graph& SimInit::graph [private] |
The graph.
std::vector<EventTy > SimInit::initEvents [private] |
The initial events.
std::vector<GNode> SimInit::inputNodes [private] |
The input nodes.
std::vector<SimObject*> SimInit::inputObjs [private] |
The input simulation objs.
size_t SimInit::numEdges [private] |
The num edges.
size_t SimInit::numNodes [private] |
The num nodes.
std::vector<SimObject*> SimInit::outputObjs [private] |
The output simulation objs.
NetlistParser SimInit::parser [private] |
The netlist parser.
size_t SimInit::simObjCntr [private] |
Counter for SimObject's.
1.6.3