diff --git a/.bake.toml b/.bake.toml
new file mode 100644
index 000000000..414bc7b5e
--- /dev/null
+++ b/.bake.toml
@@ -0,0 +1,30 @@
+# mbake configuration file
+
+[formatter]
+# Indentation settings
+use_tabs = true
+tab_width = 2
+
+# Spacing settings
+space_around_assignment = true
+space_before_colon = false
+space_after_colon = true
+
+# Line continuation settings
+normalize_line_continuations = true
+max_line_length = 100
+
+# PHONY settings
+group_phony_declarations = false
+phony_at_top = false
+auto_insert_phony_declarations = false
+
+# General settings
+remove_trailing_whitespace = true
+ensure_final_newline = true
+normalize_empty_lines = true
+max_consecutive_empty_lines = 2
+
+# Global settings
+debug = false
+verbose = false
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index d90bc3241..73221e8c0 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -12,13 +12,16 @@ on:
schedule:
- cron: '0 0 * * 0' # weekly
+permissions:
+ contents: read
+
defaults:
run:
shell: bash
working-directory: repo
concurrency:
- group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
+ group: ${{ github.workflow }}-${{ github.actor }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: true
jobs:
diff --git a/.github/workflows/contributor.yml b/.github/workflows/contributor.yml
index 6485aaf48..9731a0c5b 100644
--- a/.github/workflows/contributor.yml
+++ b/.github/workflows/contributor.yml
@@ -7,10 +7,12 @@ on:
push:
pull_request:
workflow_dispatch:
+permissions:
+ contents: read
jobs:
Test:
name: "'docs/CONTRIBUTORS' was signed"
- runs-on: ubuntu-22.04
+ runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- run: test_regress/t/t_dist_contributors.py
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index 5fb56e65a..aaa990d00 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -9,6 +9,9 @@ on:
schedule:
- cron: '0 0 * * 0' # weekly
+permissions:
+ contents: read
+
env:
CI_OS_NAME: linux
CI_COMMIT: ${{ github.sha }}
@@ -23,10 +26,12 @@ defaults:
jobs:
Build:
- runs-on: ubuntu-22.04
+ # Only run scheduled jobs if explicitly enabled for that repo (e.g.: not on forks)
+ if: ${{ github.event_name != 'schedule' || vars.ENABLE_SCHEDULED_JOBS == 'true' }}
+ runs-on: ubuntu-24.04
env:
CI_BUILD_STAGE_NAME: build
- CI_RUNS_ON: ubuntu-22.04
+ CI_RUNS_ON: ubuntu-24.04
steps:
- name: Checkout
@@ -59,11 +64,11 @@ jobs:
num: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
include:
- {test: dist, num: ''}
- runs-on: ubuntu-22.04
+ runs-on: ubuntu-24.04
name: test-${{ matrix.test }}${{ matrix.num }}
env:
CI_BUILD_STAGE_NAME: test
- CI_RUNS_ON: ubuntu-22.04
+ CI_RUNS_ON: ubuntu-24.04
steps:
- name: Download tar archive
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index af7a21502..484415e1a 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -22,11 +22,14 @@ on:
type: boolean
default: false
+permissions:
+ contents: write
+
jobs:
build:
- runs-on: ubuntu-22.04
+ runs-on: ubuntu-24.04
strategy:
matrix:
diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml
index 4fbd884c5..d0b16f48b 100644
--- a/.github/workflows/format.yml
+++ b/.github/workflows/format.yml
@@ -7,6 +7,8 @@ on:
push:
pull_request_target:
workflow_dispatch:
+permissions:
+ contents: write
jobs:
format:
runs-on: ubuntu-22.04
@@ -26,6 +28,7 @@ jobs:
run: |
bash ci/ci-install.bash &&
sudo apt-get install clang-format-14 yapf3 &&
+ sudo pip3 install gersemi mbake &&
git config --global user.email "action@example.com" &&
git config --global user.name "github action"
- name: Format code
diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml
index b7e5677c6..d4c801767 100644
--- a/.github/workflows/msbuild.yml
+++ b/.github/workflows/msbuild.yml
@@ -10,6 +10,8 @@ on:
workflow_dispatch:
schedule:
- cron: 0 0 * * 0 # weekly
+permissions:
+ contents: read
env:
CI_OS_NAME: win
CI_COMMIT: ${{ github.sha }}
@@ -20,7 +22,7 @@ defaults:
run:
working-directory: repo
concurrency:
- group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
+ group: ${{ github.workflow }}-${{ github.actor }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
cancel-in-progress: true
jobs:
windows:
diff --git a/.github/workflows/reusable-rtlmeter-run.yml b/.github/workflows/reusable-rtlmeter-run.yml
index 12f73a3de..c61044e03 100644
--- a/.github/workflows/reusable-rtlmeter-run.yml
+++ b/.github/workflows/reusable-rtlmeter-run.yml
@@ -16,10 +16,17 @@ on:
description: "Compiler to use: 'gcc' or 'clang'"
type: string
required: true
+ # Note: The combination of 'cases' and 'run-name' must be unique for all
+ # invocations of this workflow within a run of the parent workflow.
+ # These two are used together to generate a unique results file name.
cases:
description: "RTLMeter cases to run"
type: string
required: true
+ run-name:
+ description: "Run name (identifier) to add to collated results"
+ type: string
+ required: true
compileArgs:
description: "Additional Verilator command line arguments"
type: string
@@ -84,7 +91,7 @@ jobs:
- name: Execute cases
working-directory: rtlmeter
- continue-on-error: true # Do not fail on error, so we can at leat save the successful results
+ continue-on-error: true # Do not fail on error, so we can at leat save the successful results
run: |
./rtlmeter run --verbose --cases='${{ inputs.cases }}' --compileArgs='${{ inputs.compileArgs }}' --executeArgs='${{ inputs.executeArgs }}'
# My YAML highlighter sucks, so I put this comment here wiht a phony closing quote mark to make it work: '
@@ -93,10 +100,10 @@ jobs:
id: results
working-directory: rtlmeter
run: |
- # 'inputs.cases' has special characters, use its md5sum as unique id
- hash=$(md5sum <<< '${{ inputs.cases }}' | awk '{print $1}')
+ # Use 'inputs.cases' and 'inputs.run-name' to generate a unique file name
+ hash=$(md5sum <<< '${{ inputs.cases }} ${{ inputs.run-name }}' | awk '{print $1}')
echo "hash=${hash}" >> $GITHUB_OUTPUT
- ./rtlmeter collate > ../results-${hash}.json
+ ./rtlmeter collate --runName "${{ inputs.run-name }}" > ../results-${hash}.json
- name: Report results
working-directory: rtlmeter
@@ -107,7 +114,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
path: results-${{ steps.results.outputs.hash }}.json
- name: rtlmeter-results-${{ inputs.runs-on }}-${{ inputs.cc }}-${{ steps.results.outputs.hash }}
+ name: rtlmeter-results-${{ steps.results.outputs.hash }}
overwrite: true
retention-days: 2
diff --git a/.github/workflows/rtlmeter.yml b/.github/workflows/rtlmeter.yml
index 187d9d60f..e4d7a9eb3 100644
--- a/.github/workflows/rtlmeter.yml
+++ b/.github/workflows/rtlmeter.yml
@@ -10,6 +10,9 @@ on:
schedule:
- cron: '0 2 * * *' # Daily, starting at 02:00 UTC
+permissions:
+ contents: read
+
defaults:
run:
shell: bash
@@ -21,6 +24,8 @@ concurrency:
jobs:
build-gcc:
name: Build GCC
+ # Only run scheduled jobs if explicitly enabled for that repo (e.g.: not on forks)
+ if: ${{ github.event_name != 'schedule' || vars.ENABLE_SCHEDULED_JOBS == 'true' }}
uses: ./.github/workflows/reusable-rtlmeter-build.yml
with:
runs-on: ubuntu-24.04
@@ -28,6 +33,8 @@ jobs:
build-clang:
name: Build Clang
+ # Only run scheduled jobs if explicitly enabled for that repo (e.g.: not on forks)
+ if: ${{ github.event_name != 'schedule' || vars.ENABLE_SCHEDULED_JOBS == 'true' }}
uses: ./.github/workflows/reusable-rtlmeter-build.yml
with:
runs-on: ubuntu-24.04
@@ -41,6 +48,7 @@ jobs:
runs-on: ubuntu-24.04
cc: gcc
cases: ${{ matrix.cases }}
+ run-name: "gcc"
compileArgs: ""
executeArgs: ""
strategy:
@@ -52,7 +60,7 @@ jobs:
- "OpenPiton:1x1:*"
- "OpenPiton:2x2:*"
- "OpenPiton:4x4:*"
- # - "OpenTitan:*"
+ - "OpenTitan:*"
- "VeeR-EH1:asic*"
- "VeeR-EH1:default*"
- "VeeR-EH1:hiperf*"
@@ -64,10 +72,10 @@ jobs:
- "VeeR-EL2:hiperf*"
- "Vortex:mini:*"
- "Vortex:sane:*"
- # - "XiangShan:default-chisel3:* !*:linux"
- # - "XiangShan:default-chisel6:* !*:linux"
+ - "XiangShan:default-chisel3:* !*:linux"
+ - "XiangShan:default-chisel6:* !*:linux"
- "XiangShan:mini-chisel3:* !*:linux"
- # - "XiangShan:mini-chisel6:* !*:linux"
+ - "XiangShan:mini-chisel6:* !*:linux"
- "XuanTie-E902:*"
- "XuanTie-E906:*"
- "XuanTie-C906:*"
@@ -81,6 +89,7 @@ jobs:
runs-on: ubuntu-24.04
cc: clang
cases: ${{ matrix.cases }}
+ run-name: "clang --threads 4"
compileArgs: "--threads 4"
executeArgs: ""
strategy:
@@ -92,7 +101,7 @@ jobs:
- "OpenPiton:1x1:*"
- "OpenPiton:2x2:*"
- "OpenPiton:4x4:*"
- # - "OpenTitan:*"
+ - "OpenTitan:*"
- "VeeR-EH1:asic*"
- "VeeR-EH1:default*"
- "VeeR-EH1:hiperf*"
@@ -115,44 +124,84 @@ jobs:
combine-results:
name: Combine results
- needs:
- - run-gcc
- - run-clang
- if: ${{ always() }} # Run even if dependencies failed
+ needs: [run-gcc, run-clang]
+ # Run if any of the dependencies have run, even if failed.
+ # That is: do not run if all skipped, or the workflow was cancelled.
+ if: ${{ (contains(needs.*.result, 'success') || contains(needs.*.result, 'failure')) && !cancelled() }}
runs-on: ubuntu-24.04
steps:
- - name: Download all GCC results
+ - name: Download all results
uses: actions/download-artifact@v4
with:
- pattern: rtlmeter-results-ubuntu-24.04-gcc-*
- path: all-results-gcc-${{ github.run_id }}
+ pattern: rtlmeter-results-*
+ path: all-results-${{ github.run_id }}
merge-multiple: true
- - name: Download all Clang results
- uses: actions/download-artifact@v4
- with:
- pattern: rtlmeter-results-ubuntu-24.04-clang-*
- path: all-results-clang-${{ github.run_id }}
- merge-multiple: true
- - name: Tar up results
+ - name: Tar up all results into single archive
run: |
- # Ensure combined result directories exists in case of no results
- mkdir -p all-results-gcc-${{ github.run_id }}
- mkdir -p all-results-clang-${{ github.run_id }}
- ls -la all-results*
- # Tar up each directory
- tar --posix -c -z -f all-results-gcc-${{ github.run_id }}.tar.gz all-results-gcc-${{ github.run_id }}
- tar --posix -c -z -f all-results-clang-${{ github.run_id }}.tar.gz all-results-clang-${{ github.run_id }}
- - name: Upload combined GCC results
+ # Ensure combined result directory exists in case of no results
+ mkdir -p all-results-${{ github.run_id }}
+ ls -la all-results-${{ github.run_id }}
+ # Tar up the results directory
+ tar --posix -c -z -f all-results-${{ github.run_id }}.tar.gz all-results-${{ github.run_id }}
+ - name: Upload combined results
uses: actions/upload-artifact@v4
with:
- path: all-results-gcc-${{ github.run_id }}.tar.gz
- name: "all-results-gcc"
+ path: all-results-${{ github.run_id }}.tar.gz
+ name: all-results
overwrite: true
retention-days: 30
- - name: Upload combined Clang results
- uses: actions/upload-artifact@v4
+
+ publish-results:
+ name: Publish results to verilator/verilator-rtlmeter-results
+ needs: combine-results
+ # Only run on scheduled builds on the main repository. We also restrict
+ # the publishing to run only on the first run_attempt. This is required
+ # to prevent multiple uploads the same day (if rerunning), as the
+ # dashboard UI currently assumes there is only one data point per
+ # calendar day. Results from reruns can be imported manually if needed.
+ if: ${{ github.event_name == 'schedule' && github.repository == 'verilator/verilator' && github.run_attempt == 1 && contains(needs.*.result, 'success') && !cancelled() }}
+ runs-on: ubuntu-24.04
+ steps:
+ - name: Download combined results
+ uses: actions/download-artifact@v4
with:
- path: all-results-clang-${{ github.run_id }}.tar.gz
- name: "all-results-clang"
- overwrite: true
- retention-days: 30
+ name: all-results
+ path: results
+ - name: Extract combined results
+ working-directory: results
+ run: |
+ tar xzfv all-results-${{ github.run_id }}.tar.gz
+ ls -la
+ # Pushing to verilator/verilator-rtlmeter-results requires elevated permissions
+ - name: Generate access token
+ id: generate-token
+ uses: actions/create-github-app-token@v2.0.6
+ with:
+ app-id: ${{ vars.RTLMETER_RESULTS_CI_APP_ID }}
+ private-key: ${{ secrets.RTLMETER_RESULTS_CI_APP_PRIVATE_KEY }}
+ owner: verilator
+ repositories: verilator-rtlmeter-results
+ - name: Checkout verilator-rtlmeter-results
+ uses: actions/checkout@v4
+ with:
+ repository: "verilator/verilator-rtlmeter-results"
+ token: ${{ steps.generate-token.outputs.token }}
+ path: verilator-rtlmeter-results
+ - name: Import results
+ id: import-results
+ working-directory: verilator-rtlmeter-results
+ run: |
+ for f in $(find ../results -name "*.json"); do \
+ echo "Importing $f"; \
+ ./bin/add-rtlmeter-result $f; \
+ done
+ test -z "$(git status --porcelain)" || echo "valid=1" >> "$GITHUB_OUTPUT"
+ - name: Push to verilator-rtlmeter-results
+ if: ${{ steps.import-results.outputs.valid }}
+ working-directory: verilator-rtlmeter-results
+ run: |
+ git config --global user.email "action@example.com"
+ git config --global user.name "github action"
+ git add .
+ git commit -m "Verilator CI: Results of 'RTLMeter' workflow run #${{ github.run_number }}"
+ git push origin
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 705e8e4cf..570968aea 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.036
+ VERSION 5.038
HOMEPAGE_URL https://verilator.org
LANGUAGES CXX
)
diff --git a/Changes b/Changes
index 90604dccc..e2b00d973 100644
--- a/Changes
+++ b/Changes
@@ -5,7 +5,98 @@ Revision History and Change Log
===============================
The changes in each Verilator version are described below. The
-contributors that suggested a given feature are shown in []. Thanks!
+contributors that suggested or implemented a given issue are shown in []. Thanks!
+
+
+Verilator 5.038 2025-07-08
+==========================
+
+**Important:**
+
+* Change `--assert` to be the default; use `--no-assert` for legacy behavior and faster runtimes.
+
+**Other:**
+
+* Support redeclaring type as non-type; major parsing change (#2412) (#6020) (#6042) (#6044).
+* Support scoped `new` (#4199).
+* Support constrained random for associative arrays (#5985) (#5986). [Yilou Wang]
+* Support assignments to concatenations with impure RHS (#6002). [Ryszard Rozak, Antmicro Ltd.]
+* Support SARIF JSON diagnostic output with `--diagnostics-sarif`. (#6017)
+* Support 1-bit params with -G and -pvalue (#6051) (#6082). [Paul Swirhun]
+* Support `specparam` (#5767) (#6142).
+* Support `$timeformat` with missing arguments (#6113). [Alex Solomatnikov]
+* Support non-overlapping blocking/non-blocking assignments (#6137). [Geza Lore]
+* Support parameter forward types.
+* Support constant functions with left-hand-side concatenates.
+* Add PROCINITASSIGN on initial assignments to process variables (#2481). [Niraj Menon]
+* Add BADVLTPRAGMA on unknown Verilator pragmas (#5945). [Shou-Li Hsu]
+* Add ternary operator into branch coverage (#5880). [Ryszard Rozak, Antmicro Ltd.]
+* Add aggregate type error checks (#5570) (#5950). [Shou-Li Hsu]
+* Add `--work` library-selection option (#5891 partial).
+* Add `--filter-type` to verilator_coverage (#6030). [Ryszard Rozak, Antmicro Ltd.]
+* Add `--hierarchical-threads` (#6037). [Bartłomiej Chmiel]
+* Add `MODMISSING` error, in place of unnamed error (#6054). [Paul Swirhun]
+* Add DFG binToOneHot pass to generate one-hot decoders (#6096). [Geza Lore]
+* Add hint of the signed right-hand-side in oversized replication error (#6098). [Peter Birch]
+* Improve hierarchical scheduling visualization in V3ExecGraph (#6009). [Bartłomiej Chmiel, Antmicro Ltd.]
+* Improve DPI temporary 'for' loop performance (#6079). [Bartłomiej Chmiel, Antmicro Ltd.]
+* Improve memory usage for SenTrees in V3OrderProcessDomains (#6112). [Geza Lore]
+* Improve docker image size (#6139). [Tobias Rosenkranz, bitaggregat GmbH]
+* Update docker base image to Ubuntu 24.04 (#6147). [Tobias Rosenkranz, bitaggregat GmbH]
+* Optimize DFG De Morgan patterns (#6090). [Geza Lore]
+* Optimize DFG variable elimination (#6091). [Geza Lore]
+* Optimize DFG PUSH_SEL_THROUGH_CONCAT pattern (#6092). [Geza Lore]
+* Optimize DFG before V3Gate (#6141). [Geza Lore]
+* Optimize DFG peephole patterns (#6149). [Geza Lore]
+* Optimize constification within Expand and Subst stages (#6111). [Geza Lore]
+* Fix --x-initial and --x-assign random stability (#2662) (#5958) (#6018) (#6025) (#6075). [Todd Strader]
+* Fix trace hierarchical-name runtime errors (#5668) (#6076). [Paul Swirhun]
+* Fix streaming operator packing order (#5903) (#6077). [Paul Swirhun]
+* Fix filename backslash escapes in C code (#5947).
+* Fix C++ widths in V3Expand (#5953) (#5975). [Geza Lore]
+* Fix dependencies from different hierarchical schedules (#5954). [Bartłomiej Chmiel, Antmicro Ltd.]
+* Fix constant propagation of post-expand stages (#5955) (#5963) (#5969) (#5972) (#5983).
+* Fix sign extension of signed compared with unsigned case items (#5968).
+* Fix always processes ignoring $finish (#5971). [Hennadii Chernyshchyk]
+* Fix method calls and new to access interface arrays (#5973). [Nick Brereton]
+* Fix streaming to/from packed arrays (#5976). [Geza Lore]
+* Fix segfault writing timestamp to VCD after buffer flush (#5978) (#5980). [Dominick Grochowina]
+* Fix inconsistent assignment error with split-var (#5984) (#5988). [Yutetsu TAKATSUKASA]
+* Fix AstAssignW conversion (#5991) (#5992). [Ryszard Rozak, Antmicro Ltd.]
+* Fix const-bit-op-tree with single-bit masks (#5993) (#5998). [Yutetsu TAKATSUKASA]
+* Fix arithmetic right-shift by constants over 32 bits (#5994). [Zhen Yan]
+* Fix array bounds checking with class member selects (#5996) (#5997). [Krzysztof Starecki]
+* Fix checking for too-wide divide and modulus (#6003) (#6006). [Zhen Yan]
+* Fix folding of LteS in DfgPeephole (#6000) (#6004). [Geza Lore]
+* Fix slicing of AstExprStmt nodes (#6005). [Ryszard Rozak, Antmicro Ltd.]
+* Fix skipped generate blocks in toggle coverage (#6010). [Ryszard Rozak, Antmicro Ltd.]
+* Fix arithmetic left-shift by constants over 32 bits (#6007) (#6015). [Zhen Yan]
+* Fix concatenation and type casting (#6012) (#6013). [Todd Strader]
+* Fix wrong optimization result of shifted out variable (#6016) (#6019). [Yutetsu TAKATSUKASA]
+* Fix missing FreeBSD include (#6027) (#6028). [Joel Bodenmann]
+* Fix associative arrays with enum keys (#6034) (#6035). [Petr Nohavica]
+* Fix GCC 10 read-only linker error (#6040). [Todd Strader]
+* Fix WIDTHCONCAT on packed pattern assignment (#6045). [Dan Petrisko]
+* Fix type operator for interface signals (#6049) (#6050). [Todd Strader]
+* Fix V3OrderParallel scoring contraction hang (#6052). [Bartłomiej Chmiel, Antmicro Ltd.]
+* Fix virtual interface array typedef expressions (#6057).
+* Fix DFG peephole select conditionals (#6064) (#6071). [Geza Lore]
+* Fix `--skip-identical` skipping on some errors (#6066). [Todd Strader]
+* Fix class typedef elaboration (#6080). [Kamil Rakoczy, Antmicro Ltd.]
+* Fix unpacked to packed parameter assignment (#6081) (#6088). [Todd Strader]
+* Fix casting reals to large integrals (#6085). [Todd Strader]
+* Fix nested hier blocks workers error (#6087). [Bartłomiej Chmiel, Antmicro Ltd.]
+* Fix `--lib-create` with double-underscore (#6099).
+* Fix DFG binToOneHot table index missing driver (#6100). [Geza Lore]
+* Fix decoding octal string escapes with 1-2 digits (#6108).
+* Fix colon-divide operator without space (#6121). [Alex Solomatnikov]
+* Fix variables declared in fork after taskify (#6126). [Kamil Rakoczy, Antmicro Ltd.]
+* Fix method calls without parenthesis (#6127). [Alex Solomatnikov]
+* Fix `pre_randomize`/`post_randomize` when no randomize (#6128). [Alex Solomatnikov]
+* Fix wide non-blocking assignment mis-optimization (#6150) (#6152) (#6155). [Todd Strader]
+* Fix interface array connections with non-zero low declaration index.
+* Fix developer build error on MacOS/Flex2.6.4 (#6153). [Paul Swirhun]
+* Fix crash with --dumpi-V3LinkDot without --debug (#6159). [Igor Zaworski]
Verilator 5.036 2025-04-27
diff --git a/Makefile.in b/Makefile.in
index 5db547897..f22aec998 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -104,45 +104,45 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
SHELL = /bin/sh
SUBDIRS = docs src test_regress \
- examples/cmake_hello_c \
- examples/cmake_hello_sc \
- examples/cmake_tracing_c \
- examples/cmake_tracing_sc \
- examples/cmake_protect_lib \
- examples/make_hello_binary \
- examples/make_hello_c \
- examples/make_hello_sc \
- examples/make_tracing_c \
- examples/make_tracing_sc \
- examples/make_protect_lib \
- examples/json_py \
+ examples/cmake_hello_c \
+ examples/cmake_hello_sc \
+ examples/cmake_tracing_c \
+ examples/cmake_tracing_sc \
+ examples/cmake_protect_lib \
+ examples/make_hello_binary \
+ examples/make_hello_c \
+ examples/make_hello_sc \
+ examples/make_tracing_c \
+ examples/make_tracing_sc \
+ examples/make_protect_lib \
+ examples/json_py \
INFOS = verilator.html verilator.pdf
INFOS_OLD = README README.html README.pdf
EXAMPLES_FIRST = \
- examples/make_hello_c \
- examples/make_hello_sc \
+ examples/make_hello_c \
+ examples/make_hello_sc \
EXAMPLES = $(EXAMPLES_FIRST) $(filter-out $(EXAMPLES_FIRST), $(sort $(wildcard examples/*)))
# See uninstall also - don't put wildcards in this variable, it might uninstall other stuff
# No verilator_ccache_report.1, verilator_difftree.1 as those are not bin/ installed
VL_INST_MAN_FILES = \
- verilator.1 \
- verilator_coverage.1 \
- verilator_gantt.1 \
- verilator_profcfunc.1 \
+ verilator.1 \
+ verilator_coverage.1 \
+ verilator_gantt.1 \
+ verilator_profcfunc.1 \
default: all
all: all_nomsg msg_test
all_nomsg: verilator_exe $(VL_INST_MAN_FILES)
-.PHONY:verilator_exe
-.PHONY:verilator_bin$(EXEEXT)
-.PHONY:verilator_bin_dbg$(EXEEXT)
-.PHONY:verilator_coverage_bin_dbg$(EXEEXT)
+.PHONY: verilator_exe
+.PHONY: verilator_bin$(EXEEXT)
+.PHONY: verilator_bin_dbg$(EXEEXT)
+.PHONY: verilator_coverage_bin_dbg$(EXEEXT)
verilator_exe verilator_bin$(EXEEXT) verilator_bin_dbg$(EXEEXT) verilator_coverage_bin_dbg$(EXEEXT):
@echo ------------------------------------------------------------
@echo "making verilator in src"
@@ -151,7 +151,7 @@ verilator_exe verilator_bin$(EXEEXT) verilator_bin_dbg$(EXEEXT) verilator_covera
######################################################################
# Tests
-.PHONY:msg_test
+.PHONY: msg_test
msg_test: all_nomsg
@echo "Build complete!"
@echo
@@ -213,8 +213,8 @@ verilator.html:
verilator.pdf: Makefile
$(MAKE) -C docs verilator.pdf
-TAGFILES=${srcdir}/*/*.cpp ${srcdir}/*/*.h ${srcdir}/*/*.in \
- ${srcdir}/*.in ${srcdir}/*.pod
+TAGFILES = ${srcdir}/*/*.cpp ${srcdir}/*/*.h ${srcdir}/*/*.in \
+ ${srcdir}/*.in ${srcdir}/*.pod
TAGS: $(TAGFILES)
etags $(TAGFILES)
@@ -224,42 +224,49 @@ TAGS: $(TAGFILES)
doxygen:
$(MAKE) -C docs doxygen
+.PHONY: spelling
+spelling:
+ $(MAKE) -C docs spelling
+
######################################################################
# Install
# Public executables intended to be invoked directly by the user
# Don't put wildcards in these variables, it might cause an uninstall of other stuff
-VL_INST_PUBLIC_SCRIPT_FILES = verilator \
- verilator_coverage \
- verilator_gantt \
- verilator_profcfunc \
+VL_INST_PUBLIC_SCRIPT_FILES = \
+ verilator \
+ verilator_coverage \
+ verilator_gantt \
+ verilator_profcfunc \
-VL_INST_PUBLIC_BIN_FILES = verilator_bin$(EXEEXT) \
- verilator_bin_dbg$(EXEEXT) \
- verilator_coverage_bin_dbg$(EXEEXT) \
+VL_INST_PUBLIC_BIN_FILES = \
+ verilator_bin$(EXEEXT) \
+ verilator_bin_dbg$(EXEEXT) \
+ verilator_coverage_bin_dbg$(EXEEXT) \
# Private executabels intended to be invoked by internals
# Don't put wildcards in these variables, it might cause an uninstall of other stuff
-VL_INST_PRIVATE_SCRIPT_FILES = verilator_ccache_report \
- verilator_includer \
+VL_INST_PRIVATE_SCRIPT_FILES = \
+ verilator_ccache_report \
+ verilator_includer \
VL_INST_INC_BLDDIR_FILES = \
- include/verilated_config.h \
- include/verilated.mk \
+ include/verilated_config.h \
+ include/verilated.mk \
# Files under srcdir, instead of build time
VL_INST_INC_SRCDIR_FILES = \
- include/*.[chv]* \
- include/*.vlt \
- include/*.sv \
- include/gtkwave/*.[chv]* \
- include/vltstd/*.[chv]* \
+ include/*.[chv]* \
+ include/*.vlt \
+ include/*.sv \
+ include/gtkwave/*.[chv]* \
+ include/vltstd/*.[chv]* \
VL_INST_DATA_SRCDIR_FILES = \
- examples/*/*.[chv]* \
- examples/*/CMakeLists.txt \
- examples/*/Makefile* \
- examples/*/vl_* \
+ examples/*/*.[chv]* \
+ examples/*/CMakeLists.txt \
+ examples/*/Makefile* \
+ examples/*/vl_* \
mkbindirs:
$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/bin
@@ -395,19 +402,22 @@ CPPCHECK6_CPP = $(wildcard $(srcdir)/src/V3[P-Z]*.cpp)
CPPCHECK7_CPP = $(wildcard $(srcdir)/src/V3[L-R]*.cpp)
CPPCHECK8_CPP = $(wildcard $(srcdir)/src/V3[S-Z]*.cpp)
CHECK_CPP = $(CPPCHECK1_CPP) $(CPPCHECK2_CPP) $(CPPCHECK3_CPP) $(CPPCHECK4_CPP) \
- $(CPPCHECK5_CPP) $(CPPCHECK6_CPP) $(CPPCHECK7_CPP) $(CPPCHECK8_CPP)
+ $(CPPCHECK5_CPP) $(CPPCHECK6_CPP) $(CPPCHECK7_CPP) $(CPPCHECK8_CPP)
CHECK_H = $(wildcard \
- $(srcdir)/include/*.h \
- $(srcdir)/src/*.h )
+ $(srcdir)/include/*.h \
+ $(srcdir)/src/*.h )
CHECK_YL = $(wildcard \
- $(srcdir)/src/*.y \
- $(srcdir)/src/*.l )
+ $(srcdir)/src/*.y \
+ $(srcdir)/src/*.l )
CPPCHECK = src/cppcheck_filtered cppcheck
CPPCHECK_FLAGS = --enable=all --inline-suppr \
- --suppress=cstyleCast --suppress=useInitializationList \
- --suppress=nullPointer --suppress=nullPointerRedundantCheck --suppress=ctunullpointer \
- --suppress=unusedFunction --suppress=unusedScopedObject \
- --suppress=useStlAlgorithm
+ --suppress=cstyleCast --suppress=ctunullpointer \
+ --suppress=derefInvalidIteratorRedundantCheck \
+ --suppress=nullPointer --suppress=nullPointerRedundantCheck \
+ --suppress=templateRecursion \
+ --suppress=unusedFunction --suppress=unusedScopedObject \
+ --suppress=useInitializationList --suppress=useStlAlgorithm \
+
CPPCHECK_FLAGS += --xml
CPPCHECK_DEP = $(subst .cpp,.cppcheck,$(CHECK_CPP))
CPPCHECK_INC = -I$(srcdir)/include -I$(srcdir)/include/gtkwave -I$(srcdir)/include/vltstd -I$(srcdir)/src/obj_dbg -I$(srcdir)/src
@@ -432,8 +442,8 @@ cppcheck-8:
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' \
+ -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' \
CLANGTIDY_DEP = $(subst .cpp,.cpp.tidy,$(CHECK_CPP))
CLANGTIDY_DEFS = -DVL_DEBUG=1 -DVL_CPPCHECK=1
@@ -453,7 +463,7 @@ analyzer-include:
scan-build $(MAKE) -k examples
format:
- $(MAKE) -j 4 format-c format-py format-exec
+ $(MAKE) -j 5 format-c format-cmake format-exec format-py
CLANGFORMAT = clang-format-14
CLANGFORMAT_FLAGS = -i
@@ -461,7 +471,7 @@ CLANGFORMAT_FILES = $(CHECK_CPP) $(CHECK_H) $(CHECK_YL) test_regress/t/*.c* test
format-c clang-format:
@$(CLANGFORMAT) --version | egrep 14.0 > /dev/null \
- || echo "*** You are not using clang-format-14, indents may differ from master's ***"
+ || echo "*** You are not using clang-format-14, indents may differ from master's ***"
$(CLANGFORMAT) $(CLANGFORMAT_FLAGS) $(CLANGFORMAT_FILES)
YAMLFIX = YAMLFIX_WHITELINES=1 YAMLFIX_LINE_LENGTH=130 YAMLFIX_preserve_quotes=true yamlfix
@@ -471,50 +481,58 @@ yamlfix:
# CMake files
CMAKE_FILES = \
- CMakeLists.txt \
- examples/*/CMakeLists.txt \
- src/CMakeLists.txt \
- test_regress/CMakeLists.txt \
- *.cmake.in \
+ CMakeLists.txt \
+ examples/*/CMakeLists.txt \
+ src/CMakeLists.txt \
+ test_regress/CMakeLists.txt \
+ *.cmake.in \
+
+# Makefiles
+MAKE_FILES = \
+ Makefile*.in \
+ docs/Makefile* \
+ include/verilated.mk.in \
+ examples/*/Makefile* \
+ src/Makefile*.in \
+ test_regress/Makefile* \
# Python programs, subject to format and lint
PY_PROGRAMS = \
- bin/verilator_ccache_report \
- bin/verilator_difftree \
- bin/verilator_gantt \
- bin/verilator_includer \
- bin/verilator_profcfunc \
- examples/json_py/vl_file_copy \
- examples/json_py/vl_hier_graph \
- docs/guide/conf.py \
- docs/bin/vl_sphinx_extract \
- docs/bin/vl_sphinx_fix \
- src/astgen \
- src/bisonpre \
- src/config_rev \
- src/cppcheck_filtered \
- src/flexfix \
- src/vlcovgen \
- src/.gdbinit.py \
- test_regress/*.py \
- test_regress/t/*.pf \
- nodist/clang_check_attributes \
- nodist/code_coverage \
- nodist/dot_importer \
- nodist/fuzzer/actual_fail \
- nodist/fuzzer/generate_dictionary \
- nodist/install_test \
- nodist/log_changes \
+ bin/verilator_ccache_report \
+ bin/verilator_difftree \
+ bin/verilator_gantt \
+ bin/verilator_includer \
+ bin/verilator_profcfunc \
+ examples/json_py/vl_file_copy \
+ examples/json_py/vl_hier_graph \
+ docs/guide/conf.py \
+ docs/bin/vl_sphinx_extract \
+ docs/bin/vl_sphinx_fix \
+ src/astgen \
+ src/bisonpre \
+ src/config_rev \
+ src/cppcheck_filtered \
+ src/flexfix \
+ src/vlcovgen \
+ src/.gdbinit.py \
+ test_regress/*.py \
+ test_regress/t/*.pf \
+ nodist/clang_check_attributes \
+ nodist/code_coverage \
+ nodist/dot_importer \
+ nodist/fuzzer/actual_fail \
+ nodist/fuzzer/generate_dictionary \
+ nodist/install_test \
+ nodist/log_changes \
# Python files, subject to format but not lint
PY_FILES = \
- $(PY_PROGRAMS) \
- nodist/code_coverage.dat \
- test_regress/t/*.py \
+ $(PY_PROGRAMS) \
+ nodist/code_coverage.dat \
+ test_regress/t/*.py \
# Python files, test_regress tests
-PY_TEST_FILES = \
- test_regress/t/*.py \
+PY_TEST_FILES = test_regress/t/*.py
YAPF = yapf3
YAPF_FLAGS = -i --parallel
@@ -523,11 +541,17 @@ format-py yapf:
$(YAPF) $(YAPF_FLAGS) $(PY_FILES)
GERSEMI = gersemi
-GERSEMI_FLAGS = -i
+GERSEMI_FLAGS = -i --no-warn-about-unknown-commands
format-cmake:
$(GERSEMI) $(GERSEMI_FLAGS) $(CMAKE_FILES)
+MBAKE = mbake
+MBAKE_FLAGS = format --config ./.bake.toml
+
+format-make:
+ $(MBAKE) $(MBAKE_FLAGS) $(MAKE_FILES)
+
format-yaml: yamlfix
PYLINT = pylint
diff --git a/README.rst b/README.rst
index 292078152..d957472d5 100644
--- a/README.rst
+++ b/README.rst
@@ -1,7 +1,7 @@
.. Github doesn't render images unless absolute URL
.. Do not know of a conditional tag, "only: github" nor "github display" works
-|badge1| |badge2| |badge3| |badge4| |badge5| |badge7|
+|badge1| |badge2| |badge3| |badge4| |badge5| |badge7| |badge8|
.. |badge1| image:: https://img.shields.io/badge/Website-Verilator.org-181717.svg
:target: https://verilator.org
@@ -15,6 +15,8 @@
:target: https://hub.docker.com/r/verilator/verilator
.. |badge7| image:: https://github.com/verilator/verilator/workflows/build/badge.svg
:target: https://github.com/verilator/verilator/actions?query=workflow%3Abuild
+.. |badge8| image:: https://img.shields.io/github/actions/workflow/status/verilator/verilator/rtlmeter.yml?branch=master&event=schedule&label=benchmarks
+ :target: https://verilator.github.io/verilator-rtlmeter-results
Welcome to Verilator
@@ -129,7 +131,7 @@ organizations; please see `Verilator Commercial Support
Related Projects
================
-- `GTKwave `_ - Waveform viewer for
+- `GTKwave `_ - Waveform viewer for
Verilator traces.
- `Icarus Verilog`_ - Icarus is a highly-featured interpreted Verilog
diff --git a/bin/verilator b/bin/verilator
index 89c18ea6f..f27e64c84 100755
--- a/bin/verilator
+++ b/bin/verilator
@@ -130,7 +130,7 @@ if ($opt_gdb) {
} elsif ($opt_valgrind) {
# Run under valgrind
my $valgrind_bin = ($ENV{VERILATOR_VALGRIND} || "valgrind --error-exitcode=1 --max-stackframe=2815880"
- # Magic number sugested by valgrind, may need to be increased in future
+ # Magic number suggested by Valgrind, may need to be increased in future
# if you get warnings. See: https://valgrind.org/docs/manual/manual-core.html#opt.max-stackframe
);
@@ -311,8 +311,8 @@ detailed descriptions of these arguments.
+1800-2012ext+ Use SystemVerilog 2012 with file extension
+1800-2017ext+ Use SystemVerilog 2017 with file extension
+1800-2023ext+ Use SystemVerilog 2023 with file extension
- --assert Enable all assertions
- --assert-case Enable unique/unique0/priority case related checks
+ --no-assert Disable all assertions
+ --no-assert-case Disable unique/unique0/priority-case assertions
--autoflush Flush streams after all $displays
--bbox-sys Blackbox unknown $system calls
--bbox-unsup Blackbox unsupported language features
@@ -345,6 +345,8 @@ detailed descriptions of these arguments.
--decorations Set output comment and spacing level
--default-language Default language to parse
+define+= Set preprocessor define
+ --diagnostics-sarif Enable SARIF diagnostics output
+ --diagnostics-sarif-output Set SARIF diagnostics output file
--dpi-hdr-only Only produce the DPI header file
--dump- Enable dumping everything in source file
--dump-defines Show preprocessor defines with -E
@@ -381,6 +383,7 @@ detailed descriptions of these arguments.
--help Show this help
--hierarchical Enable hierarchical Verilation
--hierarchical-params-file Internal option that specifies parameters file for hier blocks
+ --hierarchical-threads Number of threads for hierarchical scheduling
-I Directory to search for includes
--if-depth Tune IFDEPTH warning
+incdir+ Directory to search for includes
@@ -388,10 +391,10 @@ detailed descriptions of these arguments.
--instr-count-dpi Assumed dynamic instruction count of DPI imports
-j Parallelism for --build-jobs/--verilate-jobs
--no-json-edit-nums Don't dump editNum in .tree.json files
- --no-json-ids Don't use short identifiers instead of adresses/paths in .tree.json
+ --no-json-ids Don't use short identifiers instead of addresses/paths in .tree.json
--json-only Create JSON parser output (.tree.json and .meta.json)
- --json-only-meta-output .tree.meta.json output filename
- --json-only-output .tree.json output filename
+ --json-only-meta-output Set .tree.meta.json output filename
+ --json-only-output Set .tree.json output filename
--l2-name Verilog scope name of the top module
--language Default language standard to parse
-LDFLAGS Linker pre-object arguments for makefile
@@ -448,7 +451,7 @@ detailed descriptions of these arguments.
--quiet-exit Don't print the command on failure
--quiet-stats Don't print statistics
--relative-includes Resolve includes relative to current file
- --reloop-limit Minimum iterations for forming loops
+ --reloop-limit Minimum iterations for forming loops
--report-unoptflat Extra diagnostics for UNOPTFLAT
--rr Run Verilator and record with rr
--runtime-debug Enable model runtime debugging
@@ -510,6 +513,7 @@ detailed descriptions of these arguments.
-Wno-fatal Disable fatal exit on warnings
-Wno-lint Disable all lint warnings
-Wno-style Disable all style warnings
+ -work Set config library for following files
-Wpedantic Warn on compliance-test issues
-Wwarn- Enable specified warning message
-Wwarn-lint Enable lint warning message
diff --git a/bin/verilator_coverage b/bin/verilator_coverage
index e7f1f6be2..9407ddbf4 100755
--- a/bin/verilator_coverage
+++ b/bin/verilator_coverage
@@ -170,6 +170,7 @@ L.
--annotate-all All files should be shown.
--annotate-min Minimum occurrence count for uncovered.
--annotate-points Annotates info from each coverage point.
+ --filter-type Keep only records of given coverage type.
--help Displays this message and version and exits.
--rank Compute relative importance of tests.
--unlink With --write, unlink all inputs
diff --git a/bin/verilator_gantt b/bin/verilator_gantt
index ee46ca814..bae7a2603 100755
--- a/bin/verilator_gantt
+++ b/bin/verilator_gantt
@@ -613,7 +613,7 @@ SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0""")
parser.add_argument('--debug', action='store_true', help='enable debug')
parser.add_argument('--no-vcd', help='disable creating vcd', action='store_true')
-parser.add_argument('--vcd', help='filename for vcd outpue', default='profile_exec.vcd')
+parser.add_argument('--vcd', help='filename for vcd output', default='profile_exec.vcd')
parser.add_argument('filename',
help='input profile_exec.dat filename to process',
default='profile_exec.dat')
diff --git a/ci/docker/buildenv/Dockerfile b/ci/docker/buildenv/Dockerfile
index 7e13feca8..520735317 100644
--- a/ci/docker/buildenv/Dockerfile
+++ b/ci/docker/buildenv/Dockerfile
@@ -6,7 +6,7 @@
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
-FROM ubuntu:22.04
+FROM ubuntu:24.04
# Create the user
RUN groupadd verilator \
@@ -36,12 +36,14 @@ RUN apt-get update \
help2man \
libfl2 \
libfl-dev \
+ libclang-rt-18-dev \
libgoogle-perftools-dev \
libsystemc \
libsystemc-dev \
numactl \
perl \
python3 \
+ python3-distro \
wget \
z3 \
zlib1g \
diff --git a/ci/docker/buildenv/README.rst b/ci/docker/buildenv/README.rst
index 64d82509b..5ee9e4e95 100644
--- a/ci/docker/buildenv/README.rst
+++ b/ci/docker/buildenv/README.rst
@@ -13,7 +13,7 @@ Verilator build. It uses the following parameters:
- Source revision (default: master)
-- Compiler (GCC 10.3.0, clang 10.0.0, default: 10.3.0)
+- Compiler (GCC 13.3.0, clang 18.1.3, default: 13.3.0)
The container is published as ``verilator/verilator-buildenv`` on `docker
hub
@@ -31,18 +31,18 @@ To also run tests:
docker run -ti verilator/verilator-buildenv test
-To change the compiler:
+To change the compiler use the `-e` switch to pass environment variables:
::
- docker run -ti -e CC=clang-10 -e CXX=clang++-10 verilator/verilator-buildenv test
+ docker run -ti -e CC=clang-18 -e CXX=clang++-18 verilator/verilator-buildenv test
-The tests that involve gdb are not working due to security restrictions.
-To run those too:
+The tests, that involve numactl are not working due to security restrictions.
+To run those too, add the CAP_SYS_NICE capability during the start of the container:
::
- docker run -ti -e CC=clang-10 -e CXX=clang++-10 --cap-add=SYS_PTRACE --security-opt seccomp=unconfined verilator/verilator-buildenv test
+ docker run -ti --cap-add=CAP_SYS_NICE verilator/verilator-buildenv test
Rather then building using a remote git repository you may prefer to use a
working copy on the local filesystem. Mount the local working copy path as
@@ -52,7 +52,7 @@ top of a repository:
::
- docker run -ti -v ${PWD}:/tmp/repo -e REPO=/tmp/repo -e REV=`git rev-parse --short HEAD` --cap-add=SYS_PTRACE --security-opt seccomp=unconfined verilator/verilator-buildenv test
+ docker run -ti -v ${PWD}:/tmp/repo -e REPO=/tmp/repo -e REV=`git rev-parse --short HEAD` verilator/verilator-buildenv test
Rebuilding
diff --git a/ci/docker/run/Dockerfile b/ci/docker/run/Dockerfile
index 24128ccc9..32391c69f 100644
--- a/ci/docker/run/Dockerfile
+++ b/ci/docker/run/Dockerfile
@@ -6,7 +6,7 @@
# Version 2.0.
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
-FROM ubuntu:22.04
+FROM ubuntu:24.04
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive \
@@ -48,7 +48,8 @@ RUN git clone "${REPO}" verilator && \
make && \
make install && \
cd .. && \
- rm -r verilator
+ rm -r verilator && \
+ ccache -C
COPY verilator-wrap.sh /usr/local/bin/verilator-wrap.sh
diff --git a/configure.ac b/configure.ac
index e6c608eee..5dae8392e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,7 +10,7 @@
# Then 'make maintainer-dist'
#AC_INIT([Verilator],[#.### YYYY-MM-DD])
#AC_INIT([Verilator],[#.### devel])
-AC_INIT([Verilator],[5.036 2025-04-27],
+AC_INIT([Verilator],[5.038 2025-07-08],
[https://verilator.org],
[verilator],[https://verilator.org])
@@ -432,10 +432,10 @@ AC_SUBST(HAVE_COROUTINES)
# Flags for compiling Verilator internals including parser always
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-Qunused-arguments)
+_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-Wno-shadow)
+_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-Wno-unused-parameter)
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-Xclang -fno-pch-timestamp)
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-faligned-new)
-_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-Wno-unused-parameter)
-_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-Wno-shadow)
AC_SUBST(CFG_CXXFLAGS_SRC)
# Flags for compiling Verilator parser always (in addition to above CFG_CXXFLAGS_SRC)
diff --git a/docs/CONTRIBUTORS b/docs/CONTRIBUTORS
index 28cce9e65..8b3ccd0ed 100644
--- a/docs/CONTRIBUTORS
+++ b/docs/CONTRIBUTORS
@@ -3,6 +3,7 @@ under the Developer Certificate of Origin (https://developercertificate.org/).
Please see the Verilator manual for 200+ additional contributors. Thanks to all.
+404allen404
Adam Bagley
Adrian Sampson
Adrien Le Masle
@@ -11,7 +12,6 @@ Aidan McNay
Aleksander Kiryk
Alex Chadwick
Alex Solomatnikov
-Àlex Torregrosa
Aliaksei Chapyzhenka
Ameya Vikram Singh
Andrea Calabrese
@@ -37,14 +37,15 @@ Chykon
Conor McCullough
Dan Petrisko
Daniel Bates
+Dave Sargeant
David Horton
David Ledger
David Metz
-Dave Sargeant
David Stanford
David Turner
Dercury
Diego Roux
+Dominick Grochowina
Don Williamson
Drew Ranck
Drew Taussig
@@ -54,14 +55,13 @@ Eric Müller
Eric Rippey
Ethan Sifferman
Eyck Jentzsch
-Furqan Nadir
Fabian Keßler
Fan Shupei
-february cozzocrea
Felix Neumärker
Felix Yan
Frans Skarman
Fuad Ismail
+Furqan Nadir
G-A. Kamendje
Garrett Smith
Geza Lore
@@ -69,12 +69,12 @@ Gianfranco Costamagna
Gijs Burghoorn
Gilberto Abram
Glen Gibb
-Gökçe Aydos
Graham Rushton
Greg Davill
Guokai Chen
Gus Smith
Gustav Svensk
+Gökçe Aydos
Han Qi
Harald Heckmann
Hennadii Chernyshchyk
@@ -83,7 +83,7 @@ Huang Rui
Huanghuang Zhou
HungMingWu
HyungKi Jeong
-Ícaro Lima
+Igor Zaworski
Ilya Barkov
Iru Cai
Ivan Vnučec
@@ -97,16 +97,17 @@ James Shi
Jamey Hicks
Jamie Iles
Jan Van Winkel
-Jiangjie Weng
Jean Berniolles
Jeremy Bennett
Jesse Taube
Jevin Sweval
Jiacheng Qian
Jiamin Zhu
-Jitesh Nayak
+Jiangjie Weng
Jinyan Xu
+Jitesh Nayak
Jiuyang Liu
+Joel Bodenmann
Joey Liu
John Coiner
John Demme
@@ -157,8 +158,8 @@ Mateusz Gancarz
Matthew Ballance
Michael Bikovitsky
Michael Killough
-Michaël Lefebvre
Michal Czyz
+Michaël Lefebvre
Mike Popoloski
Miodrag Milanović
Mladen Slijepcevic
@@ -180,9 +181,11 @@ Paul Wright
Pawel Jewstafjew
Pawel Sagan
Pengcheng Xu
+Peter Birch
Peter Debacker
Peter Horvath
Peter Monsson
+Petr Nohavica
Philip Axer
Philipp Wagner
Pierre-Henri Horrein
@@ -206,29 +209,30 @@ Sean Cross
Sebastien Van Cauwenberghe
Sergi Granell
Seth Pellegrino
+Shou-Li Hsu
Srinivasan Venkataramanan
Stefan Wallentowitz
Stephen Henry
Steven Hugg
-sumpster
Szymon Gizler
Sören Tempel
Teng Huang
-Tom Manner
Tim Hutt
Tim Snyder
+Tobias Jensen
Tobias Rosenkranz
Tobias Wölfel
Todd Strader
+Tom Manner
Tomasz Gorochowik
Topa Topino
Toru Niina
Trung Nguyen
Tudor Timi
Tymoteusz Blazejczyk
+Udaya Raj Subedi
Udi Finkelstein
Unai Martinez-Corral
-Udaya Raj Subedi
Valentin Atepalikhin
Varun Koyyalagunta
Vassilis Papaefstathiou
@@ -249,9 +253,11 @@ Yuri Victorovich
Yutetsu TAKATSUKASA
Yves Mathieu
Zhanglei Wang
+Zhen Yan
Zhou Shen
Zhouyi Shen
Zixi Li
-أحمد المحمودي
-404allen404
-Tobias Jensen
+february cozzocrea
+sumpster
+Àlex Torregrosa
+Ícaro Lima
diff --git a/docs/Makefile b/docs/Makefile
index a0d42140b..98b2f47d8 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -25,7 +25,7 @@ BUILDDIR = _build
SPHINXOPTS ?= -c guide -j 4
ifneq ($(VERILATOR_ANALYTICS_ID),)
-SPHINXOPTS += -D html_theme_options.analytics_id=$(VERILATOR_ANALYTICS_ID)
+ SPHINXOPTS += -D html_theme_options.analytics_id=$(VERILATOR_ANALYTICS_ID)
endif
######################################################################
diff --git a/docs/gen/ex_BADVLTPRAGMA_faulty.rst b/docs/gen/ex_BADVLTPRAGMA_faulty.rst
new file mode 100644
index 000000000..62725c09b
--- /dev/null
+++ b/docs/gen/ex_BADVLTPRAGMA_faulty.rst
@@ -0,0 +1,5 @@
+.. comment: generated by t_lint_badvltpragma_bad
+.. code-block:: sv
+ :emphasize-lines: 1
+
+ // verilator lintt_off WIDTH //<--- Warning (lint_off misspelled)
diff --git a/docs/gen/ex_BADVLTPRAGMA_msg.rst b/docs/gen/ex_BADVLTPRAGMA_msg.rst
new file mode 100644
index 000000000..ea57d297e
--- /dev/null
+++ b/docs/gen/ex_BADVLTPRAGMA_msg.rst
@@ -0,0 +1,7 @@
+.. comment: generated by t_lint_badvltpragma_bad
+.. code-block::
+ :emphasize-lines: 1,2
+
+ %Error-BADVLTPRAGMA: example.v:1:4 Unknown verilator comment: '/*verilator lintt_off WIDTH <--- Warning (lint_off misspelled)*/'
+ 7 | /*verilator lintt_off WIDTH <--- Warning (lint_off misspelled)*/
+ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/docs/gen/ex_PINMISSING_msg.rst b/docs/gen/ex_PINMISSING_msg.rst
index c1a06525e..eef3cdb1a 100644
--- a/docs/gen/ex_PINMISSING_msg.rst
+++ b/docs/gen/ex_PINMISSING_msg.rst
@@ -1,4 +1,4 @@
.. comment: generated by t_lint_pinmissing_bad
.. code-block::
- %Warning-PINMISSING: example.v:1:8 Cell has missing pin: 'port'
+ %Warning-PINMISSING: example.v:1:8 Instance has missing pin: 'port'
diff --git a/docs/gen/ex_PKGNODECL_faulty.rst b/docs/gen/ex_PKGNODECL_faulty.rst
deleted file mode 100644
index 1f0b81529..000000000
--- a/docs/gen/ex_PKGNODECL_faulty.rst
+++ /dev/null
@@ -1,11 +0,0 @@
-.. comment: generated by t_lint_pkgnodecl_bad
-.. code-block:: sv
- :linenos:
- :emphasize-lines: 2
-
- module t;
- initial Pkg::hello(); //<--- Warning
- endmodule
- package Pkg;
- function void hello(); endfunction
- endpackage
diff --git a/docs/gen/ex_PKGNODECL_msg.rst b/docs/gen/ex_PKGNODECL_msg.rst
deleted file mode 100644
index 7c772b7c4..000000000
--- a/docs/gen/ex_PKGNODECL_msg.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-.. comment: generated by t_lint_pkgnodecl_bad
-.. code-block::
-
- %Error-PKGNODECL: example.v:1:12 Package/class 'Pkg' not found, and needs to be predeclared (IEEE 1800-2023 26.3)
diff --git a/docs/gen/ex_PROCASSINIT_faulty.rst b/docs/gen/ex_PROCASSINIT_faulty.rst
new file mode 100644
index 000000000..c21130841
--- /dev/null
+++ b/docs/gen/ex_PROCASSINIT_faulty.rst
@@ -0,0 +1,12 @@
+.. comment: generated by t_lint_procassinit_bad
+.. code-block:: sv
+ :linenos:
+ :emphasize-lines: 1,5
+
+ logic flop_out = 1; // <--- Warning
+
+ always @(posedge clk, negedge reset_l) begin
+ if (enable) begin
+ flop_out <= ~in; // <--- Use of initialized
+ end
+ end
diff --git a/docs/gen/ex_PROCASSINIT_fixed.rst b/docs/gen/ex_PROCASSINIT_fixed.rst
new file mode 100644
index 000000000..f5a3f3711
--- /dev/null
+++ b/docs/gen/ex_PROCASSINIT_fixed.rst
@@ -0,0 +1,15 @@
+.. comment: generated by t_lint_procassinit_bad
+.. code-block:: sv
+ :linenos:
+ :emphasize-lines: 5
+
+ logic flop2_out;
+
+ always @(posedge clk, negedge reset_l) begin
+ if (!reset_l) begin
+ flop2_out <= '1; // <--- Added reset init
+ end
+ else if (enable) begin
+ flop2_out <= ~in;
+ end
+ end
diff --git a/docs/gen/ex_PROCASSINIT_msg.rst b/docs/gen/ex_PROCASSINIT_msg.rst
new file mode 100644
index 000000000..4fe084952
--- /dev/null
+++ b/docs/gen/ex_PROCASSINIT_msg.rst
@@ -0,0 +1,12 @@
+.. comment: generated by t_lint_procassinit_bad
+.. code-block::
+
+ %Warning-PROCASSINIT: example.v:1:21 Procedural assignment to declaration with initial value: 'flop_out'
+ : ... note: In instance 't'
+ : ... Location of variable initialization
+ 26 | logic flop_out = 1;
+ | ^
+ example.v:1:10 ... Location of variable process write
+ : ... Perhaps should initialize instead using a reset in this process
+ 30 | flop_out <= ~in;
+ | ^~~~~~~~
diff --git a/docs/guide/contributors.rst b/docs/guide/contributors.rst
index 504ca4698..3d6881f3f 100644
--- a/docs/guide/contributors.rst
+++ b/docs/guide/contributors.rst
@@ -23,8 +23,8 @@ Contributors
Many people have provided ideas and other assistance with Verilator.
Verilator is receiving significant development support from the `CHIPS
-Alliance `_, `Antmicro Ltd
-`_ and `Shunyao CAD `_.
+Alliance `_, and `Antmicro Ltd
+`_.
Previous major corporate sponsors of Verilator, by providing significant
contributions of time or funds include: Antmicro Ltd., Atmel Corporation,
diff --git a/docs/guide/exe_verilator.rst b/docs/guide/exe_verilator.rst
index 2f2b1cdfe..a98de32eb 100644
--- a/docs/guide/exe_verilator.rst
+++ b/docs/guide/exe_verilator.rst
@@ -1,9 +1,9 @@
.. Copyright 2003-2025 by Wilson Snyder.
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
-=====================
- verilator Arguments
-=====================
+===================
+verilator Arguments
+===================
The following arguments may be passed to the "verilator" executable.
@@ -86,13 +86,19 @@ Summary:
grammar and other semantic extensions which might not be legal when
set to an older standard.
-.. option:: --assert
+.. option:: --no-assert
- Enable all assertions. Implies :vlopt:`--assert-case`.
+ Disable all assertions. Implies :vlopt:`--no-assert-case`.
-.. option:: --assert-case
+ In versions before 5.038, these were disabled by default, and `--assert`
+ was required to enable assertions.
- Enable unique/unique0/priority case related checks.
+.. option:: --no-assert-case
+
+ Disable unique/unique0/priority case related checks.
+
+ In versions before 5.038, these were disabled by default, and `--assert`
+ or `--assert-case` was required to enable case assertions.
.. option:: --autoflush
@@ -183,7 +189,7 @@ Summary:
With :vlopt:`--clk`, the specified signal is marked as a clock signal.
The provided signal name is specified using a RTL hierarchy path. For
- example, v.foo.bar. If the signal is the input to top-module, then
+ example, v.foo.bar. If the signal is the input to the top-module, then
directly provide the signal name. Alternatively, use a
:option:`/*verilator&32;clocker*/` metacomment in RTL file to mark the
signal directly.
@@ -393,6 +399,22 @@ Summary:
standard across Verilog tools while :vlopt:`-D <-D>` is similar to
:command:`gcc -D`.
+.. option:: --diagnostics-sarif
+
+ Enables diagnostics output into a Static Analysis Results Interchange
+ Format (SARIF) file, a standard, JSON-based format for the output of
+ static analysis tools such as linters. See
+ [SARIF](https://sarifweb.azurewebsites.net/),
+ [sarif-tools](https://github.com/microsoft/sarif-tools), and the [SARIF
+ web-based viewer](https://microsoft.github.io/sarif-web-component/).
+
+.. option:: --diagnostics-sarif-output
+
+ Specifies the filename for the SARIF output file (`.sarif`) of
+ :vlopt:`--diagnostics-sarif`. Using this option automatically sets
+ :vlopt:`--diagnostics-sarif`. If not specified, output defaults to
+ :file:`.sarif`.
+
.. option:: --dpi-hdr-only
Only generate the DPI header file. This option does not affect on the
@@ -446,9 +468,9 @@ Summary:
.. option:: --dump-tree-dot
- Rarely needed. Enable dumping Ast .tree.dot debug files in Graphviz
- Dot format. This option implies :vlopt:`--dump-tree`, unless
- :vlopt:`--dumpi-tree` was passed explicitly.
+ Rarely needed - for developer use. Enable dumping Ast .tree.dot debug
+ files in Graphviz Dot format. This option implies :vlopt:`--dump-tree`,
+ unless :vlopt:`--dumpi-tree` was passed explicitly.
.. option:: --dump-tree-json
@@ -568,34 +590,41 @@ Summary:
.. option:: -fno-const-before-dfg
- Do not apply any global expression folding prior to the DFG pass. This
- option is solely for the purpose of DFG testing and should not be used
- otherwise.
+ Rarely needed. Do not apply any global expression folding prior to the
+ DFG pass. This option is solely for the purpose of DFG testing and
+ should not be used otherwise.
.. option:: -fno-const-bit-op-tree
+.. option:: -fno-const-eager
+
.. option:: -fno-dedup
.. option:: -fno-dfg
- Disable all use of the DFG-based combinational logic optimizer.
- Alias for :vlopt:`-fno-dfg-pre-inline` and :vlopt:`-fno-dfg-post-inline`.
+ Rarely needed. Disable all use of the DFG-based combinational logic
+ optimizer. Alias for :vlopt:`-fno-dfg-pre-inline`,
+ :vlopt:`-fno-dfg-post-inline` and :vlopt:`-fno-dfg-scoped`.
.. option:: -fno-dfg-peephole
- Disable the DFG peephole optimizer.
+ Rarely needed. Disable the DFG peephole optimizer.
.. option:: -fno-dfg-peephole-
- Disable individual DFG peephole optimizer pattern.
+ Rarely needed. Disable individual DFG peephole optimizer pattern.
.. option:: -fno-dfg-post-inline
- Do not apply the DFG optimizer after inlining.
+ Rarely needed. Do not apply the DFG optimizer after inlining.
.. option:: -fno-dfg-pre-inline
- Do not apply the DFG optimizer before inlining.
+ Rarely needed. Do not apply the DFG optimizer before inlining.
+
+.. option:: -fno-dfg-scoped
+
+ Rarely needed. Do not apply the DFG optimizer across module scopes.
.. option:: -fno-expand
@@ -607,6 +636,10 @@ Summary:
.. option:: -fno-gate
+ Rarely needed. Do not apply the gate-level wire optimizations. Using
+ this is not recommended as may cause additional warnings and ordering
+ issues.
+
.. option:: -fno-inline
.. option:: -fno-inline-funcs
@@ -643,8 +676,9 @@ Summary:
.. option:: -fno-var-split
- Do not attempt to split variables automatically. Variables explicitly
- annotated with :option:`/*verilator&32;split_var*/` are still split.
+ Rarely needed. Do not attempt to split variables
+ automatically. Variables explicitly annotated with
+ :option:`/*verilator&32;split_var*/` are still split.
.. option:: -future0