6 #include "scd_simulator.h"
7 #include "scd_cont_slave_wrapper.h"
8 #include "fsm/scd_cont_state.h"
11 /* forward declaration */
12 class scd_cont_man_master;
16 * Base class for all control master states.
18 class scd_stm_base : public scd_cont_state
23 * \param sim the simulation environment
24 * \param fsm the FSM of this state
26 scd_stm_base(scd_simulator& sim, scd_cont_man_master& fsm);
28 virtual ~scd_stm_base() {}
32 void set_idle(const sc_core::sc_time& time) {}
39 bool advance_time() const;
40 const sc_core::sc_time& get_time_step();
43 scd_cont_man_master& _fsm;
44 std::list<scd_cont_slave_wrapper*>& _slaves;
45 sc_core::sc_time& _time_step;
46 scd_cont_state& _st_init;
47 scd_cont_state& _st_busy;
48 scd_cont_state& _st_idle;
49 scd_cont_state& _st_done;
50 scd_cont_state& _st_time_req;
51 scd_cont_state& _st_time;
52 scd_cont_state& _st_term_req;
53 scd_cont_state& _st_terminate;
54 scd_cont_state& _st_terminated;
55 scd_cont_state& _st_fail;
56 scd_cont_state& _st_failed;
58 /* member functions */
60 bool _some_slaves_active();