X-Git-Url: http://sraa.de/git/?a=blobdiff_plain;f=dol%2Fsrc%2Fdol%2Fvisitor%2Fhdsd%2Fscd%2Ffsm%2Fscd_stm_busy.cpp;fp=dol%2Fsrc%2Fdol%2Fvisitor%2Fhdsd%2Fscd%2Ffsm%2Fscd_stm_busy.cpp;h=fcb322c09882ac3e70828e8dfb21fee41d6882b5;hb=8c411cf24ed0eb889191aaeafd8fa1e69081df42;hp=0000000000000000000000000000000000000000;hpb=dea7a4fb1ed110d3ce6e6d9255103d724bd66c0e;p=jump.git diff --git a/dol/src/dol/visitor/hdsd/scd/fsm/scd_stm_busy.cpp b/dol/src/dol/visitor/hdsd/scd/fsm/scd_stm_busy.cpp new file mode 100644 index 0000000..fcb322c --- /dev/null +++ b/dol/src/dol/visitor/hdsd/scd/fsm/scd_stm_busy.cpp @@ -0,0 +1,34 @@ +#include "fsm/scd_stm_busy.h" + +#include "scd_logging.h" +#include "scd_exception.h" +#include "scd_cont_man_master.h" + + +void scd_stm_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; + + _time_step = time; + _fsm.set_state(_st_idle); +} + + +void scd_stm_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; + + _time_step = sc_core::SC_ZERO_TIME; + _fsm.set_state(_st_done); +} + + +bool scd_stm_busy::busy() const { return true; }