diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 1d61ec338..f2ad62009 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -155,7 +155,7 @@ jobs: - name: Zip up repository run: Compress-Archive -LiteralPath install -DestinationPath verilator.zip - name: Upload zip archive - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: path: ${{ github.workspace }}/repo/verilator.zip name: verilator-win.zip diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 148c7980c..7c1bd1ec3 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -77,7 +77,7 @@ jobs: uses: actions/checkout@v6 - name: Download code coverage data - uses: actions/download-artifact@v7 + uses: actions/download-artifact@v8 with: pattern: code-coverage-* path: obj_coverage @@ -90,7 +90,7 @@ jobs: find obj_coverage -type f | paste -sd, | sed "s/^/files=/" >> "$GITHUB_OUTPUT" - name: Upload to codecov.io - uses: codecov/codecov-action@v5 + uses: codecov/codecov-action@v6 with: disable_file_fixes: true disable_search: true @@ -114,7 +114,7 @@ jobs: sudo apt install lcov - name: Download repository archive - uses: actions/download-artifact@v7 + uses: actions/download-artifact@v8 with: name: ${{ needs.build.outputs.archive }} path: ${{ github.workspace }} @@ -125,7 +125,7 @@ jobs: ls -lsha - name: Download code coverage data - uses: actions/download-artifact@v7 + uses: actions/download-artifact@v8 with: pattern: code-coverage-* path: repo/obj_coverage @@ -170,14 +170,14 @@ jobs: fi - name: Upload report - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: path: repo/obj_coverage name: coverage-report - name: Upload notification if: ${{ github.event_name == 'pull_request' }} - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: path: repo/notification name: coverage-pr-notification @@ -193,7 +193,7 @@ jobs: # Creating issues requires elevated privilege - name: Generate access token id: generate-token - uses: actions/create-github-app-token@v2.2.1 + uses: actions/create-github-app-token@v3.1.1 with: app-id: ${{ vars.VERILATOR_CI_ID }} private-key: ${{ secrets.VERILATOR_CI_KEY }} diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 05f8f101e..278a8aeb9 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -54,7 +54,7 @@ jobs: - name: Docker meta id: docker_meta - uses: docker/metadata-action@v5 + uses: docker/metadata-action@v6 with: images: | ${{ vars.DOCKER_HUB_NAMESPACE }}/${{ env.image_name }} @@ -64,21 +64,21 @@ jobs: type=raw,value=latest,enable=${{ inputs.add_latest_tag == true }} - name: Set up QEMU - uses: docker/setup-qemu-action@v3 + uses: docker/setup-qemu-action@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@v4 with: buildkitd-flags: --debug - name: Login to Docker Hub - uses: docker/login-action@v3 + uses: docker/login-action@v4 with: username: ${{ secrets.DOCKER_HUB_USER }} password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - name: Build and Push to Docker - uses: docker/build-push-action@v6 + uses: docker/build-push-action@v7 if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch' with: context: ${{ env.build_context }} diff --git a/.github/workflows/no-pulls.yml b/.github/workflows/no-pulls.yml new file mode 100644 index 000000000..b86779b26 --- /dev/null +++ b/.github/workflows/no-pulls.yml @@ -0,0 +1,15 @@ +--- +# Block PRs against stable branch +name: "Check PR not against 'stable'" +on: + pull_request: + branches: [stable] + +jobs: + block-pr: + runs-on: ubuntu-latest + steps: + - name: Fail and block PR + run: |- + echo "Error: Pull requests directly to 'stable' are not allowed. Please PR against 'master'." + exit 1 diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 651cc44a2..553885c58 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -48,7 +48,7 @@ jobs: ls -lsha tree -L 3 pages - name: Upload pages artifact - uses: actions/upload-pages-artifact@v4 + uses: actions/upload-pages-artifact@v5 with: path: pages @@ -61,7 +61,7 @@ jobs: url: ${{ steps.deployment.outputs.page_url }} steps: - name: Deploy to GitHub Pages - uses: actions/deploy-pages@v4 + uses: actions/deploy-pages@v5 notify: name: Notify @@ -74,7 +74,7 @@ jobs: # Use the Verilator CI app to post the comment - name: Generate access token id: generate-token - uses: actions/create-github-app-token@v2.2.1 + uses: actions/create-github-app-token@v3.1.1 with: app-id: ${{ vars.VERILATOR_CI_ID }} private-key: ${{ secrets.VERILATOR_CI_KEY }} diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index 2818c1455..7138a7cce 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -93,7 +93,7 @@ jobs: echo "archive=$ARCHIVE" >> "$GITHUB_OUTPUT" - name: Upload repository archive - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: path: ${{ github.workspace }}/${{ steps.create-archive.outputs.archive }} name: ${{ steps.create-archive.outputs.archive }} diff --git a/.github/workflows/reusable-rtlmeter-build.yml b/.github/workflows/reusable-rtlmeter-build.yml index 068729a0d..85deb9706 100644 --- a/.github/workflows/reusable-rtlmeter-build.yml +++ b/.github/workflows/reusable-rtlmeter-build.yml @@ -36,8 +36,8 @@ jobs: echo "path-exclude /usr/share/info/*" | sudo tee -a /etc/dpkg/dpkg.cfg.d/01_nodoc sudo apt update || \ sudo apt update - sudo apt install ccache mold help2man libfl-dev libgoogle-perftools-dev libsystemc-dev || \ - sudo apt install ccache mold help2man libfl-dev libgoogle-perftools-dev libsystemc-dev + sudo apt install ccache mold help2man libfl-dev libjemalloc-dev libsystemc-dev || \ + sudo apt install ccache mold help2man libfl-dev libjemalloc-dev libsystemc-dev - name: Use saved ccache uses: actions/cache@v5 @@ -70,7 +70,7 @@ jobs: run: tar --posix -c -z -f verilator-rtlmeter.tar.gz install - name: Upload Verilator installation archive - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: path: verilator-rtlmeter.tar.gz name: verilator-rtlmeter-${{ inputs.runs-on }}-${{ inputs.cc }} diff --git a/.github/workflows/reusable-rtlmeter-run.yml b/.github/workflows/reusable-rtlmeter-run.yml index 95525125f..5e163f555 100644 --- a/.github/workflows/reusable-rtlmeter-run.yml +++ b/.github/workflows/reusable-rtlmeter-run.yml @@ -60,11 +60,11 @@ jobs: echo "path-exclude /usr/share/info/*" | sudo tee -a /etc/dpkg/dpkg.cfg.d/01_nodoc sudo apt update || \ sudo apt update - sudo apt install ccache mold libfl-dev libgoogle-perftools-dev libsystemc-dev || \ - sudo apt install ccache mold libfl-dev libgoogle-perftools-dev libsystemc-dev + sudo apt install ccache mold libfl-dev libjemalloc-dev libsystemc-dev || \ + sudo apt install ccache mold libfl-dev libjemalloc-dev libsystemc-dev - name: Download Verilator installation archive - uses: actions/download-artifact@v7 + uses: actions/download-artifact@v8 with: name: verilator-rtlmeter-${{ inputs.runs-on }}-${{ inputs.cc }} @@ -117,7 +117,7 @@ jobs: ./rtlmeter report --steps '*' --metrics '*' ../results-${{ steps.results.outputs.hash }}.json - name: Upload results - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: path: results-${{ steps.results.outputs.hash }}.json name: rtlmeter-${{ inputs.tag }}-results-${{ steps.results.outputs.hash }} diff --git a/.github/workflows/reusable-test.yml b/.github/workflows/reusable-test.yml index d2fb687c3..7f363f2d9 100644 --- a/.github/workflows/reusable-test.yml +++ b/.github/workflows/reusable-test.yml @@ -55,7 +55,7 @@ jobs: steps: - name: Download repository archive - uses: actions/download-artifact@v7 + uses: actions/download-artifact@v8 with: name: ${{ inputs.archive }} path: ${{ github.workspace }} @@ -99,11 +99,13 @@ jobs: - name: Upload code coverage data if: ${{ inputs.dev-gcov }} - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: path: ${{ github.workspace }}/repo/obj_coverage/verilator-${{ inputs.suite }}.info name: code-coverage-${{ inputs.suite }} - name: Fail job if a test failed if: ${{ steps.run-test.outcome == 'failure' && !cancelled() }} - run: exit 1 + run: |- + echo "Click on '> Tests' arrow above (or on other steps), to expand it, and see the failure reasons" + exit 1 diff --git a/.github/workflows/rtlmeter-pr-results.yml b/.github/workflows/rtlmeter-pr-results.yml index 5ce1b0fdc..e9bd8cc43 100644 --- a/.github/workflows/rtlmeter-pr-results.yml +++ b/.github/workflows/rtlmeter-pr-results.yml @@ -20,13 +20,13 @@ jobs: pull-requests: write steps: - name: Download report - uses: actions/download-artifact@v7 + uses: actions/download-artifact@v8 with: name: rtlmeter-pr-results run-id: ${{ github.event.workflow_run.id }} github-token: ${{ secrets.GITHUB_TOKEN }} - name: Download PR number - uses: actions/download-artifact@v7 + uses: actions/download-artifact@v8 with: name: pr-number run-id: ${{ github.event.workflow_run.id }} @@ -34,7 +34,7 @@ jobs: # Use the Verilator CI app to post the comment - name: Generate access token id: generate-token - uses: actions/create-github-app-token@v2.2.1 + uses: actions/create-github-app-token@v3.1.1 with: app-id: ${{ vars.VERILATOR_CI_ID }} private-key: ${{ secrets.VERILATOR_CI_KEY }} diff --git a/.github/workflows/rtlmeter.yml b/.github/workflows/rtlmeter.yml index 3dee9f230..54d0447a4 100644 --- a/.github/workflows/rtlmeter.yml +++ b/.github/workflows/rtlmeter.yml @@ -11,6 +11,8 @@ on: - cron: '0 2 * * *' # Daily, starting at 02:00 UTC pull_request: types: [opened, synchronize, reopened, labeled, unlabeled] + push: + branches: ['ci-rtlmeter/**'] permissions: contents: read @@ -35,7 +37,8 @@ jobs: && vars.ENABLE_SCHEDULED_JOBS == 'true') || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'pr: rtlmeter')) || - (github.event_name == 'workflow_dispatch') + (github.event_name == 'workflow_dispatch') || + (github.event_name == 'push') runs-on: ubuntu-24.04 steps: - name: Startup @@ -75,12 +78,10 @@ jobs: matrix: cases: - "BlackParrot:1x1:*" - - "BlackParrot:2x2:*" - "BlackParrot:4x4:*" - "Caliptra:default:*" - "NVDLA:*" - "OpenPiton:1x1:*" - - "OpenPiton:2x2:*" - "OpenPiton:4x4:*" - "OpenTitan:*" - "VeeR-EH1:asic*" @@ -121,12 +122,10 @@ jobs: matrix: cases: - "BlackParrot:1x1:*" - - "BlackParrot:2x2:*" - "BlackParrot:4x4:*" - "Caliptra:default:*" - "NVDLA:*" - "OpenPiton:1x1:*" - - "OpenPiton:2x2:*" - "OpenPiton:4x4:*" - "OpenTitan:*" - "VeeR-EH1:asic*" @@ -167,11 +166,9 @@ jobs: matrix: cases: - "BlackParrot:1x1:* !-hier" - - "BlackParrot:2x2:* !-hier" - "BlackParrot:4x4:* !-hier" - "NVDLA:* !-hier" - "OpenPiton:1x1:* !-hier" - - "OpenPiton:2x2:* !-hier" - "OpenPiton:4x4:* !-hier" - "OpenPiton:8x8:* !-hier" - "OpenPiton:16x16:dhry !-hier" @@ -198,7 +195,7 @@ jobs: working-directory: rtlmeter run: make venv - name: Download all results - uses: actions/download-artifact@v7 + uses: actions/download-artifact@v8 with: pattern: rtlmeter-${{ matrix.tag }}-results-* path: all-results-${{ matrix.tag }} @@ -208,7 +205,7 @@ jobs: run: | ./rtlmeter collate ../all-results-${{ matrix.tag }}/*.json > ../all-results-${{ matrix.tag }}.json - name: Upload combined results - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: path: all-results-${{ matrix.tag }}.json name: all-results-${{ matrix.tag }} @@ -227,20 +224,20 @@ jobs: runs-on: ubuntu-24.04 steps: - name: Download combined results - uses: actions/download-artifact@v7 + uses: actions/download-artifact@v8 with: pattern: all-results-* path: results merge-multiple: true - name: Upload published results - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: path: results/*.json name: published-results # Pushing to verilator/verilator-rtlmeter-results requires elevated permissions - name: Generate access token id: generate-token - uses: actions/create-github-app-token@v2.2.1 + uses: actions/create-github-app-token@v3.1.1 with: app-id: ${{ vars.VERILATOR_CI_ID }} private-key: ${{ secrets.VERILATOR_CI_KEY }} @@ -289,7 +286,7 @@ jobs: working-directory: rtlmeter run: make venv - name: Download combined results - uses: actions/download-artifact@v7 + uses: actions/download-artifact@v8 with: pattern: all-results-* path: all-results @@ -308,7 +305,7 @@ jobs: DATE=$(gh run --repo ${{ github.repository }} view $ID --json createdAt --jq ".createdAt") echo "date=$DATE" >> $GITHUB_OUTPUT - name: Download scheduled run results - uses: actions/download-artifact@v7 + uses: actions/download-artifact@v8 with: name: published-results path: nightly-results @@ -374,14 +371,14 @@ jobs: done cat report.txt - name: Upload report - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: path: report.txt name: rtlmeter-pr-results - name: Save PR number run: echo ${{ github.event.number }} > pr-number.txt - name: Upload PR number - uses: actions/upload-artifact@v6 + uses: actions/upload-artifact@v7 with: path: pr-number.txt name: pr-number @@ -397,7 +394,7 @@ jobs: # Creating issues requires elevated privilege - name: Generate access token id: generate-token - uses: actions/create-github-app-token@v2.2.1 + uses: actions/create-github-app-token@v3.1.1 with: app-id: ${{ vars.VERILATOR_CI_ID }} private-key: ${{ secrets.VERILATOR_CI_KEY }} diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c391b2ab..4eea5ca22 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ cmake_minimum_required(VERSION 3.15) cmake_policy(SET CMP0091 NEW) # Use MSVC_RUNTIME_LIBRARY to select the runtime project( Verilator - VERSION 5.046 + VERSION 5.048 HOMEPAGE_URL https://verilator.org LANGUAGES CXX ) diff --git a/Changes b/Changes index cdb3948ab..5403c5b2d 100644 --- a/Changes +++ b/Changes @@ -8,6 +8,179 @@ The changes in each Verilator version are described below. The contributors that suggested or implemented a given issue are shown in []. Thanks! +Verilator 5.048 2026-04-26 +========================== + +**Important:** + +* Displaying Verilator generated FST files will require an updated version + of Surfer (built from 'main', or the future numbered release 0.7.0). + No GTKWave update is necessary (#7255). +* Support jemalloc as the default allocator on Linux (#7250). [Yangyu Chen] + For better performance, `apt install libjemalloc-dev` or equivalent before running ./configure. + +**Other:** + +* Add VPI callback support to `--main` (#7145). +* Add `--func-recursion-depth` option (#7175) (#7179). +* Add `+verilator+solver+file` for debugging constraint solver (#7242). +* Add `--coverage-fsm` for experimental FSM state and arc coverage (#7412). [Yogish Sekhar] +* Add printed summary to verilator_coverage (#7438) (#7462). [Yogish Sekhar] +* Deprecate `--structs-packed` (#7222). +* Remove DFG extract optimization pass (#7394). [Geza Lore, Testorrent USA, Inc.] +* Remove multi-threaded FST tracing (#7443). [Geza Lore, Testorrent USA, Inc.] +* Improve assignment-compatibility type check (#2843) (#5666) (#7052). [Pawel Kojma, Antmicro Ltd.] +* Improve error message when variable used as data type (#7318). [Ryszard Rozak, Antmicro Ltd.] +* Improve E_UNSUPPORTED warning messages (#7329). [Eunseo Song] +* Improve NFA-based multi-cycle SVA evaluation engine (#7430). [Yilou Wang] +* Change array tracing to dump left index to right index (#7205). [Geza Lore, Testorrent USA, Inc.] +* Change `--converge-limit` default to 10000 (#7209). +* Support inout inside SV interface (#3466) (#7134). [Nick Brereton] +* Support `##0` cycle delays (#4263) (#7298). [Yilou Wang] +* Support multidimensional arrays of interfaces (#6230) (#7451). [em2machine] +* Support array reduction methods with 'with' clause in constraints (#6455) (#6999). [Rahul Behl] +* Support constraint imperfect distributions (#6811) (#7168). [Yilou Wang] +* Support disable task by name (#6853) (#7136). [Nick Brereton] +* Support procedural concurrent assertion simple cases (#6944). +* Support force assignments to array elements of real type (#7048). [Ryszard Rozak, Antmicro Ltd.] +* Support VPI array indexing in signal names (#7097) (#7187) (#7214) (#7289). [Christian Hecken, Heidelberg University] +* Support soft constraint solving (#7124) (#7166). [Yilou Wang] +* Support constraints on fixed-size array of class object members (#7170) (#7183). [Yilou Wang] +* Support Z non-blocking assignment (#7192) (#496) (#7197). [Nick Brereton] +* Support constraint `with` item.index array reduction (#7198). [Rahul Behl] +* Support constant expressions without parentheses in `PATHPULSE$` (#7199). [Pawel Kojma, Antmicro Ltd.] +* Support $sformat with runtime format string (#7212). +* Support dist and solve...before inside foreach constraints (#7245) (#7253). [Yilou Wang] +* Support array and struct info metadata in FST traces (#7255). [Geza Lore, Testorrent USA, Inc.] +* Support dynamic array .size in inline randomize() with constraints (#7258) (#7266). [Yilou Wang] +* Support defparam with more than one dot (#7262). [Artur Bieniek, Antmicro Ltd.] +* Support modport export/import task prototypes and out-of-block definitions (#7277). [Yilou Wang] +* Support very wide $display arguments (#7280). [Jakub Michalski] +* Support named sequence declarations and instances in assertions (#7283). [Yilou Wang] +* Support `##`, `##[*]`, `##[+]`, `##[M:N]` cycle delays in assertions (#7284) (#7312) (#7377). [Yilou Wang] +* Support boolean and/or in sequence expressions (#7285). [Yilou Wang] +* Support property-local variables and sequence match items (#7286). [Yilou Wang] +* Support 'until' and `until_with` property (#7290 partial) (#7399) (#7436). [Ryszard Rozak, Antmicro Ltd.] +* Support implication operator with constraint_set (#7300) (#7448). [Yilou Wang] +* Support array map() method (#7307) (#7316) (#7344). [Wei-Lun Chiu] +* Support MacOS address sanitizer memory limit (#7308). [Marco Bartoli] +* Support SVA goto repetition `[->N]` in concurrent assertions (#7310). [Yilou Wang] +* Support consecutive repetition `[\*N]` in SVA properties (#7311). [Yilou Wang] +* Support rise/fall delays (#7368). [Artur Bieniek, Antmicro Ltd.] +* Support sequence intersect operator (#7374). [Yilou Wang] +* Support sequence 'throughout' operator (#7378). [Yilou Wang] +* Support sequence consecutive repetition `[*N:M]`, `[+]`, and `[*]` (#7379). [Yilou Wang] +* Support sequence `first_match` operator (#7392). [Yilou Wang] +* Support nonconsecutive repetition [=N] in sequence expressions (#7397). [Yilou Wang] +* Support per-process RNG for process::srandom() and object seeding (#7408) (#7415) (#7408). [Yilou Wang] +* Support 2**n expressions in constraint randomization (#7422). [Yilou Wang] +* Support IEEE-compliant force/release handling (#7391). [Artur Bieniek, Antmicro Ltd.] +* Support sequence 'within' operator (#7461). [Yilou Wang] +* Optimize trace code for faster compiles on repeated types (#6707) (#6832). [Todd Strader] +* Optimize impure expressions and calls with new V3LiftExpr pass (#7141) (#7164). [Geza Lore, Testorrent USA, Inc.] +* Optimize size of trace declaration object code (#7150). [Szymon Gizler, Antmicro Ltd.] +* Optimize function call return value temporaries (#7152). [Geza Lore, Testorrent USA, Inc.] +* Optimize conditional merging across some impure statements (#7159). [Geza Lore, Testorrent USA, Inc.] +* Optimize reuse of existing associative terms in DfgPeephole. [Geza Lore, Testorrent USA, Inc.] +* Optimize duplicate vertices and multiplexers in DfgPeephole (#7305). [Geza Lore, Testorrent USA, Inc.] +* Optimize commutative vertex operands in DFG for better combining. [Geza Lore, Testorrent USA, Inc.] +* Optimize DFG peephole until a fixed point (#7309). [Geza Lore, Testorrent USA, Inc.] +* Optimize comparisons with identical operands and $countones in DFG. [Geza Lore, Testorrent USA, Inc.] +* Optimize more patterns in DfgPeephole (#7332). [Geza Lore, Testorrent USA, Inc.] +* Optimize read references in DFG (#7354). [Geza Lore, Testorrent USA, Inc.] +* Optimize DFG only once, after scoping (#7362). [Geza Lore, Testorrent USA, Inc.] +* Optimize more DFG peephole patterns (#7423) (#7452). [Geza Lore, Testorrent USA, Inc.] +* Optimize DfgBreakCycles IndependentBits analysis ordering (#7446). [Geza Lore, Testorrent USA, Inc.] +* Optimize select patterns in DfgPeephole. [Geza Lore, Testorrent USA, Inc.] +* Optimize temporary insertion in DfgPeephole. [Geza Lore, Testorrent USA, Inc.] +* Optimize arithmetic right shift (>>>) in DfgBreakCycles (#7447). [Geza Lore, Testorrent USA, Inc.] +* Optimize temporary insertion in DFG (#7459). [Geza Lore, Testorrent USA, Inc.] +* Optimize mix of Concat/Extend assignments (#7479). [Geza Lore, Testorrent USA, Inc.] +* Fix recursive default assignment for sub-arrays (#4589) (#7202). [Julian Carrier] +* Fix tracing virtual interface member written from classes (#5044) (#7465). [Nikolay Puzanov] +* Fix virtual interface member trigger convergence (#5116) (#7323). [Yilou Wang] +* Fix shift width mismatch in constraint solver SMT emission (#5420) (#7265). [Yilou Wang] +* Fix returning wrong type from static function in parameterized class (#5479) (#7387) (#7411) (#7418) (#7445) (#7450). [em2machine] +* Fix randomize size+element queue constraints (#5582) (#7225). [Rahul Behl, Testorrent USA, Inc.] +* Fix null assignment to virtual interfaces (#5974) (#5990). [Maxim Fonarev] +* Fix typedef scope resolution for parameterized class aliases (#5977) (#7319). [Nick Brereton] +* Fix lambda coroutines (#6106) (#7135). [Nick Brereton] +* Fix super constructor calls with local variables (#6214) (#6933). [Igor Zaworski, Antmicro Ltd.] +* Fix parameter default comparison when value contains type cast (#6281) (#7369) (#6281). [Yilou Wang] +* Fix `local::` false error in randomize() with on parameterized class (#6680) (#7293). [Yilou Wang] +* Fix false recursive definition error (#6769) (#7118). [Alex Zhou] +* Fix port assignment to large arrays (#6904). +* Fix interface localparam dependencies and arbitrary nesting (#6936) (#7128) (#7188) (#7190). [em2machine] +* Fix parameterized class typedef as interface type parameter (#7000) (#7006). [Leela Pakanati] +* Fix errant integer promotion (#7012). [Todd Strader] +* Fix randc solver hang with wide variables (#7068) (#7248). [Yilou Wang] +* Fix coroutine trace setters (#7078 repair) (#7296). [Igor Zaworski, Antmicro Ltd.] +* Fix vpi_put_value not updating forced read value (#7092) (#7395) (#7092). [Christian Hecken, Heidelberg University] +* Fix scheduling non-determinism (#7120) (#7162) (#7165). [Geza Lore, Testorrent USA, Inc.] +* Fix parameters inside std::randomize `with` clause (#7140). [Kamil Danecki, Antmicro Ltd.] +* Fix forcing unpacked variables (#7149). [Ryszard Rozak, Antmicro Ltd.] +* Fix wide conditional short circuiting (#7155). +* Fix eliminating assignments to DPI-read variables (#7158). [Geza Lore, Testorrent USA, Inc.] +* Fix std::randomize() in static function with static class members (#7167) (#7169). [Yilou Wang] +* Fix resolving default/non-default type parameters (#7171) (#7346) (#7380) (#7385) (#7398) (#7406) (#7398). [em2machine] +* Fix recursive constant function in $unit scope (#7173) (#7174). +* Fix class extend references between queues (#7195). +* Fix library/hier_block tracing when top name is empty (#7200). [Geza Lore, Testorrent USA, Inc.] +* Fix virtual interface select from sub-interface instance (#7203) (#7370) (#7203). [Yilou Wang] +* Fix VPI force of bit-selected signals (#7211) (#7301). [Christian Hecken] +* Fix `$finish` to immediately stop executing code from non-final blocks (#7213 partial) (#7390). +* Fix wrong $bits() for parameterized interface struct typedefs (#7218) (#7219). [em2machine] +* Fix `dist` operator inside constraint if blocks (#7221) (#7224). [Rahul Behl, Testorrent USA, Inc.] +* Fix array reduction in constraints crashing with class inheritance (#7226) (#7263). [Yilou Wang] +* Fix soft cross-object constraint priority inversion (#7228) (#7233). [Yilou Wang] +* Fix internal error when derived class calls this.randomize() with inherited rand members (#7229) (#7234). [Yilou Wang] +* Fix enum range constraints missing for rand variables in sub-objects (#7230) (#7235). [Yilou Wang] +* Fix vpi_put_value release on non-continuous signal (#7231) (#7241). [Christian Hecken] +* Fix functions in generate block resulting in 'Broken link in node' (#7236) (#7367). [em2machine] +* Fix tracing of typedefed 1D packed arrays with --trace-structs (#7237). [Geza Lore, Testorrent USA, Inc.] +* Fix rand variable used as array index in constraint evaluated as constant (#7238) (#7247). [Yilou Wang] +* Fix --hierarchical dropping arguments in -f/-F files (#7240). [Clara Sparks] +* Fix `final` asserts and $stop (#7249). [Artur Bieniek, Antmicro Ltd.] +* Fix MacOS clang PCH compile error with -o flag (#7251) (#7327). [Eunseo Song] +* Fix vpi_put_value with vpiIntVal on VlWide data (#7256). [Christian Hecken] +* Fix streaming with descending unpacked arrays and unpacked-to-queue (#7287). [Yilou Wang] +* Fix MacOs lexer compile error (#7314) (#7315). [Tracy Narine] +* Fix linking shared library with its dependencies (#7320). [Artur Bieniek, Antmicro Ltd.] +* Fix modport selection of virtual interface handle (#7321). [Yilou Wang] +* Fix false ASSIGNIN on interface input ports driven from outside (#7322). [Yilou Wang] +* Fix static initialization order for packages with class hierarchies (#7324). [Yilou Wang] +* Fix sensitivity of signals to unrelated interface members (#7336). [Artur Bieniek, Antmicro Ltd.] +* Fix `disable iff` imply-delay statement linking (#7337). [Nick Brereton] +* Fix lost `$stop` on implied assertion `$error` failures. +* Fix wait() hang when interface uses process calls and VIF function (#7342). [Yilou Wang] +* Fix error on illegal nand/nor binary operators (#7353). +* Fix simple array assignment unrolling in slice optimization (#7359). [Geza Lore, Testorrent USA, Inc.] +* Fix missing temporary for DfgSplicePacked (#7361). [Geza Lore, Testorrent USA, Inc.] +* Fix virtual interface function calls binding to wrong instance (#7363). [Yilou Wang] +* Fix false ASSIGNIN on interface input port connections (#7365). [Yilou Wang] +* Fix string `inside` queue (#7373). +* Fix subclass with rand_mode(0) getting randomized (#7376) (#7383). [Yilou Wang] +* Fix VPI access to Verilog `force`-ed signals (#7381). [Christian Hecken, Heidelberg University] +* Fix sampling of hierarchical references (#7386). [Ryszard Rozak, Antmicro Ltd.] +* Fix virtual class inheritance false error (#7403) (#7405). [Nikolay Puzanov] +* Fix CMake compiler coroutine flags (#7404). [Shogo Yamazaki] +* Fix delete inside foreach skipping elements (#7407) (#7410) +* Fix std::randomize in parameterized-derived class (#7409) (#7416). [Yilou Wang] +* Fix virtual interface implied comparison with null (#7421). [Alex Solomatnikov] +* Fix uvm_hdl_release_and_read to release value and check success (#7425). [Christian Hecken, Heidelberg University] +* Fix inline constraint on array-indexed randomize target (#7431) (#7434). [Yilou Wang] +* Fix modification of members of object with const handle (#7433). [Kamil Danecki, Antmicro Ltd.] +* Fix `dist` under implication in constraints (#7440) (#7442). [Alex Solomatnikov] [Yilou Wang] +* Fix std::randomize `inside` corrupting class-member queue operand (#7449) (#7456). [Yilou Wang] +* Fix module parameters not re-evaluated upon instantiation (#7463) (#7477). [em2machine] +* Fix function-in-constraint internal error on bare port return (#7473) (#7480). [Yilou Wang] +* Fix access to static variable inside function (#7474) (#7475). [Alex Zhou] +* Fix multiple inclusion of verilated_std.sv (#7478). [Larry Doolittle] +* Fix std::randomize inside {typedef array} internal error (#7481). [Yilou Wang] +* Fix module parameters not re-evaluated upon instantiation (#7463) (#7477). [em2machine] +* Fix infinite recursion with VERILATOR_BIN (#7496) (#7497). + + Verilator 5.046 2026-02-28 ========================== @@ -31,7 +204,7 @@ Verilator 5.046 2026-02-28 * Support solve..before constraints (#5647) (#7123). [Yilou Wang] * Support structure initial values (#6130). * Support proper automatic/static initialization, and remove STATICVAR warning (#6405) (#7086). -* Support vpi_put/vpi_get forcing of signals (#5933) (#6704). [Christian Hecken] +* Support vpi_put/vpi_get forcing of signals (#5933) (#6704). [Christian Hecken, Heidelberg University] * Support detailed failure info for constraint violations (#6617) (#6883). [Yilou Wang] * Support `unique` constraints (on 1D static arrays) (#6810) (#6878). [Srinivasan Venkataramanan] * Support complex expressions as std::randomize arguments (#6860). [Jakub Wasilewski, Antmicro Ltd.] @@ -94,7 +267,7 @@ Verilator 5.046 2026-02-28 * Fix `foreach` with mid-index empty commas (#6910). * Fix internal error when fork under always expression (#6911). * Fix error when calling non-static method (#6916). [Artur Bieniek, Antmicro Ltd.] -* Fix memory leak in vpi_put_value and vpi_get_value (#6917). [Christian Hecken] +* Fix memory leak in vpi_put_value and vpi_get_value (#6917). [Christian Hecken, Heidelberg University] * Fix interface internal type reference (#6920) (#6966). [Todd Strader] * Fix segfault after assignment pattern XOR error (#6928) (#6931). [emmettifelts] * Fix delayed initial assignment (#6929). [Todd Strader] diff --git a/Makefile.in b/Makefile.in index 164e7768f..fa81074c9 100644 --- a/Makefile.in +++ b/Makefile.in @@ -398,9 +398,12 @@ CPPCHECK_RUNTIME_CPP = $(wildcard $(srcdir)/include/*.cpp) CPPCHECK_VLC_CPP = $(wildcard $(srcdir)/src/Vlc*.cpp) CPPCHECK_EXAMPLES_CPP = $(wildcard $(srcdir)/examples/*/*.cpp) CHECK_CPP = $(CPPCHECK_VERILATOR_CPP) $(CPPCHECK_RUNTIME_CPP) $(CPPCHECK_VLC_CPP) $(CPPCHECK_EXAMPLES_CPP) -CHECK_H = $(wildcard \ +CHECK_H = $(filter-out \ + $(srcdir)/src/config_package.h \ + $(srcdir)/src/config_rev.h, \ + $(wildcard \ $(srcdir)/include/*.h \ - $(srcdir)/src/*.h ) + $(srcdir)/src/*.h )) CHECK_YL = $(wildcard \ $(srcdir)/src/*.y \ $(srcdir)/src/*.l ) @@ -441,7 +444,9 @@ cppcheck: CLANGTIDY = clang-tidy CLANGTIDY_FLAGS = -config='' \ -header-filter='.*' \ - -checks='-fuchsia-*,-cppcoreguidelines-avoid-c-arrays,-cppcoreguidelines-init-variables,-cppcoreguidelines-avoid-goto,-modernize-avoid-c-arrays,-readability-magic-numbers,-readability-simplify-boolean-expr,-cppcoreguidelines-macro-usage' \ + -checks='*,-abseil-*,-fuchsia-*,-cppcoreguidelines-avoid-c-arrays,-cppcoreguidelines-init-variables,-cppcoreguidelines-avoid-goto,-modernize-avoid-c-arrays,-readability-magic-numbers,-readability-simplify-boolean-expr,-cppcoreguidelines-macro-usage' \ + +# Good checks: -checks='-*,bugprone-assignment-in-if-condition,google-build-using-namespace,google-readability-casting,modernize-use-default-member-init,modernize-use-emplace,modernize-use-equals-default,modernize-use-equals-delete,modernize-use-nullptr,performance-faster-string-find,readability-isolate-declaration,readability-redundant-control-flow,readability-redundant-member-init,readability-redundant-string-cstr,readability-uppercase-literal-suffix CLANGTIDY_DEP = $(subst .cpp,.cpp.tidy,$(CHECK_CPP)) CLANGTIDY_DEFS = -DVL_DEBUG=1 -DVL_CPPCHECK=1 @@ -517,6 +522,7 @@ PY_PROGRAMS = \ nodist/lint_py_test_filter \ nodist/log_changes \ nodist/uvm_pkg_packer \ + nodist/verilator_bisect \ nodist/verilator_saif_diff \ src/.gdbinit.py \ src/astgen \ @@ -577,7 +583,7 @@ MBAKE = mbake MBAKE_FLAGS = format --config ./.bake.toml format-exec: - -chmod a+x test_regress/t/*.py + -chmod a+x test_regress/t/t_*.py -chmod a-x test_regress/t/*.v format-make mbake: diff --git a/REUSE.toml b/REUSE.toml index d0f53012e..6245ebb6f 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -15,6 +15,7 @@ path = [ ".style.yapf", "CITATION.cff", "CPPLINT.cfg", + "ci/docker/buildenv/wavetools.conf", "docs/CONTRIBUTORS", "docs/spelling.txt", "docs/verilated.dox", diff --git a/bin/verilator b/bin/verilator index ab07e6201..5fefa73bd 100755 --- a/bin/verilator +++ b/bin/verilator @@ -27,6 +27,21 @@ use vars qw($Debug @Opt_Verilator_Sw); autoflush STDOUT 1; autoflush STDERR 1; +# Guard against unbounded recursive re-entry. Hierarchical / --build flows +# legitimately re-enter the wrapper a few levels deep (wrapper -> verilator_bin +# -> make -> wrapper -> ...); a misconfigured VERILATOR_BIN, VERILATOR_GDB or +# VERILATOR_VALGRIND that points back at this wrapper, however, recurses +# without bound and exhausts the OS PID table. Use VERILATOR_RUNNING as a +# depth counter and cap it well above any real nesting. +my $verilator_running_max = 16; +my $verilator_running_depth = ($ENV{VERILATOR_RUNNING} || 0) + 1; +if ($verilator_running_depth > $verilator_running_max) { + die "%Error: verilator: re-entered $verilator_running_depth levels deep" + . " via \$VERILATOR_RUNNING; check that VERILATOR_BIN, VERILATOR_GDB" + . " and VERILATOR_VALGRIND do not resolve back to this wrapper script.\n"; +} +$ENV{VERILATOR_RUNNING} = $verilator_running_depth; + $Debug = 0; my $opt_aslr; my $opt_gdb; @@ -149,7 +164,7 @@ if ($opt_gdb) { . verilator_bin() . " " . join(' ', @quoted_sw)); } else { - # Normal, non gdb + # Normal, non-gdb run(ulimit_stack_unlimited() . aslr(1) . verilator_bin() . " " . join(' ', @quoted_sw)); } @@ -213,14 +228,22 @@ sub ulimit_stack_unlimited { # AddressSanitizer doesn't work with 'ulimit -s unlimted' if (`${\(verilator_bin())} --get-supported DEV_ASAN` eq "1\n") { # Use host 'physical memory / #cores / 8' instead - open(my $fh, "<", "/proc/meminfo") || die "Can't read host memory for asan"; - while (<$fh>) { - if (m/MemTotal:\s+(\d+)\s+kB/) { - $limit = int(int($1)/`nproc`/8); - last; + if ($^O eq "darwin") { + my $membytes = `sysctl -n hw.memsize`; + chomp $membytes; + my $ncpu = `sysctl -n hw.ncpu`; + chomp $ncpu; + $limit = int(int($membytes / 1024) / $ncpu / 8); + } else { + open(my $fh, "<", "/proc/meminfo") || die "Can't read host memory for asan"; + while (<$fh>) { + if (m/MemTotal:\s+(\d+)\s+kB/) { + $limit = int(int($1)/`nproc`/8); + last; + } } + close($fh); } - close($fh); } system("ulimit -s $limit 2>/dev/null"); my $status = $?; @@ -345,10 +368,12 @@ detailed descriptions of these arguments. -CFLAGS C++ compiler arguments for makefile --compiler Tune for specified C++ compiler --compiler-include Include additional header in the precompiled one + --constraint-array-limit Maximum array size for constraint array reduction --converge-limit Tune convergence settle time --coverage Enable all coverage --coverage-expr Enable expression coverage --coverage-expr-max Maximum permutations allowed for an expression + --coverage-fsm Enable FSM state/arc coverage --coverage-line Enable line coverage --coverage-max-width Maximum array depth for coverage --coverage-toggle Enable toggle coverage @@ -370,6 +395,7 @@ detailed descriptions of these arguments. --dump- Enable dumping everything in source file --dump-defines Show preprocessor defines with -E --dump-dfg Enable dumping DfgGraphs to .dot files + --dump-dfg-patterns Enable dumping Dfg pattern statistics --dump-graph Enable dumping V3Graphs to .dot files --dump-inputs Enable dumping preprocessed input files --dump-tree Enable dumping Ast .tree files @@ -390,6 +416,7 @@ detailed descriptions of these arguments. -f Parse arguments from a file -FI Force include of a file --flatten Force inlining of all modules, tasks and functions + --func-recursion-depth Maximum recursive constant function depth --future0