dol: initial dol commit
[jump.git] / dol / src / dol / visitor / hdsd / scd / fsm / scd_stm_busy.cpp
1 #include "fsm/scd_stm_busy.h"
2
3 #include "scd_logging.h"
4 #include "scd_exception.h"
5 #include "scd_cont_man_master.h"
6
7
8 void scd_stm_busy::set_idle(const sc_core::sc_time& time)
9 {
10     /* prevents the situation where no events exist, but a huge
11      * ammount of data is being transferred that will generate events later
12      */
13     if (_sim.get_poller().wait(SCD_CONT_DELAY))
14         return;
15
16     _time_step = time;
17     _fsm.set_state(_st_idle);
18 }
19
20
21 void scd_stm_busy::set_done()
22 {
23     /* prevents the situation where no events exist, but a huge
24      * ammount of data is being transferred that will generate events later
25      */
26     if (_sim.get_poller().wait(SCD_CONT_DELAY))
27         return;
28
29     _time_step = sc_core::SC_ZERO_TIME;
30     _fsm.set_state(_st_done);
31 }
32
33
34 bool scd_stm_busy::busy() const { return true; }