Skip to content

Commit a08e113

Browse files
committed
Merge remote-tracking branch 'origin/develop'
2 parents 010aac1 + ca01246 commit a08e113

File tree

109 files changed

+8167
-4469
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+8167
-4469
lines changed

CMakeLists.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ option(BUILD_SCC_DOCUMENTATION "Create and install the HTML based API documentat
1111
option(FULL_TRACE_TYPE_LIST "Test for extended set of templated datatypes" OFF)
1212
#Note: this needs to match the SystemC kernel build options
1313
option(SC_WITH_PHASE_CALLBACKS "Whether SystemC is built with simulation phase callbacks" OFF)
14-
option(SC_WITH_PHASE_CALLBACK_TRACING "whether SystemC was build with pahse callbacks for tracing. It needs to match the SystemC build configuration" OFF)
14+
option(SC_WITH_PHASE_CALLBACK_TRACING "whether SystemC was build with phase callbacks for tracing. It needs to match the SystemC build configuration" OFF)
1515
set(SCC_ARCHIVE_DIR_MODIFIER "" CACHE STRING "additional directory levels to store static library archives")
1616
set(SCC_LIBRARY_DIR_MODIFIER "" CACHE STRING "additional directory levels to store libraries")
1717

@@ -67,8 +67,11 @@ if(CMAKE_PROJECT_NAME STREQUAL "scc")
6767
option(ENABLE_CLANG_TIDY "Add clang-tidy automatically to builds" OFF)
6868
option(BUILD_SCC_LIB_ONLY "Build only the library (no examples" OFF)
6969
option(INSTALL_DEPENDENCIES "Should dependencies be installed when installing SCC" OFF)
70+
set(CLANG_FORMAT_EXCLUDE_PATTERNS "third_party/")
71+
find_package(ClangFormat)
7072
else()
7173
option(BUILD_SCC_LIB_ONLY "Build only the library (no examples" ON)
74+
set(CLANG_FORMAT_EXCLUDE_PATTERNS ${CLANG_FORMAT_EXCLUDE_PATTERNS} "/third_party/" PARENT_SCOPE)
7275
endif()
7376

7477
if(BUILD_SCC_DOCUMENTATION)
@@ -137,9 +140,6 @@ if(MSVC)
137140
endif()
138141
include(SystemCPackage)
139142

140-
set(CLANG_FORMAT_EXCLUDE_PATTERNS "third_party/")
141-
find_package(ClangFormat)
142-
143143
include(CheckSymbolExists)
144144
# Check for function getenv()
145145
check_symbol_exists(getenv "stdlib.h" HAVE_GETENV)
@@ -154,11 +154,11 @@ endif()
154154
###############################################################################
155155
add_subdirectory(src/common)
156156
if(SystemC_FOUND)
157-
add_subdirectory(src/bus_interfaces)
157+
add_subdirectory(src/interfaces)
158158
add_subdirectory(src/components)
159159
add_subdirectory(src/sysc)
160160
add_subdirectory(third_party)
161-
if(NOT SCC_LIB_ONLY)
161+
if(NOT BUILD_SCC_LIB_ONLY)
162162
if (NOT (DEFINED CMAKE_CXX_CLANG_TIDY OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))
163163
add_subdirectory(examples)
164164
endif()
@@ -181,7 +181,7 @@ if(SystemC_FOUND)
181181
target_include_directories(scc INTERFACE ${Boost_INCLUDE_DIRS})
182182
target_link_libraries(scc INTERFACE ${Boost_datetime_LIBRARY})
183183
endif()
184-
target_link_libraries(scc INTERFACE scc-util scc-sysc components busses scv-tr)
184+
target_link_libraries(scc INTERFACE scc-util scc-sysc components interfaces scv-tr)
185185
target_link_libraries(scc INTERFACE ${FMT_TARGET} spdlog::spdlog)
186186

187187
set_target_properties(scc PROPERTIES
@@ -192,7 +192,7 @@ if(SystemC_FOUND)
192192
#set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--export-all-symbols")
193193
add_library(scc_shared SHARED $<TARGET_OBJECTS:scc-util>
194194
$<TARGET_OBJECTS:scc-sysc>
195-
$<TARGET_OBJECTS:busses>
195+
$<TARGET_OBJECTS:interfaces>
196196
$<TARGET_OBJECTS:scv-tr>
197197
)
198198
set_target_properties(scc_shared PROPERTIES CXX_VISIBILITY_PRESET hidden)

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Here is a short list of features.
1919

2020
* Various optimized trace file implementations
2121
* compressed VCD
22-
* FST (used by [GTKWave](http://gtkwave.sourceforge.net/))
22+
* FST (used by [GTKWave](http://gtkwave.sourceforge.net/) and [Surfer](https://surfer-project.org/))
2323

2424
* Tracing TLM2 Sockets
2525

@@ -57,6 +57,11 @@ Here is a short list of features.
5757

5858
The full documentation can be found at the [Github pages](https://minres.github.io/SystemC-Components/)
5959

60+
Build notes
61+
=======================================
62+
63+
If SystemC is build using cmake with `SC_WITH_PHASE_CALLBACK_TRACING=ON` (which is the default for SystemC 2.3.4), tracing will not work. Either SystemC is being installed with SC_WITH_PHASE_CALLBACK_TRACING=ON (which is the prefered way as this setting is in sync with the automake configure configuration, see https://github.com/accellera-official/systemc/issues/24) or the SCC is being build using `SC_WITH_PHASE_CALLBACK_TRACING=ON`.
64+
6065
Build instructions using conan
6166
=======================================
6267

cmake/SystemCPackage.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ if(NOT SystemC_FOUND)
1313
find_package(MTISystemC REQUIRED)
1414
set(SystemC_LIBRARIES SystemC::systemc)
1515
else()
16+
set(CMAKE_FIND_USE_PACKAGE_REGISTRY FALSE)
17+
set(CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY TRUE)
1618
find_package(SystemCLanguage QUIET)
1719
if(TARGET SystemC::systemc) # conan find_package_generator or the cmake of an SystemC installation
1820
set(SystemC_FOUND true)

contrib/install_wo_conan.cmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ set GENERATOR=Visual Studio 17 2022
3131
set TOOLSET=msvc-14.3
3232
:start_build:
3333

34-
set CMAKE_OPTS=-G "%GENERATOR%" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_GENERATOR_PLATFORM=x64 -DCMAKE_CXX_STANDARD=%CXX_STD%
34+
set CMAKE_OPTS=-G "%GENERATOR%" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_GENERATOR_PLATFORM=x64 -DCMAKE_CXX_STANDARD=%CXX_STD% -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON
3535
set BOOST_LIB_EXCLUDE=--without-contract --without-fiber --without-graph --without-graph_parallel --without-iostreams --without-json --without-locale --without-log --without-math --without-mpi --without-nowide --without-python --without-random --without-stacktrace --without-test --without-timer --without-wave
3636
@REM ############################################################################################
3737
@REM build_boost
@@ -46,7 +46,7 @@ popd
4646
@REM ############################################################################################
4747
if NOT EXIST "fmt" tar xzvf fmt_8.0.1.tar.gz
4848
cmake -S fmt -B build\fmt %CMAKE_OPTS% -DCMAKE_INSTALL_PREFIX=%SCC_HOME% -DBUILD_SHARED_LIBS=ON
49-
cmake --build build\fmt -j 10 --target install
49+
cmake --build build\fmt -j 10 --config Release --target install
5050
@REM ############################################################################################
5151
@REM build_spdlog
5252
@REM ############################################################################################
@@ -81,5 +81,5 @@ cmake --build build/systemcams -j 10 --config Release --target install
8181
@REM build_scc
8282
@REM ############################################################################################
8383
if NOT EXIST "scc" tar xzvf scc.tar.gz
84-
cmake -S scc -B build\scc -Wno-dev %CMAKE_OPTS% -DCMAKE_INSTALL_PREFIX=%SCC_HOME% -DENABLE_CONAN=OFF -DBoost_NO_SYSTEM_PATHS=TRUE -DBOOST_ROOT=%SCC_HOME% -DBOOST_INCLUDEDIR=%SCC_HOME%\include\boost-1_85 -DBoost_NO_WARN_NEW_VERSIONS=ON -DBoost_USE_STATIC_LIBS=ON -DBoost_USE_MULTITHREADED=ON -DBoost_USE_STATIC_RUNTIME=OFF
84+
cmake -S scc -B build\scc -Wno-dev %CMAKE_OPTS% -DCMAKE_INSTALL_PREFIX=%SCC_HOME% -DENABLE_CONAN=OFF -DBoost_NO_SYSTEM_PATHS=TRUE -DBOOST_ROOT=%SCC_HOME% -DBOOST_INCLUDEDIR=%SCC_HOME%\include\boost-1_85 -DBoost_NO_WARN_NEW_VERSIONS=ON -DBoost_USE_STATIC_LIBS=ON -DBoost_USE_MULTITHREADED=ON -DBoost_USE_STATIC_RUNTIME=OFF -DBUILD_SCC_LIB_ONLY=ON
8585
cmake --build build\scc -j 10 --config Release --target install

contrib/install_wo_conan.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ function build_lz4 {
8989
if [ ! -d lz4 ]; then
9090
if [ ! -f lz4_1.9.4.tar.gz ]; then
9191
git clone --depth 1 --branch v1.9.4 -c advice.detachedHead=false https://github.com/lz4/lz4.git
92-
tar czf lz4_1.9.4.tar.gz yaml-cpp --exclude=.git
92+
tar czf lz4_1.9.4.tar.gz lz4 --exclude=.git
9393
else
9494
tar xzf lz4_1.9.4.tar.gz
9595
fi
@@ -145,7 +145,7 @@ function build_scc {
145145
tar czf scc.tar.gz --exclude=.git scc
146146
fi
147147
cmake -S scc -B build/scc -Wno-dev ${CMAKE_COMMON_SETTINGS} -DCMAKE_INSTALL_PREFIX=${SCC_INSTALL} -DENABLE_CONAN=OFF \
148-
-DBoost_NO_SYSTEM_PATHS=TRUE -DBOOST_ROOT=${SCC_INSTALL} -DBoost_NO_WARN_NEW_VERSIONS=ON -DSCC_LIB_ONLY=ON || exit 1
148+
-DBoost_NO_SYSTEM_PATHS=TRUE -DBOOST_ROOT=${SCC_INSTALL} -DBoost_NO_WARN_NEW_VERSIONS=ON -DBUILD_SCC_LIB_ONLY=ON || exit 1
149149
cmake --build build/scc -j 10 --target install || exit 2
150150
}
151151

contrib/pysysc/src/pysysc/scc/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ def load_lib(project_dir):
2222
if os.path.exists(os.path.join(project_dir, 'scc/')):
2323
logging.debug("Loading SC-Components build dir libs")
2424
pysysc.add_include_path(os.path.join(project_dir, 'scc/src/common'))
25-
pysysc.add_include_path(os.path.join(project_dir, 'scc/third_party'))
25+
pysysc.add_include_path(os.path.join(project_dir, "scc/third_party/cci-1.0.0"))
2626
pysysc.add_include_path(os.path.join(project_dir, 'scc/third_party/scv-tr/src'))
27+
pysysc.add_include_path(os.path.join(project_dir, 'scc/third_party/axi_chi'))
2728
pysysc.add_include_path(os.path.join(project_dir, 'scc/src/sysc'))
2829
pysysc.add_include_path(os.path.join(project_dir, 'scc/src/components'))
30+
pysysc.add_include_path(os.path.join(project_dir, 'scc/src/bus_interfaces'))
2931
elif os.path.exists(os.path.join(project_dir, 'include/')):
3032
logging.debug("Loading SC-Components installed libs")
3133
pysysc.add_include_path(os.path.join(project_dir, 'include'))

examples/ahb_bfm/sc_main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
#include <ahb/pin/initiator.h>
2-
#include <ahb/pin/target.h>
31
#include <cci_configuration>
42
#include <fstream>
3+
#include <interfaces/ahb/pin/initiator.h>
4+
#include <interfaces/ahb/pin/target.h>
55
#include <scc/configurable_tracer.h>
66
#include <scc/configurer.h>
77
#include <scc/report.h>

examples/axi-axi/sc_main.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
*/
77

88
#include <array>
9-
#include <axi/axi_initiator.h>
10-
#include <axi/axi_target.h>
119
#include <axi/scv/recorder_modules.h>
10+
#include <interfaces/axi/axi_initiator.h>
11+
#include <interfaces/axi/axi_target.h>
1212
#include <scc.h>
1313
#include <scc/configurable_tracer.h>
1414
#include <scc/hierarchy_dumper.h>
@@ -33,7 +33,7 @@ class testbench : public sc_core::sc_module {
3333
axi::axi_target<SOCKET_WIDTH> tgt{"tgt"};
3434

3535
private:
36-
tlm::scc::initiator_mixin<tlm::tlm_initiator_socket<>> top_isck{"top_isck"};
36+
tlm::scc::initiator_mixin<tlm::tlm_initiator_socket<scc::LT>> top_isck{"top_isck"};
3737
scc::memory<1_GB, 0> mem{"mem"};
3838

3939
unsigned id{0};
@@ -47,7 +47,7 @@ class testbench : public sc_core::sc_module {
4747
: sc_core::sc_module(nm) {
4848
SC_THREAD(run);
4949
intor.clk_i(clk);
50-
top_isck(intor.b_tsck);
50+
top_isck(intor.tsck);
5151
tgt.clk_i(clk);
5252
intor.isck(intor_rec.tsckt);
5353
intor_rec.isckt(tgt.tsck);

examples/axi4_tlm-pin-tlm/sc_main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
#include <array>
99
#include <axi/pe/axi_initiator.h>
1010
#include <axi/pe/simple_target.h>
11-
#include <axi/pin/axi4_initiator.h>
12-
#include <axi/pin/axi4_target.h>
1311
#include <axi/scv/recorder_modules.h>
1412
#include <csetjmp>
1513
#include <csignal>
14+
#include <interfaces/axi/pin/axi4_initiator.h>
15+
#include <interfaces/axi/pin/axi4_target.h>
1616
#include <scc.h>
1717

1818
using namespace sc_core;

examples/axi4lite_tlm-pin-tlm/sc_main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
#include <array>
99
#include <axi/pe/axi_initiator.h>
1010
#include <axi/pe/simple_target.h>
11-
#include <axi/pin/axi4_initiator.h>
12-
#include <axi/pin/axi4_target.h>
1311
#include <axi/scv/recorder_modules.h>
1412
#include <csetjmp>
1513
#include <csignal>
14+
#include <interfaces/axi/pin/axi4_initiator.h>
15+
#include <interfaces/axi/pin/axi4_target.h>
1616
#include <scc.h>
1717

1818
using namespace sc_core;

0 commit comments

Comments
 (0)