ilang  0.9.1
ILAng: A Modeling and Verification Platform for SoCs
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 Member Functions

 VerilogConstantExprEval (ast_expression *e)
 input : the string to evaluate
 
void ParseCurrentModuleParameters (ast_module_declaration *m)
 
double Eval ()
 parse a hierarchy More...
 

Protected Member Functions

virtual double _eval (ast_expression *e)
 

Protected Attributes

ast_expression * eval_expr
 the given expression
 
bool evaluated
 whether it has been evaluated or not
 
unsigned cached_value
 if it has been evaluated store the value here
 
bool eval_error
 record if there was an error in eval
 
std::string error_str
 record the errorneous part:
 
std::map< std::string, double > param_defs
 to record the variable binding
 

Detailed Description

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

Member Function Documentation

◆ Eval()

double ilang::VerilogConstantExprEval::Eval ( )

parse a hierarchy

Get the value

◆ ParseCurrentModuleParameters()

void ilang::VerilogConstantExprEval::ParseCurrentModuleParameters ( ast_module_declaration *  m)

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


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