X-Git-Url: http://sraa.de/git/?a=blobdiff_plain;f=dol%2Fsrc%2Fdol%2Fvisitor%2Fhdsd%2Fscd%2Ffsm%2Fscd_sts_busy.cpp;fp=dol%2Fsrc%2Fdol%2Fvisitor%2Fhdsd%2Fscd%2Ffsm%2Fscd_sts_busy.cpp;h=a9bb214ae816bd6035cf6fc3bbb2f7ca2e117b6f;hb=8c411cf24ed0eb889191aaeafd8fa1e69081df42;hp=0000000000000000000000000000000000000000;hpb=dea7a4fb1ed110d3ce6e6d9255103d724bd66c0e;p=jump.git diff --git a/dol/src/dol/visitor/hdsd/scd/fsm/scd_sts_busy.cpp b/dol/src/dol/visitor/hdsd/scd/fsm/scd_sts_busy.cpp new file mode 100644 index 0000000..a9bb214 --- /dev/null +++ b/dol/src/dol/visitor/hdsd/scd/fsm/scd_sts_busy.cpp @@ -0,0 +1,36 @@ +#include "fsm/scd_sts_busy.h" + +#include "scd_logging.h" +#include "scd_exception.h" +#include "scd_cont_man_slave.h" + + +void scd_sts_busy::set_idle(const sc_core::sc_time& time) +{ + /* prevents the situation where no events exist, but a huge + * ammount of data is being transferred that will generate events later + */ + if (_sim.get_poller().wait(SCD_CONT_DELAY)) + return; + + scd_command* cmd = new scd_command(SCD_CM_CONTROL, SCD_CM_IDLE, time); + _fsm.send_command(cmd); + _fsm.set_state(_st_idle); +} + + +void scd_sts_busy::set_done() +{ + /* prevents the situation where no events exist, but a huge + * ammount of data is being transferred that will generate events later + */ + if (_sim.get_poller().wait(SCD_CONT_DELAY)) + return; + + scd_command* cmd = new scd_command(SCD_CM_CONTROL, SCD_CM_DONE); + _fsm.send_command(cmd); + _fsm.set_state(_st_done); +} + + +bool scd_sts_busy::busy() const { return true; }