Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/10835

Change subject: systemc: Seperate the "external" header interface.
......................................................................

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
---
R src/systemc/core/SConscript
R src/systemc/core/SystemC.py
R src/systemc/core/kernel.cc
R src/systemc/core/kernel.hh
R src/systemc/core/sc_attr.cc
R src/systemc/core/sc_event.cc
R src/systemc/core/sc_export.cc
R src/systemc/core/sc_interface.cc
R src/systemc/core/sc_main.cc
R src/systemc/core/sc_module.cc
R src/systemc/core/sc_module_name.cc
R src/systemc/core/sc_object.cc
R src/systemc/core/sc_port.cc
R src/systemc/core/sc_prim.cc
R src/systemc/core/sc_sensitive.cc
R src/systemc/core/sc_time.cc
R src/systemc/ext/core/sc_attr.hh
R src/systemc/ext/core/sc_event.hh
R src/systemc/ext/core/sc_export.hh
R src/systemc/ext/core/sc_interface.hh
R src/systemc/ext/core/sc_main.hh
R src/systemc/ext/core/sc_module.hh
R src/systemc/ext/core/sc_module_name.hh
R src/systemc/ext/core/sc_object.hh
R src/systemc/ext/core/sc_port.hh
R src/systemc/ext/core/sc_prim.hh
R src/systemc/ext/core/sc_sensitive.hh
R src/systemc/ext/core/sc_time.hh
R src/systemc/ext/dt/int/sc_nbdefs.hh
29 files changed, 52 insertions(+), 64 deletions(-)



diff --git a/src/systemc/SConscript b/src/systemc/core/SConscript
similarity index 100%
rename from src/systemc/SConscript
rename to src/systemc/core/SConscript
diff --git a/src/systemc/SystemC.py b/src/systemc/core/SystemC.py
similarity index 95%
rename from src/systemc/SystemC.py
rename to src/systemc/core/SystemC.py
index d63d4bb..833c9fc 100644
--- a/src/systemc/SystemC.py
+++ b/src/systemc/core/SystemC.py
@@ -30,7 +30,7 @@
 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):
         from _m5.systemc import sc_main
@@ -40,7 +40,7 @@
     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'
     cxx_base = None

     # Hide the cxx_exports from SimObject since we don't inherit from
diff --git a/src/systemc/kernel.cc b/src/systemc/core/kernel.cc
similarity index 97%
rename from src/systemc/kernel.cc
rename to src/systemc/core/kernel.cc
index e52d04e..288a037 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
similarity index 100%
rename from src/systemc/kernel.hh
rename to src/systemc/core/kernel.hh
diff --git a/src/systemc/sc_attr.cc b/src/systemc/core/sc_attr.cc
similarity index 98%
rename from src/systemc/sc_attr.cc
rename to src/systemc/core/sc_attr.cc
index 6128f93..28e0b60 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
similarity index 99%
rename from src/systemc/sc_event.cc
rename to src/systemc/core/sc_event.cc
index a96d5f3..f3b27be 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
similarity index 97%
rename from src/systemc/sc_export.cc
rename to src/systemc/core/sc_export.cc
index 1363f4c..dbe910a 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
similarity index 97%
rename from src/systemc/sc_interface.cc
rename to src/systemc/core/sc_interface.cc
index 18124ab..e01bdcc 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
similarity index 98%
rename from src/systemc/sc_main.cc
rename to src/systemc/core/sc_main.cc
index 88d51ba..5a6108a 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
similarity index 99%
rename from src/systemc/sc_module.cc
rename to src/systemc/core/sc_module.cc
index 78a06ec..f5c73c0 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
similarity index 97%
rename from src/systemc/sc_module_name.cc
rename to src/systemc/core/sc_module_name.cc
index 06291e6..2646d43 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
similarity index 98%
rename from src/systemc/sc_object.cc
rename to src/systemc/core/sc_object.cc
index be99e13..a2c7372 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
similarity index 97%
rename from src/systemc/sc_port.cc
rename to src/systemc/core/sc_port.cc
index 42c55bd..e1823bc 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
similarity index 98%
rename from src/systemc/sc_prim.cc
rename to src/systemc/core/sc_prim.cc
index 516eab2..0daf317 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
similarity index 97%
rename from src/systemc/sc_sensitive.cc
rename to src/systemc/core/sc_sensitive.cc
index eedade0..e182fa0 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
similarity index 98%
rename from src/systemc/sc_time.cc
rename to src/systemc/core/sc_time.cc
index 7c1b4ee..0228957 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
similarity index 95%
rename from src/systemc/sc_attr.hh
rename to src/systemc/ext/core/sc_attr.hh
index 512aa06..2a5da0e 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>

@@ -87,4 +87,4 @@

 } // 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
similarity index 96%
rename from src/systemc/sc_event.hh
rename to src/systemc/ext/core/sc_event.hh
index 002674f..99acd3e 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>

@@ -143,4 +143,4 @@

 } // 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
similarity index 94%
rename from src/systemc/sc_export.hh
rename to src/systemc/ext/core/sc_export.hh
index 404e6e7..f1ac5a7 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"

@@ -78,4 +78,4 @@

 } // 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
similarity index 93%
rename from src/systemc/sc_interface.hh
rename to src/systemc/ext/core/sc_interface.hh
index 4418a95..2073f53 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 @@

 } // 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
similarity index 93%
rename from src/systemc/sc_main.hh
rename to src/systemc/ext/core/sc_main.hh
index d9fd2b1..9bf0d0a 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 @@
     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
similarity index 98%
rename from src/systemc/sc_module.hh
rename to src/systemc/ext/core/sc_module.hh
index d800ec7..5b1b143 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>

@@ -232,4 +232,4 @@

 } // 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
similarity index 92%
rename from src/systemc/sc_module_name.hh
rename to src/systemc/ext/core/sc_module_name.hh
index 40279b3..7ae2fd6 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 @@

 } // 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
similarity index 95%
rename from src/systemc/sc_object.hh
rename to src/systemc/ext/core/sc_object.hh
index c2aa5b9..8414afd 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 @@

 } // 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
similarity index 96%
rename from src/systemc/sc_port.hh
rename to src/systemc/ext/core/sc_port.hh
index 6c39667..1d32422 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 @@

 } // 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
similarity index 96%
rename from src/systemc/sc_prim.hh
rename to src/systemc/ext/core/sc_prim.hh
index 1bf15fa..d6265cb 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 @@

 } // 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
similarity index 93%
rename from src/systemc/sc_sensitive.hh
rename to src/systemc/ext/core/sc_sensitive.hh
index cd0dadb..62f18b6 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 @@

 } // 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
similarity index 94%
rename from src/systemc/sc_time.hh
rename to src/systemc/ext/core/sc_time.hh
index 3c70ba9..456d59e 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 @@

 } // 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
similarity index 100%
rename from src/systemc/dt/int/sc_nbdefs.hh
rename to src/systemc/ext/dt/int/sc_nbdefs.hh

--
To view, visit https://gem5-review.googlesource.com/10835
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: Ida63f9cc0bc0431024d4dd691cc5b22b944a99a8
Gerrit-Change-Number: 10835
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <gabebl...@google.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to