|
ilang
1.1.4
ILAng: A Modeling and Verification Platform for SoCs
|
The class for the Instruction. An Instr object contains: More...
#include <instr.h>
Public Types | |
| typedef std::shared_ptr< Instr > | InstrPtr |
| Pointer type for normal use of Instr. | |
|
typedef std::shared_ptr< const Instr > | InstrCnstPtr |
| Pointer type for read-only use of Instr. | |
| typedef std::set< std::string > | StateNameSet |
| Type for a set of state names. | |
Public Types inherited from ilang::Object | |
| typedef std::shared_ptr< Object > | ObjPtr |
| Pointer type for normal use of Object. | |
Public Member Functions | |
| Instr (const std::string &name, const InstrLvlAbsPtr &host=nullptr) | |
| Constructor with the ast simplifier. | |
| ~Instr () | |
| Default destructor. | |
| bool | is_instr () const |
| Return true if Is type Instr. | |
| InstrLvlAbsPtr | host () const |
| Return the host ILA. | |
| void | set_decode (const ExprPtr &decode) |
| Set the decode function if not yet assigned. More... | |
| void | set_update (const std::string &name, const ExprPtr &update) |
| Set the update function for the state variable specified by name. More... | |
| void | set_update (const ExprPtr &state, const ExprPtr &update) |
| Set the update function for the state variable specified by var pointer. More... | |
| void | set_program (const InstrLvlAbsPtr &program) |
| Set the child-program (as a child-ILA) of the instruction. More... | |
| ExprPtr | decode () const |
| Return the decode function. | |
| ExprPtr | update (const std::string &name) const |
| Return the update function for the state specified by name. More... | |
| ExprPtr | update (const ExprPtr &state) const |
| Return the update function for the state specified by var pointer. More... | |
| StateNameSet | updated_states () const |
| return the (potentially) updated state of this function | |
| InstrLvlAbsPtr | program () const |
| Returun the child-ILA comprising the child-program. | |
| void | ForceSetDecode (const ExprPtr &decode) |
| Set the decode function. More... | |
| void | ForceAddUpdate (const std::string &name, const ExprPtr &update) |
| Overwrite update function for the state variable specified by name. More... | |
| std::ostream & | Print (std::ostream &out) const |
| Output function. | |
Public Member Functions inherited from ilang::Object | |
| Object () | |
| Default constructor. | |
| Object (const std::string &name) | |
| Constructor with string name. | |
| virtual | ~Object () |
| Default destructor. | |
| const Symbol & | name () const |
| Get the symbol (name). | |
| virtual bool | is_instr_lvl_abs () const |
| Is type InstrLvlAbs. | |
| virtual bool | is_ast () const |
| Is type Ast. | |
Static Public Member Functions | |
| static InstrPtr | New (const std::string &name, InstrLvlAbsPtr host=nullptr) |
| Create a new instruction (Instr) binded with the host. Used for hiding implementation specific type details. | |
Friends | |
| std::ostream & | operator<< (std::ostream &out, InstrPtr i) |
| Overload output stream operator. | |
| std::ostream & | operator<< (std::ostream &out, InstrCnstPtr i) |
| Overload output stream operator for const object. | |
The class for the Instruction. An Instr object contains:
| void ilang::Instr::ForceAddUpdate | ( | const std::string & | name, |
| const ExprPtr & | update | ||
| ) |
Overwrite update function for the state variable specified by name.
| [in] | name | the name of the state variable. |
| [in] | update | the update function expression (same type as state). |
| void ilang::Instr::ForceSetDecode | ( | const ExprPtr & | decode | ) |
Set the decode function.
| [in] | decode | is the pointer to the decode function (bool). |
| void ilang::Instr::set_decode | ( | const ExprPtr & | decode | ) |
Set the decode function if not yet assigned.
| [in] | decode | is the pointer to the decode function (bool). |
| void ilang::Instr::set_program | ( | const InstrLvlAbsPtr & | program | ) |
Set the child-program (as a child-ILA) of the instruction.
| [in] | program | the pointer to the child-ILA. |
| void ilang::Instr::set_update | ( | const std::string & | name, |
| const ExprPtr & | update | ||
| ) |
Set the update function for the state variable specified by name.
| [in] | name | the name of the state variable. |
| [in] | update | the update function expression (same type as state). |
Set the update function for the state variable specified by var pointer.
| [in] | state | the pointer to the state variable. |
| [in] | update | the update function expression (same type as state). |
| ExprPtr ilang::Instr::update | ( | const std::string & | name | ) | const |
Return the update function for the state specified by name.
| [in] | name | the name of the state variable. |
Return the update function for the state specified by var pointer.
| [in] | state | the pointer to the state variable. |
1.8.5