5 #ifndef ILANG_VERILOG_IN_VERILOG_CONST_PARSER_H__
6 #define ILANG_VERILOG_IN_VERILOG_CONST_PARSER_H__
13 #include <verilogparser/verilog_ast.h>
25 typedef std::pair<ast_module_declaration*, ast_module_instantiation*>
43 double virtual _eval(ast_expression* e,
48 ast_module_declaration* m,
59 ast_module_declaration* current_module);
61 double Eval(ast_expression* _s);
68 #endif // ILANG_VERILOG_IN_VERILOG_CONST_PARSER_H__
std::vector< double > ordered_parameter_dict_t
ordered paramater dictionary
Definition: verilog_const_parser.h:32
double Eval(ast_expression *_s)
Get the value.
std::pair< ast_module_declaration *, ast_module_instantiation * > param_hier_item_t
An item in the hierarchy.
Definition: verilog_const_parser.h:26
bool eval_error
record if there was an error in eval
Definition: verilog_const_parser.h:36
std::string error_str
record the errorneous part:
Definition: verilog_const_parser.h:38
bool error() const
Get parsing error.
The class to convert a constant expr to an integer number.
Definition: verilog_const_parser.h:21
std::vector< param_hier_item_t > param_def_hierarchy
The hierarchy.
Definition: verilog_const_parser.h:28
std::map< std::string, double > named_parameter_dict_t
named parameter dictionary
Definition: verilog_const_parser.h:30
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)
named_parameter_dict_t current_module_param_defs
to record the variable binding in the current module
Definition: verilog_const_parser.h:40
void PopulateParameterDefByHierarchy(const param_def_hierarchy &hier, ast_module_declaration *current_module)
parse a hierarchy
VerilogConstantExprEval()
input : the string to evaluate