summaryrefslogtreecommitdiff
path: root/src/systemc
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-05-08 19:01:17 -0700
committerGabe Black <gabeblack@google.com>2018-07-24 21:38:22 +0000
commita60868f5d5ddf565ddb8ce340ad6f1509f3cdf41 (patch)
tree1d9ee2469d16b2f5f63cfef6623390f7e93e3bb8 /src/systemc
parent82d17ee5df10c0ead279ae986af8fc040edafbf4 (diff)
downloadgem5-a60868f5d5ddf565ddb8ce340ad6f1509f3cdf41.tar.xz
systemc: Seperate the "external" header interface.
Most (but not all) of the SystemC headers are part of the "external" interface that an existing, standard compliant module would include through <systemc.h> or <systemc>. Since those follow slightly different rules (relative includes, no gem5 includes), this change separates them out so that they're easier to identify. Also, this change moves the other files into a "core" subdirectory, with the intention to add a "dt", aka data type, directory some time in the future when those standard defined types are implemented. Change-Id: Ida63f9cc0bc0431024d4dd691cc5b22b944a99a8 Reviewed-on: https://gem5-review.googlesource.com/10835 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc')
-rw-r--r--src/systemc/core/SConscript (renamed from src/systemc/SConscript)0
-rw-r--r--src/systemc/core/SystemC.py (renamed from src/systemc/SystemC.py)4
-rw-r--r--src/systemc/core/kernel.cc (renamed from src/systemc/kernel.cc)2
-rw-r--r--src/systemc/core/kernel.hh (renamed from src/systemc/kernel.hh)0
-rw-r--r--src/systemc/core/sc_attr.cc (renamed from src/systemc/sc_attr.cc)3
-rw-r--r--src/systemc/core/sc_event.cc (renamed from src/systemc/sc_event.cc)3
-rw-r--r--src/systemc/core/sc_export.cc (renamed from src/systemc/sc_export.cc)3
-rw-r--r--src/systemc/core/sc_interface.cc (renamed from src/systemc/sc_interface.cc)3
-rw-r--r--src/systemc/core/sc_main.cc (renamed from src/systemc/sc_main.cc)3
-rw-r--r--src/systemc/core/sc_module.cc (renamed from src/systemc/sc_module.cc)3
-rw-r--r--src/systemc/core/sc_module_name.cc (renamed from src/systemc/sc_module_name.cc)3
-rw-r--r--src/systemc/core/sc_object.cc (renamed from src/systemc/sc_object.cc)3
-rw-r--r--src/systemc/core/sc_port.cc (renamed from src/systemc/sc_port.cc)3
-rw-r--r--src/systemc/core/sc_prim.cc (renamed from src/systemc/sc_prim.cc)3
-rw-r--r--src/systemc/core/sc_sensitive.cc (renamed from src/systemc/sc_sensitive.cc)3
-rw-r--r--src/systemc/core/sc_time.cc (renamed from src/systemc/sc_time.cc)3
-rw-r--r--src/systemc/ext/core/sc_attr.hh (renamed from src/systemc/sc_attr.hh)6
-rw-r--r--src/systemc/ext/core/sc_event.hh (renamed from src/systemc/sc_event.hh)6
-rw-r--r--src/systemc/ext/core/sc_export.hh (renamed from src/systemc/sc_export.hh)6
-rw-r--r--src/systemc/ext/core/sc_interface.hh (renamed from src/systemc/sc_interface.hh)6
-rw-r--r--src/systemc/ext/core/sc_main.hh (renamed from src/systemc/sc_main.hh)6
-rw-r--r--src/systemc/ext/core/sc_module.hh (renamed from src/systemc/sc_module.hh)6
-rw-r--r--src/systemc/ext/core/sc_module_name.hh (renamed from src/systemc/sc_module_name.hh)6
-rw-r--r--src/systemc/ext/core/sc_object.hh (renamed from src/systemc/sc_object.hh)6
-rw-r--r--src/systemc/ext/core/sc_port.hh (renamed from src/systemc/sc_port.hh)6
-rw-r--r--src/systemc/ext/core/sc_prim.hh (renamed from src/systemc/sc_prim.hh)6
-rw-r--r--src/systemc/ext/core/sc_sensitive.hh (renamed from src/systemc/sc_sensitive.hh)6
-rw-r--r--src/systemc/ext/core/sc_time.hh (renamed from src/systemc/sc_time.hh)8
-rw-r--r--src/systemc/ext/dt/int/sc_nbdefs.hh (renamed from src/systemc/dt/int/sc_nbdefs.hh)0
29 files changed, 52 insertions, 64 deletions
diff --git a/src/systemc/SConscript b/src/systemc/core/SConscript
index a94eb0012..a94eb0012 100644
--- a/src/systemc/SConscript
+++ b/src/systemc/core/SConscript
diff --git a/src/systemc/SystemC.py b/src/systemc/core/SystemC.py
index bc04ed69c..41fecb2c2 100644
--- a/src/systemc/SystemC.py
+++ b/src/systemc/core/SystemC.py
@@ -34,7 +34,7 @@ from m5.SimObject import SimObject
class SystemC_Kernel(SimObject):
type = 'SystemC_Kernel'
cxx_class = 'SystemC::Kernel'
- cxx_header = 'systemc/kernel.hh'
+ cxx_header = 'systemc/core/kernel.hh'
def sc_main(self, *args):
'''Call the systemc sc_main function with the given string args'''
@@ -48,7 +48,7 @@ class SystemC_ScObject(SimObject):
type = 'SystemC_ScObject'
abstract = True
cxx_class = 'sc_core::sc_object'
- cxx_header = 'systemc/sc_object.hh'
+ cxx_header = 'systemc/ext/core/sc_object.hh'
# Clear cxx_base to stop the c++ binding code from assuming
# sc_core::sc_object inherits from SimObject, even though SystemC_ScObject
diff --git a/src/systemc/kernel.cc b/src/systemc/core/kernel.cc
index e52d04e11..288a037cc 100644
--- a/src/systemc/kernel.cc
+++ b/src/systemc/core/kernel.cc
@@ -27,7 +27,7 @@
* Authors: Gabe Black
*/
-#include "systemc/kernel.hh"
+#include "systemc/core/kernel.hh"
namespace SystemC
{
diff --git a/src/systemc/kernel.hh b/src/systemc/core/kernel.hh
index 9a81d9db4..9a81d9db4 100644
--- a/src/systemc/kernel.hh
+++ b/src/systemc/core/kernel.hh
diff --git a/src/systemc/sc_attr.cc b/src/systemc/core/sc_attr.cc
index 6128f9378..28e0b6010 100644
--- a/src/systemc/sc_attr.cc
+++ b/src/systemc/core/sc_attr.cc
@@ -27,9 +27,8 @@
* Authors: Gabe Black
*/
-#include "systemc/sc_attr.hh"
-
#include "base/logging.hh"
+#include "systemc/ext/core/sc_attr.hh"
namespace sc_core
{
diff --git a/src/systemc/sc_event.cc b/src/systemc/core/sc_event.cc
index e641af6dc..0cdab2a50 100644
--- a/src/systemc/sc_event.cc
+++ b/src/systemc/core/sc_event.cc
@@ -27,9 +27,8 @@
* Authors: Gabe Black
*/
-#include "systemc/sc_event.hh"
-
#include "base/logging.hh"
+#include "systemc/ext/core/sc_event.hh"
namespace sc_core
{
diff --git a/src/systemc/sc_export.cc b/src/systemc/core/sc_export.cc
index ab1252a92..387b8a7fd 100644
--- a/src/systemc/sc_export.cc
+++ b/src/systemc/core/sc_export.cc
@@ -27,9 +27,8 @@
* Authors: Gabe Black
*/
-#include "systemc/sc_export.hh"
-
#include "base/logging.hh"
+#include "systemc/ext/core/sc_export.hh"
namespace sc_core
{
diff --git a/src/systemc/sc_interface.cc b/src/systemc/core/sc_interface.cc
index 18124abc4..e01bdccfd 100644
--- a/src/systemc/sc_interface.cc
+++ b/src/systemc/core/sc_interface.cc
@@ -27,9 +27,8 @@
* Authors: Gabe Black
*/
-#include "systemc/sc_interface.hh"
-
#include "base/logging.hh"
+#include "systemc/ext/core/sc_interface.hh"
namespace sc_core
{
diff --git a/src/systemc/sc_main.cc b/src/systemc/core/sc_main.cc
index 88d51baff..5a6108a6b 100644
--- a/src/systemc/sc_main.cc
+++ b/src/systemc/core/sc_main.cc
@@ -27,13 +27,12 @@
* Authors: Gabe Black
*/
-#include "systemc/sc_main.hh"
-
#include <cstring>
#include "base/logging.hh"
#include "python/pybind11/pybind.hh"
#include "sim/init.hh"
+#include "systemc/ext/core/sc_main.hh"
// A default version of this function in case one isn't otherwise defined.
// This ensures everything will link properly whether or not the user defined
diff --git a/src/systemc/sc_module.cc b/src/systemc/core/sc_module.cc
index 60c07bf0c..6bbb9dca6 100644
--- a/src/systemc/sc_module.cc
+++ b/src/systemc/core/sc_module.cc
@@ -27,9 +27,8 @@
* Authors: Gabe Black
*/
-#include "systemc/sc_module.hh"
-
#include "base/logging.hh"
+#include "systemc/ext/core/sc_module.hh"
namespace sc_core
{
diff --git a/src/systemc/sc_module_name.cc b/src/systemc/core/sc_module_name.cc
index 06291e61c..2646d431a 100644
--- a/src/systemc/sc_module_name.cc
+++ b/src/systemc/core/sc_module_name.cc
@@ -28,9 +28,8 @@
*/
-#include "systemc/sc_module_name.hh"
-
#include "base/logging.hh"
+#include "systemc/ext/core/sc_module_name.hh"
namespace sc_core
{
diff --git a/src/systemc/sc_object.cc b/src/systemc/core/sc_object.cc
index 6b9fc251c..554bc221f 100644
--- a/src/systemc/sc_object.cc
+++ b/src/systemc/core/sc_object.cc
@@ -27,9 +27,8 @@
* Authors: Gabe Black
*/
-#include "systemc/sc_object.hh"
-
#include "base/logging.hh"
+#include "systemc/ext/core/sc_object.hh"
namespace sc_core
{
diff --git a/src/systemc/sc_port.cc b/src/systemc/core/sc_port.cc
index 42c55bd46..e1823bcc9 100644
--- a/src/systemc/sc_port.cc
+++ b/src/systemc/core/sc_port.cc
@@ -27,9 +27,8 @@
* Authors: Gabe Black
*/
-#include "systemc/sc_port.hh"
-
#include "base/logging.hh"
+#include "systemc/ext/core/sc_port.hh"
namespace sc_core
{
diff --git a/src/systemc/sc_prim.cc b/src/systemc/core/sc_prim.cc
index 516eab2d6..0daf317cd 100644
--- a/src/systemc/sc_prim.cc
+++ b/src/systemc/core/sc_prim.cc
@@ -27,9 +27,8 @@
* Authors: Gabe Black
*/
-#include "systemc/sc_prim.hh"
-
#include "base/logging.hh"
+#include "systemc/ext/core/sc_prim.hh"
namespace sc_core
{
diff --git a/src/systemc/sc_sensitive.cc b/src/systemc/core/sc_sensitive.cc
index eedade0f1..e182fa003 100644
--- a/src/systemc/sc_sensitive.cc
+++ b/src/systemc/core/sc_sensitive.cc
@@ -27,9 +27,8 @@
* Authors: Gabe Black
*/
-#include "systemc/sc_sensitive.hh"
-
#include "base/logging.hh"
+#include "systemc/ext/core/sc_sensitive.hh"
namespace sc_core
{
diff --git a/src/systemc/sc_time.cc b/src/systemc/core/sc_time.cc
index 7c1b4eef7..022895733 100644
--- a/src/systemc/sc_time.cc
+++ b/src/systemc/core/sc_time.cc
@@ -27,9 +27,8 @@
* Authors: Gabe Black
*/
-#include "systemc/sc_time.hh"
-
#include "base/logging.hh"
+#include "systemc/ext/core/sc_time.hh"
namespace sc_core
{
diff --git a/src/systemc/sc_attr.hh b/src/systemc/ext/core/sc_attr.hh
index 6db5893d0..d7baa149d 100644
--- a/src/systemc/sc_attr.hh
+++ b/src/systemc/ext/core/sc_attr.hh
@@ -27,8 +27,8 @@
* Authors: Gabe Black
*/
-#ifndef __SYSTEMC_SC_ATTR_HH__
-#define __SYSTEMC_SC_ATTR_HH__
+#ifndef __SYSTEMC_EXT_CORE_SC_ATTR_HH__
+#define __SYSTEMC_EXT_CORE_SC_ATTR_HH__
#include <string>
@@ -95,4 +95,4 @@ class sc_attr_cltn
} // namespace sc_core
-#endif //__SYSTEMC_SC_ATTR_HH__
+#endif //__SYSTEMC_EXT_CORE_SC_ATTR_HH__
diff --git a/src/systemc/sc_event.hh b/src/systemc/ext/core/sc_event.hh
index 98a16bd0c..d4d719b95 100644
--- a/src/systemc/sc_event.hh
+++ b/src/systemc/ext/core/sc_event.hh
@@ -27,8 +27,8 @@
* Authors: Gabe Black
*/
-#ifndef __SYSTEMC_SC_EVENT_HH__
-#define __SYSTEMC_SC_EVENT_HH__
+#ifndef __SYSTEMC_EXT_CORE_SC_EVENT_HH__
+#define __SYSTEMC_EXT_CORE_SC_EVENT_HH__
#include <vector>
@@ -148,4 +148,4 @@ sc_event *sc_find_event(const char *);
} // namespace sc_core
-#endif //__SYSTEMC_SC_INTERFACE_HH__
+#endif //__SYSTEMC_EXT_CORE_SC_INTERFACE_HH__
diff --git a/src/systemc/sc_export.hh b/src/systemc/ext/core/sc_export.hh
index 5cbd564a0..dc2176492 100644
--- a/src/systemc/sc_export.hh
+++ b/src/systemc/ext/core/sc_export.hh
@@ -27,8 +27,8 @@
* Authors: Gabe Black
*/
-#ifndef __SYSTEMC_SC_EXPORT_HH__
-#define __SYSTEMC_SC_EXPORT_HH__
+#ifndef __SYSTEMC_EXT_CORE_SC_EXPORT_HH__
+#define __SYSTEMC_EXT_CORE_SC_EXPORT_HH__
#include "sc_object.hh"
@@ -98,4 +98,4 @@ class sc_export : public sc_export_base
} // namespace sc_core
-#endif //__SYSTEMC_SC_EXPORT_HH__
+#endif //__SYSTEMC_EXT_CORE_SC_EXPORT_HH__
diff --git a/src/systemc/sc_interface.hh b/src/systemc/ext/core/sc_interface.hh
index 4418a9520..2073f5362 100644
--- a/src/systemc/sc_interface.hh
+++ b/src/systemc/ext/core/sc_interface.hh
@@ -27,8 +27,8 @@
* Authors: Gabe Black
*/
-#ifndef __SYSTEMC_SC_INTERFACE_HH__
-#define __SYSTEMC_SC_INTERFACE_HH__
+#ifndef __SYSTEMC_EXT_CORE_SC_INTERFACE_HH__
+#define __SYSTEMC_EXT_CORE_SC_INTERFACE_HH__
namespace sc_core
{
@@ -54,4 +54,4 @@ class sc_interface
} // namespace sc_core
-#endif //__SYSTEMC_SC_INTERFACE_HH__
+#endif //__SYSTEMC_EXT_CORE_SC_INTERFACE_HH__
diff --git a/src/systemc/sc_main.hh b/src/systemc/ext/core/sc_main.hh
index d9fd2b1d2..9bf0d0aae 100644
--- a/src/systemc/sc_main.hh
+++ b/src/systemc/ext/core/sc_main.hh
@@ -27,8 +27,8 @@
* Authors: Gabe Black
*/
-#ifndef __SYSTEMC_SC_MAIN_HH__
-#define __SYSTEMC_SC_MAIN_HH__
+#ifndef __SYSTEMC_EXT_CORE_SC_MAIN_HH__
+#define __SYSTEMC_EXT_CORE_SC_MAIN_HH__
extern "C" int sc_main(int argc, char *argv[]);
@@ -41,4 +41,4 @@ namespace sc_core
extern "C" const char *const *sc_argv();
} // namespace sc_core
-#endif //__SYSTEMC_SC_MAIN_HH__
+#endif //__SYSTEMC_EXT_CORE_SC_MAIN_HH__
diff --git a/src/systemc/sc_module.hh b/src/systemc/ext/core/sc_module.hh
index 2fd85b68a..4c4ebb269 100644
--- a/src/systemc/sc_module.hh
+++ b/src/systemc/ext/core/sc_module.hh
@@ -27,8 +27,8 @@
* Authors: Gabe Black
*/
-#ifndef __SYSTEMC_SC_MODULE_HH__
-#define __SYSTEMC_SC_MODULE_HH__
+#ifndef __SYSTEMC_CORE_EXT_SC_MODULE_HH__
+#define __SYSTEMC_CORE_EXT_SC_MODULE_HH__
#include <vector>
@@ -243,4 +243,4 @@ bool sc_end_of_simulation_invoked();
} // namespace sc_core
-#endif //__SYSTEMC_SC_MODULE_HH__
+#endif //__SYSTEMC_EXT_CORE_SC_MODULE_HH__
diff --git a/src/systemc/sc_module_name.hh b/src/systemc/ext/core/sc_module_name.hh
index 40279b366..7ae2fd689 100644
--- a/src/systemc/sc_module_name.hh
+++ b/src/systemc/ext/core/sc_module_name.hh
@@ -27,8 +27,8 @@
* Authors: Gabe Black
*/
-#ifndef __SYSTEMC_SC_MODULE_NAME_HH__
-#define __SYSTEMC_SC_MODULE_NAME_HH__
+#ifndef __SYSTEMC_EXT_CORE_SC_MODULE_NAME_HH__
+#define __SYSTEMC_EXT_CORE_SC_MODULE_NAME_HH__
namespace sc_core
{
@@ -53,4 +53,4 @@ class sc_module_name
} // namespace sc_core
-#endif //__SYSTEMC_SC_MODULE_NAME_HH__
+#endif //__SYSTEMC_EXT_CORE_SC_MODULE_NAME_HH__
diff --git a/src/systemc/sc_object.hh b/src/systemc/ext/core/sc_object.hh
index 51ca19759..0e975814f 100644
--- a/src/systemc/sc_object.hh
+++ b/src/systemc/ext/core/sc_object.hh
@@ -27,8 +27,8 @@
* Authors: Gabe Black
*/
-#ifndef __SYSTEMC_SC_OBJECT_HH__
-#define __SYSTEMC_SC_OBJECT_HH__
+#ifndef __SYSTEMC_EXT_CORE_SC_OBJECT_HH__
+#define __SYSTEMC_EXT_CORE_SC_OBJECT_HH__
#include <iostream>
#include <string>
@@ -77,4 +77,4 @@ sc_object *sc_find_object(const char *);
} // namespace sc_core
-#endif //__SYSTEMC_SC_OBJECT_HH__
+#endif //__SYSTEMC_EXT_CORE_SC_OBJECT_HH__
diff --git a/src/systemc/sc_port.hh b/src/systemc/ext/core/sc_port.hh
index 6c39667ea..1d32422a5 100644
--- a/src/systemc/sc_port.hh
+++ b/src/systemc/ext/core/sc_port.hh
@@ -27,8 +27,8 @@
* Authors: Gabe Black
*/
-#ifndef __SYSTEMC_SC_PORT_HH__
-#define __SYSTEMC_SC_PORT_HH__
+#ifndef __SYSTEMC_EXT_CORE_SC_PORT_HH__
+#define __SYSTEMC_EXT_CORE_SC_PORT_HH__
#include "sc_object.hh"
@@ -189,4 +189,4 @@ class sc_port : public sc_port_b<IF>
} // namespace sc_core
-#endif //__SYSTEMC_SC_PORT_HH__
+#endif //__SYSTEMC_EXT_CORE_SC_PORT_HH__
diff --git a/src/systemc/sc_prim.hh b/src/systemc/ext/core/sc_prim.hh
index 1bf15fa83..d6265cb56 100644
--- a/src/systemc/sc_prim.hh
+++ b/src/systemc/ext/core/sc_prim.hh
@@ -27,8 +27,8 @@
* Authors: Gabe Black
*/
-#ifndef __SYSTEMC_SC_PRIM_HH__
-#define __SYSTEMC_SC_PRIM_HH__
+#ifndef __SYSTEMC_EXT_CORE_SC_PRIM_HH__
+#define __SYSTEMC_EXT_CORE_SC_PRIM_HH__
#include "sc_object.hh"
#include "sc_time.hh"
@@ -94,4 +94,4 @@ class sc_prim_channel : public sc_object
} // namespace sc_core
-#endif //__SYSTEMC_SC_PRIM_HH__
+#endif //__SYSTEMC_EXT_CORE_SC_PRIM_HH__
diff --git a/src/systemc/sc_sensitive.hh b/src/systemc/ext/core/sc_sensitive.hh
index cd0dadb5b..62f18b6d2 100644
--- a/src/systemc/sc_sensitive.hh
+++ b/src/systemc/ext/core/sc_sensitive.hh
@@ -27,8 +27,8 @@
* Authors: Gabe Black
*/
-#ifndef __SYSTEMC_SC_SENSITIVE_HH__
-#define __SYSTEMC_SC_SENSITIVE_HH__
+#ifndef __SYSTEMC_EXT_CORE_SC_SENSITIVE_HH__
+#define __SYSTEMC_EXT_CORE_SC_SENSITIVE_HH__
namespace sc_core
{
@@ -49,4 +49,4 @@ class sc_sensitive
} // namespace sc_core
-#endif //__SYSTEMC_SC_SENSITIVE_HH__
+#endif //__SYSTEMC_EXT_CORE_SC_SENSITIVE_HH__
diff --git a/src/systemc/sc_time.hh b/src/systemc/ext/core/sc_time.hh
index 3c70ba9b9..456d59e02 100644
--- a/src/systemc/sc_time.hh
+++ b/src/systemc/ext/core/sc_time.hh
@@ -27,14 +27,14 @@
* Authors: Gabe Black
*/
-#ifndef __SYSTEMC_SC_TIME_HH__
-#define __SYSTEMC_SC_TIME_HH__
+#ifndef __SYSTEMC_EXT_CORE_SC_TIME_HH__
+#define __SYSTEMC_EXT_CORE_SC_TIME_HH__
#include <stdint.h>
#include <iostream>
-#include "dt/int/sc_nbdefs.hh"
+#include "../dt/int/sc_nbdefs.hh"
namespace sc_core
{
@@ -95,4 +95,4 @@ const sc_time &sc_max_time();
} // namespace sc_core
-#endif //__SYSTEMC_SC_TIME_HH__
+#endif //__SYSTEMC_EXT_CORE_SC_TIME_HH__
diff --git a/src/systemc/dt/int/sc_nbdefs.hh b/src/systemc/ext/dt/int/sc_nbdefs.hh
index 48d735adf..48d735adf 100644
--- a/src/systemc/dt/int/sc_nbdefs.hh
+++ b/src/systemc/ext/dt/int/sc_nbdefs.hh