3bd39dc4b709453e92bf445d4e1e29c339ce5ea2
[jump.git] / dol / src / dol / visitor / hdsd / scd / fsm / scd_stsw_term_req.cpp
1 #include "fsm/scd_stsw_term_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_term_req::recv_term_nack()
9 {
10     _fsm.load_state();
11 }
12
13
14 void scd_stsw_term_req::recv_term_ack()
15 {
16     _fsm.set_state(_st_term_ack);
17 }
18
19
20 void scd_stsw_term_req::send_term_nack()
21 {
22     scd_command* cmd = new scd_command(SCD_CM_CONTROL, SCD_CM_TERM_NACK);
23     _fsm.send_command(cmd);
24     _fsm.load_state();
25 }
26
27
28 bool scd_stsw_term_req::term_req() const { return true; }
29
30
31 void scd_stsw_term_req::set_busy()
32 {
33     _time_step = sc_core::SC_ZERO_TIME;
34     _fsm.save_state(_st_busy);
35 }
36
37
38 void scd_stsw_term_req::set_idle(const sc_core::sc_time& time)
39 {
40     _time_step = time;
41     _fsm.save_state(_st_idle);
42 }
43
44
45 void scd_stsw_term_req::set_done()
46 {
47     _fsm.save_state(_st_done);
48 }