dol: initial dol commit
[jump.git] / dol / src / dol / visitor / hdsd / scd / fsm / scd_stsw_time_req.cpp
1 #include "fsm/scd_stsw_time_req.h"
2
3 #include "scd_logging.h"
4 #include "scd_exception.h"
5 #include "scd_cont_slave_wrapper.h"
6
7
8 void scd_stsw_time_req::recv_time_nack()
9 {
10     _fsm.load_state();
11 }
12
13
14 void scd_stsw_time_req::recv_time_ack()
15 {
16     _fsm.set_state(_st_time_ack);
17 }
18
19
20 void scd_stsw_time_req::send_time_nack()
21 {
22     scd_command* cmd = new scd_command(SCD_CM_CONTROL, SCD_CM_TIME_NACK);
23     _fsm.send_command(cmd);
24     _fsm.load_state();
25 }
26
27
28 bool scd_stsw_time_req::time_req() const { return true; }
29
30
31 void scd_stsw_time_req::set_busy()
32 {
33     _fsm.save_state(_st_busy);
34 }
35
36
37 void scd_stsw_time_req::set_idle(const sc_core::sc_time& time)
38 {
39     _time_step = time;
40     _fsm.save_state(_st_idle);
41 }
42
43
44 void scd_stsw_time_req::set_done()
45 {
46     _time_step = sc_core::SC_ZERO_TIME;
47     _fsm.save_state(_st_done);
48 }