Inheritance diagram for class svt_fsm:
Base class for describing protocol state machines
Public Member Functions | |
| function void | abort ( ) |
| function void | append_callback ( svt_fsm_callback cb ) |
| virtual function void | build ( ) |
| function bit | callback_client_exists ( ) |
| function svt_fsm | create_fsm ( svt_type_factory_override_base typ, string name ) |
| function void | exception ( svt_fsm_exception except ) |
| virtual function int | get_inst_id ( ) |
| virtual function string | get_name ( ) |
| virtual function string | get_uid ( ) |
| virtual function string | get_xml_name ( ) |
| function void | goto_cb_exec ( svt_fsm_state_base from_state, svt_fsm_state_base to_state ) |
| function svt_fsm_state_base | m_create_state ( svt_type_factory_override_base typ ) |
| function void | m_init ( ) |
| function void | new (
string name = " |
| function void | override_fsm ( svt_type_factory_override_base orig, svt_type_factory_override_base over ) |
| function void | override_state ( svt_type_factory_override_base orig, svt_type_factory_override_base over ) |
| function void | prepend_callback ( svt_fsm_callback cb ) |
| virtual function void | print ( ) |
| task | run ( ) |
| function void | save_current_state_to_xml ( ) |
| function void | set_name ( string name ) |
| virtual function void | set_xml_writer ( svt_xml_writer xml_writer ) |
| function void | unregister_callback ( svt_fsm_callback cb ) |
| task | wait_for_state_transition ( output svt_fsm_state_base to_state ) |
Public Attributes | |
| int | callback_client_exists_cache = -1; |
| vmm_log | log |
Protected Member Functions | |
| virtual function bit | is_viable_next_fsm_state ( svt_fsm_state_base test_next ) |
| function void | set_done_state ( svt_fsm_state_base state ) |
| function void | set_reset_state ( svt_fsm_state_base state ) |
| function void | set_start_state ( svt_fsm_state_base state ) |
| virtual task | wait_for_reset ( ) |
Protected Attributes | |
| protected svt_fsm_callback | callbacks [$] |
| static protected int | m_inst_count |
|
||
Terminate the FSM. This will cause the run method to return.
|
|
|
||
The FSM states are created in extensions of this method, using the `svt_fsm_create_state macro.
|
|
|
||
Create a sub-FSM instance of the specified type using the local factory. Should not be called directly. Rather, the `svt_fsm_create_fsm macro should be used instead.
|
|
||
Should be called whenever an error is detected by the FSM implementation Calls all registered instances of the svt_fsm_callback :: exception method.
|
|
||
Method returns unique numeric instance identifier for the FSM.
|
|
|
||
This method can be used to obtain a unique identifier for a data object.
Return values - Unique identifier for the object. |
|
||
This method provides a name which can be used to establish a channel associated with this FSM in the XML output. If there are multiple FSMs this is needed to differentiate this FSM from the other FSMs in the XML file. As such it needs to be unique across the set of FSMs that will be included in the XML file.
If there is just one state machine, then it is unnecessary to provide a channel for the FSM in the XML. In this case get_xml_name can return an empty string. This will result in the channel field not being included in the XML output. The default implementation uses get_name to obtain a representative name that can be used for the channel. This therefore supports there being multiple FSMs in the XML.
Return values - Name to be used to define a channel for the FSM in the XML output. |
|
||
Function encapsulating actions that occur at the transition from current to next state, including calling the 'goto' callback.
|
|
||
Method which checks whether the provided fsm state can be reached directly from the current fsm state.
test_next - The state to be checked as a possible next state. Return values - Indicates that this state is (1) or is not (0) a viable next state. |
|
||
Create a state of the specified type using the factory. Should not be called directly. Rather, the `svt_fsm_create_state macro should be used instead.
|
|
||
Initialize the FSM and it's states. Called automatically when run is called.
|
|
|
||
Override the type of a sub-FSM for this FSM instance only. Must be called before the state that creates the sub-FSM is started.
|
|
||
Override a state type with another state type for this FSM instance only. Must be called before build is called.
|
|
|
||
Print a description of the FSM and its current state.
|
|
||
Start and run the FSM until it is aborted.
|
|
||
Function that can force the current state to get an end time and be forced out to XML.
|
|
||
|
||
Set the name of the FSM instance
|
|
||
Define the reset state of the FSM (required if the start state is a dead-end state). Requires that wait_for_reset be implemented. Should be called in an extension of build or run.
|
|
||
|
||
Set the XML Writer, used to generate XML output at state transitions.
|
|
|
||
Must be implemented if a reset state is defined. Automatically invoked by the run task, it must return only once the reset condition has been detected. The implementation must not call super.wait_for_reset.
|
|
||
Wait for the FSM to transition state and return the state it just transitioned to. Returns NULL if the FSM was aborted.
|
|
|
|
Cached callback_client_exists return value used to accelerate callback processing.
|
|
|