Skip to content

Commit

Permalink
Merge remote-tracking branch 'accellera-official/main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
lmailletcontoz committed Oct 30, 2024
2 parents 95d68b0 + f642423 commit 1d6a361
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 7 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/tsan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: tsan

on:
push:
pull_request:

jobs:
ubuntu:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: [20.04, 22.04]
platform: [linux/amd64, linux/arm64]
target: [clang-shared-regression-tsan]
steps:
- name: Install qemu-user-static
run: |
if [[ "${{ matrix.platform }}" == "linux/arm64" ]]; then
sudo apt-get update && sudo apt-get install -y qemu-user-static
fi
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: |
docker buildx build --platform ${{ matrix.platform }} -t systemc_test --build-arg UBUNTU_VERSION=${{ matrix.version }} -f docker/ubuntu.dockerfile .
docker run -e SYSTEMC_CI_TARGET=${{ matrix.target }} systemc_test
almalinux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: [8, 9]
platform: [linux/amd64, linux/arm64]
target: [clang-shared-regression-tsan]
steps:
- name: Install qemu-user-static
run: |
if [[ "${{ matrix.platform }}" == "linux/arm64" ]]; then
sudo apt-get update && sudo apt-get install -y qemu-user-static
fi
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: |
docker buildx build --platform ${{ matrix.platform }} -t systemc_test --build-arg ALMA_VERSION=${{ matrix.version }} -f docker/alma.dockerfile .
docker run -e SYSTEMC_CI_TARGET=${{ matrix.target }} systemc_test
macos:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
target: [clang-shared-regression-tsan]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: |
SYSTEMC_CI_TARGET=${{ matrix.target }} SYSTEMC_SRC_PATH=$PWD docker/entrypoint.sh
9 changes: 8 additions & 1 deletion docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,14 @@ case "$SYSTEMC_CI_TARGET" in
BUILD_REGRESSIONS=true
CXX_FLAGS="$CXX_FLAGS -fsanitize=undefined"
;;
*)
clang-shared-regression-tsan)
CC=clang
CXX=clang++
BUILD_SHARED_LIBRARY=true
BUILD_REGRESSIONS=true
CXX_FLAGS="$CXX_FLAGS -fsanitize=thread"
;;
*)
echo "Error: Unknown SYSTEMC_CI_TARGET '$SYSTEMC_CI_TARGET'"
exit 1
;;
Expand Down
5 changes: 2 additions & 3 deletions src/sysc/tracing/sc_vcd_trace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1374,9 +1374,8 @@ vcd_trace_file::cycle(bool this_is_a_delta_cycle)

// Now do the actual printing
bool time_printed = false;
vcd_trace* const* const l_traces = &traces[0];
for (int i = 0; i < (int)traces.size(); i++) {
vcd_trace* t = l_traces[i];
for (size_t i = 0; i < traces.size(); i++) {
vcd_trace* t = traces[i];
if(t->changed()) {
if(!time_printed){
print_time_stamp(now_units_high, now_units_low);
Expand Down
5 changes: 2 additions & 3 deletions src/sysc/tracing/sc_wif_trace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1226,9 +1226,8 @@ wif_trace_file::cycle(bool this_is_a_delta_cycle)
}

bool time_printed = false;
wif_trace* const* const l_traces = &traces[0];
for (int i = 0; i < (int)traces.size(); i++) {
wif_trace* t = l_traces[i];
for (size_t i = 0; i < traces.size(); i++) {
wif_trace* t = traces[i];
if(t->changed()){
if(time_printed == false) {

Expand Down

0 comments on commit 1d6a361

Please sign in to comment.