diff options
Diffstat (limited to 'src/systemc/ext/core/sc_main.hh')
-rw-r--r-- | src/systemc/ext/core/sc_main.hh | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/systemc/ext/core/sc_main.hh b/src/systemc/ext/core/sc_main.hh index 9bf0d0aae..24e93503e 100644 --- a/src/systemc/ext/core/sc_main.hh +++ b/src/systemc/ext/core/sc_main.hh @@ -30,6 +30,9 @@ #ifndef __SYSTEMC_EXT_CORE_SC_MAIN_HH__ #define __SYSTEMC_EXT_CORE_SC_MAIN_HH__ +#include "../dt/int/sc_nbdefs.hh" +#include "sc_time.hh" + extern "C" int sc_main(int argc, char *argv[]); namespace sc_core @@ -39,6 +42,55 @@ namespace sc_core // The standard version of this function doesn't have these "const" // qualifiers, but the canonical SystemC implementation does. extern "C" const char *const *sc_argv(); + + enum sc_starvation_policy + { + SC_RUN_TO_TIME, + SC_EXIT_ON_STARVATION + }; + + void sc_start(); + void sc_start(const sc_time &, sc_starvation_policy p=SC_RUN_TO_TIME); + static inline void + sc_start(double d, sc_time_unit t, sc_starvation_policy p=SC_RUN_TO_TIME) + { + sc_start(sc_time(d, t), p); + } + + void sc_pause(); + + enum sc_stop_mode + { + SC_STOP_FINISH_DELTA, + SC_STOP_IMMEDIATE, + }; + + void sc_set_stop_mode(sc_stop_mode mode); + sc_stop_mode sc_get_stop_mode(); + + void sc_stop(); + + const sc_time &sc_time_stamp(); + sc_dt::uint64 sc_delta_count(); + bool sc_is_running(); + bool sc_pending_activity_at_current_time(); + bool sc_pending_activity_at_future_time(); + bool sc_pending_activity(); + sc_time sc_time_to_pending_activity(); + + enum sc_status + { + SC_ELABORATION = 0x1, + SC_BEFORE_END_OF_ELABORATION = 0x02, + SC_END_OF_ELABORATION = 0x04, + SC_START_OF_SIMULATION = 0x08, + SC_RUNNING = 0x10, + SC_PAUSED = 0x20, + SC_STOPPED = 0x40, + SC_END_OF_SIMULATION = 0x80 + }; + + sc_status sc_get_status(); } // namespace sc_core #endif //__SYSTEMC_EXT_CORE_SC_MAIN_HH__ |