12struct quantumkeeper_st :
public tlm_utils::tlm_quantumkeeper {
13 using base = tlm_utils::tlm_quantumkeeper;
17 virtual ~quantumkeeper_st() {}
19 void reset()
override { tlm_utils::tlm_quantumkeeper::reset(); }
21 inline void reset(sc_core::sc_time
const& t) {
22 m_local_time = t - sc_core::sc_time_stamp();
23 m_next_sync_point = t + compute_local_quantum();
26 inline void check_and_sync(sc_core::sc_time core_inc) {
28 m_local_time += core_inc;
29 if((sc_core::sc_time_stamp() + m_local_time) >= m_next_sync_point) {
31 ::sc_core::wait(m_local_time);
32 m_local_time = sc_core::SC_ZERO_TIME;
33 m_next_sync_point = sc_core::sc_time_stamp() + compute_local_quantum();
36 sc_core::sc_time get_local_absolute_time()
const {
return base::get_current_time(); }
49 inline void execute_on_sysc(std::function<
void(
void)>& fct, sc_core::sc_time when) {
50 if(when > sc_core::SC_ZERO_TIME)