diff options
author | Gabe Black <gabeblack@google.com> | 2018-06-15 17:01:14 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-08-22 01:02:43 +0000 |
commit | 3b7441e9f7c0756fb6d202ff7b6bbccec1e62281 (patch) | |
tree | 8c9c5a0581932257fc5ba6e4e9ff144f08310ae5 /src/systemc | |
parent | d5983ac03f26b7f5f35d117dd07801f1d259401d (diff) | |
download | gem5-3b7441e9f7c0756fb6d202ff7b6bbccec1e62281.tar.xz |
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 <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc')
-rw-r--r-- | src/systemc/ext/core/sc_module.hh | 13 |
1 files changed, 13 insertions, 0 deletions
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__ |