From 2bc5aa5cf4346ca478a547bf90c752399a73a7a7 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 25 Jun 2026 14:20:27 +0200 Subject: [PATCH 1/7] Update ABC as per 2026-06-25 --- abc | 2 +- cmake/YosysAbc.cmake | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/abc b/abc index 30c47da5c..a35f806b8 160000 --- a/abc +++ b/abc @@ -1 +1 @@ -Subproject commit 30c47da5c9343713ef0b3e12914686ffd28ef367 +Subproject commit a35f806b8ce47d29537cab973679b5a3523ab085 diff --git a/cmake/YosysAbc.cmake b/cmake/YosysAbc.cmake index 0632a9b17..696752e76 100644 --- a/cmake/YosysAbc.cmake +++ b/cmake/YosysAbc.cmake @@ -60,6 +60,7 @@ function(yosys_abc_target arg_LIBNAME arg_EXENAME) $<$>:ABC_NAMESPACE=abc> ABC_USE_STDINT_H=1 ABC_USE_CUDD=1 + ABC_NO_HISTORY=1 ABC_NO_DYNAMIC_LINKING $<${YOSYS_ENABLE_THREADS}:ABC_USE_PTHREADS> $<${YOSYS_ENABLE_READLINE}:ABC_USE_READLINE> @@ -83,6 +84,7 @@ function(yosys_abc_target arg_LIBNAME arg_EXENAME) -Wno-deprecated-comma-subscript -Wno-format -Wno-constant-logical-operand + -Wno-sizeof-pointer-memaccess ) target_link_libraries(${arg_LIBNAME} PUBLIC $<${YOSYS_ENABLE_THREADS}:Threads::Threads> From 459a933005d4e276be76c78e8f480840be4a577b Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 26 Jun 2026 14:33:12 +0200 Subject: [PATCH 2/7] Store caches on main --- .github/workflows/extra-builds.yml | 15 ++++++++++----- .github/workflows/test-build.yml | 15 +++++++++------ .github/workflows/test-compile.yml | 9 ++++++--- .github/workflows/test-sanitizers.yml | 10 +++++++--- 4 files changed, 32 insertions(+), 17 deletions(-) diff --git a/.github/workflows/extra-builds.yml b/.github/workflows/extra-builds.yml index 411fd9f55..46615cd27 100644 --- a/.github/workflows/extra-builds.yml +++ b/.github/workflows/extra-builds.yml @@ -3,8 +3,8 @@ name: Test extra build flows on: pull_request: merge_group: - #push: - # branches: [ main ] + push: + branches: [ main ] workflow_dispatch: jobs: @@ -27,6 +27,8 @@ jobs: run: | if [ "${{ github.event_name }}" = "merge_group" ]; then echo "should_skip=false" >> $GITHUB_OUTPUT + elif [ "${{ github.event_name }}" = "push" ]; then + should_skip=false else echo "should_skip=${{ steps.skip_check.outputs.should_skip }}" >> $GITHUB_OUTPUT fi @@ -35,7 +37,7 @@ jobs: name: Visual Studio build runs-on: windows-latest needs: [pre_job] - if: (github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') && needs.pre_job.outputs.should_skip != 'true' + if: (github.event_name == 'push' || github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') && needs.pre_job.outputs.should_skip != 'true' steps: - uses: actions/checkout@v7 with: @@ -51,6 +53,7 @@ jobs: uses: hendrikmuhs/ccache-action@v1.2.23 with: key: vs-build + save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} restore-keys: | vs-build- @@ -80,7 +83,7 @@ jobs: name: MINGW64 build runs-on: windows-latest needs: [pre_job] - if: (github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') && needs.pre_job.outputs.should_skip != 'true' + if: (github.event_name == 'push' || github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') && needs.pre_job.outputs.should_skip != 'true' steps: - uses: actions/checkout@v7 with: @@ -114,6 +117,7 @@ jobs: uses: hendrikmuhs/ccache-action@v1.2.23 with: key: mingw-build + save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} restore-keys: | mingw-build- @@ -130,7 +134,7 @@ jobs: wasi-build: name: WASI build needs: pre_job - if: (github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') && needs.pre_job.outputs.should_skip != 'true' + if: (github.event_name == 'push' || github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') && needs.pre_job.outputs.should_skip != 'true' runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 @@ -142,6 +146,7 @@ jobs: uses: hendrikmuhs/ccache-action@v1.2.23 with: key: wasi-build + save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} restore-keys: | wasi-build- diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index 0c8ac6b90..860d69416 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -3,8 +3,8 @@ name: Build and run tests on: pull_request: merge_group: - #push: - # branches: [ main ] + push: + branches: [ main ] workflow_dispatch: jobs: @@ -50,6 +50,8 @@ jobs: run: | if [ "${{ github.event_name }}" = "merge_group" ]; then echo "should_skip=false" >> $GITHUB_OUTPUT + elif [ "${{ github.event_name }}" = "push" ]; then + should_skip=false else echo "should_skip=${{ steps.skip_check.outputs.should_skip }}" >> $GITHUB_OUTPUT fi @@ -83,6 +85,7 @@ jobs: uses: hendrikmuhs/ccache-action@v1.2.23 with: key: test-build-${{ matrix.os }} + save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} restore-keys: | test-build-${{ matrix.os }}- @@ -115,7 +118,7 @@ jobs: name: Run tests runs-on: ${{ matrix.os }} needs: [build-yosys, pre_job] - if: needs.pre_job.outputs.should_skip != 'true' + if: github.event_name != 'push' && needs.pre_job.outputs.should_skip != 'true' env: CC: clang strategy: @@ -165,7 +168,7 @@ jobs: name: Run test_cell runs-on: ${{ matrix.os }} needs: [build-yosys, pre_job] - if: needs.pre_job.outputs.should_skip != 'true' + if: github.event_name != 'push' && needs.pre_job.outputs.should_skip != 'true' env: CC: clang strategy: @@ -204,7 +207,7 @@ jobs: name: Run docs tests runs-on: ${{ matrix.os }} needs: [build-yosys, pre_docs_job] - if: needs.pre_docs_job.outputs.should_skip != 'true' + if: github.event_name != 'push' && needs.pre_job.outputs.should_skip != 'true' strategy: matrix: os: [ubuntu-latest] @@ -246,7 +249,7 @@ jobs: name: Try build docs runs-on: [self-hosted, linux, x64, fast] needs: [pre_docs_job] - if: ${{ needs.pre_docs_job.outputs.should_skip != 'true' && github.repository_owner == 'YosysHQ' }} + if: ${{ github.event_name != 'push' && needs.pre_docs_job.outputs.should_skip != 'true' && github.repository_owner == 'YosysHQ' }} strategy: matrix: docs-target: [html, latexpdf] diff --git a/.github/workflows/test-compile.yml b/.github/workflows/test-compile.yml index fafa82894..9bf31481f 100644 --- a/.github/workflows/test-compile.yml +++ b/.github/workflows/test-compile.yml @@ -3,8 +3,8 @@ name: Compiler testing on: pull_request: merge_group: - #push: - # branches: [ main ] + push: + branches: [ main ] workflow_dispatch: jobs: @@ -27,6 +27,8 @@ jobs: run: | if [ "${{ github.event_name }}" = "merge_group" ]; then echo "should_skip=false" >> $GITHUB_OUTPUT + elif [ "${{ github.event_name }}" = "push" ]; then + should_skip=false else echo "should_skip=${{ steps.skip_check.outputs.should_skip }}" >> $GITHUB_OUTPUT fi @@ -34,7 +36,7 @@ jobs: test-compile: runs-on: ${{ matrix.os }} needs: pre_job - if: (github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') && needs.pre_job.outputs.should_skip != 'true' + if: (github.event_name == 'push' || github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') && needs.pre_job.outputs.should_skip != 'true' env: CXXFLAGS: ${{ startsWith(matrix.compiler, 'gcc') && '-Wp,-D_GLIBCXX_ASSERTIONS' || ''}} strategy: @@ -70,6 +72,7 @@ jobs: uses: hendrikmuhs/ccache-action@v1.2.23 with: key: test-compile-${{ matrix.os }}-${{ matrix.compiler }} + save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} restore-keys: | test-compile-${{ matrix.os }}-${{ matrix.compiler }}- diff --git a/.github/workflows/test-sanitizers.yml b/.github/workflows/test-sanitizers.yml index 5439b16b4..950e0c2e2 100644 --- a/.github/workflows/test-sanitizers.yml +++ b/.github/workflows/test-sanitizers.yml @@ -3,8 +3,8 @@ name: Check clang sanitizers on: pull_request: merge_group: - #push: - # branches: [ main ] + push: + branches: [ main ] workflow_dispatch: jobs: @@ -27,6 +27,8 @@ jobs: run: | if [ "${{ github.event_name }}" = "merge_group" ]; then echo "should_skip=false" >> $GITHUB_OUTPUT + elif [ "${{ github.event_name }}" = "push" ]; then + should_skip=false else echo "should_skip=${{ steps.skip_check.outputs.should_skip }}" >> $GITHUB_OUTPUT fi @@ -35,7 +37,7 @@ jobs: name: Build and run tests runs-on: ${{ matrix.os }} needs: pre_job - if: (github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') && needs.pre_job.outputs.should_skip != 'true' + if: (github.event_name == 'push' || github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') && needs.pre_job.outputs.should_skip != 'true' env: CC: clang ASAN_OPTIONS: halt_on_error=1 detect_container_overflow=0 @@ -64,6 +66,7 @@ jobs: uses: hendrikmuhs/ccache-action@v1.2.23 with: key: test-san-${{ matrix.os }} + save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} restore-keys: | test-san-${{ matrix.os }}- @@ -82,6 +85,7 @@ jobs: ./build/yosys-config || true - name: Run tests + if: github.event_name != 'push' shell: bash run: | make -C tests -j$procs vanilla-test From 84248a008b1f09de63ee0d80f87115a638efbd85 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 18 Jun 2026 13:05:49 +0200 Subject: [PATCH 3/7] Bump minimal clang to 16 --- .github/workflows/test-compile.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/test-compile.yml b/.github/workflows/test-compile.yml index 9bf31481f..b57b0df53 100644 --- a/.github/workflows/test-compile.yml +++ b/.github/workflows/test-compile.yml @@ -45,7 +45,7 @@ jobs: - ubuntu-latest compiler: # oldest supported - - 'clang-14' + - 'clang-16' - 'gcc-11' # newest, make sure to update maximum standard step to match - 'clang-22' @@ -80,7 +80,6 @@ jobs: uses: aminya/setup-cpp@v1 with: compiler: ${{ matrix.compiler }} - gcc: ${{ (matrix.os == 'ubuntu-latest' && matrix.compiler == 'clang-14') && '12' || '' }} - name: Tool versions shell: bash @@ -88,11 +87,6 @@ jobs: $CC --version $CXX --version - - name: Fix clang-14 toolchain - if: matrix.os == 'ubuntu-latest' && matrix.compiler == 'clang-14' - run: | - echo 'CXXFLAGS=--gcc-toolchain=/usr -isystem /usr/include/c++/12 -isystem /usr/include/x86_64-linux-gnu/c++/12' >> $GITHUB_ENV - # minimum standard - name: Build C++20 shell: bash From 8ad1b7f2b28dced7b729bb7b918e8898552bcfe2 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sat, 20 Jun 2026 17:15:10 +0200 Subject: [PATCH 4/7] Remove nix parameter --- .github/workflows/extra-builds.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/extra-builds.yml b/.github/workflows/extra-builds.yml index 46615cd27..644529c9d 100644 --- a/.github/workflows/extra-builds.yml +++ b/.github/workflows/extra-builds.yml @@ -189,7 +189,7 @@ jobs: - uses: cachix/install-nix-action@v31 with: install_url: https://releases.nixos.org/nix/nix-2.30.0/install - - run: nix build .?submodules=1 -L + - run: nix build -L extra-builds-result: runs-on: ubuntu-latest From 0c132579159d2356dddc1f1e6ef14ac248a06cd1 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 26 Jun 2026 16:07:34 +0200 Subject: [PATCH 5/7] Sanitizer self hosted --- .github/workflows/test-sanitizers.yml | 39 +++++++-------------------- 1 file changed, 10 insertions(+), 29 deletions(-) diff --git a/.github/workflows/test-sanitizers.yml b/.github/workflows/test-sanitizers.yml index 950e0c2e2..d0509eb43 100644 --- a/.github/workflows/test-sanitizers.yml +++ b/.github/workflows/test-sanitizers.yml @@ -3,8 +3,8 @@ name: Check clang sanitizers on: pull_request: merge_group: - push: - branches: [ main ] + #push: + # branches: [ main ] workflow_dispatch: jobs: @@ -33,20 +33,14 @@ jobs: echo "should_skip=${{ steps.skip_check.outputs.should_skip }}" >> $GITHUB_OUTPUT fi - run_san: - name: Build and run tests - runs-on: ${{ matrix.os }} + test-sanitizers: + runs-on: [self-hosted, linux, x64, fast] needs: pre_job - if: (github.event_name == 'push' || github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') && needs.pre_job.outputs.should_skip != 'true' + if: (github.event_name == 'merge_group' || github.event_name == 'workflow_dispatch') && needs.pre_job.outputs.should_skip != 'true' env: CC: clang ASAN_OPTIONS: halt_on_error=1 detect_container_overflow=0 UBSAN_OPTIONS: halt_on_error=1 - strategy: - matrix: - os: [ubuntu-latest, macos-latest] - sanitizer: ['undefined,address'] - fail-fast: false steps: - name: Checkout Yosys uses: actions/checkout@v7 @@ -54,21 +48,9 @@ jobs: submodules: true persist-credentials: false - - name: Setup environment - uses: ./.github/actions/setup-build-env - with: - runs-on: ${{ matrix.os }} - get-build-deps: true - get-test-deps: true - get-iverilog: true - - - name: ccache - uses: hendrikmuhs/ccache-action@v1.2.23 - with: - key: test-san-${{ matrix.os }} - save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} - restore-keys: | - test-san-${{ matrix.os }}- + - name: Runtime environment + run: | + echo "procs=$(nproc)" >> $GITHUB_ENV - name: Build shell: bash @@ -76,7 +58,7 @@ jobs: rm -rf build cmake -B build . \ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \ - -DCMAKE_BUILD_TYPE=Sanitize -DSANITIZE=${{ matrix.sanitizer }} \ + -DCMAKE_BUILD_TYPE=Sanitize -DSANITIZE='undefined,address' \ -DYOSYS_COMPILER_LAUNCHER=ccache cmake --build build -j$procs @@ -85,7 +67,6 @@ jobs: ./build/yosys-config || true - name: Run tests - if: github.event_name != 'push' shell: bash run: | make -C tests -j$procs vanilla-test @@ -99,7 +80,7 @@ jobs: test-sanitizers-result: runs-on: ubuntu-latest needs: - - run_san + - test-sanitizers if: always() steps: - name: Check results From cd4198e024d933ffa980acf263d0141904b0983a Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Fri, 26 Jun 2026 17:17:35 +0200 Subject: [PATCH 6/7] Skip this step during merge queue since we have already run those --- .github/workflows/test-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index 860d69416..8a71d39be 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -26,7 +26,7 @@ jobs: - id: set_output run: | if [ "${{ github.event_name }}" = "merge_group" ]; then - echo "should_skip=false" >> $GITHUB_OUTPUT + echo "should_skip=true" >> $GITHUB_OUTPUT else echo "should_skip=${{ steps.skip_check.outputs.should_skip }}" >> $GITHUB_OUTPUT fi From 04a604f9fee572320a023cf5a1b4d45bb15260cb Mon Sep 17 00:00:00 2001 From: Akash Levy Date: Fri, 26 Jun 2026 11:41:04 -0700 Subject: [PATCH 7/7] Smallfix to simplemap --- passes/techmap/simplemap.cc | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/passes/techmap/simplemap.cc b/passes/techmap/simplemap.cc index b9b6ccea7..f92d45009 100644 --- a/passes/techmap/simplemap.cc +++ b/passes/techmap/simplemap.cc @@ -405,15 +405,24 @@ void simplemap_sop(RTLIL::Module *module, RTLIL::Cell *cell) pat.append(State::S1); } } - SigSpec eq_y = module->addWire(NEW_ID2_SUFFIX("eq_out"), max(GetSize(in), GetSize(pat))); // SILIMATE: Improve the naming - Cell* eq = module->addEq(NEW_ID2_SUFFIX("eq"), in, pat, eq_y, false, cell->get_src_attribute()); - eq->attributes = cell->attributes; - products.append(GetSize(in) > 0 ? eq_y : State::S1); // SILIMATE: Improve the naming + + // A product term with no literals matches everything, so it is constant 1. + if (GetSize(in) == 0) { + products.append(State::S1); + continue; + } + + // $eq produces a single-bit result, so eq_y is always 1 bit wide. + SigSpec eq_y = module->addWire(NEW_ID2_SUFFIX("eq_out")); // SILIMATE: Improve the naming + Cell* eq = module->addEq(NEW_ID2_SUFFIX("eq"), in, pat, eq_y); // SILIMATE: Improve the naming + transfer_src(eq, cell); + products.append(eq_y); } - SigSpec red_or_y = module->addWire(NEW_ID2_SUFFIX("red_or_out"), GetSize(products)); // SILIMATE: Improve the naming - Cell* red_or = module->addReduceOr(NEW_ID2_SUFFIX("reduce_or"), products, red_or_y, false, cell->get_src_attribute()); - red_or->attributes = cell->attributes; + // The reduce-or of all product terms is the single-bit SOP output. + SigSpec red_or_y = module->addWire(NEW_ID2_SUFFIX("red_or_out")); // SILIMATE: Improve the naming + Cell* red_or = module->addReduceOr(NEW_ID2_SUFFIX("reduce_or"), products, red_or_y); // SILIMATE: Improve the naming + transfer_src(red_or, cell); module->connect(cell->getPort(ID::Y), red_or_y); // SILIMATE: Improve the naming }