changeset c6a6fed4bf6c in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=c6a6fed4bf6c
description:
misc: Implement the Base SystemC Module as an sc_channel.
Implementing the Module as an sc_channel allows derived classes to
provide
SystemC interfaces. Other SystemC modules can connect to these
interfaces.
This meachanism can be used to control gem5 and acces gem5 components
from
within arbitrary SystemC moduels. Since sc_channel is derived from
sc_module, this patch does not break compatibility with existing code.
Signed-off-by: Jason Lowe-Power <[email protected]>
diffstat:
util/systemc/sc_module.cc | 3 ++-
util/systemc/sc_module.hh | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diffs (40 lines):
diff -r d0586994a10e -r c6a6fed4bf6c util/systemc/sc_module.cc
--- a/util/systemc/sc_module.cc Thu Feb 09 19:03:58 2017 -0500
+++ b/util/systemc/sc_module.cc Thu Feb 09 19:10:25 2017 -0500
@@ -43,6 +43,7 @@
* Steve Reinhardt
* Andrew Bardsley
* Matthias Jung
+ * Christian Menard
*/
/**
@@ -77,7 +78,7 @@
::setClockFrequency(1000000000000);
}
-Module::Module(sc_core::sc_module_name name) : sc_core::sc_module(name),
+Module::Module(sc_core::sc_module_name name) : sc_core::sc_channel(name),
in_simulate(false)
{
SC_METHOD(eventLoop);
diff -r d0586994a10e -r c6a6fed4bf6c util/systemc/sc_module.hh
--- a/util/systemc/sc_module.hh Thu Feb 09 19:03:58 2017 -0500
+++ b/util/systemc/sc_module.hh Thu Feb 09 19:10:25 2017 -0500
@@ -42,6 +42,7 @@
* Authors: Nathan Binkert
* Steve Reinhardt
* Andrew Bardsley
+ * Christian Menard
*/
/**
@@ -83,7 +84,7 @@
* This functionality is wrapped in an sc_module as its intended that
* the a class representing top level simulation control should be derived
* from this class. */
-class Module : public sc_core::sc_module
+class Module : public sc_core::sc_channel
{
protected:
/** Event to trigger (via. ::notify) for event scheduling from
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev