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>
This commit is contained in:
@@ -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__
|
||||
|
||||
Reference in New Issue
Block a user