Gabe Black has submitted this change and it was merged. (
https://gem5-review.googlesource.com/c/public/gem5/+/11261 )
Change subject: systemc: Add some nonstandard SC_WAIT* macros.
......................................................................
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 <[email protected]>
Maintainer: Gabe Black <[email protected]>
---
M src/systemc/ext/core/sc_module.hh
1 file changed, 13 insertions(+), 0 deletions(-)
Approvals:
Gabe Black: Looks good to me, approved; Looks good to me, approved
diff --git a/src/systemc/ext/core/sc_module.hh
b/src/systemc/ext/core/sc_module.hh
index 68d2174..c83cf1d 100644
--- a/src/systemc/ext/core/sc_module.hh
+++ b/src/systemc/ext/core/sc_module.hh
@@ -250,6 +250,19 @@
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__
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/11261
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I4cbddac4eb75c58d8ae3eb77d1f291dac3c51cd6
Gerrit-Change-Number: 11261
Gerrit-PatchSet: 6
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Matthias Jung <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev