ilang
1.1.4
ILAng: A Modeling and Verification Platform for SoCs
|
The class to convert a constant expr to an integer number. More...
#include <verilog_const_parser.h>
Public Types | |
typedef std::pair < ast_module_declaration *, ast_module_instantiation * > | param_hier_item_t |
An item in the hierarchy. | |
typedef std::vector < param_hier_item_t > | param_def_hierarchy |
The hierarchy. | |
typedef std::map< std::string, double > | named_parameter_dict_t |
named parameter dictionary | |
typedef std::vector< double > | ordered_parameter_dict_t |
ordered paramater dictionary | |
Public Member Functions | |
VerilogConstantExprEval () | |
input : the string to evaluate | |
void | PopulateParameterDefByHierarchy (const param_def_hierarchy &hier, ast_module_declaration *current_module) |
parse a hierarchy | |
double | Eval (ast_expression *_s) |
Get the value. | |
bool | error () const |
Get parsing error. | |
Protected Member Functions | |
virtual double | _eval (ast_expression *e, const named_parameter_dict_t ¶m_defs) |
void | ParseCurrentModuleParameters (ast_module_declaration *m, const named_parameter_dict_t &named_parameter_override, const ordered_parameter_dict_t &ordered_parameter_override, named_parameter_dict_t &output_parameter_dict) |
Protected Attributes | |
bool | eval_error |
record if there was an error in eval | |
std::string | error_str |
record the errorneous part: | |
named_parameter_dict_t | current_module_param_defs |
to record the variable binding in the current module | |
The class to convert a constant expr to an integer number.
|
protected |
parse only the current module's parameter definitions, will update param_defs