From 3b7441e9f7c0756fb6d202ff7b6bbccec1e62281 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Fri, 15 Jun 2018 17:01:14 -0700 Subject: systemc: Add some nonstandard SC_WAIT* macros. These are not in the standard, but are defined by Accellera and used in the tests. Change-Id: I4cbddac4eb75c58d8ae3eb77d1f291dac3c51cd6 Reviewed-on: https://gem5-review.googlesource.com/11261 Reviewed-by: Gabe Black Maintainer: Gabe Black --- src/systemc/ext/core/sc_module.hh | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/systemc/ext/core') diff --git a/src/systemc/ext/core/sc_module.hh b/src/systemc/ext/core/sc_module.hh index 68d2174b3..c83cf1d3b 100644 --- a/src/systemc/ext/core/sc_module.hh +++ b/src/systemc/ext/core/sc_module.hh @@ -250,6 +250,19 @@ bool sc_end_of_simulation_invoked(); sc_module *sc_module_sc_new(sc_module *); #define SC_NEW(x) ::sc_core::sc_module_sc_new(new x); +// Nonstandard +// In the Accellera implementation, this macro calls sc_set_location to record +// the current file and line, calls wait, and then calls it again to clear the +// file and line. We'll ignore the sc_set_location calls for now. +#define SC_WAIT() ::sc_core::wait(); + +// Nonstandard +// Same as above, but passes through an argument. +#define SC_WAITN(n) ::sc_core::wait(n); + +// Nonstandard +#define SC_WAIT_UNTIL(expr) do { SC_WAIT(); } while (!(expr)) + } // namespace sc_core #endif //__SYSTEMC_EXT_CORE_SC_MODULE_HH__ -- cgit v1.2.3