From 8cbfcca8b046d2fe06e1eb92e392cc3b6a030f7b Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Tue, 18 Aug 2026 23:23:44 -0700 Subject: [PATCH 1/6] disables the build of C++17 only components in C++11 and C++14 builds --- src/components/CMakeLists.txt | 75 ++++++++++++++++++++--------------- 1 file changed, 42 insertions(+), 33 deletions(-) diff --git a/src/components/CMakeLists.txt b/src/components/CMakeLists.txt index 24228291..966d61a7 100644 --- a/src/components/CMakeLists.txt +++ b/src/components/CMakeLists.txt @@ -2,40 +2,49 @@ project(components VERSION ${scc_VERSION} LANGUAGES CXX) find_package(flatbuffers CONFIG QUIET) -add_library(${PROJECT_NAME} scc/at_router/nb_router.cpp) -add_library(scc::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) -target_include_directories(${PROJECT_NAME} PUBLIC - $ # for headers when building - $ # for client in install mode -) -target_link_libraries(${PROJECT_NAME} PUBLIC scc-sysc scc-util) - -if(TARGET flatbuffers::flatbuffers) - find_package(Boost REQUIRED COMPONENTS thread chrono) - # flatbuffers scheme to be compiled by flac binary - set(FB_SCHEMA "${CMAKE_CURRENT_LIST_DIR}/ipc.fbs") - # Location of the generated files. I like to use CMAKE_CURRENT_BINARY_DIR - # So it will not be in the source code tree. - set(FB_OUTDIR "${CMAKE_CURRENT_BINARY_DIR}/fbs/") - # This is an utilitary function that is available in flatbuffer cmake integration - # fbschemas is a new target that will be created with the generated file - build_flatbuffers("${FB_SCHEMA}" "" scc_fbschemas "" "${FB_OUTDIR}" "" "") - - target_sources(${PROJECT_NAME} PRIVATE scc/tcp4tlm_bridge.cpp scc/tcp4tlm_server.cpp scc/tcp4tlm_client.cpp) - target_include_directories(${PROJECT_NAME} PRIVATE - $ # for headers when building - $ # for headers when building + $ # for client in install mode + ) + target_link_libraries(${PROJECT_NAME} PUBLIC scc-sysc scc-util) + + if(TARGET flatbuffers::flatbuffers) + find_package(Boost REQUIRED COMPONENTS thread chrono) + # flatbuffers scheme to be compiled by flac binary + set(FB_SCHEMA "${CMAKE_CURRENT_LIST_DIR}/ipc.fbs") + # Location of the generated files. I like to use CMAKE_CURRENT_BINARY_DIR + # So it will not be in the source code tree. + set(FB_OUTDIR "${CMAKE_CURRENT_BINARY_DIR}/fbs/") + # This is an utilitary function that is available in flatbuffer cmake integration + # fbschemas is a new target that will be created with the generated file + build_flatbuffers("${FB_SCHEMA}" "" scc_fbschemas "" "${FB_OUTDIR}" "" "") + + target_sources(${PROJECT_NAME} PRIVATE scc/tcp4tlm_bridge.cpp scc/tcp4tlm_server.cpp scc/tcp4tlm_client.cpp) + target_include_directories(${PROJECT_NAME} PRIVATE + $ # for headers when building + $ # for headers when building + $ # for client in install mode + ) + target_link_libraries(${PROJECT_NAME} INTERFACE scc-sysc) endif() - set_target_properties(${PROJECT_NAME} PROPERTIES # VERSION ${PROJECT_VERSION} # FRAMEWORK FALSE From 6d9d141b4a8c120a811f55a4ea1d747b44c7f9bd Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Tue, 18 Aug 2026 23:58:25 -0700 Subject: [PATCH 2/6] removes non-std tlm include in tlm2_lwtr.h --- src/sysc/tlm/scc/lwtr/tlm2_lwtr.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/sysc/tlm/scc/lwtr/tlm2_lwtr.h b/src/sysc/tlm/scc/lwtr/tlm2_lwtr.h index cb14bbda..af41066c 100644 --- a/src/sysc/tlm/scc/lwtr/tlm2_lwtr.h +++ b/src/sysc/tlm/scc/lwtr/tlm2_lwtr.h @@ -27,7 +27,6 @@ #include #include #include -#include #include /** From 8ecafb37c855054db574ad78fca446e94883400a Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Wed, 19 Aug 2026 00:26:11 -0700 Subject: [PATCH 3/6] removes tlm specific sub-include as they are not part of the standard --- src/components/scc/at_router/nb_arbiter.h | 4 +--- src/components/scc/at_router/types.h | 5 ++--- src/components/scc/dmi_mgr.h | 1 - src/components/scc/memory.h | 3 +-- src/components/scc/router.h | 2 -- src/components/scc/tlm_target.h | 1 - src/interfaces/tilelink/scv/tlc_recorder.h | 1 - src/sysc/tlm/nw/tlm_network_gp.h | 6 +----- src/sysc/tlm/scc/tlm_extensions.h | 6 +----- src/sysc/tlm/scc/tlm_signal_gp.h | 6 +----- src/sysc/tlm/scc/tlm_signal_sockets.h | 9 ++------- 11 files changed, 9 insertions(+), 35 deletions(-) diff --git a/src/components/scc/at_router/nb_arbiter.h b/src/components/scc/at_router/nb_arbiter.h index c7c218f8..92fc6360 100644 --- a/src/components/scc/at_router/nb_arbiter.h +++ b/src/components/scc/at_router/nb_arbiter.h @@ -22,8 +22,6 @@ #include #include #include -#include -#include #include #ifndef SC_INCLUDE_DYNAMIC_PROCESSES #define SC_INCLUDE_DYNAMIC_PROCESSES @@ -171,4 +169,4 @@ struct nb_arbiter : public tlm::tlm_bw_nonblocking_transport_if -#include +#include namespace scc { namespace at_router { @@ -91,4 +90,4 @@ template struct i_port_fw_adapter : public at_router::i_port #include #include -#include #include #include diff --git a/src/components/scc/memory.h b/src/components/scc/memory.h index 001e3460..1836600e 100644 --- a/src/components/scc/memory.h +++ b/src/components/scc/memory.h @@ -20,7 +20,6 @@ // Needed for the simple_target_socket #include #include -#include #include #ifndef SC_INCLUDE_DYNAMIC_PROCESSES #define SC_INCLUDE_DYNAMIC_PROCESSES @@ -34,7 +33,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/components/scc/router.h b/src/components/scc/router.h index 253e8a16..3f9594fb 100644 --- a/src/components/scc/router.h +++ b/src/components/scc/router.h @@ -33,8 +33,6 @@ #include #include #include -#include -#include #include namespace scc { diff --git a/src/components/scc/tlm_target.h b/src/components/scc/tlm_target.h index 3b4955d8..d13e04bd 100644 --- a/src/components/scc/tlm_target.h +++ b/src/components/scc/tlm_target.h @@ -22,7 +22,6 @@ #include #include #include -#include #include namespace scc { diff --git a/src/interfaces/tilelink/scv/tlc_recorder.h b/src/interfaces/tilelink/scv/tlc_recorder.h index cc608bf1..8062d169 100644 --- a/src/interfaces/tilelink/scv/tlc_recorder.h +++ b/src/interfaces/tilelink/scv/tlc_recorder.h @@ -16,7 +16,6 @@ #pragma once -#include #ifndef SC_INCLUDE_DYNAMIC_PROCESSES #define SC_INCLUDE_DYNAMIC_PROCESSES #endif diff --git a/src/sysc/tlm/nw/tlm_network_gp.h b/src/sysc/tlm/nw/tlm_network_gp.h index 2c2c87be..1dc1cbec 100644 --- a/src/sysc/tlm/nw/tlm_network_gp.h +++ b/src/sysc/tlm/nw/tlm_network_gp.h @@ -20,11 +20,7 @@ #include "tlm_array.h" #include #include -#ifdef CWR_SYSTEMC -#include -#else -#include -#endif +#include #include /** diff --git a/src/sysc/tlm/scc/tlm_extensions.h b/src/sysc/tlm/scc/tlm_extensions.h index ccf6ee23..d89f41f7 100644 --- a/src/sysc/tlm/scc/tlm_extensions.h +++ b/src/sysc/tlm/scc/tlm_extensions.h @@ -17,11 +17,7 @@ #ifndef SC_COMPONENTS_INCL_TLM_TLM_EXTENSIONS_H_ #define SC_COMPONENTS_INCL_TLM_TLM_EXTENSIONS_H_ -#ifdef CWR_SYSTEMC -#include -#else -#include -#endif +#include #include "tlm_gp_shared.h" //! @brief SystemC TLM diff --git a/src/sysc/tlm/scc/tlm_signal_gp.h b/src/sysc/tlm/scc/tlm_signal_gp.h index 2563914c..6f940326 100644 --- a/src/sysc/tlm/scc/tlm_signal_gp.h +++ b/src/sysc/tlm/scc/tlm_signal_gp.h @@ -18,11 +18,7 @@ #define _TLM_TLM_SIGNAL_GP_H_ #include -#ifdef CWR_SYSTEMC -#include -#else -#include -#endif +#include //! @brief SystemC TLM namespace tlm { diff --git a/src/sysc/tlm/scc/tlm_signal_sockets.h b/src/sysc/tlm/scc/tlm_signal_sockets.h index 40f89d65..0223fd8d 100644 --- a/src/sysc/tlm/scc/tlm_signal_sockets.h +++ b/src/sysc/tlm/scc/tlm_signal_sockets.h @@ -17,15 +17,10 @@ #ifndef _TLM_TLM_SIGNAL_SOCKETS_H_ #define _TLM_TLM_SIGNAL_SOCKETS_H_ -#include "scc/report.h" +#include #include -#ifdef CWR_SYSTEMC -#include -#include -#else -#include -#include +#include #endif //! @brief SystemC TLM From 4a6c7f10034949ee77a3247277faffcaaa27df24 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Wed, 19 Aug 2026 00:43:19 -0700 Subject: [PATCH 4/6] fixes left-over preprocessor statement --- src/sysc/tlm/scc/tlm_signal_sockets.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/sysc/tlm/scc/tlm_signal_sockets.h b/src/sysc/tlm/scc/tlm_signal_sockets.h index 0223fd8d..51752989 100644 --- a/src/sysc/tlm/scc/tlm_signal_sockets.h +++ b/src/sysc/tlm/scc/tlm_signal_sockets.h @@ -21,7 +21,6 @@ #include #include -#endif //! @brief SystemC TLM namespace tlm { From 0000adf53a65dc3e5d825bd62c4d777ba32eb53e Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Wed, 19 Aug 2026 02:41:06 -0700 Subject: [PATCH 5/6] applies clang-format --- src/components/scc/memory.h | 2 +- src/sysc/tlm/nw/tlm_network_gp.h | 4 ++-- src/sysc/tlm/scc/tlm_extensions.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/scc/memory.h b/src/components/scc/memory.h index 1836600e..f328337d 100644 --- a/src/components/scc/memory.h +++ b/src/components/scc/memory.h @@ -33,8 +33,8 @@ #include #include #include -#include #include +#include #include #include diff --git a/src/sysc/tlm/nw/tlm_network_gp.h b/src/sysc/tlm/nw/tlm_network_gp.h index 1dc1cbec..e56febcb 100644 --- a/src/sysc/tlm/nw/tlm_network_gp.h +++ b/src/sysc/tlm/nw/tlm_network_gp.h @@ -18,10 +18,10 @@ #define _TLM_NW_TLM_NETWROK_GP_H_ #include "tlm_array.h" +#include #include -#include #include -#include +#include /** * @brief The SystemC Transaction Level Model (TLM) Network TLM utilities. diff --git a/src/sysc/tlm/scc/tlm_extensions.h b/src/sysc/tlm/scc/tlm_extensions.h index d89f41f7..5ce5291f 100644 --- a/src/sysc/tlm/scc/tlm_extensions.h +++ b/src/sysc/tlm/scc/tlm_extensions.h @@ -17,8 +17,8 @@ #ifndef SC_COMPONENTS_INCL_TLM_TLM_EXTENSIONS_H_ #define SC_COMPONENTS_INCL_TLM_TLM_EXTENSIONS_H_ -#include #include "tlm_gp_shared.h" +#include //! @brief SystemC TLM namespace tlm { From 7310ec9486de90a60a0949689134c919fe733b17 Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Wed, 19 Aug 2026 22:45:35 -0700 Subject: [PATCH 6/6] disables the test of C++17 only components in C++11 and C++14 builds --- tests/CMakeLists.txt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index b05b80ad..622d31d0 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -12,16 +12,17 @@ add_subdirectory(sc_fixed_tracing) add_subdirectory(cxs_tlm) add_subdirectory(tlm_memory) add_subdirectory(memory_subsys) -add_subdirectory(at_router_crossbar) -add_subdirectory(at_router_hub) add_subdirectory(quantum_keeper_mt) add_subdirectory(sim_speed) add_subdirectory(streambuf) if(FULL_TEST_SUITE) add_subdirectory(sim_performance) endif() -find_package(flatbuffers CONFIG QUIET) -if(TARGET flatbuffers::flatbuffers) - add_subdirectory(tcp4tlm_bridge) +if(CMAKE_CXX_STANDARD GREATER_EQUAL 17) + add_subdirectory(at_router_crossbar) + add_subdirectory(at_router_hub) + find_package(flatbuffers CONFIG QUIET) + if(TARGET flatbuffers::flatbuffers) + add_subdirectory(tcp4tlm_bridge) + endif() endif() -