There are a couple things this CL fixes related to the TLM #includes.
1. Removes #includes of <systemc> and <tlm>. These bring in a header
file from boost which shouldn't be necessary but which some of the
tests (and likely some external code) depends on. We avoid including
those in files built into gem5 itself so that gem5 isn't dependent on
boost.
2. All includes in ext should be relative. That way those headers can
be removed from gem5 and still build, allowing them to be moved over
to or referenced from a foreign codebase which isn't part of gem5.
Change-Id: I76e267385b48cb4fe93aea89ec8319c76465a0a4
Reviewed-on: https://gem5-review.googlesource.com/c/15796
Reviewed-by: Ciro Santilli <ciro.santilli@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
#ifndef __SYSTEMC_EXT_TLM_CORE_1_ANALYSIS_ANALYSIS_HH__
#define __SYSTEMC_EXT_TLM_CORE_1_ANALYSIS_ANALYSIS_HH__
-#include "tlm_core/1/analysis/analysis_fifo.hh"
-#include "tlm_core/1/analysis/analysis_if.hh"
-#include "tlm_core/1/analysis/analysis_port.hh"
-#include "tlm_core/1/analysis/analysis_triple.hh"
-#include "tlm_core/1/analysis/write_if.hh"
+#include "analysis_fifo.hh"
+#include "analysis_if.hh"
+#include "analysis_port.hh"
+#include "analysis_triple.hh"
+#include "write_if.hh"
#endif /* __SYSTEMC_EXT_TLM_CORE_1_ANALYSIS_ANALYSIS_HH__ */
#ifndef __SYSTEMC_EXT_TLM_CORE_1_ANALYSIS_ANALYSIS_FIFO_HH__
#define __SYSTEMC_EXT_TLM_CORE_1_ANALYSIS_ANALYSIS_FIFO_HH__
-#include "tlm_core/1/analysis/analysis_if.hh"
-#include "tlm_core/1/analysis/analysis_triple.hh"
-#include "tlm_core/1/req_rsp/channels/fifo/fifo.hh"
+#include "../req_rsp/channels/fifo/fifo.hh"
+#include "analysis_if.hh"
+#include "analysis_triple.hh"
namespace tlm
{
#ifndef __SYSTEMC_EXT_TLM_CORE_1_ANALYSIS_ANALYSIS_IF_HH__
#define __SYSTEMC_EXT_TLM_CORE_1_ANALYSIS_ANALYSIS_IF_HH__
-#include "tlm_core/1/analysis/write_if.hh"
+#include "write_if.hh"
namespace tlm
{
#include <algorithm>
#include <deque>
-#include "tlm_core/1/analysis/analysis_if.hh"
+#include "analysis_if.hh"
namespace tlm
{
#ifndef __SYSTEMC_EXT_TLM_CORE_1_ANALYSIS_WRITE_IF_HH__
#define __SYSTEMC_EXT_TLM_CORE_1_ANALYSIS_WRITE_IF_HH__
-#include <systemc>
+#include "../../../core/sc_interface.hh"
namespace tlm
{
#ifndef __SYSTEMC_EXT_TLM_CORE_1_REQ_RSP_ADAPTERS_HH__
#define __SYSTEMC_EXT_TLM_CORE_1_REQ_RSP_ADAPTERS_HH__
-#include "tlm_core/1/req_rsp/interfaces/master_slave_ifs.hh"
+#include "../interfaces/master_slave_ifs.hh"
namespace tlm
{
// actual physical buffer.
//
-#include "tlm_core/1/req_rsp/channels/fifo/circular_buffer.hh"
-#include "tlm_core/1/req_rsp/interfaces/fifo_ifs.hh"
+#include "../../interfaces/fifo_ifs.hh"
+#include "circular_buffer.hh"
namespace tlm
{
} // namespace tlm
-#include "tlm_core/1/req_rsp/channels/fifo/fifo_peek.hh"
-#include "tlm_core/1/req_rsp/channels/fifo/fifo_put_get.hh"
-#include "tlm_core/1/req_rsp/channels/fifo/fifo_resize.hh"
+#include "fifo_peek.hh"
+#include "fifo_put_get.hh"
+#include "fifo_resize.hh"
#endif /* __SYSTEMC_EXT_TLM_CORE_1_REQ_RSP_CHANNELS_FIFO_FIFO_HH__ */
#define \
__EXT_TLM_CORE_1_REQ_RSP_CHANNELS_REQ_RSP_CHANNELS_REQ_RSP_CHANNELS_HH__
-#include "tlm_core/1/req_rsp/adapters/adapters.hh"
-#include "tlm_core/1/req_rsp/channels/fifo/fifo.hh"
-#include "tlm_core/1/req_rsp/channels/req_rsp_channels/put_get_imp.hh"
+#include "../../adapters/adapters.hh"
+#include "../fifo/fifo.hh"
+#include "put_get_imp.hh"
namespace tlm
{
#ifndef __SYSTEMC_EXT_TLM_CORE_1_REQ_RSP_INTERFACES_CORE_IFS_HH__
#define __SYSTEMC_EXT_TLM_CORE_1_REQ_RSP_INTERFACES_CORE_IFS_HH__
-#include "tlm_core/1/req_rsp/interfaces/tag.hh"
+#include "tag.hh"
namespace tlm
{
#ifndef __SYSTEMC_EXT_TLM_CORE_1_REQ_RSP_INTERFACES_FIFO_IFS_HH__
#define __SYSTEMC_EXT_TLM_CORE_1_REQ_RSP_INTERFACES_FIFO_IFS_HH__
-#include "tlm_core/1/req_rsp/interfaces/core_ifs.hh"
+#include "core_ifs.hh"
namespace tlm
{
#ifndef __TLM_CORE_1_REQ_RSP_INTERFACES_MASTER_SLAVE_IFS_HH__
#define __TLM_CORE_1_REQ_RSP_INTERFACES_MASTER_SLAVE_IFS_HH__
-#include "tlm_core/1/req_rsp/interfaces/core_ifs.hh"
+#include "core_ifs.hh"
namespace tlm
{
#include <sstream>
-#include "tlm_core/1/req_rsp/interfaces/tag.hh"
+#include "../interfaces/tag.hh"
namespace tlm
{
#ifndef __SYSTEMC_EXT_TLM_CORE_1_REQ_RSP_PORTS_NONBLOCKING_PORT_HH__
#define __SYSTEMC_EXT_TLM_CORE_1_REQ_RSP_PORTS_NONBLOCKING_PORT_HH__
-#include "tlm_core/1/req_rsp/interfaces/core_ifs.hh"
-#include "tlm_core/1/req_rsp/ports/event_finder.hh"
+#include "../interfaces/core_ifs.hh"
+#include "event_finder.hh"
namespace tlm
{
// The unannotated TLM interfaces.
-#include "tlm_core/1/req_rsp/interfaces/core_ifs.hh"
-#include "tlm_core/1/req_rsp/interfaces/master_slave_ifs.hh"
+#include "interfaces/core_ifs.hh"
+#include "interfaces/master_slave_ifs.hh"
// The channels : tlm_fifo, tlm_transport_channel and tlm_req_rsp_channel.
-#include "tlm_core/1/req_rsp/channels/req_rsp_channels/req_rsp_channels.hh"
+#include "channels/req_rsp_channels/req_rsp_channels.hh"
// Some non blocking ports to provide static sensitivity.
-#include "tlm_core/1/req_rsp/ports/nonblocking_port.hh"
+#include "ports/nonblocking_port.hh"
#endif /* __SYSTEMC_EXT_TLM_CORE_1_REQ_RSP_REQ_RSP_HH__ */
#include <cstring> // std::memset
-#include "tlm_core/2/generic_payload/gp.hh"
+#include "gp.hh"
namespace tlm
{
#ifndef __SYSTEMC_EXT_TLM_CORE_2_GENERIC_GENERIC_PAYLOAD_HH__
#define __SYSTEMC_EXT_TLM_CORE_2_GENERIC_GENERIC_PAYLOAD_HH__
-#include "tlm_core/2/generic_payload/endian_conv.hh"
-#include "tlm_core/2/generic_payload/gp.hh"
-#include "tlm_core/2/generic_payload/helpers.hh"
-#include "tlm_core/2/generic_payload/phase.hh"
+#include "endian_conv.hh"
+#include "gp.hh"
+#include "helpers.hh"
+#include "phase.hh"
#endif /* __SYSTEMC_EXT_TLM_CORE_2_GENERIC_GENERIC_PAYLOAD_HH__ */
#ifndef __SYSTEMC_EXT_TLM_CORE_2_GENERIC_PAYLOAD_GP_HH__
#define __SYSTEMC_EXT_TLM_CORE_2_GENERIC_PAYLOAD_GP_HH__
-#include <systemc>
#include <typeinfo> // std::type_info
-#include "tlm_core/2/generic_payload/array.hh"
+#include "../../../utils/sc_report_handler.hh" // sc_assert
+#include "array.hh"
namespace tlm
{
#ifndef __SYSTEMC_EXT_TLM_CORE_2_INTERFACES_DMI_HH__
#define __SYSTEMC_EXT_TLM_CORE_2_INTERFACES_DMI_HH__
-#include <systemc>
+#include "../../../core/sc_time.hh"
+#include "../../../dt/int/sc_nbdefs.hh"
namespace tlm
{
#ifndef __SYSTEMC_EXT_TLM_CORE_2_INTERFACES_FW_BW_IFS_HH__
#define __SYSTEMC_EXT_TLM_CORE_2_INTERFACES_FW_BW_IFS_HH__
-#include <systemc>
-
-#include "tlm_core/2/generic_payload/generic_payload.hh"
-#include "tlm_core/2/interfaces/dmi.hh"
+#include "../../../core/sc_interface.hh"
+#include "../../../core/sc_time.hh"
+#include "../generic_payload/generic_payload.hh"
+#include "dmi.hh"
namespace tlm
{
#ifndef __SYSTEMC_EXT_TLM_CORE_2_INTERFACES_INTERFACES_HH__
#define __SYSTEMC_EXT_TLM_CORE_2_INTERFACES_INTERFACES_HH__
-#include "tlm_core/2/interfaces/dmi.hh"
-#include "tlm_core/2/interfaces/fw_bw_ifs.hh"
+#include "dmi.hh"
+#include "fw_bw_ifs.hh"
#endif /* __SYSTEMC_EXT_TLM_CORE_2_INTERFACES_INTERFACES_HH__ */
#ifndef __SYSTEMC_EXT_TLM_CORE_2_QUANTUM_GLOBAL_QUANTUM_HH__
#define __SYSTEMC_EXT_TLM_CORE_2_QUANTUM_GLOBAL_QUANTUM_HH__
-#include <systemc>
+#include "../../../core/sc_time.hh"
namespace tlm
{
#ifndef ____SYSTEMC_EXT_TLM_CORE_2_QUANTUM_QUANTUM_HH__
#define ____SYSTEMC_EXT_TLM_CORE_2_QUANTUM_QUANTUM_HH__
-#include "tlm_core/2/quantum/global_quantum.hh"
+#include "global_quantum.hh"
#endif /* ____SYSTEMC_EXT_TLM_CORE_2_QUANTUM_QUANTUM_HH__ */
#ifndef __SYSTEMC_EXT_TLM_CORE_2_SOCKETS_BASE_SOCKET_IF_H__
#define __SYSTEMC_EXT_TLM_CORE_2_SOCKETS_BASE_SOCKET_IF_H__
-#include <systemc>
#include <typeindex>
+#include "../../../core/sc_export.hh"
+#include "../../../core/sc_port.hh"
+
namespace tlm
{
#include <typeindex>
-#include "tlm_core/2/interfaces/fw_bw_ifs.hh"
-#include "tlm_core/2/sockets/base_socket_if.hh"
+#include "../interfaces/fw_bw_ifs.hh"
+#include "base_socket_if.hh"
namespace tlm
{
#ifndef __SYSTEMC_EXT_TLM_CORE_2_SOCKETS_SOCKETS_HH__
#define __SYSTEMC_EXT_TLM_CORE_2_SOCKETS_SOCKETS_HH__
-#include "tlm_core/2/sockets/initiator_socket.hh"
-#include "tlm_core/2/sockets/target_socket.hh"
+#include "initiator_socket.hh"
+#include "target_socket.hh"
#endif /* __SYSTEMC_EXT_TLM_CORE_2_SOCKETS_SOCKETS_HH__ */
#include <typeindex>
-#include "tlm_core/2/interfaces/fw_bw_ifs.hh"
-#include "tlm_core/2/sockets/base_socket_if.hh"
+#include "../interfaces/fw_bw_ifs.hh"
+#include "base_socket_if.hh"
namespace tlm
{
#ifndef __SYSTEMC_EXT_TLM_UTILS_CONVENIENCE_SOCKET_BASES_H__
#define __SYSTEMC_EXT_TLM_UTILS_CONVENIENCE_SOCKET_BASES_H__
-#include <systemc>
-
namespace sc_core
{
#ifndef __SYSTEMC_EXT_TLM_UTILS_INSTANCE_SPECIFIC_EXTENSIONS_H__
#define __SYSTEMC_EXT_TLM_UTILS_INSTANCE_SPECIFIC_EXTENSIONS_H__
-#include "tlm_utils/instance_specific_extensions_int.h"
+#include "instance_specific_extensions_int.h"
namespace tlm_utils
{
#ifndef __SYSTEMC_EXT_TLM_UTILS_INSTANCE_SPECIFIC_EXTENSIONS_INT_H__
#define __SYSTEMC_EXT_TLM_UTILS_INSTANCE_SPECIFIC_EXTENSIONS_INT_H__
-#include <tlm>
+#include <vector>
+
+#include "../tlm_core/2/generic_payload/array.hh"
namespace tlm_utils
{
#ifndef __SYSTEMC_EXT_TLM_UTILS_MULTI_PASSTHROUGH_TARGET_SOCKET_H__
#define __SYSTEMC_EXT_TLM_UTILS_MULTI_PASSTHROUGH_TARGET_SOCKET_H__
-#include "tlm_utils/multi_socket_bases.h"
+#include "../core/sc_module.hh"
+#include "../core/sc_port.hh"
+#include "multi_socket_bases.h"
namespace tlm_utils
{
#define __SYSTEMC_EXT_TLM_UTILS_MULTI_SOCKET_BASES_H__
#include <map>
-#include <tlm>
-#include "tlm_utils/convenience_socket_bases.h"
+
+#include "../core/sc_port.hh"
+#include "../tlm_core/2/interfaces/fw_bw_ifs.hh"
+#include "convenience_socket_bases.h"
namespace tlm_utils
{
#ifndef __SYSTEMC_EXT_TLM_UTILS_PASSTHROUGH_TARGET_SOCKET_H__
#define __SYSTEMC_EXT_TLM_UTILS_PASSTHROUGH_TARGET_SOCKET_H__
-#include <tlm>
-#include "tlm_utils/convenience_socket_bases.h"
+#include "../core/sc_port.hh"
+#include "../core/sc_time.hh"
+#include "../tlm_core/2/sockets/target_socket.hh"
+#include "../utils/sc_report_handler.hh"
+#include "convenience_socket_bases.h"
namespace tlm_utils
{
#ifndef __SYSTEMC_EXT_TLM_UTILS_PEQ_WITH_CB_AND_PHASE_H__
#define __SYSTEMC_EXT_TLM_UTILS_PEQ_WITH_CB_AND_PHASE_H__
-#include <systemc>
-#include <tlm>
#include <vector>
+#include "../core/sc_main.hh"
+#include "../core/sc_object.hh"
+#include "../core/sc_spawn.hh"
+#include "../core/sc_time.hh"
+#include "../dt/int/sc_nbdefs.hh"
+
namespace tlm_utils
{
#define __SYSTEMC_EXT_TLM_UTILS_PEQ_WITH_GET_H__
#include <map>
-#include <systemc>
+
+#include "../core/sc_event.hh"
+#include "../core/sc_main.hh"
+#include "../core/sc_object.hh"
+#include "../core/sc_time.hh"
namespace tlm_utils
{
#ifndef __SYSTEMC_EXT_TLM_UTILS_SIMPLE_INITIATOR_SOCKET_H__
#define __SYSTEMC_EXT_TLM_UTILS_SIMPLE_INITIATOR_SOCKET_H__
-#include <tlm>
-
-#include "tlm_utils/convenience_socket_bases.h"
+#include "../core/sc_module.hh"
+#include "../core/sc_port.hh"
+#include "../tlm_core/2/generic_payload/gp.hh"
+#include "../tlm_core/2/interfaces/fw_bw_ifs.hh"
+#include "../tlm_core/2/sockets/initiator_socket.hh"
+#include "../utils/sc_report_handler.hh"
+#include "convenience_socket_bases.h"
namespace tlm_utils
{
#ifndef __SYSTEMC_EXT_TLM_UTILS_SIMPLE_TARGET_SOCKET_H__
#define __SYSTEMC_EXT_TLM_UTILS_SIMPLE_TARGET_SOCKET_H__
-#include <systemc>
-#include <tlm>
-
-#include "tlm_utils/convenience_socket_bases.h"
-#include "tlm_utils/peq_with_get.h"
+#include "../core/sc_event.hh"
+#include "../core/sc_module.hh"
+#include "../core/sc_port.hh"
+#include "../tlm_core/2/generic_payload/gp.hh"
+#include "../tlm_core/2/interfaces/fw_bw_ifs.hh"
+#include "../tlm_core/2/sockets/target_socket.hh"
+#include "../utils/sc_report_handler.hh"
+#include "convenience_socket_bases.h"
+#include "peq_with_get.h"
namespace tlm_utils
{
#ifndef __SYSTEMC_EXT_TLM_UTILS_TLM_QUANTUMKEEPER_H__
#define __SYSTEMC_EXT_TLM_UTILS_TLM_QUANTUMKEEPER_H__
-#include <tlm>
+#include "../core/sc_time.hh"
namespace tlm_utils
{
#include <cstring> // std::memcpy et.al.
#include <map>
-#include <systemc>
-#include <tlm>
#include <typeindex>
+#include "systemc/ext/tlm_core/2/generic_payload/gp.hh"
+
namespace tlm
{
#include <cstring>
#include <map>
#include <string>
-#include <systemc>
-#include <tlm>
#include <typeindex>
+#include "systemc/ext/tlm_core/2/generic_payload/phase.hh"
+#include "systemc/ext/utils/sc_report_handler.hh"
+
namespace tlm
{
*****************************************************************************/
-#include <systemc>
-#include <tlm>
+#include "systemc/ext/core/sc_main.hh"
+#include "systemc/ext/core/sc_time.hh"
+#include "systemc/ext/tlm_core/2/quantum/global_quantum.hh"
namespace tlm
{
#include <tlm_utils/convenience_socket_bases.h>
#include <sstream>
-#include <systemc>
+
+#include "systemc/ext/core/sc_object.hh"
+#include "systemc/ext/core/sc_simcontext.hh"
+#include "systemc/ext/utils/sc_report_handler.hh"
namespace tlm_utils
{
#include <iostream>
#include <map>
-#include <systemc>
-#include <tlm>
#include <typeindex>
namespace tlm