ilang
1.1.4
ILAng: A Modeling and Verification Platform for SoCs
|
The wrapper of Expr (e.g. state var, var relation, constant, etc). More...
#include <ilang++.h>
Public Member Functions | |
ExprRef (ExprPtr ptr) | |
Constructor with the pointer of the actual data. | |
~ExprRef () | |
Default destructor. | |
ExprPtr | get () const |
Return the wrapped Expr pointer. | |
int | bit_width () const |
Return the bit-width if is bit-vector; return -1 otherwise. | |
int | addr_width () const |
Return the address bit-width if is memory; return -1 otherwise. | |
int | data_width () const |
Return the data bit-width if is memory; return -1 otherwise. | |
std::string | name () const |
Return the expression name as std::string. | |
ExprRef | Load (const ExprRef &addr) const |
Load from memory. | |
ExprRef | Store (const ExprRef &addr, const ExprRef &data) const |
Store to memory. | |
ExprRef | Load (const NumericType &addr) const |
Load from memory with constant address. | |
ExprRef | Store (const NumericType &addr, const NumericType &data) const |
Store to memory with constant address and data. | |
ExprRef | Append (const ExprRef &lsbv) const |
Append another bit-vector to the less significant side. | |
ExprRef | operator() (const int &hi, const int &lo) const |
Extract bit-field in the bit-vector. | |
ExprRef | operator() (const int &idx) const |
Extract single-bit in the bit-vector. | |
ExprRef | ZExt (const int &length) const |
Zero-extend the bit-vector to the specified length. | |
ExprRef | SExt (const int &length) const |
Sign-extend the bit-vector to the specified length. | |
void | ReplaceArg (const int &i, const ExprRef &new_arg) |
Replace the i-th argument with the new node. | |
void | ReplaceArg (const ExprRef &org_arg, const ExprRef &new_arg) |
Replace the original argument (must exist) with the new argument. | |
bool | SetEntryNum (const int &num) |
Set the entry number of the memory (size regardless of bit-width). | |
int | GetEntryNum () |
GEt the entry number of the memory (size regardless of bit-width). | |
The wrapper of Expr (e.g. state var, var relation, constant, etc).