Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
b407b12
Add sc_log
markfoodyburton Apr 3, 2025
177267c
Fixes for compatibility with gcc
markfoodyburton Apr 22, 2025
5140c7c
Add format include to sc_log
markfoodyburton Apr 23, 2025
ec10ba3
Comment out redundent TRACE macro in risc_cpu example
markfoodyburton Apr 23, 2025
15328bc
clean up comments and make guards consistent with filenames, make cac…
markfoodyburton Apr 23, 2025
ad61cd8
Move sc_log under sc_core
markfoodyburton May 16, 2025
97eea3a
fixes licensing header in sc_log.h
eyck Sep 30, 2025
e03c79a
fixes licensing header of sc_log.cpp
eyck Sep 30, 2025
f2b0cf0
updates sc_log_types.h license header
eyck Sep 30, 2025
ff0216d
adds MINRES Technologies to the list of authors
eyck Sep 30, 2025
a99141a
Rename macros to be compliant, and remove log handler convenience class
markfoodyburton Jan 19, 2026
89f4acb
Previx name of call_sc_name_fn convenience class with sc_log_priv_
markfoodyburton Jan 19, 2026
c138522
Expose the dynamic logging mechanism as an implementation defined API…
markfoodyburton Jan 30, 2026
176f926
Add FILE and LINE to SC_LOG verbosity API
markfoodyburton Feb 5, 2026
d825db5
Major re-work to simplify macro API
markfoodyburton Feb 12, 2026
6dfa196
Merge pull request #744 from markfoodyburton/mburton/sc_log
lmailletcontoz Mar 10, 2026
de4e722
SC_LOG: bug fixes, std::string ownership, internal improvements
markfoodyburton Apr 17, 2026
1fccfb1
SC_LOG: std::format/fmt detection, missing includes
markfoodyburton Apr 17, 2026
11be830
Merge pull request #150 from markfoodyburton/mburton/sc_log
lmailletcontoz May 5, 2026
97f287e
Andy Goodrich: use separate names for thread_local vpools.
AndrewGoodrich Mar 1, 2026
4044b65
Andy Goodrich: use thread_local on two temporary pools I missed.
AndrewGoodrich Mar 1, 2026
ff4a7a6
Andy Goodrich: be consistent in naming temporary pools.
AndrewGoodrich Mar 1, 2026
bc1dfc0
MSYS2: Remove systemc_if export target
jeromehaxhiaj-qti Nov 20, 2025
e8ae53e
CI: Add msys2 UCRT64 and CLANGARM64 targets
jeromehaxhiaj-qti Nov 4, 2025
b996d15
ACG: Convert FX lists and other statics to thread_local.
AndrewGoodrich Mar 22, 2026
c7aa9ec
Andy Goodrich: fix right shift operators to IEEE standard
AndrewGoodrich Apr 5, 2026
fc06769
Andy Goodrich: further changes to return same sized values after righ…
AndrewGoodrich Apr 5, 2026
1071551
Andy Goodrich: change static to thread_local for scfx_rep::to_string.
AndrewGoodrich Apr 2, 2026
4c1a42f
Andy Goodrich: alignment issue.
AndrewGoodrich Apr 14, 2026
c5153d6
Andy Goodrich: convert indents to spaces rather than tabs.
AndrewGoodrich Apr 14, 2026
e5bf3e8
Andy Goodrich: add adjust_hod calls to set() and clear()
AndrewGoodrich Apr 14, 2026
ee3599a
Andy Goodrich: fix indentation.
AndrewGoodrich Apr 16, 2026
f29b92d
Andy Goodrich: more indentation fixes
AndrewGoodrich Apr 16, 2026
6bee7f5
Andy Goodrich: match standard for unsigned ~ operator.
AndrewGoodrich Apr 16, 2026
64b86ee
Andy Goodrich: adjust test for new result sign for operator~.
AndrewGoodrich Apr 16, 2026
318a56b
CI: Don't build with -Werror on AlmaLinux 8 on arm64 hosts
aut0 Apr 22, 2026
53e5f7d
ci: remove Ubuntu 20.04, because it is end of life
aut0 Apr 22, 2026
9345283
tests: fix unused return value for regression tests
aut0 Apr 22, 2026
adddd51
tests: fix memory leaks
nbosb Apr 22, 2026
c2dd012
Make sc_simcontext thread_local; handle sub-simcontext construction
markfoodyburton May 12, 2026
792e8b5
Thread-safe kernel statics and kernel prim_channel construction
markfoodyburton May 12, 2026
d892137
Add kernel async runnable helper and run_update_async primitive
markfoodyburton May 12, 2026
80aedea
Make sc_event notify/cancel cross-simcontext safe
markfoodyburton May 12, 2026
ff33f4e
Make process state mutations cross-simcontext safe
markfoodyburton May 7, 2026
df18123
Make sc_signal::write cross-simcontext safe
markfoodyburton May 7, 2026
f8c2aab
Make sc_report_handler state thread_local
markfoodyburton May 12, 2026
764848c
Add sc_on_context and route TLM b_transport / nb_transport_fw
markfoodyburton May 7, 2026
3ea98e5
Add sc_ob_event utility
markfoodyburton May 7, 2026
82cb38b
Add sc_sync_window utility
markfoodyburton May 7, 2026
ca7201a
Add sc_concurrent / SC_ALLOW_CONCURRENCY with bidirectional stop and …
markfoodyburton May 12, 2026
a7068d0
Complete sc_object_manager thread safety for shared sub-simcontexts
markfoodyburton May 12, 2026
b82a6aa
Add cross-simcontext regression tests
markfoodyburton May 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/asan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: [20.04, 22.04, 24.04]
version: [22.04, 24.04]
platform: [linux/amd64]
target: [clang-shared-regression-asan]
steps:
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: [20.04, 22.04, 24.04]
version: [22.04, 24.04]
platform: [linux/arm64]
target: [clang-shared-regression-asan]
steps:
Expand Down
42 changes: 40 additions & 2 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: [20.04, 22.04, 24.04]
version: [22.04, 24.04]
platform: [linux/amd64]
target: [gcc-shared, gcc-static, clang-shared, clang-static]
steps:
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: [20.04, 22.04, 24.04]
version: [22.04, 24.04]
platform: [linux/arm64]
target: [gcc-shared, gcc-static, clang-shared, clang-static]
steps:
Expand Down Expand Up @@ -87,3 +87,41 @@ jobs:
cmake -B BUILD/RELEASE/BUILD .
cmake --build BUILD/RELEASE/BUILD --config RELEASE --parallel
cmake --install BUILD/RELEASE/BUILD --config RELEASE
msys2-ucrt64:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
target: [gcc-shared, gcc-static]
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v5
- uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: git mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-ninja
- name: Build
run: |
SYSTEMC_CI_TARGET=${{ matrix.target }} SYSTEMC_SRC_PATH=$PWD docker/entrypoint.sh
msys2-clangarm64:
runs-on: windows-11-arm
strategy:
fail-fast: false
matrix:
target: [clang-shared, clang-static]
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v5
- uses: msys2/setup-msys2@v2
with:
msystem: CLANGARM64
update: true
install: git mingw-w64-clang-aarch64-clang mingw-w64-clang-aarch64-cmake mingw-w64-clang-aarch64-ninja
- name: Build
run: |
SYSTEMC_CI_TARGET=${{ matrix.target }} SYSTEMC_SRC_PATH=$PWD docker/entrypoint.sh
42 changes: 40 additions & 2 deletions .github/workflows/regressions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: [20.04, 22.04, 24.04]
version: [22.04, 24.04]
platform: [linux/amd64]
target: [gcc-shared-regression, clang-shared-regression]
steps:
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: [20.04, 22.04, 24.04]
version: [22.04, 24.04]
platform: [linux/arm64]
target: [gcc-shared-regression, clang-shared-regression]
steps:
Expand Down Expand Up @@ -87,3 +87,41 @@ jobs:
cmake -B BUILD/RELEASE/BUILD -DENABLE_REGRESSION=true .
cmake --build BUILD/RELEASE/BUILD --config RELEASE --parallel
cmake --install BUILD/RELEASE/BUILD --config RELEASE
msys2-ucrt64:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
target: [gcc-shared-regression, gcc-static-regression]
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v5
- uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install: git mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-ninja
- name: Build
run: |
SYSTEMC_CI_TARGET=${{ matrix.target }} SYSTEMC_SRC_PATH=$PWD docker/entrypoint.sh
msys2-clangarm64:
runs-on: windows-11-arm
strategy:
fail-fast: false
matrix:
target: [clang-shared-regression, clang-static-regression]
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v5
- uses: msys2/setup-msys2@v2
with:
msystem: CLANGARM64
update: true
install: git mingw-w64-clang-aarch64-clang mingw-w64-clang-aarch64-cmake mingw-w64-clang-aarch64-ninja
- name: Build
run: |
SYSTEMC_CI_TARGET=${{ matrix.target }} SYSTEMC_SRC_PATH=$PWD docker/entrypoint.sh
4 changes: 2 additions & 2 deletions .github/workflows/tsan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: [20.04, 22.04, 24.04]
version: [22.04, 24.04]
platform: [linux/amd64]
target: [clang-shared-regression-tsan]
steps:
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: [20.04, 22.04, 24.04]
version: [22.04, 24.04]
platform: [linux/arm64]
target: [clang-shared-regression-tsan]
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ubsan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: [20.04, 22.04, 24.04]
version: [22.04, 24.04]
platform: [linux/amd64]
target: [clang-shared-regression-ubsan]
steps:
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: [20.04, 22.04, 24.04]
version: [22.04, 24.04]
platform: [linux/arm64]
target: [clang-shared-regression-ubsan]
steps:
Expand Down
5 changes: 5 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ This product includes software developed by Mentor Graphics Corporation
Copyright 2006-2019 Mentor Graphics Corporation
All rights reserved.

This product includes software developed by MINRES Technologies GmbH
Keltenhof 2, 85579 Neubibergm Germany
Copyright 2016-2025 XtremeEDA Corporation.
All rights reserved.

This product includes software developed by NXP B.V.
High Tech Campus 60, 5656 AG Eindhoven, Netherlands
Copyright 2012-2023 NXP B.V.
Expand Down
49 changes: 39 additions & 10 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@ fi
# Build with -Werror by default
CXX_FLAGS="-Werror"

# Don't build with -Werror on AlmaLinux 8 on arm64 hosts
# GCC 8.5 does not ignore false positive -Wshift-negative-value warning
if [[ -f /etc/os-release ]]; then
. /etc/os-release

ARCH=$(uname -m)

if [[ "$ID" == "almalinux" && "$VERSION_ID" == 8* ]] && \
[[ "$ARCH" == "aarch64" || "$ARCH" == "arm64" ]]; then
CXX_FLAGS=""
fi
fi

case "$SYSTEMC_CI_TARGET" in
gcc-shared)
CC=gcc
Expand All @@ -30,6 +43,12 @@ case "$SYSTEMC_CI_TARGET" in
BUILD_SHARED_LIBRARY=true
BUILD_REGRESSIONS=true
;;
gcc-static-regression)
CC=gcc
CXX=g++
BUILD_SHARED_LIBRARY=false
BUILD_REGRESSIONS=true
;;
clang-shared)
CC=clang
CXX=clang++
Expand All @@ -48,6 +67,12 @@ case "$SYSTEMC_CI_TARGET" in
BUILD_SHARED_LIBRARY=true
BUILD_REGRESSIONS=true
;;
clang-static-regression)
CC=clang
CXX=clang++
BUILD_SHARED_LIBRARY=false
BUILD_REGRESSIONS=true
;;
clang-shared-regression-asan)
CC=clang
CXX=clang++
Expand Down Expand Up @@ -75,16 +100,20 @@ case "$SYSTEMC_CI_TARGET" in
;;
esac

cd $SYSTEMC_SRC_PATH
cmake -B BUILD/RELEASE-${SYSTEMC_CI_TARGET}/BUILD \
-DCMAKE_INSTALL_PREFIX=${SYSTEMC_SRC_PATH}/BUILD/${SYSTEMC_CI_TARGET} \

cd "$SYSTEMC_SRC_PATH"
cmake -B "BUILD/RELEASE-${SYSTEMC_CI_TARGET}/BUILD" \
-DCMAKE_INSTALL_PREFIX="${SYSTEMC_SRC_PATH}/BUILD/${SYSTEMC_CI_TARGET}" \
-DCMAKE_CXX_FLAGS="$CXX_FLAGS" \
-DCMAKE_C_COMPILER=$CC \
-DCMAKE_CXX_COMPILER=$CXX \
-DENABLE_REGRESSION=$BUILD_REGRESSIONS \
-DBUILD_SHARED_LIBS=$BUILD_SHARED_LIBRARY .
cmake --build BUILD/RELEASE-${SYSTEMC_CI_TARGET}/BUILD/ --parallel
cmake --install BUILD/RELEASE-${SYSTEMC_CI_TARGET}/BUILD/
make -j `getconf _NPROCESSORS_ONLN` -C BUILD/RELEASE-${SYSTEMC_CI_TARGET}/BUILD/ check
-DCMAKE_C_COMPILER="$CC" \
-DCMAKE_CXX_COMPILER="$CXX" \
-DENABLE_REGRESSION="$BUILD_REGRESSIONS" \
-DBUILD_SHARED_LIBS="$BUILD_SHARED_LIBRARY" .
cmake --build "BUILD/RELEASE-${SYSTEMC_CI_TARGET}/BUILD/" --parallel
cmake --install "BUILD/RELEASE-${SYSTEMC_CI_TARGET}/BUILD/"

if [[ "$BUILD_REGRESSIONS" == "true" ]]; then
cmake --build "BUILD/RELEASE-${SYSTEMC_CI_TARGET}/BUILD/" --parallel "$(getconf _NPROCESSORS_ONLN)" --target check
fi

exit 0
1 change: 1 addition & 0 deletions examples/sysc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,5 @@ add_subdirectory (simple_bus)
add_subdirectory (simple_fifo)
add_subdirectory (simple_perf)
add_subdirectory (async_suspend)
add_subdirectory (concurrent)

14 changes: 13 additions & 1 deletion examples/sysc/async_suspend/node.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ SC_MODULE (asynctestnode)
init_socket("output"),
target_socket("input"),
txnSent_c(0),
txn(nullptr),
suspendReq(false),
col(c),
running(true),
Expand All @@ -136,12 +137,22 @@ SC_MODULE (asynctestnode)
sensitive << txnSentEvent;
}

~asynctestnode()
virtual ~asynctestnode()
{
running = false;
while (!finished)
txnSentMethod();
if (m_thread.joinable()) m_thread.join();

delete txn;
txn = nullptr;

while (!queue.empty())
{
delete queue.front();
queue.pop();
}

}

// This will cause SystemC time to be driven forwards. But, if we're not
Expand Down Expand Up @@ -239,6 +250,7 @@ SC_MODULE (asynctestnode)

// Send transaction to a random place
init_socket[rand() % init_socket.size()]->b_transport(*txn, myTime);
txn = nullptr;

#ifdef DEBUG
std::stringstream msg;
Expand Down
32 changes: 32 additions & 0 deletions examples/sysc/concurrent/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
###############################################################################
#
# Licensed to Accellera Systems Initiative Inc. (Accellera) under one or
# more contributor license agreements. See the NOTICE file distributed
# with this work for additional information regarding copyright ownership.
# Accellera licenses this file to you under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# permissions and limitations under the License.
#
###############################################################################

###############################################################################
#
# examples/sysc/concurrent/CMakeLists.txt --
# Build the SC_ALLOW_CONCURRENCY demonstrator.
#
###############################################################################

set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_package(Threads REQUIRED)

add_executable(concurrent_test concurrent_test.cpp)
target_link_libraries(concurrent_test SystemC::systemc Threads::Threads)
configure_and_add_test(concurrent_test)
Loading
Loading