#include <model.h>
Public Member Functions | |
clsModule (string nm, string t, bool orig=true) | |
constructor | |
~clsModule () | |
destructor | |
bool | operator< (clsModule const &c) const |
definition of the '<' operator over class objects | |
bool | operator!= (clsModule c) const |
definition of the '!=' operator over class objects | |
bool | operator* (clsModule const &c) const |
definition of the '*' operator over class objects | |
string | getName () const |
gets name of the module | |
string | getType () const |
gets type of the module | |
void | setArea (int i) |
sets area to the module | |
int | getArea () |
gets area of the module | |
void | setPower (int i) |
sets power consumption to the module | |
int | getPower () |
gets power consumption of the module | |
bool | addPort (string nm, int nt, int w, bool orig=true) |
adds port with specified width to a module's clsModule::mapPort | |
bool | addPort (string nm, int nt, int hbit, int lbit, bool orig=true) |
adds port (containing bits in hbit:lbit range ) to a module's clsModule::mapPort | |
bool | addInterface (clsModuleType *mtptr, bool orig=true) |
adds interface to the module according to properties of clsModule::type | |
bool | bitsExist (string bits) |
function for checking existence of bits in module interface | |
bool | addTranis (string s, bool orig=true) |
adds transparency data to the module | |
set< tMTypeData, lt_mtdata > ::iterator | getSTranisBegin () |
gets begining of clsModule::setOfTRANIS | |
set< tMTypeData, lt_mtdata > ::iterator | getSTranisEnd () |
gets end of clsModule::setOfTRANIS | |
void | eraseTranis (set< tMTypeData, lt_mtdata >::iterator t) |
erases data stored in clsModule::setOfTRANIS | |
bool | addTranspData (clsModuleType *mtptr, bool orig=true) |
adds transparency data to the module according to properties of clsModule::type | |
clsPort * | findPort (string nm) |
searches for the port within module interface | |
map< string, clsPort >::iterator | getMapPortBegin () |
gets begining of clsModule::mapPort | |
map< string, clsPort >::iterator | getMapPortEnd () |
gets end of clsModule::mapPort | |
void | erasePort (map< string, clsPort >::iterator p) |
erases data stored in clsModule::mapPort | |
bool | addConst (string s_names, string s_values) |
adds constant and its value to clsModule::mapConsts | |
int | evalExpr (string nm) |
evaluates given expression. Values to be assigned to non-numeric symbols utilized in the expression are taken from clsModule::mapConsts | |
int | getConstVal (string nm) |
gets value of given constant | |
map< string, int >::iterator | getMapConstsBegin () |
gets beginning of clsModule::mapConsts | |
map< string, int >::iterator | getMapConstsEnd () |
gets end of clsModule::mapConsts | |
void | setOrig (bool v) |
sets originality flag of the object to v value | |
bool | getOrig () const |
gets value of object's originality flag | |
bool | changeTypeTo (string type) |
changes clsModule::type to given type (including interface change, transparency-behavior change etc.). See dual clsModule::typeBack for more info | |
bool | typeBack () |
returns clsModule::type to its original setting (including interface change, transparency-behavior change etc.). See dual clsModule::changeTypeTo for more info | |
Private Attributes | |
string | name |
module name | |
string | type |
name of module type | |
int | area |
estimated actual area of the module | |
int | power |
estimated actual wort-case power consumption of the module | |
map< string, clsPort > | mapPort |
map of all ports within module | |
map< string, int > | mapConsts |
relation between constant name present in (general) module-type template and its value specified by particular module declaration | |
set< tMTypeData, lt_mtdata > | setOfTRANIS |
set of module's transparency data | |
bool | orig |
originality flag. Set to true for a bit originally present in the design |
information about modules (its name and type) is read from a file whose name must be specified by means of tool's command line parameters (see tool's help to -i command line parameter). Each circuit is assigned an independent set of the class objects (stored in clsCircuit::mapMod map).
clsModule::clsModule | ( | string | nm, | |
string | t, | |||
bool | orig = true | |||
) |
constructor
[in] | nm | name of the module |
[in] | t | module type |
[in] | orig | originality flag (implicitly set to true) |
clsModule::~clsModule | ( | ) |
destructor
bool clsModule::operator< | ( | clsModule const & | c | ) | const [inline] |
definition of the '<' operator over class objects
bool clsModule::operator!= | ( | clsModule | c | ) | const [inline] |
definition of the '!=' operator over class objects
bool clsModule::operator* | ( | clsModule const & | c | ) | const [inline] |
definition of the '*' operator over class objects
string clsModule::getName | ( | ) | const [inline] |
gets name of the module
string clsModule::getType | ( | ) | const [inline] |
gets type of the module
void clsModule::setArea | ( | int | i | ) | [inline] |
sets area to the module
int clsModule::getArea | ( | ) | [inline] |
gets area of the module
void clsModule::setPower | ( | int | i | ) | [inline] |
sets power consumption to the module
int clsModule::getPower | ( | ) | [inline] |
gets power consumption of the module
bool clsModule::addPort | ( | string | nm, | |
int | nt, | |||
int | w, | |||
bool | orig = true | |||
) |
adds port with specified width to a module's clsModule::mapPort
[in] | nm | name of the module port is to be added to |
[in] | nt | port type (see tNode) |
[in] | w | port width |
[in] | orig | originality flag (implicitly set to true) |
bool clsModule::addPort | ( | string | nm, | |
int | nt, | |||
int | hbit, | |||
int | lbit, | |||
bool | orig = true | |||
) |
adds port (containing bits in hbit:lbit range ) to a module's clsModule::mapPort
[in] | nm | name of the module port is to be added to |
[in] | nt | port type (see tNode) |
[in] | hbit | highest bit in the port |
[in] | lbit | lowest bit in the port |
[in] | orig | originality flag (implicitly set to true) |
bool clsModule::addInterface | ( | clsModuleType * | mtptr, | |
bool | orig = true | |||
) |
adds interface to the module according to properties of clsModule::type
[in] | mtptr | pointer to module-type module's interface will be synchronized with |
[in] | orig | originality flag (implicitly set to true) |
bool clsModule::bitsExist | ( | string | bits | ) |
function for checking existence of bits in module interface
bool clsModule::addTranis | ( | string | s, | |
bool | orig = true | |||
) |
adds transparency data to the module
[in] | s | tranis information |
[in] | orig | originality flag (implicitly set to true) |
set<tMTypeData, lt_mtdata>::iterator clsModule::getSTranisBegin | ( | ) | [inline] |
gets begining of clsModule::setOfTRANIS
set<tMTypeData, lt_mtdata>::iterator clsModule::getSTranisEnd | ( | ) | [inline] |
gets end of clsModule::setOfTRANIS
void clsModule::eraseTranis | ( | set< tMTypeData, lt_mtdata >::iterator | t | ) | [inline] |
erases data stored in clsModule::setOfTRANIS
bool clsModule::addTranspData | ( | clsModuleType * | mtptr, | |
bool | orig = true | |||
) |
adds transparency data to the module according to properties of clsModule::type
[in] | mtptr | poiter to module-type tranises are to be synchronized with |
[in] | orig | originality flag (implicitly set to true) |
clsPort* clsModule::findPort | ( | string | nm | ) | [inline] |
searches for the port within module interface
map<string, clsPort>::iterator clsModule::getMapPortBegin | ( | ) | [inline] |
gets begining of clsModule::mapPort
map<string, clsPort>::iterator clsModule::getMapPortEnd | ( | ) | [inline] |
gets end of clsModule::mapPort
void clsModule::erasePort | ( | map< string, clsPort >::iterator | p | ) | [inline] |
erases data stored in clsModule::mapPort
bool clsModule::addConst | ( | string | s_names, | |
string | s_values | |||
) |
adds constant and its value to clsModule::mapConsts
[in] | s_names | constant names to be added to the module |
[in] | s_values | constant values to be assigned to constant names |
int clsModule::evalExpr | ( | string | nm | ) |
evaluates given expression. Values to be assigned to non-numeric symbols utilized in the expression are taken from clsModule::mapConsts
int clsModule::getConstVal | ( | string | nm | ) | [inline] |
gets value of given constant
map<string, int>::iterator clsModule::getMapConstsBegin | ( | ) | [inline] |
gets beginning of clsModule::mapConsts
map<string, int>::iterator clsModule::getMapConstsEnd | ( | ) | [inline] |
gets end of clsModule::mapConsts
void clsModule::setOrig | ( | bool | v | ) | [inline] |
sets originality flag of the object to v value
bool clsModule::getOrig | ( | ) | const [inline] |
gets value of object's originality flag
bool clsModule::changeTypeTo | ( | string | type | ) |
changes clsModule::type to given type (including interface change, transparency-behavior change etc.). See dual clsModule::typeBack for more info
bool clsModule::typeBack | ( | ) |
returns clsModule::type to its original setting (including interface change, transparency-behavior change etc.). See dual clsModule::changeTypeTo for more info
string clsModule::name [private] |
module name
string clsModule::type [private] |
name of module type
int clsModule::area [private] |
estimated actual area of the module
int clsModule::power [private] |
estimated actual wort-case power consumption of the module
map<string, clsPort> clsModule::mapPort [private] |
map of all ports within module
map<string, int> clsModule::mapConsts [private] |
relation between constant name present in (general) module-type template and its value specified by particular module declaration
set<tMTypeData, lt_mtdata> clsModule::setOfTRANIS [private] |
set of module's transparency data
bool clsModule::orig [private] |
originality flag. Set to true for a bit originally present in the design