ilang
1.1.4
ILAng: A Modeling and Verification Platform for SoCs
|
The wrapper of InstrLvlAbs (ILA). More...
#include <ilang++.h>
Public Types | |
enum | PassID { SANITY_CHECK_AND_FIX = 0, SIMPLIFY_SYNTACTIC, SIMPLIFY_SEMANTIC, REWRITE_CONDITIONAL_STORE, REWRITE_LOAD_FROM_STORE } |
Supported pass ID. | |
typedef enum ilang::Ila::PassID | PassID |
Supported pass ID. | |
Public Member Functions | |
Ila (const std::string &name) | |
Constructor with the specified name. | |
Ila (IlaPtr ptr) | |
Constructor with the pointer of the actual data. | |
~Ila () | |
Default destructor. | |
ExprRef | NewBoolState (const std::string &name) |
Declare a state variable of Boolean type. More... | |
ExprRef | NewBvState (const std::string &name, const int &bit_width) |
Declare a state variable of bit-vector type. More... | |
ExprRef | NewMemState (const std::string &name, const int &addr_width, const int &data_width) |
Declare a state variable of memory (array) type. More... | |
ExprRef | NewBoolInput (const std::string &name) |
Declare an input of Boolean type. More... | |
ExprRef | NewBvInput (const std::string &name, const int &bit_width) |
Declare an input of bit-vector type. More... | |
void | AddInit (const ExprRef &init) |
Add one initial constraint. More... | |
void | SetFetch (const ExprRef &fetch) |
Set the fetch function of the ILA. More... | |
void | SetValid (const ExprRef &valid) |
Set the valid function of the ILA. More... | |
InstrRef | NewInstr (const std::string &name) |
Declare an instruction. More... | |
Ila | NewChild (const std::string &name) |
Declare a child-ILA. More... | |
size_t | input_num () const |
Return the number of input variables. | |
size_t | state_num () const |
Return the number of state variables. | |
size_t | instr_num () const |
Return the number of instructions. | |
size_t | child_num () const |
Return the number of child-ILAs. | |
size_t | init_num () const |
Return the number of initial condition. | |
std::string | name () const |
Return the Ila name. | |
ExprRef | fetch () const |
Return the fetch function. | |
ExprRef | valid () const |
Return the valid function. | |
ExprRef | input (const size_t &i) const |
Access the i-th input variable. | |
ExprRef | state (const size_t &i) const |
Access the i-th state variable. | |
InstrRef | instr (const size_t &i) const |
Access the i-th instruction. | |
Ila | child (const size_t &i) const |
Access the i-th child-ILA. | |
ExprRef | init (const size_t &i) const |
Access the i-th initial condition. | |
ExprRef | input (const std::string &name) const |
Return the named input variable; return NULL if not registered. | |
ExprRef | state (const std::string &name) const |
Return the named state variable; return NULL if not registered. | |
InstrRef | instr (const std::string &name) const |
Return the named instruction; return NULL if not registered. | |
Ila | child (const std::string &name) const |
Return the named child-ILA; return NULL if not registered. | |
IlaPtr | get () const |
Return the wrapped ILA pointer. | |
void | ExportToVerilog (std::ostream &fout) const |
Export an ILA as Verilog. More... | |
void | FlattenHierarchy () |
Flatten the hierarchy by lifting child-instructions as the top-level parent instructions. | |
bool | ExecutePass (const std::vector< PassID > &passes) const |
Execute the specified passes in order. More... | |
The wrapper of InstrLvlAbs (ILA).
void ilang::Ila::AddInit | ( | const ExprRef & | init | ) |
Add one initial constraint.
[in] | init | the Boolean type initial constraint. |
bool ilang::Ila::ExecutePass | ( | const std::vector< PassID > & | passes | ) | const |
Execute the specified passes in order.
[in] | passes | the list of passes to execute. |
void ilang::Ila::ExportToVerilog | ( | std::ostream & | fout | ) | const |
Export an ILA as Verilog.
[in] | fout | the output stream of the generated Verilog source. |
ExprRef ilang::Ila::NewBoolInput | ( | const std::string & | name | ) |
Declare an input of Boolean type.
[in] | name | input name. |
ExprRef ilang::Ila::NewBoolState | ( | const std::string & | name | ) |
Declare a state variable of Boolean type.
[in] | name | state variable name. |
ExprRef ilang::Ila::NewBvInput | ( | const std::string & | name, |
const int & | bit_width | ||
) |
Declare an input of bit-vector type.
[in] | name | input name. |
[in] | bit_width | bit-vector bit-width. |
ExprRef ilang::Ila::NewBvState | ( | const std::string & | name, |
const int & | bit_width | ||
) |
Declare a state variable of bit-vector type.
[in] | name | state variable name. |
[in] | bit_width | bit-vector bit-width. |
Ila ilang::Ila::NewChild | ( | const std::string & | name | ) |
Declare a child-ILA.
[in] | name | child-ILA name. |
InstrRef ilang::Ila::NewInstr | ( | const std::string & | name | ) |
Declare an instruction.
[in] | name | instruction name. |
ExprRef ilang::Ila::NewMemState | ( | const std::string & | name, |
const int & | addr_width, | ||
const int & | data_width | ||
) |
Declare a state variable of memory (array) type.
[in] | name | state variable name. |
[in] | addr_width | address bit-width. |
[in] | data_width | data bit-width. |
void ilang::Ila::SetFetch | ( | const ExprRef & | fetch | ) |
Set the fetch function of the ILA.
[in] | fetch | the bit-vector type fetch function. |
void ilang::Ila::SetValid | ( | const ExprRef & | valid | ) |
Set the valid function of the ILA.
[in] | valid | the Boolean type valid function. |