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>
This commit is contained in:
Gabe Black
2018-05-08 19:01:17 -07:00
parent 82d17ee5df
commit a60868f5d5
29 changed files with 52 additions and 64 deletions

View File

@@ -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

View File

@@ -27,7 +27,7 @@
* Authors: Gabe Black
*/
#include "systemc/kernel.hh"
#include "systemc/core/kernel.hh"
namespace SystemC
{

View File

@@ -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
{

View File

@@ -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
{

View File

@@ -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
{

View File

@@ -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
{

View File

@@ -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

View File

@@ -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
{

View File

@@ -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
{

View File

@@ -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
{

View File

@@ -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
{

View File

@@ -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
{

View File

@@ -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
{

View File

@@ -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
{

View File

@@ -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__

View File

@@ -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__

View File

@@ -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__

View File

@@ -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__

View File

@@ -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__

View File

@@ -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__

View File

@@ -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__

View File

@@ -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__

View File

@@ -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__

View File

@@ -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__

View File

@@ -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__

View File

@@ -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__