dol: initial dol commit
[jump.git] / dol / src / dol / visitor / hdsd / scd / fsm / scd_stsw_time_ack.cpp
diff --git a/dol/src/dol/visitor/hdsd/scd/fsm/scd_stsw_time_ack.cpp b/dol/src/dol/visitor/hdsd/scd/fsm/scd_stsw_time_ack.cpp
new file mode 100644 (file)
index 0000000..53d0a4c
--- /dev/null
@@ -0,0 +1,42 @@
+#include "fsm/scd_stsw_time_ack.h"
+
+#include "scd_logging.h"
+#include "scd_exception.h"
+#include "scd_cont_slave_wrapper.h"
+
+
+void scd_stsw_time_ack::recv_time_nack()
+{
+    scd_warn("received time_nack message in wrong state");
+}
+
+
+void scd_stsw_time_ack::recv_time_ack()
+{
+    scd_warn("received time_nack message in wrong state");
+}
+
+
+void scd_stsw_time_ack::send_time_nack()
+{
+    scd_command* cmd = new scd_command(SCD_CM_CONTROL, SCD_CM_TIME_NACK);
+    _fsm.send_command(cmd);
+    _fsm.load_state();
+}
+
+
+void scd_stsw_time_ack::send_time(const sc_core::sc_time& time)
+{
+    scd_command* cmd = new scd_command(SCD_CM_CONTROL, SCD_CM_TIME, time);
+    _fsm.send_command(cmd);
+    _fsm.set_state(_st_busy);
+}
+
+
+bool scd_stsw_time_ack::time_ack() const { return true; }
+
+
+const sc_core::sc_time& scd_stsw_time_ack::get_time_step()
+{
+    return _time_step;
+}