ilang  1.0.2
ILAng: A Modeling and Verification Platform for SoCs
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ilang::VerilogConstantExprEval Class Reference

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_tparam_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 &param_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
 

Detailed Description

The class to convert a constant expr to an integer number.

Member Function Documentation

◆ ParseCurrentModuleParameters()

void ilang::VerilogConstantExprEval::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

parse only the current module's parameter definitions, will update param_defs


The documentation for this class was generated from the following file: