ilang  1.1.4
ILAng: A Modeling and Verification Platform for SoCs
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros
Public Types | Public Member Functions | List of all members
ilang::Ila Class Reference

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...
 

Detailed Description

The wrapper of InstrLvlAbs (ILA).

Member Function Documentation

void ilang::Ila::AddInit ( const ExprRef init)

Add one initial constraint.

Parameters
[in]initthe Boolean type initial constraint.
bool ilang::Ila::ExecutePass ( const std::vector< PassID > &  passes) const

Execute the specified passes in order.

Parameters
[in]passesthe list of passes to execute.
void ilang::Ila::ExportToVerilog ( std::ostream &  fout) const

Export an ILA as Verilog.

Parameters
[in]foutthe output stream of the generated Verilog source.
ExprRef ilang::Ila::NewBoolInput ( const std::string &  name)

Declare an input of Boolean type.

Parameters
[in]nameinput name.
ExprRef ilang::Ila::NewBoolState ( const std::string &  name)

Declare a state variable of Boolean type.

Parameters
[in]namestate variable name.
ExprRef ilang::Ila::NewBvInput ( const std::string &  name,
const int &  bit_width 
)

Declare an input of bit-vector type.

Parameters
[in]nameinput name.
[in]bit_widthbit-vector bit-width.
ExprRef ilang::Ila::NewBvState ( const std::string &  name,
const int &  bit_width 
)

Declare a state variable of bit-vector type.

Parameters
[in]namestate variable name.
[in]bit_widthbit-vector bit-width.
Ila ilang::Ila::NewChild ( const std::string &  name)

Declare a child-ILA.

Parameters
[in]namechild-ILA name.
InstrRef ilang::Ila::NewInstr ( const std::string &  name)

Declare an instruction.

Parameters
[in]nameinstruction 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.

Parameters
[in]namestate variable name.
[in]addr_widthaddress bit-width.
[in]data_widthdata bit-width.
void ilang::Ila::SetFetch ( const ExprRef fetch)

Set the fetch function of the ILA.

Parameters
[in]fetchthe bit-vector type fetch function.
void ilang::Ila::SetValid ( const ExprRef valid)

Set the valid function of the ILA.

Parameters
[in]validthe Boolean type valid function.

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