mirror of
https://github.com/verilator/verilator.git
synced 2026-10-02 16:13:34 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b4852048d | ||
|
|
0144e3ebec | ||
|
|
d410e551f8 | ||
|
|
344f87abe3 | ||
|
|
57c816f906 | ||
|
|
82e1dbe162 | ||
|
|
e6b0bdd4df | ||
|
|
4f13c4d1bb | ||
|
|
c37ec19751 | ||
|
|
aaaf8e75af | ||
|
|
8cc31c6cf1 | ||
|
|
8468af1a20 | ||
|
|
db39d70c75 | ||
|
|
04fff7ebd8 | ||
|
|
b154af87a1 | ||
|
|
8b7480806a | ||
|
|
e29f5ad559 | ||
|
|
4618fd5a43 | ||
|
|
ed979c6aa1 | ||
|
|
141c5da3f9 | ||
|
|
0185ee5df3 | ||
|
|
27c08a65e1 | ||
|
|
de408a5eb7 | ||
|
|
fa3c072dd1 | ||
|
|
aac4b7090a | ||
|
|
f0d664530d | ||
|
|
702140bf93 | ||
|
|
2075db3db0 | ||
|
|
b7fec513cf | ||
|
|
78e7758022 | ||
|
|
818318ddd5 | ||
|
|
39eea781bc | ||
|
|
c4f7bd6a04 | ||
|
|
dd03d0f3c9 | ||
|
|
369ce6af2c | ||
|
|
f83817510d | ||
|
|
bfcd779cfb | ||
|
|
e69c380205 | ||
|
|
61e14aa827 | ||
|
|
0c6c83e278 | ||
|
|
6f52208b68 |
+1
-1
@@ -1,4 +1,4 @@
|
||||
Checks: '*,-hicpp*,-android-cloexec-fopen,-cert-dcl50-cpp,-cert-env33-c,-cert-err34-c,-cert-err58-cpp,-clang-analyzer-core.UndefinedBinaryOperatorResult,-clang-analyzer-security*,-cppcoreguidelines-avoid-magic-numbers,-cppcoreguidelines-no-malloc,-cppcoreguidelines-owning-memory,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-const-cast,-cppcoreguidelines-pro-type-reinterpret-cast,-cppcoreguidelines-pro-type-static-cast-downcast,-cppcoreguidelines-pro-type-union-access,-cppcoreguidelines-pro-type-vararg,-cppcoreguidelines-special-member-functions,-fuchsia-*,-google-default-arguments,-google-readability-todo,-google-runtime-references,-llvm-header-guard,-llvm-include-order,-misc-string-integer-assignment,-misc-string-literal-with-embedded-nul,-modernize-use-auto,-modernize-use-trailing-return-type,-readability-braces-around-statements,-readability-container-size-empty,-readability-delete-null-pointer,-readability-else-after-return,-readability-implicit-bool-conversion,-readability-named-parameter,-readability-static-accessed-through-instance,-llvmlibc-*,-altera-*'
|
||||
Checks: '*,-hicpp*,-android-cloexec-fopen,-cert-dcl50-cpp,-cert-env33-c,-cert-err34-c,-cert-err58-cpp,-clang-analyzer-core.UndefinedBinaryOperatorResult,-clang-analyzer-security*,-cppcoreguidelines-avoid-magic-numbers,-cppcoreguidelines-no-malloc,-cppcoreguidelines-owning-memory,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-const-cast,-cppcoreguidelines-pro-type-reinterpret-cast,-cppcoreguidelines-pro-type-static-cast-downcast,-cppcoreguidelines-pro-type-union-access,-cppcoreguidelines-pro-type-vararg,-cppcoreguidelines-special-member-functions,-fuchsia-*,-google-default-arguments,-google-readability-todo,-google-runtime-references,-llvm-header-guard,-llvm-include-order,-misc-string-integer-assignment,-misc-string-literal-with-embedded-nul,-modernize-use-auto,-modernize-use-trailing-return-type,-readability-braces-around-statements,-readability-container-size-empty,-readability-delete-null-pointer,-readability-else-after-return,-readability-implicit-bool-conversion,-readability-named-parameter,-readability-static-accessed-through-instance'
|
||||
WarningsAsErrors: ''
|
||||
HeaderFilterRegex: ''
|
||||
FormatStyle: none
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
---
|
||||
exclude_paths:
|
||||
- ".github/**"
|
||||
- "ci/build_verilator.sh"
|
||||
- "include/vltstd/**"
|
||||
- "nodist/fastcov.py"
|
||||
- '.github/**'
|
||||
- 'ci/build_verilator.sh'
|
||||
- 'include/vltstd/**'
|
||||
- 'nodist/fastcov.py'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "Verilator Build Environment",
|
||||
"name": "Verilator Build Environment",
|
||||
|
||||
"build": {
|
||||
"build": {
|
||||
"dockerfile": "../ci/docker/buildenv/Dockerfile"
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ assignees: ''
|
||||
|
||||
Thanks for taking the time to report this.
|
||||
|
||||
Can you attach an example that shows the issue? (Must be openly licensed, completely self-contaned so can directly run what you provide. Ideally use test_regress format, see https://veripool.org/guide/latest/contributing.html?highlight=test_regress#reporting-bugs
|
||||
Can you attach an example that shows the issue? (Must be openly licensed, ideally in test_regress format.)
|
||||
|
||||
What 'verilator' command line do we use to run your example?
|
||||
|
||||
@@ -18,5 +18,3 @@ What 'verilator --version' are you using? Did you try it with the git master ve
|
||||
What OS and distribution are you using?
|
||||
|
||||
May we assist you in trying to fix this in Verilator yourself?
|
||||
|
||||
(Please avoid attaching screenshots that show text - you can convert images to text using e.g. https://ocr.space)
|
||||
|
||||
@@ -11,8 +11,6 @@ Thanks for taking the time to report this.
|
||||
|
||||
What would you like added/supported?
|
||||
|
||||
What 'verilator --version' are you using? Did you try it with the git master version?
|
||||
|
||||
Can you attach an example that runs on other simulators? (Must be openly licensed, ideally in test_regress format.)
|
||||
|
||||
May we assist you in trying to fix this in Verilator yourself?
|
||||
|
||||
@@ -8,5 +8,3 @@ assignees: ''
|
||||
---
|
||||
|
||||
How may we help - what is your question?
|
||||
|
||||
(If reporting a bug or requesting a feature please use one of the other issue templates.)
|
||||
|
||||
+79
-91
@@ -1,4 +1,3 @@
|
||||
---
|
||||
# DESCRIPTION: Github actions config
|
||||
# This name is key to badges in README.rst, so we use the name build
|
||||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
@@ -10,7 +9,7 @@ on:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 0 * * 0' # weekly
|
||||
- cron: '0 0 * * 0' # weekly
|
||||
|
||||
env:
|
||||
CI_OS_NAME: linux
|
||||
@@ -18,8 +17,6 @@ env:
|
||||
CCACHE_COMPRESS: 1
|
||||
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
||||
CCACHE_LIMIT_MULTIPLE: 0.95
|
||||
INSTALL_DIR: ${{ github.workspace }}/install
|
||||
RELOC_DIR: ${{ github.workspace }}/relloc
|
||||
|
||||
defaults:
|
||||
run:
|
||||
@@ -36,14 +33,14 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-24.04, ubuntu-22.04, ubuntu-20.04]
|
||||
os: [ubuntu-22.04, ubuntu-20.04]
|
||||
compiler:
|
||||
- {cc: clang, cxx: clang++}
|
||||
- {cc: gcc, cxx: g++}
|
||||
- { cc: clang, cxx: clang++ }
|
||||
- { cc: gcc, cxx: g++ }
|
||||
include:
|
||||
# Build GCC 10 on ubuntu-20.04
|
||||
- os: ubuntu-20.04
|
||||
compiler: {cc: gcc-10, cxx: g++-10}
|
||||
compiler: { cc: gcc-10, cxx: g++-10 }
|
||||
runs-on: ${{ matrix.os }}
|
||||
name: Build | ${{ matrix.os }} | ${{ matrix.compiler.cc }}
|
||||
env:
|
||||
@@ -52,40 +49,41 @@ jobs:
|
||||
CC: ${{ matrix.compiler.cc }}
|
||||
CXX: ${{ matrix.compiler.cxx }}
|
||||
CACHE_BASE_KEY: build-${{ matrix.os }}-${{ matrix.compiler.cc }}
|
||||
CCACHE_MAXSIZE: 1000M # Per build matrix entry (* 5 = 5000M in total)
|
||||
CCACHE_MAXSIZE: 1000M # Per build matrix entry (* 5 = 5000M in total)
|
||||
VERILATOR_ARCHIVE: verilator-${{ github.sha }}-${{ matrix.os }}-${{ matrix.compiler.cc }}.tar.gz
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: repo
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: repo
|
||||
|
||||
- name: Cache $CCACHE_DIR
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
CACHE_KEY: ${{ env.CACHE_BASE_KEY }}-ccache
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: ${{ env.CACHE_KEY }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ env.CACHE_KEY }}-
|
||||
- name: Cache $CCACHE_DIR
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
CACHE_KEY: ${{ env.CACHE_BASE_KEY }}-ccache
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: ${{ env.CACHE_KEY }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ env.CACHE_KEY }}-
|
||||
|
||||
- name: Install packages for build
|
||||
run: ./ci/ci-install.bash
|
||||
- name: Install packages for build
|
||||
run: ./ci/ci-install.bash
|
||||
|
||||
- name: Build
|
||||
run: ./ci/ci-script.bash
|
||||
- name: Build
|
||||
run: ./ci/ci-script.bash
|
||||
|
||||
- name: Tar up repository
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: tar --posix -c -z -f ${{ env.VERILATOR_ARCHIVE }} repo
|
||||
- name: Tar up repository
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: tar --posix -c -z -f ${{ env.VERILATOR_ARCHIVE }} repo
|
||||
|
||||
- name: Upload tar archive
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: ${{ github.workspace }}/${{ env.VERILATOR_ARCHIVE }}
|
||||
name: ${{ env.VERILATOR_ARCHIVE }}
|
||||
|
||||
- name: Upload tar archive
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: ${{ github.workspace }}/${{ env.VERILATOR_ARCHIVE }}
|
||||
name: ${{ env.VERILATOR_ARCHIVE }}
|
||||
|
||||
test:
|
||||
needs: build
|
||||
@@ -94,65 +92,55 @@ jobs:
|
||||
matrix:
|
||||
os: [ubuntu-22.04, ubuntu-20.04]
|
||||
compiler:
|
||||
- {cc: clang, cxx: clang++}
|
||||
- {cc: gcc, cxx: g++}
|
||||
reloc: [0]
|
||||
suite: [dist-vlt-0, dist-vlt-1, dist-vlt-2, dist-vlt-3, vltmt-0, vltmt-1]
|
||||
- { cc: clang, cxx: clang++ }
|
||||
- { cc: gcc, cxx: g++ }
|
||||
suite: [dist-vlt-0, dist-vlt-1, dist-vlt-2, vltmt-0, vltmt-1]
|
||||
include:
|
||||
# Test with GCC 10 on ubuntu-20.04, also test relocation
|
||||
- {os: ubuntu-20.04, compiler: {cc: gcc-10, cxx: g++-10}, reloc: 1, suite: dist-vlt-0}
|
||||
- {os: ubuntu-20.04, compiler: {cc: gcc-10, cxx: g++-10}, reloc: 1, suite: dist-vlt-1}
|
||||
- {os: ubuntu-20.04, compiler: {cc: gcc-10, cxx: g++-10}, reloc: 1, suite: dist-vlt-2}
|
||||
- {os: ubuntu-20.04, compiler: {cc: gcc-10, cxx: g++-10}, reloc: 1, suite: dist-vlt-3}
|
||||
- {os: ubuntu-20.04, compiler: {cc: gcc-10, cxx: g++-10}, reloc: 1, suite: vltmt-0}
|
||||
- {os: ubuntu-20.04, compiler: {cc: gcc-10, cxx: g++-10}, reloc: 1, suite: vltmt-1}
|
||||
# Ubuntu 24.04 only on GCC; not passing on clang yet
|
||||
- {os: ubuntu-24.04, compiler: {cc: gcc, cxx: g++}, suite: dist-vlt-0}
|
||||
- {os: ubuntu-24.04, compiler: {cc: gcc, cxx: g++}, suite: dist-vlt-1}
|
||||
- {os: ubuntu-24.04, compiler: {cc: gcc, cxx: g++}, suite: dist-vlt-2}
|
||||
- {os: ubuntu-24.04, compiler: {cc: gcc, cxx: g++}, suite: dist-vlt-3}
|
||||
- {os: ubuntu-24.04, compiler: {cc: gcc, cxx: g++}, suite: vltmt-0}
|
||||
- {os: ubuntu-24.04, compiler: {cc: gcc, cxx: g++}, suite: vltmt-1}
|
||||
# Test with GCC 10 on ubuntu-20.04
|
||||
- {os: ubuntu-20.04, compiler: { cc: gcc-10, cxx: g++-10 }, suite: dist-vlt-0}
|
||||
- {os: ubuntu-20.04, compiler: { cc: gcc-10, cxx: g++-10 }, suite: dist-vlt-1}
|
||||
- {os: ubuntu-20.04, compiler: { cc: gcc-10, cxx: g++-10 }, suite: dist-vlt-2}
|
||||
- {os: ubuntu-20.04, compiler: { cc: gcc-10, cxx: g++-10 }, suite: vltmt-0}
|
||||
- {os: ubuntu-20.04, compiler: { cc: gcc-10, cxx: g++-10 }, suite: vltmt-1}
|
||||
runs-on: ${{ matrix.os }}
|
||||
name: Test | ${{ matrix.os }} | ${{ matrix.compiler.cc }} | ${{ matrix.reloc && 'reloc | ' || '' }} ${{ matrix.suite }}
|
||||
name: Test | ${{ matrix.os }} | ${{ matrix.compiler.cc }} | ${{ matrix.suite }}
|
||||
env:
|
||||
CI_BUILD_STAGE_NAME: test
|
||||
CI_RUNS_ON: ${{ matrix.os }}
|
||||
CI_RELOC: ${{ matrix.reloc }}
|
||||
CC: ${{ matrix.compiler.cc }}
|
||||
CXX: ${{ matrix.compiler.cxx }}
|
||||
CACHE_BASE_KEY: test-${{ matrix.os }}-${{ matrix.compiler.cc }}-${{ matrix.reloc }}-${{ matrix.suite }}
|
||||
CCACHE_MAXSIZE: 100M # Per build per suite (* 5 * 5 = 2500M in total)
|
||||
CACHE_BASE_KEY: test-${{ matrix.os }}-${{ matrix.compiler.cc }}-${{ matrix.suite }}
|
||||
CCACHE_MAXSIZE: 100M # Per build per suite (* 5 * 5 = 2500M in total)
|
||||
VERILATOR_ARCHIVE: verilator-${{ github.sha }}-${{ matrix.os }}-${{ matrix.compiler.cc }}.tar.gz
|
||||
steps:
|
||||
|
||||
- name: Download tar archive
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{ env.VERILATOR_ARCHIVE }}
|
||||
path: ${{ github.workspace }}
|
||||
- name: Download tar archive
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{ env.VERILATOR_ARCHIVE }}
|
||||
path: ${{ github.workspace }}
|
||||
|
||||
- name: Unpack tar archive
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: tar -x -z -f ${{ env.VERILATOR_ARCHIVE }}
|
||||
- name: Unpack tar archive
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: tar -x -z -f ${{ env.VERILATOR_ARCHIVE }}
|
||||
|
||||
- name: Cache $CCACHE_DIR
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
CACHE_KEY: ${{ env.CACHE_BASE_KEY }}-ccache2
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: ${{ env.CACHE_KEY }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ env.CACHE_KEY }}-
|
||||
- name: Cache $CCACHE_DIR
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
CACHE_KEY: ${{ env.CACHE_BASE_KEY }}-ccache
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: ${{ env.CACHE_KEY }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ env.CACHE_KEY }}-
|
||||
|
||||
- name: Install test dependencies
|
||||
run: ./ci/ci-install.bash
|
||||
- name: Install test dependencies
|
||||
run: ./ci/ci-install.bash
|
||||
|
||||
- name: Test
|
||||
env:
|
||||
TESTS: ${{ matrix.suite }}
|
||||
run: ./ci/ci-script.bash
|
||||
- name: Test
|
||||
env:
|
||||
TESTS: ${{ matrix.suite }}
|
||||
run: ./ci/ci-script.bash
|
||||
|
||||
lint-py:
|
||||
runs-on: ubuntu-22.04
|
||||
@@ -161,21 +149,21 @@ jobs:
|
||||
CI_BUILD_STAGE_NAME: build
|
||||
CI_RUNS_ON: ubuntu-22.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: repo
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: repo
|
||||
|
||||
- name: Install packages for build
|
||||
run: ./ci/ci-install.bash
|
||||
- name: Install packages for build
|
||||
run: ./ci/ci-install.bash
|
||||
|
||||
# We use specific version numbers, otherwise a Python package
|
||||
# update may add a warning and break our build
|
||||
- name: Install packages for lint
|
||||
run: sudo pip3 install pylint==3.0.2 ruff==0.1.3 clang sphinx sphinx_rtd_theme sphinxcontrib-spelling breathe ruff
|
||||
- name: Install packages for lint
|
||||
run: sudo pip3 install pylint==3.0.2 ruff==0.1.3 clang sphinx sphinx_rtd_theme sphinxcontrib-spelling breathe ruff
|
||||
|
||||
- name: Configure
|
||||
run: autoconf && ./configure --enable-longtests --enable-ccwarn
|
||||
- name: Configure
|
||||
run: autoconf && ./configure --enable-longtests --enable-ccwarn
|
||||
|
||||
- name: Lint
|
||||
run: make -k lint-py
|
||||
- name: Lint
|
||||
run: make -k lint-py
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
---
|
||||
# DESCRIPTION: Github actions config
|
||||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
#
|
||||
|
||||
name: Contributor Agreement
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
Test:
|
||||
name: "'docs/CONTRIBUTORS' was signed"
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: test_regress/t/t_dist_contributors.py
|
||||
- uses: actions/checkout@v4
|
||||
- run: test_regress/t/t_dist_contributors.pl
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
---
|
||||
# DESCRIPTION: Github actions config
|
||||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
@@ -7,7 +6,7 @@ name: coverage
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 0 * * 0' # weekly
|
||||
- cron: '0 0 * * 0' # weekly
|
||||
|
||||
env:
|
||||
CI_OS_NAME: linux
|
||||
@@ -22,6 +21,7 @@ defaults:
|
||||
|
||||
jobs:
|
||||
|
||||
|
||||
Build:
|
||||
runs-on: ubuntu-22.04
|
||||
env:
|
||||
@@ -29,36 +29,49 @@ jobs:
|
||||
CI_RUNS_ON: ubuntu-22.04
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: repo
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: repo
|
||||
|
||||
- name: Install packages for build
|
||||
run: ./ci/ci-install.bash
|
||||
- name: Install packages for build
|
||||
run: ./ci/ci-install.bash
|
||||
|
||||
- name: Build
|
||||
run: ./ci/ci-script.bash
|
||||
- name: Build
|
||||
run: ./ci/ci-script.bash
|
||||
|
||||
- name: Tar up repository
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: tar --posix -c -z -f ${{ env.VERILATOR_ARCHIVE }} repo
|
||||
- name: Tar up repository
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: tar --posix -c -z -f ${{ env.VERILATOR_ARCHIVE }} repo
|
||||
|
||||
- name: Upload tar archive
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: ${{ github.workspace }}/${{ env.VERILATOR_ARCHIVE }}
|
||||
name: ${{ env.VERILATOR_ARCHIVE }}
|
||||
|
||||
- name: Upload tar archive
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: ${{ github.workspace }}/${{ env.VERILATOR_ARCHIVE }}
|
||||
name: ${{ env.VERILATOR_ARCHIVE }}
|
||||
|
||||
Test:
|
||||
needs: Build
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
test: [vlt-, vltmt-]
|
||||
num: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
|
||||
test:
|
||||
- vlt-
|
||||
- vltmt-
|
||||
num:
|
||||
- 0
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
- 4
|
||||
- 5
|
||||
- 6
|
||||
- 7
|
||||
- 8
|
||||
- 9
|
||||
include:
|
||||
- {test: dist, num: ''}
|
||||
- { test: dist, num: '' }
|
||||
runs-on: ubuntu-22.04
|
||||
name: test-${{ matrix.test }}${{ matrix.num }}
|
||||
env:
|
||||
@@ -66,27 +79,20 @@ jobs:
|
||||
CI_RUNS_ON: ubuntu-22.04
|
||||
steps:
|
||||
|
||||
- name: Download tar archive
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{ env.VERILATOR_ARCHIVE }}
|
||||
path: ${{ github.workspace }}
|
||||
- name: Download tar archive
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ${{ env.VERILATOR_ARCHIVE }}
|
||||
path: ${{ github.workspace }}
|
||||
|
||||
- name: Unpack tar archive
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: tar -x -z -f ${{ env.VERILATOR_ARCHIVE }}
|
||||
- name: Unpack tar archive
|
||||
working-directory: ${{ github.workspace }}
|
||||
run: tar -x -z -f ${{ env.VERILATOR_ARCHIVE }}
|
||||
|
||||
- name: Install test dependencies
|
||||
run: ./ci/ci-install.bash
|
||||
- name: Install test dependencies
|
||||
run: ./ci/ci-install.bash
|
||||
|
||||
- name: Test
|
||||
env:
|
||||
TESTS: coverage-${{ matrix.test }}${{ matrix.num }}
|
||||
run: ./ci/ci-script.bash
|
||||
|
||||
- name: Upload coverage data to Codecov
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
run: |
|
||||
find . -name '*.gcno' -exec rm {} \;
|
||||
./ci/codecov -v upload-process -Z --sha ${{ github.sha }} -f nodist/obj_dir/coverage/app_total.info
|
||||
- name: Test
|
||||
env:
|
||||
TESTS: coverage-${{ matrix.test }}${{ matrix.num }}
|
||||
run: ./ci/ci-script.bash
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
---
|
||||
# Build and push verilator docker image when tags are pushed to the repository.
|
||||
# The following variable(s) must be configured in the github repository:
|
||||
# DOCKER_HUB_NAMESPACE: docker hub namespace.
|
||||
@@ -9,7 +8,7 @@ name: Build Verilator Container
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: ['v*']
|
||||
tags: [ 'v*' ]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
manual_tag:
|
||||
@@ -35,52 +34,52 @@ jobs:
|
||||
# - "ci/docker/buildenv:verilator-buildenv"
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Extract context variables
|
||||
run: |
|
||||
echo "${{ matrix.contexts }}" | sed -r 's/(.*):.*/build_context=\1/' >> "$GITHUB_ENV"
|
||||
echo "${{ matrix.contexts }}" | sed -r 's/.*:(.*)/image_name=\1/' >> "$GITHUB_ENV"
|
||||
echo "git_tag=${GITHUB_REF#refs/*/}" >> "$GITHUB_ENV"
|
||||
- name: Extract context variables
|
||||
run: |
|
||||
echo "${{ matrix.contexts }}" | sed -r 's/(.*):.*/build_context=\1/' >> "$GITHUB_ENV"
|
||||
echo "${{ matrix.contexts }}" | sed -r 's/.*:(.*)/image_name=\1/' >> "$GITHUB_ENV"
|
||||
echo "git_tag=${GITHUB_REF#refs/*/}" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Use manual tag
|
||||
if: ${{ inputs.manual_tag }}
|
||||
run: |
|
||||
echo "git_tag=${{ inputs.manual_tag }}" >> "$GITHUB_ENV"
|
||||
- name: Use manual tag
|
||||
if: ${{ inputs.manual_tag }}
|
||||
run: |
|
||||
echo "git_tag=${{ inputs.manual_tag }}" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Docker meta
|
||||
id: docker_meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: |
|
||||
${{ vars.DOCKER_HUB_NAMESPACE }}/${{ env.image_name }}
|
||||
tags: |
|
||||
type=match,pattern=(v.*),group=1,enable=${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||
type=raw,value=${{ inputs.manual_tag }},enable=${{ inputs.manual_tag != '' }}
|
||||
type=raw,value=latest,enable=${{ inputs.add_latest_tag == true }}
|
||||
- name: Docker meta
|
||||
id: docker_meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: |
|
||||
${{ vars.DOCKER_HUB_NAMESPACE }}/${{ env.image_name }}
|
||||
tags: |
|
||||
type=match,pattern=(v.*),group=1,enable=${{ startsWith(github.ref, 'refs/tags/v') }}
|
||||
type=raw,value=${{ inputs.manual_tag }},enable=${{ inputs.manual_tag != '' }}
|
||||
type=raw,value=latest,enable=${{ inputs.add_latest_tag == true }}
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
with:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
with:
|
||||
buildkitd-flags: --debug
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USER }}
|
||||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_HUB_USER }}
|
||||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
||||
|
||||
- name: Build and Push to Docker
|
||||
uses: docker/build-push-action@v4
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
with:
|
||||
context: ${{ env.build_context }}
|
||||
build-args: SOURCE_COMMIT=${{ env.git_tag }}
|
||||
platforms: linux/arm64,linux/amd64
|
||||
push: ${{ !env.ACT && startsWith(github.ref, 'refs/tags/v') }}
|
||||
tags: ${{ steps.docker_meta.outputs.tags }}
|
||||
labels: ${{ steps.docker_meta.outputs.labels }}
|
||||
- name: Build and Push to Docker
|
||||
uses: docker/build-push-action@v4
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
with:
|
||||
context: ${{ env.build_context }}
|
||||
build-args: SOURCE_COMMIT=${{ env.git_tag }}
|
||||
platforms: linux/arm64,linux/amd64
|
||||
push: ${{ !env.ACT && startsWith(github.ref, 'refs/tags/v') }}
|
||||
tags: ${{ steps.docker_meta.outputs.tags }}
|
||||
labels: ${{ steps.docker_meta.outputs.labels }}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
---
|
||||
# DESCRIPTION: Github actions config
|
||||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
#
|
||||
|
||||
name: format
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request_target:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
format:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
@@ -1,50 +1,55 @@
|
||||
---
|
||||
# DESCRIPTION: Github actions config
|
||||
# This name is key to badges in README.rst, so we use the name build
|
||||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
#
|
||||
|
||||
name: msbuild
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: 0 0 * * 0 # weekly
|
||||
- cron: '0 0 * * 0' # weekly
|
||||
|
||||
env:
|
||||
CI_OS_NAME: win
|
||||
CI_COMMIT: ${{ github.sha }}
|
||||
CCACHE_COMPRESS: 1
|
||||
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
||||
CCACHE_LIMIT_MULTIPLE: 0.95
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: repo
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
windows:
|
||||
|
||||
windows:
|
||||
name: run on windows
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
path: repo
|
||||
- name: Cache $CCACHE_DIR
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: msbuild-msvc-cmake
|
||||
- name: compile
|
||||
env:
|
||||
WIN_FLEX_BISON: ${{ github.workspace }}/.ccache
|
||||
run: ./ci/ci-win-compile.ps1
|
||||
- name: test build
|
||||
run: ./ci/ci-win-test.ps1
|
||||
- name: Zip up repository
|
||||
run: Compress-Archive -LiteralPath install -DestinationPath verilator.zip
|
||||
- name: Upload zip archive
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: ${{ github.workspace }}/repo/verilator.zip
|
||||
name: verilator-win.zip
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
path: repo
|
||||
- name: Cache $CCACHE_DIR
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ env.CCACHE_DIR }}
|
||||
key: msbuild-msvc-cmake
|
||||
- name: compile
|
||||
env:
|
||||
WIN_FLEX_BISON: ${{ github.workspace }}/.ccache
|
||||
run: ./ci/ci-win-compile.ps1
|
||||
- name: test build
|
||||
run: ./ci/ci-win-test.ps1
|
||||
- name: Zip up repository
|
||||
run: Compress-Archive -LiteralPath install -DestinationPath verilator.zip
|
||||
- name: Upload zip archive
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: ${{ github.workspace }}/repo/verilator.zip
|
||||
name: verilator-win.zip
|
||||
|
||||
+4
-10
@@ -29,15 +29,14 @@ dddrun*
|
||||
doxygen-doc
|
||||
gdbrun*
|
||||
gmon.out
|
||||
internals.txt
|
||||
ncverilog.history
|
||||
nohup.out
|
||||
verilator-config-version.cmake
|
||||
verilator-config.cmake
|
||||
verilator.pc
|
||||
internals.txt
|
||||
verilator.txt
|
||||
verilator_bin*
|
||||
verilator_coverage_bin*
|
||||
verilator.pc
|
||||
verilator-config.cmake
|
||||
verilator-config-version.cmake
|
||||
**/__pycache__/*
|
||||
**/_build/*
|
||||
**/obj_dir/*
|
||||
@@ -45,8 +44,3 @@ verilator_coverage_bin*
|
||||
/.idea/
|
||||
/cmake-build-*/
|
||||
/test_regress/snapshot/
|
||||
xmverilog.*
|
||||
xrun.history
|
||||
|
||||
# Normal CMake build directory
|
||||
/build
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
---
|
||||
- id: verilator
|
||||
name: verilator-lint
|
||||
description: Runs verilator Docker image to lint (System) Verilog designs
|
||||
args: [--lint-only]
|
||||
language: docker_image
|
||||
entry: verilator/verilator:latest
|
||||
types_or: [verilog, system-verilog]
|
||||
@@ -1,4 +0,0 @@
|
||||
[style]
|
||||
based_on_style = pep8
|
||||
column_limit = 99
|
||||
#split_before_arithmetic_operator=True
|
||||
@@ -1,27 +0,0 @@
|
||||
# See https://citation-file-format.github.io/
|
||||
cff-version: 1.2.0
|
||||
title: Verilator
|
||||
message: >-
|
||||
If you use this software, please cite it using the
|
||||
metadata from this file.
|
||||
type: software
|
||||
authors:
|
||||
- given-names: Wilson
|
||||
family-names: Snyder
|
||||
email: [email protected]
|
||||
affiliation: Veripool
|
||||
- given-names: Paul
|
||||
family-names: Wasson
|
||||
- given-names: Duane
|
||||
family-names: Galbi
|
||||
- name: 'et al'
|
||||
repository-code: 'https://github.com/verilator/verilator'
|
||||
url: 'https://verilator.org'
|
||||
abstract: >-
|
||||
The Verilator package converts Verilog and SystemVerilog hardware
|
||||
description language (HDL) designs into a fast C++ or SystemC model
|
||||
that, after compiling, can be executed. Verilator is not a
|
||||
traditional simulator but a compiler.
|
||||
license:
|
||||
- LGPL-3.0-only
|
||||
- Artistic-2.0
|
||||
+35
-81
@@ -4,7 +4,7 @@
|
||||
#
|
||||
#*****************************************************************************
|
||||
#
|
||||
# Copyright 2003-2025 by Wilson Snyder. This program is free software; you
|
||||
# Copyright 2003-2024 by Wilson Snyder. This program is free software; you
|
||||
# can redistribute it and/or modify it under the terms of either the GNU
|
||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||
# Version 2.0.
|
||||
@@ -14,49 +14,36 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
cmake_policy(SET CMP0091 NEW) # Use MSVC_RUNTIME_LIBRARY to select the runtime
|
||||
project(
|
||||
Verilator
|
||||
VERSION 5.034
|
||||
project(Verilator
|
||||
VERSION 5.022
|
||||
HOMEPAGE_URL https://verilator.org
|
||||
LANGUAGES CXX
|
||||
)
|
||||
|
||||
# Set default build type to Release if not specified
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build type" FORCE)
|
||||
endif()
|
||||
|
||||
option(
|
||||
DEBUG_AND_RELEASE_AND_COVERAGE
|
||||
"Builds both the debug and release binaries, overriding CMAKE_BUILD_TYPE. Not supported under MSBuild."
|
||||
)
|
||||
option(DEBUG_AND_RELEASE_AND_COVERAGE
|
||||
"Builds both the debug and release binaries, overriding CMAKE_BUILD_TYPE. Not supported under MSBuild.")
|
||||
|
||||
find_package(Python3 COMPONENTS Interpreter)
|
||||
set(PYTHON3 ${Python3_EXECUTABLE})
|
||||
# See also CMake built-in; CMAKE_INSTALL_PREFIX is applied by the install command.
|
||||
set(CMAKE_INSTALL_DATADIR .)
|
||||
set(PYTHON3 Python3::Interpreter)
|
||||
set(CMAKE_INSTALL_DATADIR ${CMAKE_INSTALL_PREFIX})
|
||||
include(GNUInstallDirs)
|
||||
include(CMakePackageConfigHelpers)
|
||||
include(CheckStructHasMember)
|
||||
include(ExternalProject)
|
||||
include(FindThreads)
|
||||
|
||||
if(NOT WIN32)
|
||||
if (NOT WIN32)
|
||||
message(WARNING "CMake support on Linux/OSX is experimental.")
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
if(DEFINED ENV{WIN_FLEX_BISON})
|
||||
if (WIN32)
|
||||
if (DEFINED ENV{WIN_FLEX_BISON})
|
||||
set(WIN_FLEX_BISON "$ENV{WIN_FLEX_BISON}")
|
||||
endif()
|
||||
if(EXISTS ${WIN_FLEX_BISON})
|
||||
if (EXISTS ${WIN_FLEX_BISON})
|
||||
list(APPEND CMAKE_PREFIX_PATH ${WIN_FLEX_BISON})
|
||||
endif()
|
||||
if(NOT WIN_FLEX_BISON)
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"Please install https://github.com/lexxmark/winflexbison and set WIN_FLEX_BISON environment variable. Please use install cmake target after a successful build."
|
||||
)
|
||||
if (NOT WIN_FLEX_BISON)
|
||||
message(FATAL_ERROR "Please install https://github.com/lexxmark/winflexbison and set WIN_FLEX_BISON environment variable. Please use install cmake target after a successful build.")
|
||||
endif()
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
endif()
|
||||
@@ -64,25 +51,20 @@ endif()
|
||||
set(OBJCACHE "" CACHE STRING "Path for ccache, auto-detected if empty")
|
||||
option(OBJCACHE_ENABLED "Compile Verilator with ccache" ON)
|
||||
|
||||
if(OBJCACHE_ENABLED)
|
||||
if(OBJCACHE STREQUAL "")
|
||||
if (OBJCACHE_ENABLED)
|
||||
if (OBJCACHE STREQUAL "")
|
||||
find_program(OBJCACHE_PATH ccache)
|
||||
if(OBJCACHE_PATH STREQUAL "OBJCACHE_PATH-NOTFOUND")
|
||||
if (OBJCACHE_PATH STREQUAL "OBJCACHE_PATH-NOTFOUND")
|
||||
set(OBJCACHE_PATH "")
|
||||
endif()
|
||||
else()
|
||||
set(OBJCACHE_PATH "${OBJCACHE}")
|
||||
endif()
|
||||
if(NOT OBJCACHE_PATH STREQUAL "")
|
||||
execute_process(
|
||||
COMMAND "${OBJCACHE_PATH}" --version
|
||||
OUTPUT_VARIABLE objcache_version
|
||||
)
|
||||
if (NOT OBJCACHE_PATH STREQUAL "")
|
||||
execute_process(COMMAND "${OBJCACHE_PATH}" --version
|
||||
OUTPUT_VARIABLE objcache_version)
|
||||
string(REGEX MATCH "[^\n\r]+" objcache_version "${objcache_version}")
|
||||
message(
|
||||
STATUS
|
||||
"Found ccache: ${OBJCACHE_PATH} (\"${objcache_version}\")"
|
||||
)
|
||||
message(STATUS "Found ccache: ${OBJCACHE_PATH} (\"${objcache_version}\")")
|
||||
set(CMAKE_CXX_COMPILER_LAUNCHER "${OBJCACHE_PATH}")
|
||||
endif()
|
||||
endif()
|
||||
@@ -93,8 +75,8 @@ find_package(FLEX)
|
||||
# Build
|
||||
#set_property(GLOBAL PROPERTY JOB_POOLS one_job=1)
|
||||
|
||||
if(DEBUG_AND_RELEASE_AND_COVERAGE)
|
||||
if(CMAKE_GENERATOR MATCHES "^Visual Studio ")
|
||||
if (DEBUG_AND_RELEASE_AND_COVERAGE)
|
||||
if (CMAKE_GENERATOR MATCHES "^Visual Studio ")
|
||||
error("%Error: The DEBUG_AND_RELEASE_AND_COVERAGE option is not supported in MSBuild-based builds.")
|
||||
endif()
|
||||
set(saved_build_type ${CMAKE_BUILD_TYPE})
|
||||
@@ -113,72 +95,44 @@ endif()
|
||||
|
||||
set(PACKAGE_NAME ${PROJECT_NAME})
|
||||
set(PACKAGE_VERSION ${PROJECT_VERSION})
|
||||
set(CXX ${CMAKE_CXX_COMPILER})
|
||||
set(AR ${CMAKE_AR})
|
||||
|
||||
configure_file(include/verilated_config.h.in include/verilated_config.h @ONLY)
|
||||
configure_file(include/verilated.mk.in include/verilated.mk @ONLY)
|
||||
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/include/verilated_config.h
|
||||
DESTINATION include
|
||||
)
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/include/verilated.mk
|
||||
DESTINATION include
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/include/verilated_config.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include)
|
||||
|
||||
configure_package_config_file(verilator-config.cmake.in verilator-config.cmake
|
||||
INSTALL_DESTINATION ${CMAKE_INSTALL_PREFIX}
|
||||
)
|
||||
|
||||
configure_package_config_file(
|
||||
verilator-config.cmake.in
|
||||
verilator-config.cmake
|
||||
INSTALL_DESTINATION .
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/verilator-config.cmake DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
|
||||
configure_package_config_file(verilator-config-version.cmake.in verilator-config-version.cmake
|
||||
INSTALL_DESTINATION ${CMAKE_INSTALL_PREFIX}
|
||||
)
|
||||
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/verilator-config.cmake
|
||||
DESTINATION .
|
||||
)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/verilator-config-version.cmake DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
|
||||
configure_package_config_file(
|
||||
verilator-config-version.cmake.in
|
||||
verilator-config-version.cmake
|
||||
INSTALL_DESTINATION .
|
||||
)
|
||||
|
||||
install(
|
||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/verilator-config-version.cmake
|
||||
DESTINATION .
|
||||
)
|
||||
|
||||
foreach(
|
||||
program
|
||||
foreach (program
|
||||
verilator
|
||||
verilator_gantt
|
||||
verilator_ccache_report
|
||||
verilator_difftree
|
||||
verilator_profcfunc
|
||||
verilator_includer
|
||||
)
|
||||
install(PROGRAMS bin/${program} TYPE BIN)
|
||||
endforeach()
|
||||
|
||||
install(
|
||||
DIRECTORY examples
|
||||
TYPE DATA
|
||||
FILES_MATCHING
|
||||
install(DIRECTORY examples TYPE DATA FILES_MATCHING
|
||||
PATTERN "examples/*/*.[chv]*"
|
||||
PATTERN "examples/*/Makefile*"
|
||||
PATTERN "examples/*/CMakeLists.txt"
|
||||
)
|
||||
|
||||
install(
|
||||
DIRECTORY include
|
||||
TYPE DATA
|
||||
FILES_MATCHING
|
||||
install(DIRECTORY include TYPE DATA FILES_MATCHING
|
||||
PATTERN "include/verilated_config.h"
|
||||
PATTERN "include/verilated.mk"
|
||||
PATTERN "include/*.[chv]"
|
||||
PATTERN "include/*.cpp"
|
||||
PATTERN "include/*.vlt"
|
||||
PATTERN "include/*.sv"
|
||||
PATTERN "include/gtkwave/*.[chv]*"
|
||||
PATTERN "include/vltstd/*.[chv]*"
|
||||
|
||||
@@ -8,426 +8,6 @@ The changes in each Verilator version are described below. The
|
||||
contributors that suggested a given feature are shown in []. Thanks!
|
||||
|
||||
|
||||
Verilator 5.034 2025-02-24
|
||||
==========================
|
||||
|
||||
**Important:**
|
||||
|
||||
* This is likely the last version to support Ubuntu 20.04, which is at end-of-life.
|
||||
* Add expression coverage (#4677) (#5719). [Todd Strader]
|
||||
|
||||
**Other:**
|
||||
|
||||
* Add `COVERIGN` warning, as a more specific UNSUPPORTED error.
|
||||
* Add `--public-ignore` to ignore public metacomments (#5716). [Andrew Nolte]
|
||||
* Add `--preproc-token-limit` (#5768). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Add lint error on importing package within a class (#5634) (#5679). [Nick Brereton]
|
||||
* Add `--preproc-resolve` for modules in preprocessor output (#5789). [Kamil Rakoczy, Antmicro Ltd.]
|
||||
* Support multidimensional array access via VPI (#2812) (#5573). [Krzysztof Starecki]
|
||||
* Support nested classes (#4178) (#5778). [Kamil Rakoczy, Antmicro Ltd.]
|
||||
* Support VPI array accessors (#5612). [Moubarak Jeje]
|
||||
* Support unpacked structure constrained randomization (#5657) (#5759). [Yilou Wang]
|
||||
* Support generated classes (#5665). [Shou-Li Hsu]
|
||||
* Support constraints on associative array user-defined keys (#5671) (#5729). [Yilou Wang]
|
||||
* Support `+incdir` with multiple directories.
|
||||
* Support integer atom type ports in `--hierarchical` (#5748). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||
* Support constrained random for arrays in structs (#5765) (#5802). [Yilou Wang]
|
||||
* Support selects on arbitrary string expressions (#5773). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Support side effects of form 'variable[index_function()]++'.
|
||||
* Improve hierarchical DPI wrapper scheduling performance (#2583) (#5734). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||
* Improve VPI write errors (#5712). [Andrew Nolte]
|
||||
* Improve `resetall support (#5728) (#5730). [Ethan Sifferman]
|
||||
* Optimize labels as final `if` block statements (#5744).
|
||||
* Optimize empty function definition bodies (#5750).
|
||||
* Optimize splitting trigger computation and dump (#5798). [Geza Lore]
|
||||
* Fix error message when call task as a function (#3089). [Matthew Ballance]
|
||||
* Fix force VPI public signal visibility (#5225). [Frédéric Requin]
|
||||
* Fix VPI iteration over hierarchy (#5314) (#5731). [Natan Kreimer]
|
||||
* Fix constrained random for > 64-bit associative arrays (#5670) (#5682). [Yilou Wang]
|
||||
* Fix mis-optimizing away `$urandom` (#5703). [Parker Schless]
|
||||
* Fix packages with `--public-depth 1` (#5708). [Andrew Nolte]
|
||||
* Fix V3Simulate constant reuse (#5709). [Geza Lore]
|
||||
* Fix man pages what-is section (#5710). [Ahmed El-Mahmoudy]
|
||||
* Fix pattern assignment to real inside struct (#5713).
|
||||
* Fix %p format output for real inside struct (#5713).
|
||||
* Fix segfault when only enum value referenced in package (#5714). [Dan Katz]
|
||||
* Fix `BLKSEQ` on suspendable processes (#5722). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Fix vpiDefName issues with non-inlined scopes and dpi conflicts (#5732). [Andrew Nolte]
|
||||
* Fix inlined expression with assignment under LHS of NBA (#5736) (#5740). [Geza Lore]
|
||||
* Fix duplicate-named class variable equivalence (#5737).
|
||||
* Fix `-j` ignored after `-f` (#5749). [Luca Colagrande]
|
||||
* Fix handling forced assigns in V3Life (#5757). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||
* Fix VFileContent reference count (#5769) (#5771). [Dave Sargeant]
|
||||
* Fix ignoring joins in stringify in preprocessor (#5777). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Fix unpacked split_var (#5782) (#5785). [Yutetsu TAKATSUKASA]
|
||||
* Fix time import error on time parameters (#5786). [Luca Colagrande]
|
||||
* Fix dpi context functions (#5788). [Ryszard Rozak, Antmicro Ltd.]
|
||||
* Fix `$monitor` with dotted references (#5794). [Ahmed Elzeftawi]
|
||||
* Fix parsing input wire with default and range (#5800). [RJ Cunningham]
|
||||
* Fix matching language extension options including dots.
|
||||
|
||||
|
||||
Verilator 5.032 2025-01-01
|
||||
==========================
|
||||
|
||||
**Minor:**
|
||||
|
||||
* Support queue's assignment `push_back/push_front('{})` (#5585) (#5586). [Yilou Wang]
|
||||
* Support basic constrained random for multi-dimensional dynamic array and queue (#5591). [Yilou Wang]
|
||||
* Support vpiDefName (#3906) (#5572). [Krzysztof Starecki]
|
||||
* Support parameter names in pattern initialization (#5593) (#5596). [Greg Davill]
|
||||
* Support randomize size constraints with restrictions (#5582 partial) (#5611). [Ryszard Rozak, Antmicro Ltd.]
|
||||
* Support associative array basic constrained randomization (#5658) (#5670). [Yilou Wang]
|
||||
* Support `default disable iff` and `$inferred_disable` (#4016). [Srinivasan Venkataramanan]
|
||||
* Support `extern constraint` and `pure constraint`.
|
||||
* Add `--no-std-waiver` and default reading of standard lint waivers file (#5607).
|
||||
* Add `--no-std-package` as subset-alias of `--no-std` (#5607).
|
||||
* Add `lint_off --contents` in configuration files (#5606).
|
||||
* Add `--waiver-multiline` for context-sensitive `--waiver-output` (#5608).
|
||||
* Add `--fno-inline-funcs` to disable function inlining.
|
||||
* Add `--fno-slice` to disable array assignment slicing (#5644).
|
||||
* Add error on illegal enum base type (#3010). [Iztok Jeras]
|
||||
* Add error on `wait` with missing `.triggered` (#4457).
|
||||
* Add error when improperly storing to parameter (#5147). [Gökçe Aydos]
|
||||
* Add error on illegal `--prefix` etc. values (#5507). [Fabian Keßler]
|
||||
* Add error on `--savable --timing` (#5690). [Narcis Rodas]
|
||||
* Add coverage point hierarchy to coverage reports (#5575) (#5576). [Andrew Nolte]
|
||||
* Add warning on global constraints (#5625). [Ryszard Rozak, Antmicro Ltd.]
|
||||
* Add default CMAKE_BUILD_TYPE (#5691) (#5692). [Anthony Moore]
|
||||
* Add error on `solve before` or soft constraints of `randc` variable.
|
||||
* Improve concatenation performance (#5598) (#5599) (#5602). [Geza Lore]
|
||||
* Improve optimization of duplicate wide expressions (#5637). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||
* Fix dotted reference in delay value (#2410).
|
||||
* Fix `function fork...join_none` regression with unknown type (#4449).
|
||||
* Fix public_module requiring a wire to become public (#4916). [Andrew Nolte]
|
||||
* Fix --hierarchical on projects with dot-f dependency lists (#5199) (#5669). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||
* Fix can't locate scope error in interface task delayed assignment (#5462) (#5568). [Zhou Shen]
|
||||
* Fix BLKANDNBLK for for VARXREFs (#5569). [Todd Strader]
|
||||
* Fix VPI error instead of fatal for vpi_get_value() on large signals (#5571). [Todd Strader]
|
||||
* Fix --output-groups leftover files issue (#5574). [Todd Strader]
|
||||
* Fix slow unsized number parsing (#5577). [Geza Lore]
|
||||
* Fix negative assignment pattern keys (#5580). [Iztok Jeras]
|
||||
* Fix duplicate scope identifiers decoding (#5584). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||
* Fix `rand` dynamic arrays with null handles (#5594). [Ryszard Rozak, Antmicro Ltd.]
|
||||
* Fix NBAs to unpacked arrays of unpacked structs (#5603). [Geza Lore]
|
||||
* Fix array of struct member overwrites on member update (#5605) (#5618) (#5628). [sumpster]
|
||||
* Fix interface and struct pattern collision (#5639) (#5640). [Todd Strader]
|
||||
* Fix mis-aliasing of instances with mailbox parameter types (#5632 partial).
|
||||
* Fix error on duplicated declaration of gen block (#5663). [Ryszard Rozak, Antmicro Ltd.]
|
||||
* Fix wildcard equality and inside operators for non-fourstate expressions (#5673). [Ryszard Rozak, Antmicro Ltd.]
|
||||
* Fix `randomize..with` of parameterized classes (#5676). [Ryszard Rozak, Antmicro Ltd.]
|
||||
* Fix interface bracketed array parameter access (#5677) (#5678). [Todd Strader]
|
||||
* Fix width extension of operands of `inside` operator (#5685). [Ryszard Rozak, Antmicro Ltd.]
|
||||
* Fix VPI + SYMRSVDWORD intersection (#5686). [Todd Strader]
|
||||
* Fix verilator_gantt for hierarchically Verilated models (#5700). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||
|
||||
|
||||
Verilator 5.030 2024-10-27
|
||||
==========================
|
||||
|
||||
**Major:**
|
||||
|
||||
* Add `-output-groups` to build with concatenated .cpp files (#5257). [Mariusz Glebocki]
|
||||
* Self-tests have been converted to Python, run `{test_name}.py` instead of `{test_name}.pl`.
|
||||
|
||||
**Minor:**
|
||||
|
||||
* Change .vlt config files to be read before .v files (#5185). [David Moberg]
|
||||
* Change to use maximum for cover point aggregation (#5402). [Andrew Nolte]
|
||||
* Change `--main` and `--binary` to use a TOP hierarchy name of "" (#5482).
|
||||
* Change install of public executables into bindir instead of pkgdatadir (#5140) (#5544). [Geza Lore]
|
||||
* Support IEEE-compliant intra-assign delays (#3711) (#5441). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Support `wor`, `trior`, `wand`, `triand` (#5386) (#5496). [Zhou Shen]
|
||||
* Support unconstrained randomization for unions (#5395) (#5396). [Yilou Wang]
|
||||
* Support basic constrained queue randomization (#5413). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||
* Support packed/unpacked and dynamic array unconstrained randomization (#5414) (#5415). [Yilou Wang]
|
||||
* Support appending to queue via `[]` (#5421). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Support named event locals (#5422). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Support basic `dist` constraints (#5431). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||
* Support unpacked array constrained randomization (#5437) (#5489). [Yilou Wang]
|
||||
* Support inside array constraints (#5448). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||
* Support DPI imports and exports with double underscores (#5481).
|
||||
* Support ccache when compiling Verilated files with cmake.
|
||||
* Support `local` and `protected` on `typedef` (#5460).
|
||||
* Support unconstrained randomization for associative array and queue (#5515). [Yilou Wang]
|
||||
* Support `rand` dynamic arrays of objects (#5557) (#5564). [Ryszard Rozak, Antmicro Ltd.]
|
||||
* Add error on misused genvar (#408). [Alex Solomatnikov]
|
||||
* Add error on instances without parenthesis.
|
||||
* Add Docker pre-commit hook (#5238) (#5452). [Chris Bachhuber]
|
||||
* Add partial coverage symbol and branch data in lcov info files (#5388). [Andrew Nolte]
|
||||
* Add method to check if there are VPI callbacks of the given type (#5399). [Kaleb Barrett]
|
||||
* Remove warning on unsized numbers exceeding 32-bits.
|
||||
* Improve Verilation thread pool (#5161). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||
* Improve performance of V3VariableOrder with parallelism (#5406). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||
* Improve parser error handling (#5493). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||
* Improve process trigger performance (#5483). [Geza Lore]
|
||||
* Fix suppression of WIDTH* warnings when immediately under a size cast (#3417).
|
||||
* Fix `$fatal` to not be affected by `+verilator+error+limit` (#5135). [Gökçe Aydos]
|
||||
* Fix equivalence checking when replacing type parameters (#5213) (#5255). [Han Qi]
|
||||
* Fix display with multiple string formats (#5311). [Luiza de Melo]
|
||||
* Fix performance of V3Trace when many activity blocks (#5372). [Deniz Güzel]
|
||||
* Fix REALCVT warning on integral timescale conversions (#5378). [Liam Braun]
|
||||
* Fix multidimensional function return value selects (#5382). [Gökçe Aydos]
|
||||
* Fix internal error in out-of-range select (#5393) (#5443). [Geza Lore]
|
||||
* Fix dot fallback finding wrong symbols (#5394). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||
* Fix infinite recursion due to recursive functions/tasks (#5398). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Fix V3Randomize compile error on old GCC (#5403) (#5417). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Fix extra events in traces (#5405).
|
||||
* Fix empty `foreach` in `if` in constraints (#5408). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Fix queue `[$-i]` select as reference argument (#5411). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Fix `pre`/`post_randomize` on `randomize() with` (#5412). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Fix capturing params in `randomize() with` (#5416) (#5418). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Fix `sformatf` internal error on initial automatics (#5423). [Todd Strader]
|
||||
* Fix clearing trigger of events with no sensitivity trees (#5426). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||
* Fix driving clocking block in reactive region (#5430). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Fix associative array next/prev/first/last mis-propagating constants (#5435). [Ethan Sifferman]
|
||||
* Fix randomize treated as std::randomize in classes (#5436). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||
* Fix `foreach` colliding index names (#5444). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||
* Fix fault on defparam with UNSUPPORTED ignored (#5450). [Luiza de Melo]
|
||||
* Fix class reference with pin that is a class reference (#5454).
|
||||
* Fix not reporting class reference with extra parameters (#5467).
|
||||
* Fix user-type parameter overlap (#5469). [Todd Strader]
|
||||
* Fix tracing when name() is empty (#5470). [Sam Shahrestani]
|
||||
* Fix timing mode not exiting on empty events (#5472).
|
||||
* Fix coverage counts missing due to table optimization (#5473) (#5474). [Vito Gamberini]
|
||||
* Fix `--binary` with .cpp PLI filenames under relative directory paths.
|
||||
* Fix extra dot in coverage point hierarchy when using name()=''.
|
||||
* Fix short-circuiting with associative array access (#5484). [Ethan Sifferman]
|
||||
* Fix short-circuiting on method calls (#5486). [Ethan Sifferman]
|
||||
* Fix exponential concatenate performance (#5488). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||
* Fix V3Table trying to generate 'x' bits in the lookup table. (#5491). [Geza Lore]
|
||||
* Fix randomize with foreach constraints (#5492). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||
* Fix explicit CMAKE_INSTALL_PREFIX usages (#5500). [Fabian Keßler]
|
||||
* Fix configure inserting absolute paths for Python and Perl (#5504) (#5505). [Nathan Graybeal]
|
||||
* Fix pattern initialization with typedef key (#5512). [Eugene Feinberg]
|
||||
* Fix `-j` option without argument in hierarchical Verilation (#5514). [Ryszard Rozak, Antmicro Ltd.]
|
||||
* Fix `foreach` with 2-D queues and dynamic arrays (#5525) (#5529). [Yilou Wang]
|
||||
* Fix struct array assignment (#5455) (#5537). [Yilou Wang]
|
||||
* Fix copy constructor of classes that use std::process (#5528). [Ryszard Rozak, Antmicro Ltd.]
|
||||
* Fix foreach on associative array (#5530). [Yilou Wang]
|
||||
* Fix multi-range indices assignment (#5534) (#5547). [Yilou Wang]
|
||||
* Fix static function wrappers (#5536). [Ryszard Rozak, Antmicro Ltd.]
|
||||
* Fix assignments of concatenation to queues and dynamic arrays (#5540). [Ryszard Rozak, Antmicro Ltd.]
|
||||
* Fix container reduction methods (#5542). [Krzysztof Boroński]
|
||||
* Fix complex user type problem with `--x-assign` (#5543). [Todd Strader]
|
||||
* Fix long module names crashing string handling (#5546). [Filip Badáň]
|
||||
* Fix array trace splitting (#5549). [Todd Strader]
|
||||
* Fix queue element access (#5551). [Ryszard Rozak, Antmicro Ltd.]
|
||||
* Fix struct literal on pattern assignment (#5552) (#5559). [Todd Strader]
|
||||
* Fix build on gcc when using the Spack wrapper (#5555). [Eric Müller]
|
||||
* Fix enum name method (#5563). [Todd Strader]
|
||||
* Fix `$countbits` in assert with non-tristates (#5566). [Shou-Li Hsu]
|
||||
* Fix missing VlProcess handle in coroutines with splits (#5623) (#5650). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||
* Fix imported array assignment literals (#5642) (#5648). [Todd Strader]
|
||||
* Fix foreach mixed array (#5655) (#5656). [Yilou Wang]
|
||||
|
||||
|
||||
Verilator 5.028 2024-08-21
|
||||
==========================
|
||||
|
||||
**Minor:**
|
||||
|
||||
* Support state-dependent constraints (#5217). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||
* Support cross-module clocking variable access (#5184). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||
* Support inline constraints for class randomization methods (#5234). [Krzysztof Boroński]
|
||||
* Support clocking blocks in virtual interfaces (#5235). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||
* Support `$assertcontrol` assertion_type (#5236). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||
* Support conditional constraints (#5245). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||
* Support`--compiler-include` headers in user-supplied cpp files (#5271). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||
* Support `rand_mode` (#5273). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Support `this.randomize with` (#5282). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||
* Support foreach constraints (#5302). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||
* Support `parameter type` in hierarchical blocks (#5309) (#5333). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||
* Support assertcontrol directive type (#5310). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||
* Support inline random variable control (#5317). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Support streaming operator on arrays and wide data (#5326). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||
* Support streams to/from arrays of wide data (#5334). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||
* Support `constraint_mode` (#5338). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Support constraining AstSel (#5344). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||
* Support default value on module input (#5358) (#5373). [Drew Ranck]
|
||||
* Add `--compiler-include` for additional C++ includes (#5139) (#5202). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||
* Add `--emit-accessors` (#5182) (#5227). [Ryan Ziegler]
|
||||
* Add suggestions on misspelled PLI functions.
|
||||
* Add warning on dist in constraints (#5264). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||
* Add more `rand_mode` unsupported errors (#5329). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Add parsing but otherwise ignore std::randomize (#5354). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||
* Add Verilated cc define when `--timing` used (#5383). [Kaleb Barrett]
|
||||
* Improve emitted code to use a reference for VlSelf (#5254). [Yangyu Chen]
|
||||
* Fix monitor block sensitivity items (#4400) (#5294). [Udaya Raj Subedi]
|
||||
* Fix fusing macro arguments to not ignore whitespace (#5061). [Tudor Timi]
|
||||
* Fix optimized-out sensitivity trees with `--timing` (#5080) (#5349). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Fix classes/modules of case-similar names (#5109). [Arkadiusz Kozdra]
|
||||
* Fix mis-removing $value$plusargs calls (#5127) (#5137). [Seth Pellegrino]
|
||||
* Fix incorrect result of width mismatch (#5186) (#5189). [Yutetsu TAKATSUKASA]
|
||||
* Fix compiler coroutine check (#5190) (#5300). [Ricardo Barbedo]
|
||||
* Fix shortened module names when searching for files (#5196) (#5246). [Tim Hutt]
|
||||
* Fix `--x-assign` to be independent from `+verilator+rand+reset` (#5214). [Andrew Nolte]
|
||||
* Fix splitting if statements with impure conditions (#5219). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||
* Fix unknown conversion on queues (#5220). [Alex Solomatnikov]
|
||||
* Fix top-level unpacked structure resets (#5221).
|
||||
* Fix concurrency for mailbox and semaphores (#5222). [Liam Braun]
|
||||
* Fix forks capturing non-input ports in tasks (#5237) (#5343). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Fix toggle coverage aggregation on same line (#5248). [Krzysztof Obłonczek]
|
||||
* Fix error on empty generate with -O0 (#5250).
|
||||
* Fix unconstrained randomization of unpacked structs (#5252). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Fix inlining of variables driven from forced vars (#5259). [Geza Lore]
|
||||
* Fix tracing with `--main-top-name -` (#5261). [Ethan Sifferman]
|
||||
* Fix randomization when used with inheritance (#5268). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Fix inline constraints creating class random generator (#5280). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Fix WIDTHEXPAND on left shift of intuitive amount (#5284). [Greg Taylor]
|
||||
* Fix elaborating foreach loops (#5285). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||
* Fix initializing static array in dynamic arrays and queues (#5287). [Baruch Sterin]
|
||||
* Fix static variable initializers in procedures (#5296). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||
* Fix randomizing current object with `rand` class instance member (#5292). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Fix handling of rand fields not referenced in constraints (#5305). [Ryszard Rozak, Antmicro Ltd.]
|
||||
* Fix Python3 path discovery in make flows to avoid mixing system and user python interpreters (#5307) [Markus Krause]
|
||||
* Fix make flows to pass PYTHON3 (like PERL) (#5307) (#5308). [Markus Krause]
|
||||
* Fix assert on wide expression (#5319) (#5324). [Varun Koyyalagunta]
|
||||
* Fix output clock variable overwriting signal (#5320) (#5347). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Fix stringify in nested preprocessor macros (#5323). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Fix $sformat with array arguments (#5330). [Abe Jordan]
|
||||
* Fix -Wunused-but-set-variable clang warning (#5331). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||
* Fix purity of functions with AstJumpBlock or AstStmtExpr (#5332). [Ryszard Rozak, Antmicro Ltd.]
|
||||
* Fix compilation error on unreachable disable fork / wait fork (#5339). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||
* Fix missing type coercion in 'inside {array}' (#5340). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||
* Fix +: and -: unpacked array slicing when array has nonzero low index (#5345) (#5387). [James Bailey]
|
||||
* Fix tracing_{on,off} in the presence of non-inlined modules (#5346). [Geza Lore]
|
||||
* Fix NBAs in suspendables (#5348). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Fix lint_off on Errors (#5351) (#5363). [Ethan Sifferman]
|
||||
* Fix cache config file resolution performance (#5369). [Geza Lore]
|
||||
* Fix capturing fields from superclass in `randomize() with` (#5389). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Fix virtual interface null checks (#5391). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Fix ==? and !=? with X values.
|
||||
* Fix CPU time being zero.
|
||||
* Fix inline function ref port persistence.
|
||||
|
||||
|
||||
Verilator 5.026 2024-06-15
|
||||
==========================
|
||||
|
||||
**Major:**
|
||||
|
||||
* Support constrained randomization with external solvers (#4947). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||
|
||||
**Minor:**
|
||||
|
||||
* Support `$psprintf` system function (#4314) (#5169). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||
* Support 2D dynamic array initialization (#4700) (#5122). [Valentin Atepalikhin]
|
||||
* Support __en/__out signals on top level inout ports (#4812) (#4856). [Paul Wright]
|
||||
* Support empty queue as dynarray default value (#5055). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||
* Support vpiInertialDelay (#5087). [Todd Strader]
|
||||
* Support NBAs to arrays inside loops (#5092). [Geza Lore]
|
||||
* Support parsing and otherwise ignoring inline constraints (#5126). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||
* Support `inout` clocking items (#5160). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||
* Support StructSel in unpacked array assignments (#5176). [Geza Lore]
|
||||
* Add error on zero width select (#5028).
|
||||
* Add CITATION.cff (#5057) (#5058). [Gijs Burghoorn]
|
||||
* Add VPI eval needed tracking (#5065). [Todd Strader]
|
||||
* Add `--localize-max-size` option and optimization (#5072).
|
||||
* Add parameterless assert control system tasks (#5010). [Bartłomiej Chmiel]
|
||||
* Add traceCapable indication to model header (#5053). [Vito Gamberini]
|
||||
* Add increasing of stack size when possible (#5071) (#5104). [Yinan Xu]
|
||||
* Add assertion on reusing VerilatedContext (#5167).
|
||||
* Add `--pins-sc-uint-bool` to force SystemC uint type (#5192). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||
* Improve DFG regularization in cyclic graphs (#5142). [Geza Lore]
|
||||
* Improve VerilatedVpiPutHolder storage requirements (#5144). [Kaleb Barrett]
|
||||
* Fix coroutines without awaits to have a co_return (#4208) (#5175). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||
* Fix missing flex include path variable (#4970) (#4971). [Christopher Taylor]
|
||||
* Fix missing parameters with comma to be errors (#4979) (#5012). [Paul Swirhun]
|
||||
* Fix 'experimental/coroutine' file not found on MacOS (#5030) (#5031) (#5151). [Paul Bowen-Huggett]
|
||||
* Fix bound queue printing (#5032). [Aleksander Kiryk, Antmicro Ltd.]
|
||||
* Fix consecutive zero-delays (#5038). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Fix attempted to destroy locked thread pool error (#5040). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||
* Fix `$system` with string argument (#5042).
|
||||
* Fix width extension on delays (#5043).
|
||||
* Fix `$typename` on array.min and others (#5049). [Gökçe Aydos]
|
||||
* Fix `make $(info)` which cannot be silenced (#5059). [Gökçe Aydos]
|
||||
* Fix CMake builds to export VERILATOR_ROOT (#5063). [Michael Bikovitsky]
|
||||
* Fix false ASSIGNIN on functions with explicit port map (#5069).
|
||||
* Fix 4-state value support for $readmem (#5070) (#5078). [Ethan Sifferman]
|
||||
* Fix DFG assertion with SystemC (#5076). [Geza Lore]
|
||||
* Fix `$typename` string to be more standard (#5082) (#5083). [Andrew Nolte]
|
||||
* Fix missed optimization in V3Delayed (#5089). [Geza Lore]
|
||||
* Fix macro expansion in strings per 1800-2023 (#5094). [Geza Lore]
|
||||
* Fix width extension of unpacked array select (#5095). [Varun Koyyalagunta]
|
||||
* Fix MacOS missing <type_traits> header (#5096) (#5097). [Vito Gamberini]
|
||||
* Fix assertion failure in V3Gate (#5101). [Yutetsu TAKATSUKASA]
|
||||
* Fix aliases for forced port signals (#5105). [Geza Lore]
|
||||
* Fix tracing interface functions (#5108). [Alex Solomatnikov]
|
||||
* Fix method calls parsing in constraints (#5110). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||
* Fix vpiInertialDelay for memories (#5113). [Todd Strader]
|
||||
* Fix hierarchical compilation with nested -F (#5114) (#5124). [Alex Solomatnikov]
|
||||
* Fix references to ports in forks (#5123). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Fix output C++ type error on change detect of I/O arrays (#5125) (#5131). [Pawel Jewstafjew]
|
||||
* Fix x-valued parameters with `--x-assign unique` (#5129). [Ethan Sifferman]
|
||||
* Fix overflow of string on VPI reads (#5145) (#5146). [Kaleb Barrett]
|
||||
* Fix VerilatedVpiPutHolder class (#5156). [Kaleb Barrett]
|
||||
* Fix extending out-of-range select (#5159) (#5164). [Geza Lore]
|
||||
* Fix radix in width warnings (#5166). [Geza Lore]
|
||||
* Fix SystemC BITS_PER_DIGIT in VL_ASSIGN_SBW (#5170). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||
* Fix non-constant replication in concats (#5171). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||
* Fix table optimization when applied on real data type (#5172) (#5173). [Arthur Rosa]
|
||||
* Fix signed types emitted in hierarchical Verilation (#5178). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||
* Fix DPI import of null C-string (#5179).
|
||||
* Fix CMake installation missing verilated.mk (#5187) (#5188). [Philip Axer]
|
||||
* Fix linking with pthreads on CMake (#5194). [Tim Hutt]
|
||||
* Fix clang-17 coroutines configuration with -std=gnu++20 (#5200). [Gus Smith]
|
||||
|
||||
|
||||
Verilator 5.024 2024-04-05
|
||||
==========================
|
||||
|
||||
**Major:**
|
||||
|
||||
* Add printing summary reports, use `--quiet` or `+verilator+quiet` to suppress (#4909).
|
||||
* Support 1800-2023 keywords, and parsing with UNDEFINED warnings.
|
||||
* Support 1800-2023 preprocessor ifdef expressions.
|
||||
|
||||
**Minor:**
|
||||
|
||||
* Change 1800-2023 to be default language version.
|
||||
* Add DFG 'regularize' pass, and improve variable removal (#4937). [Geza Lore]
|
||||
* Add error when pass net to function argument (#4132) (#4966). [Fuad Ismail]
|
||||
* Add `UNUSEDLOOP` when unused loop is removed (#4926). [Bartłomiej Chmiel, Antmicro Ltd.]
|
||||
* Add custom version for verilator --version packaging (#4954). [Nolan Poe]
|
||||
* Add error on missing pure virtual functions (#4961).
|
||||
* Add error on calling static function without object (#4962).
|
||||
* Add JSON AST dumps (#5020). [Szymon Gizler]
|
||||
* Support 1800-2023 DPI headers, svGetTime/svgGetTimeUnit/svGetTimePrecision methods.
|
||||
* Support 1800-2023 class and function :initial, :extends, :final virtual overrides (#5025).
|
||||
* Support public packed struct / union (#860) (#4878). [Kefa Chen]
|
||||
* Support stream operation on unpacked array (#4714) (#5006). [Fuad Ismail]
|
||||
* Support implicitly-typed variable definitions in for-loop initializers (#4945) (#4986). [Kevin Nygaard]
|
||||
* Support inside range with implicit type conversion (#5026). [Arkadiusz Kozdra, Antmicro Ltd.]
|
||||
* Improve installation to be relocatable (#4927). [Geza Lore]
|
||||
* Improve internal ordering code (#4957) (#4990) (#4994) et al. [Geza Lore]
|
||||
* Fix generate blocks in vpi_iterate (#3609) (#4913). [Andrew Nolte]
|
||||
* Fix __Vlip undefined error in --freloop (#4824). [Justin Yao Du]
|
||||
* Fix missing VPI scopes (#4918). [Andrew Nolte]
|
||||
* Fix invalid cast on string structure creation (#4921).
|
||||
* Fix try-lock spuriously fails (#4931) (#4938). [Kamil Rakoczy]
|
||||
* Fix V3Unknown unpacked struct x-assign (#4934). [Yan Xu]
|
||||
* Fix DFG removing forceable signals (#4942). [Geza Lore]
|
||||
* Fix null characters in shortened identifiers (#4946). [Abdul Hameed]
|
||||
* Fix assignment of null into struct member (#4952).
|
||||
* Fix VPI missing scopes 2 (#4965). [Andrew Nolte]
|
||||
* Fix object assignment from conditionals (#4968).
|
||||
* Fix GCC14 warnings on template specialization syntax (#4974) (#4975). [Nolan Poe]
|
||||
* Fix unpacked structure upper bit cleaning (#4978).
|
||||
* Fix tests on MacOS (#4984) (#4985). [Kevin Nygaard]
|
||||
* Fix `--prof-exec` predicted time values (#4988). [Geza Lore]
|
||||
* Fix class type as an associative array parameter (#4997).
|
||||
* Fix inout ports of unpacked struct type (#5000). [Ryszard Rozak, Antmicro Ltd.]
|
||||
* Fix `unique {}` constraints missing semicolon (#5001).
|
||||
* Fix preprocessor to respect strings in joins (#5007).
|
||||
* Fix tracing class parameters (#5014).
|
||||
* Fix memory leaks (#5016). [Geza Lore]
|
||||
* Fix `$readmem` with missing newline (#5019). [Josse Van Delm]
|
||||
* Fix internal error on missing pattern key (#5023).
|
||||
* Fix tracing replicated hierarchical models (#5027).
|
||||
* Fix false LIFETIME warning on `repeat` in `fork-join` (#5456).
|
||||
|
||||
|
||||
Verilator 5.022 2024-02-24
|
||||
==========================
|
||||
|
||||
@@ -547,7 +127,6 @@ Verilator 5.020 2024-01-01
|
||||
* Fix dynamic NBA conditions (#4773). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Fix `V3Fork` stage to run only if `--timing` is set (#4778). [Krzysztof Bieganski, Antmicro Ltd.]
|
||||
* Fix max multiply width and add runtime assertions if too small. (#4781)
|
||||
* Fix select value too wide (#5148) (#5153). [Dercury]
|
||||
|
||||
|
||||
Verilator 5.018 2023-10-30
|
||||
@@ -764,7 +343,7 @@ Verilator 5.012 2023-06-13
|
||||
* Fix wide structure VL_TOSTRING_W generation (#4188) (#4189). [Aylon Chaim Porat]
|
||||
* Fix references to members of parameterized base classes (#4196). [Ryszard Rozak, Antmicro Ltd]
|
||||
* Fix tracing undefined alignment (#4201) (#4288) [John Wehle]
|
||||
* Fix class-specific same methods for AstVarScope, AstVar, and AstScope (#4203) (#4250). [John Wehle]
|
||||
* Fix class specific same methods for AstVarScope, AstVar, and AstScope (#4203) (#4250). [John Wehle]
|
||||
* Fix dotted references in parameterized classes (#4206). [Ryszard Rozak, Antmicro Ltd]
|
||||
* Fix bit selections under parameterized classes (#4210). [Ryszard Rozak, Antmicro Ltd]
|
||||
* Fix duplicate std:: declaration with -I (#4215). [Harald Pretl]
|
||||
@@ -920,7 +499,7 @@ Verilator 5.006 2023-01-22
|
||||
**Minor:**
|
||||
|
||||
* Support clocking blocks (#3674). [Krzysztof Bieganski, Antmicro Ltd]
|
||||
* Support unpacked structs (#3802). [Aleksander Kiryk, Antmicro Ltd]
|
||||
* Support packed structs (#3802). [Aleksander Kiryk, Antmicro Ltd]
|
||||
* Support Windows-native builds using cmake (#3814). [Kritik Bhimani]
|
||||
* Support p format for UnpackArray (#3877). [Aleksander Kiryk, Antmicro Ltd]
|
||||
* Support property calls without parenthesis (#3879) (#3893). [Ryszard Rozak, Antmicro Ltd]
|
||||
@@ -1811,7 +1390,6 @@ Verilator 4.026 2020-01-11
|
||||
* Fix expand optimization slowing --lint-only. Closes #2091. [Thomas Watts]
|
||||
* Fix %{number}s with strings. #2093. [agrobman]
|
||||
* Fix shebang breaking some shells. Closes #2067. [zdave]
|
||||
* Fix errors on using string in incorrect format (#5240). [John Demme]
|
||||
|
||||
|
||||
Verilator 4.024 2019-12-08
|
||||
@@ -4989,7 +4567,7 @@ Verilator 0.0 1994-07-08
|
||||
Copyright
|
||||
=========
|
||||
|
||||
Copyright 2001-2025 by Wilson Snyder. This program is free software; you
|
||||
Copyright 2001-2024 by Wilson Snyder. This program is free software; you
|
||||
can redistribute it and/or modify it under the terms of either the GNU
|
||||
Lesser General Public License Version 3 or the Perl Artistic License
|
||||
Version 2.0.
|
||||
|
||||
+55
-144
@@ -7,7 +7,7 @@
|
||||
#
|
||||
#*****************************************************************************
|
||||
#
|
||||
# Copyright 2003-2025 by Wilson Snyder. This program is free software; you
|
||||
# Copyright 2003-2024 by Wilson Snyder. This program is free software; you
|
||||
# can redistribute it and/or modify it under the terms of either the GNU
|
||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||
# Version 2.0.
|
||||
@@ -52,7 +52,6 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
MAKEINFO = makeinfo
|
||||
POD2TEXT = pod2text
|
||||
PYTHON3 = @PYTHON3@
|
||||
MKINSTALLDIRS = $(SHELL) $(srcdir)/src/mkinstalldirs
|
||||
|
||||
# Version (for docs/guide/conf.py)
|
||||
@@ -77,7 +76,7 @@ datadir = @datadir@
|
||||
# Directory in which to install documentation info files.
|
||||
infodir = @infodir@
|
||||
|
||||
# Directory in which to install package-specific files
|
||||
# Directory in which to install package specific files
|
||||
# Generally ${prefix}/share/verilator
|
||||
pkgdatadir = @pkgdatadir@
|
||||
|
||||
@@ -92,12 +91,10 @@ datarootdir = @datarootdir@
|
||||
CFG_WITH_CCWARN = @CFG_WITH_CCWARN@
|
||||
CFG_WITH_DEFENV = @CFG_WITH_DEFENV@
|
||||
CFG_WITH_LONGTESTS = @CFG_WITH_LONGTESTS@
|
||||
CFG_WITH_SOLVER = @CFG_WITH_SOLVER@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
|
||||
#### End of system configuration section. ####
|
||||
######################################################################
|
||||
# Main build targets
|
||||
|
||||
.SUFFIXES:
|
||||
|
||||
@@ -148,9 +145,6 @@ verilator_exe verilator_bin$(EXEEXT) verilator_bin_dbg$(EXEEXT) verilator_covera
|
||||
@echo "making verilator in src"
|
||||
$(MAKE) -C src $(OBJCACHE_JOBS)
|
||||
|
||||
######################################################################
|
||||
# Tests
|
||||
|
||||
.PHONY:msg_test
|
||||
msg_test: all_nomsg
|
||||
@echo "Build complete!"
|
||||
@@ -161,7 +155,7 @@ msg_test: all_nomsg
|
||||
.PHONY: test
|
||||
ifeq ($(CFG_WITH_LONGTESTS),yes) # Local... Else don't burden users
|
||||
test: smoke-test test_regress
|
||||
# examples is part of test_regress's test_regress/t/t_a2_examples.py
|
||||
# examples is part of test_regress's test_regress/t/t_a2_examples.pl
|
||||
# (because that allows it to run in parallel with other test_regress's)
|
||||
else
|
||||
test: smoke-test examples
|
||||
@@ -173,8 +167,8 @@ endif
|
||||
@echo
|
||||
|
||||
smoke-test: all_nomsg
|
||||
test_regress/t/t_a1_first_cc.py
|
||||
test_regress/t/t_a2_first_sc.py
|
||||
test_regress/t/t_a1_first_cc.pl
|
||||
test_regress/t/t_a2_first_sc.pl
|
||||
|
||||
test_regress: all_nomsg
|
||||
$(MAKE) -C test_regress
|
||||
@@ -188,11 +182,8 @@ examples: all_nomsg
|
||||
$(MAKE) -C $$p VERILATOR_ROOT=`pwd` || exit 10; \
|
||||
done
|
||||
|
||||
######################################################################
|
||||
# Docs
|
||||
|
||||
.PHONY: docs
|
||||
docs: info $(VL_INST_MAN_FILES)
|
||||
docs: info
|
||||
|
||||
info: $(INFOS)
|
||||
|
||||
@@ -201,8 +192,7 @@ verilator.1: ${srcdir}/bin/verilator
|
||||
verilator_coverage.1: ${srcdir}/bin/verilator_coverage
|
||||
pod2man $< $@
|
||||
%.1: ${srcdir}/bin/%
|
||||
help2man --no-info --no-discard-stderr --version-string=- \
|
||||
-n "$(shell $< --help | head -n 3 | tail -n 1)" $< -o $@
|
||||
help2man --no-info --no-discard-stderr --version-string=- $< -o $@
|
||||
|
||||
.PHONY: verilator.html
|
||||
verilator.html:
|
||||
@@ -213,35 +203,11 @@ verilator.html:
|
||||
verilator.pdf: Makefile
|
||||
$(MAKE) -C docs verilator.pdf
|
||||
|
||||
TAGFILES=${srcdir}/*/*.cpp ${srcdir}/*/*.h ${srcdir}/*/*.in \
|
||||
${srcdir}/*.in ${srcdir}/*.pod
|
||||
|
||||
TAGS: $(TAGFILES)
|
||||
etags $(TAGFILES)
|
||||
|
||||
.PHONY: doxygen
|
||||
|
||||
doxygen:
|
||||
$(MAKE) -C docs doxygen
|
||||
|
||||
######################################################################
|
||||
# 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_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 \
|
||||
# See uninstall also - don't put wildcards in this variable, it might uninstall other stuff
|
||||
VL_INST_BIN_FILES = verilator verilator_bin$(EXEEXT) verilator_bin_dbg$(EXEEXT) verilator_coverage_bin_dbg$(EXEEXT) \
|
||||
verilator_ccache_report verilator_coverage verilator_difftree verilator_gantt verilator_includer verilator_profcfunc
|
||||
# Some scripts go into both the search path and pkgdatadir,
|
||||
# so they can be found by the user, and under $VERILATOR_ROOT.
|
||||
|
||||
VL_INST_INC_BLDDIR_FILES = \
|
||||
include/verilated_config.h \
|
||||
@@ -250,7 +216,6 @@ VL_INST_INC_BLDDIR_FILES = \
|
||||
# Files under srcdir, instead of build time
|
||||
VL_INST_INC_SRCDIR_FILES = \
|
||||
include/*.[chv]* \
|
||||
include/*.vlt \
|
||||
include/*.sv \
|
||||
include/gtkwave/*.[chv]* \
|
||||
include/vltstd/*.[chv]* \
|
||||
@@ -261,38 +226,19 @@ VL_INST_DATA_SRCDIR_FILES = \
|
||||
examples/*/Makefile* \
|
||||
examples/*/vl_* \
|
||||
|
||||
mkbindirs:
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/bin
|
||||
installbin:
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
|
||||
|
||||
installbin: | mkbindirs
|
||||
cd $(srcdir)/bin; \
|
||||
for p in $(VL_INST_PUBLIC_SCRIPT_FILES) ; do \
|
||||
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
|
||||
done
|
||||
perl -p -i -e 'use File::Spec;' \
|
||||
-e' $$path = File::Spec->abs2rel("$(realpath $(DESTDIR)$(pkgdatadir))", "$(realpath $(DESTDIR)$(bindir))");' \
|
||||
-e 's/my \$$verilator_pkgdatadir_relpath = .*/my \$$verilator_pkgdatadir_relpath = "$$path";/g' \
|
||||
-- "$(DESTDIR)/$(bindir)/verilator"
|
||||
cd bin; \
|
||||
for p in $(VL_INST_PUBLIC_BIN_FILES) ; do \
|
||||
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/$$p; \
|
||||
done
|
||||
cd $(srcdir)/bin; \
|
||||
for p in $(VL_INST_PRIVATE_SCRIPT_FILES) ; do \
|
||||
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkgdatadir)/bin/$$p; \
|
||||
done
|
||||
|
||||
installredirect: installbin | mkbindirs
|
||||
cp ${srcdir}/bin/redirect ${srcdir}/bin/redirect.tmp
|
||||
perl -p -i -e 'use File::Spec;' \
|
||||
-e' $$path = File::Spec->abs2rel("$(realpath $(DESTDIR)$(bindir))", "$(realpath $(DESTDIR)$(pkgdatadir)/bin)");' \
|
||||
-e 's/RELPATH.*/"$$path";/g' -- "${srcdir}/bin/redirect.tmp"
|
||||
cd $(srcdir)/bin; \
|
||||
for p in $(VL_INST_PUBLIC_SCRIPT_FILES) $(VL_INST_PUBLIC_BIN_FILES) ; do \
|
||||
$(INSTALL_PROGRAM) redirect.tmp $(DESTDIR)$(pkgdatadir)/bin/$$p; \
|
||||
done
|
||||
rm ${srcdir}/bin/redirect.tmp
|
||||
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator $(DESTDIR)$(bindir)/verilator )
|
||||
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_coverage $(DESTDIR)$(bindir)/verilator_coverage )
|
||||
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_gantt $(DESTDIR)$(bindir)/verilator_gantt )
|
||||
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_profcfunc $(DESTDIR)$(bindir)/verilator_profcfunc )
|
||||
( cd bin ; $(INSTALL_PROGRAM) verilator_bin$(EXEEXT) $(DESTDIR)$(bindir)/verilator_bin$(EXEEXT) )
|
||||
( cd bin ; $(INSTALL_PROGRAM) verilator_bin_dbg$(EXEEXT) $(DESTDIR)$(bindir)/verilator_bin_dbg$(EXEEXT) )
|
||||
( cd bin ; $(INSTALL_PROGRAM) verilator_coverage_bin_dbg$(EXEEXT) $(DESTDIR)$(bindir)/verilator_coverage_bin_dbg$(EXEEXT) )
|
||||
$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/bin
|
||||
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_includer $(DESTDIR)$(pkgdatadir)/bin/verilator_includer )
|
||||
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_ccache_report $(DESTDIR)$(pkgdatadir)/bin/verilator_ccache_report )
|
||||
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_difftree $(DESTDIR)$(pkgdatadir)/bin/verilator_difftree )
|
||||
|
||||
# Man files can either be part of the original kit, or built in current directory
|
||||
# So important we use $^ so VPATH is searched
|
||||
@@ -335,11 +281,8 @@ installdata:
|
||||
|
||||
# We don't trust rm -rf, so rmdir instead as it will fail if user put in other files
|
||||
uninstall:
|
||||
-cd $(DESTDIR)$(bindir) && rm -f $(VL_INST_PUBLIC_SCRIPT_FILES)
|
||||
-cd $(DESTDIR)$(bindir) && rm -f $(VL_INST_PUBLIC_BIN_FILES)
|
||||
-cd $(DESTDIR)$(pkgdatadir)/bin && rm -f $(VL_INST_PUBLIC_SCRIPT_FILES)
|
||||
-cd $(DESTDIR)$(pkgdatadir)/bin && rm -f $(VL_INST_PUBLIC_BIN_FILES)
|
||||
-cd $(DESTDIR)$(pkgdatadir)/bin && rm -f $(VL_INST_PRIVATE_SCRIPT_FILES)
|
||||
-cd $(DESTDIR)$(bindir) && rm -f $(VL_INST_BIN_FILES)
|
||||
-cd $(DESTDIR)$(pkgdatadir)/bin && rm -f $(VL_INST_BIN_FILES)
|
||||
-cd $(DESTDIR)$(mandir)/man1 && rm -f $(VL_INST_MAN_FILES)
|
||||
-cd $(DESTDIR)$(pkgdatadir) && rm -f $(VL_INST_INC_BLDDIR_FILES)
|
||||
-cd $(DESTDIR)$(pkgdatadir) && rm -f $(VL_INST_INC_SRCDIR_FILES)
|
||||
@@ -368,23 +311,10 @@ uninstall:
|
||||
-rmdir $(DESTDIR)$(pkgconfigdir)
|
||||
|
||||
install: all_nomsg install-all
|
||||
install-all: installbin installredirect installman installdata install-msg
|
||||
install-all: installbin installman installdata install-msg
|
||||
|
||||
install-here: installman info
|
||||
|
||||
install-msg:
|
||||
@echo
|
||||
@echo "Installed binaries to $(DESTDIR)$(bindir)/verilator"
|
||||
@echo "Installed man to $(DESTDIR)$(mandir)/man1"
|
||||
@echo "Installed examples to $(DESTDIR)$(pkgdatadir)/examples"
|
||||
@echo
|
||||
@echo "For documentation see 'man verilator' or 'verilator --help'"
|
||||
@echo "For forums and to report bugs see https://verilator.org"
|
||||
@echo
|
||||
|
||||
######################################################################
|
||||
# Format/Lint
|
||||
|
||||
# Use --xml flag to see the cppcheck code to use for suppression
|
||||
CPPCHECK1_CPP = $(wildcard $(srcdir)/include/*.cpp)
|
||||
CPPCHECK2_CPP = $(wildcard $(srcdir)/examples/*/*.cpp)
|
||||
@@ -452,32 +382,17 @@ analyzer-include:
|
||||
-rm -rf examples/*/obj*
|
||||
scan-build $(MAKE) -k examples
|
||||
|
||||
format:
|
||||
$(MAKE) -j 4 format-c format-py format-exec
|
||||
format: clang-format yapf format-pl-exec
|
||||
|
||||
CLANGFORMAT = clang-format-14
|
||||
CLANGFORMAT_FLAGS = -i
|
||||
CLANGFORMAT_FILES = $(CHECK_CPP) $(CHECK_H) $(CHECK_YL) test_regress/t/*.c* test_regress/t/*.h
|
||||
|
||||
format-c clang-format:
|
||||
clang-format:
|
||||
@$(CLANGFORMAT) --version | egrep 14.0 > /dev/null \
|
||||
|| 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
|
||||
|
||||
yamlfix:
|
||||
$(YAMLFIX) .
|
||||
|
||||
# CMake files
|
||||
CMAKE_FILES = \
|
||||
CMakeLists.txt \
|
||||
examples/*/CMakeLists.txt \
|
||||
src/CMakeLists.txt \
|
||||
test_regress/CMakeLists.txt \
|
||||
*.cmake.in \
|
||||
|
||||
# Python programs, subject to format and lint
|
||||
PY_PROGRAMS = \
|
||||
bin/verilator_ccache_report \
|
||||
bin/verilator_difftree \
|
||||
@@ -495,8 +410,6 @@ PY_PROGRAMS = \
|
||||
src/cppcheck_filtered \
|
||||
src/flexfix \
|
||||
src/vlcovgen \
|
||||
src/.gdbinit.py \
|
||||
test_regress/*.py \
|
||||
test_regress/t/*.pf \
|
||||
nodist/clang_check_attributes \
|
||||
nodist/code_coverage \
|
||||
@@ -504,55 +417,45 @@ PY_PROGRAMS = \
|
||||
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 \
|
||||
|
||||
# Python files, test_regress tests
|
||||
PY_TEST_FILES = \
|
||||
test_regress/t/*.py \
|
||||
|
||||
YAPF = yapf3
|
||||
YAPF_FLAGS = -i --parallel
|
||||
YAPF_FLAGS = -i
|
||||
|
||||
format-py yapf:
|
||||
yapf:
|
||||
$(YAPF) $(YAPF_FLAGS) $(PY_FILES)
|
||||
|
||||
GERSEMI = gersemi
|
||||
GERSEMI_FLAGS = -i
|
||||
|
||||
format-cmake:
|
||||
$(GERSEMI) $(GERSEMI_FLAGS) $(CMAKE_FILES)
|
||||
|
||||
PYLINT = pylint
|
||||
PYLINT_FLAGS = --recursive=n --score=n --disable=R0801
|
||||
PYLINT_TEST_FLAGS = $(PYLINT_FLAGS) --disable=C0103,C0114,C0116,C0209,C0411,C0413,C0301,R0801,R0912,R0915,R0916,R1702,W0511,W0621
|
||||
PYLINT_FLAGS = --score=n --disable=R0801
|
||||
|
||||
RUFF = ruff
|
||||
RUFF_FLAGS = check --ignore=E402,E501,E701
|
||||
|
||||
# "make -k" so can see all tool result errors
|
||||
lint-py:
|
||||
$(MAKE) -k lint-py-pylint lint-py-pylint-tests lint-py-ruff
|
||||
$(MAKE) -k lint-py-pylint lint-py-ruff
|
||||
|
||||
lint-py-pylint:
|
||||
$(PYLINT) $(PYLINT_FLAGS) $(PY_PROGRAMS)
|
||||
|
||||
lint-py-pylint-tests:
|
||||
$(PYLINT) $(PYLINT_TEST_FLAGS) $(PY_TEST_FILES) | $(PYTHON3) nodist/lint_py_test_filter
|
||||
|
||||
lint-py-ruff:
|
||||
$(RUFF) $(RUFF_FLAGS) $(PY_PROGRAMS)
|
||||
|
||||
format-exec:
|
||||
-chmod a+x test_regress/t/*.py
|
||||
format-pl-exec:
|
||||
-chmod a+x test_regress/t/*.pl
|
||||
|
||||
######################################################################
|
||||
# Configure
|
||||
install-msg:
|
||||
@echo
|
||||
@echo "Installed binaries to $(DESTDIR)$(bindir)/verilator"
|
||||
@echo "Installed man to $(DESTDIR)$(mandir)/man1"
|
||||
@echo "Installed examples to $(DESTDIR)$(pkgdatadir)/examples"
|
||||
@echo
|
||||
@echo "For documentation see 'man verilator' or 'verilator --help'"
|
||||
@echo "For forums and to report bugs see https://verilator.org"
|
||||
@echo
|
||||
|
||||
IN_WILD := ${srcdir}/*.in ${srcdir}/*/*.in
|
||||
|
||||
@@ -573,9 +476,6 @@ else
|
||||
autoconf
|
||||
endif
|
||||
|
||||
######################################################################
|
||||
# Clean
|
||||
|
||||
maintainer-clean::
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "rebuilding the deleted files requires autoconf."
|
||||
@@ -606,6 +506,17 @@ distclean maintainer-clean::
|
||||
rm -f bin/verilator_bin* bin/verilator_coverage_bin*
|
||||
rm -f include/verilated.mk include/verilated_config.h
|
||||
|
||||
TAGFILES=${srcdir}/*/*.cpp ${srcdir}/*/*.h ${srcdir}/*/*.in \
|
||||
${srcdir}/*.in ${srcdir}/*.pod
|
||||
|
||||
TAGS: $(TAGFILES)
|
||||
etags $(TAGFILES)
|
||||
|
||||
.PHONY: doxygen
|
||||
|
||||
doxygen:
|
||||
$(MAKE) -C docs doxygen
|
||||
|
||||
######################################################################
|
||||
# Distributions
|
||||
|
||||
|
||||
+16
-15
@@ -1,21 +1,21 @@
|
||||
.. 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| |badge6| |badge7|
|
||||
|
||||
.. |badge1| image:: https://img.shields.io/badge/Website-Verilator.org-181717.svg
|
||||
.. image:: https://img.shields.io/badge/Website-Verilator.org-181717.svg
|
||||
:target: https://verilator.org
|
||||
.. |badge2| image:: https://img.shields.io/badge/License-LGPL%20v3-blue.svg
|
||||
.. image:: https://img.shields.io/badge/License-LGPL%20v3-blue.svg
|
||||
:target: https://www.gnu.org/licenses/lgpl-3.0
|
||||
.. |badge3| image:: https://img.shields.io/badge/License-Artistic%202.0-0298c3.svg
|
||||
.. image:: https://img.shields.io/badge/License-Artistic%202.0-0298c3.svg
|
||||
:target: https://opensource.org/licenses/Artistic-2.0
|
||||
.. |badge4| image:: https://repology.org/badge/tiny-repos/verilator.svg?header=distro%20packages
|
||||
.. image:: https://repology.org/badge/tiny-repos/verilator.svg?header=distro%20packages
|
||||
:target: https://repology.org/project/verilator/versions
|
||||
.. |badge5| image:: https://img.shields.io/docker/pulls/verilator/verilator
|
||||
.. image:: https://img.shields.io/docker/pulls/verilator/verilator
|
||||
:target: https://hub.docker.com/r/verilator/verilator
|
||||
.. |badge6| image:: https://api.codacy.com/project/badge/Grade/fa78caa433c84a4ab9049c43e9debc6f
|
||||
.. image:: https://api.codacy.com/project/badge/Grade/fa78caa433c84a4ab9049c43e9debc6f
|
||||
:target: https://www.codacy.com/gh/verilator/verilator
|
||||
.. |badge7| image:: https://github.com/verilator/verilator/workflows/build/badge.svg
|
||||
.. image:: https://codecov.io/gh/verilator/verilator/branch/master/graph/badge.svg
|
||||
:target: https://codecov.io/gh/verilator/verilator
|
||||
.. image:: https://github.com/verilator/verilator/workflows/build/badge.svg
|
||||
:target: https://github.com/verilator/verilator/actions?query=workflow%3Abuild
|
||||
|
||||
|
||||
@@ -85,11 +85,12 @@ thread is about 100 times faster than interpreted Verilog simulators such
|
||||
as `Icarus Verilog`_. Another 2-10x speedup might be gained from
|
||||
multithreading (yielding 200-1000x total over interpreted simulators).
|
||||
|
||||
Verilator has typically similar or better performance versus closed-source
|
||||
Verilog simulators (e.g., Aldec Riviera-Pro, Cadence Incisive/NC-Verilog,
|
||||
Mentor ModelSim/Questa, Synopsys VCS, VTOC, and Pragmatic CVer/CVC). But,
|
||||
Verilator is open-sourced, so you can spend on computes rather than
|
||||
licenses. Thus, Verilator gives you the best simulation cycles/dollar.
|
||||
Verilator has typically similar or better performance versus
|
||||
closed-source Verilog simulators (e.g., Carbon Design Systems Carbonator,
|
||||
Modelsim/Questa, Cadence Incisive/NC-Verilog, Synopsys VCS, VTOC, and
|
||||
Pragmatic CVer/CVC). But, Verilator is open-sourced, so you can spend on
|
||||
computes rather than licenses. Thus, Verilator gives you the best
|
||||
simulation cycles/dollar.
|
||||
|
||||
|
||||
Installation & Documentation
|
||||
@@ -141,7 +142,7 @@ Related Projects
|
||||
Open License
|
||||
============
|
||||
|
||||
Verilator is Copyright 2003-2025 by Wilson Snyder. (Report bugs to
|
||||
Verilator is Copyright 2003-2024 by Wilson Snyder. (Report bugs to
|
||||
`Verilator Issues <https://verilator.org/issues>`_.)
|
||||
|
||||
Verilator is free software; you can redistribute it and/or modify it under
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
######################################################################
|
||||
#
|
||||
# Copyright 2003-2025 by Wilson Snyder. This program is free software; you
|
||||
# can redistribute it and/or modify it under the terms of either the GNU
|
||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||
# Version 2.0.
|
||||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
#
|
||||
######################################################################
|
||||
|
||||
require 5.006_001;
|
||||
use warnings;
|
||||
use FindBin qw($RealBin $RealScript);
|
||||
use strict;
|
||||
|
||||
my $relpath = RELPATH; # Substituted during Verilator 'make install'
|
||||
|
||||
unshift @ARGV, $RealScript;
|
||||
|
||||
exec { "$RealBin/$relpath/$RealScript" } @ARGV;
|
||||
die "%Error: Exec failed,";
|
||||
+47
-66
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env perl
|
||||
######################################################################
|
||||
#
|
||||
# Copyright 2003-2025 by Wilson Snyder. This program is free software; you
|
||||
# Copyright 2003-2024 by Wilson Snyder. This program is free software; you
|
||||
# can redistribute it and/or modify it under the terms of either the GNU
|
||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||
# Version 2.0.
|
||||
@@ -15,7 +15,6 @@ use Getopt::Long;
|
||||
use FindBin qw($RealBin $RealScript);
|
||||
use IO::File;
|
||||
use Pod::Usage;
|
||||
use Cwd qw(realpath);
|
||||
|
||||
use strict;
|
||||
use vars qw($Debug @Opt_Verilator_Sw);
|
||||
@@ -58,7 +57,6 @@ if (! GetOptions(
|
||||
# Switches
|
||||
"gdb!" => \$opt_gdb,
|
||||
"gdbbt!" => \$opt_gdbbt,
|
||||
"quiet!" => \$opt_quiet_exit, # As -quiet implies -quiet-exit
|
||||
"quiet-exit!" => \$opt_quiet_exit,
|
||||
"rr!" => \$opt_rr,
|
||||
"unlimited-stack!" => \$opt_unlimited_stack,
|
||||
@@ -69,20 +67,6 @@ if (! GetOptions(
|
||||
pod2usage(-exitstatus => 2, -verbose => 0);
|
||||
}
|
||||
|
||||
# WARNING: $verilator_pkgdatadir_relpath is substituted during Verilator 'make install'
|
||||
my $verilator_pkgdatadir_relpath = "..";
|
||||
my $verilator_root = realpath("$RealBin/$verilator_pkgdatadir_relpath");
|
||||
if (defined $ENV{VERILATOR_ROOT}) {
|
||||
if ((!-d $ENV{VERILATOR_ROOT}) || $verilator_root ne realpath($ENV{VERILATOR_ROOT})) {
|
||||
warn "%Error: verilator: VERILATOR_ROOT is set to inconsistent path. Suggest leaving it unset.\n";
|
||||
warn "%Error: VERILATOR_ROOT=$ENV{VERILATOR_ROOT}\n";
|
||||
exit 1;
|
||||
}
|
||||
} else {
|
||||
print "export VERILATOR_ROOT='$verilator_root'\n" if $Debug;
|
||||
$ENV{VERILATOR_ROOT} = $verilator_root;
|
||||
}
|
||||
|
||||
if ($opt_gdbbt && !gdb_works()) {
|
||||
warn "-Info: --gdbbt ignored: gdb doesn't seem to be working\n" if $Debug;
|
||||
$opt_gdbbt = 0;
|
||||
@@ -167,13 +151,30 @@ sub debug {
|
||||
# Builds
|
||||
|
||||
sub verilator_bin {
|
||||
my $bin = "";
|
||||
# Use VERILATOR_ROOT if defined, else assume verilator_bin is in the search path
|
||||
my $basename = ($ENV{VERILATOR_BIN}
|
||||
|| ($Debug ? "verilator_bin_dbg" : "verilator_bin"));
|
||||
if (-x "$RealBin/$basename" || -x "$RealBin/$basename.exe") {
|
||||
return "$RealBin/$basename";
|
||||
if (defined($ENV{VERILATOR_ROOT})) {
|
||||
my $dir = $ENV{VERILATOR_ROOT};
|
||||
if (-x "$dir/bin/$basename"
|
||||
|| -x "$dir/bin/$basename.exe") { # From a "make install" into VERILATOR_ROOT
|
||||
$bin = "$dir/bin/$basename";
|
||||
} else {
|
||||
$bin = "$dir/$basename"; # From pointing to kit directory
|
||||
}
|
||||
} else {
|
||||
return $basename; # Find in PATH
|
||||
if (-x "$RealBin/$basename"
|
||||
|| -x "$RealBin/$basename.exe") {
|
||||
$bin = "$RealBin/$basename"; # From path/to/verilator with verilator_bin installed
|
||||
} else {
|
||||
$bin = $basename; # Find in PATH
|
||||
}
|
||||
# Note we don't look under bin/$basename which would be right if running
|
||||
# in the kit dir. Running that would likely break, since
|
||||
# VERILATOR_ROOT wouldn't be set and Verilator won't find internal files.
|
||||
}
|
||||
return $bin;
|
||||
}
|
||||
|
||||
#######################################################################
|
||||
@@ -269,7 +270,8 @@ __END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Verilator - Lint, compile and simulate SystemVerilog code using C++/SystemC
|
||||
Verilator - Translate and simulate SystemVerilog code using C++/SystemC
|
||||
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
@@ -310,7 +312,6 @@ detailed descriptions of these arguments.
|
||||
+1800-2009ext+<ext> Use SystemVerilog 2009 with file extension <ext>
|
||||
+1800-2012ext+<ext> Use SystemVerilog 2012 with file extension <ext>
|
||||
+1800-2017ext+<ext> Use SystemVerilog 2017 with file extension <ext>
|
||||
+1800-2023ext+<ext> Use SystemVerilog 2023 with file extension <ext>
|
||||
--assert Enable all assertions
|
||||
--assert-case Enable unique/unique0/priority case related checks
|
||||
--autoflush Flush streams after all $displays
|
||||
@@ -325,11 +326,8 @@ detailed descriptions of these arguments.
|
||||
--clk <signal-name> Mark specified signal as clock
|
||||
--no-clk <signal-name> Prevent marking specified signal as clock
|
||||
--compiler <compiler-name> Tune for specified C++ compiler
|
||||
--compiler-include Include additional header in the precompiled one
|
||||
--converge-limit <loops> Tune convergence settle time
|
||||
--coverage Enable all coverage
|
||||
--coverage-expr Enable expression coverage
|
||||
--coverage-expr-max <value> Maximum permutations allowed for an expression
|
||||
--coverage-line Enable line coverage
|
||||
--coverage-max-width <width> Maximum array depth for coverage
|
||||
--coverage-toggle Enable toggle coverage
|
||||
@@ -352,15 +350,12 @@ detailed descriptions of these arguments.
|
||||
--dump-tree Enable dumping Ast .tree files
|
||||
--dump-tree-addrids Use short identifiers instead of addresses
|
||||
--dump-tree-dot Enable dumping Ast .tree.dot debug files
|
||||
--dump-tree-json Enable dumping Ast .tree.json files and .tree.meta.json file
|
||||
--dump-<srcfile> Enable dumping everything in source file
|
||||
--dumpi-dfg <level> Enable dumping DfgGraphs to .dot files at level
|
||||
--dumpi-graph <level> Enable dumping V3Graphs to .dot files at level
|
||||
--dumpi-tree <level> Enable dumping Ast .tree files at level
|
||||
--dumpi-tree-json <level> Enable dumping Ast .tree.json files at level
|
||||
--dumpi-<srcfile> <level> Enable dumping everything in source file at level
|
||||
-E Preprocess, but do not compile
|
||||
--emit-accessors Emit getter and setter methods for model top class
|
||||
--error-limit <value> Abort after this number of errors
|
||||
--exe Link to create executable
|
||||
--expand-limit <value> Set expand optimization limit
|
||||
@@ -376,29 +371,22 @@ detailed descriptions of these arguments.
|
||||
--gdb Run Verilator under GDB interactively
|
||||
--gdbbt Run Verilator under GDB for backtrace
|
||||
--generate-key Create random key for --protect-key
|
||||
--get-supported <feature> Get if feature is supported
|
||||
--getenv <var> Get environment variable with defaults
|
||||
--help Show this help
|
||||
--get-supported <feature> Get if feature is supported
|
||||
--help Display this help
|
||||
--hierarchical Enable hierarchical Verilation
|
||||
--hierarchical-params-file <name> Internal option that specifies parameters file for hier blocks
|
||||
-I<dir> Directory to search for includes
|
||||
--if-depth <value> Tune IFDEPTH warning
|
||||
+incdir+<dir> Directory to search for includes
|
||||
--inline-mult <value> Tune module inlining
|
||||
--instr-count-dpi <value> Assumed dynamic instruction count of DPI imports
|
||||
-j <jobs> 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
|
||||
--json-only Create JSON parser output (.tree.json and .meta.json)
|
||||
--json-only-output .tree.json output filename
|
||||
--json-only-meta-output .tree.meta.json output filename
|
||||
--l2-name <value> Verilog scope name of the top module
|
||||
--language <lang> Default language standard to parse
|
||||
-LDFLAGS <flags> Linker pre-object arguments for makefile
|
||||
--lib-create <name> Create a DPI library
|
||||
+libext+<ext>+[ext]... Extensions for finding modules
|
||||
--lint-only Lint, but do not make output
|
||||
--localize-max-size <value> Tune localize optimization variable size
|
||||
--make <build-tool> Generate scripts for specified build tool
|
||||
-MAKEFLAGS <flags> Arguments to pass to make during --build
|
||||
--main Generate C++ main() file
|
||||
@@ -413,23 +401,18 @@ detailed descriptions of these arguments.
|
||||
-O3 High-performance optimizations
|
||||
-O<optimization-letter> Selectable optimizations
|
||||
-o <executable> Name of final executable
|
||||
--output-groups <numfiles> Group .cpp files into larger ones
|
||||
--output-split <statements> Split .cpp files into pieces
|
||||
--output-split-cfuncs <statements> Split model functions
|
||||
--output-split-ctrace <statements> Split tracing functions
|
||||
-P Disable line numbers and blanks with -E
|
||||
--pins-bv <bits> Specify types for top-level ports
|
||||
--pins-inout-enables Specify that __en and __out signals be created for inouts
|
||||
--pins-sc-biguint Specify types for top-level ports
|
||||
--pins-sc-uint Specify types for top-level ports
|
||||
--pins-sc-uint-bool Specify types for top-level ports
|
||||
--pins-uint8 Specify types for top-level ports
|
||||
--no-pins64 Don't use uint64_t's for 33-64 bit sigs
|
||||
--pipe-filter <command> Filter all input through a script
|
||||
--pp-comments Show preprocessor comments with -E
|
||||
--prefix <topname> Name of top-level class
|
||||
--preproc-resolve Include all found modules in the output with -E
|
||||
--preproc-token-limit Maximum tokens on a line allowed by preprocessor
|
||||
--private Debugging; see docs
|
||||
--prof-c Compile C++ code with profiling
|
||||
--prof-cfuncs Name functions for profiling
|
||||
@@ -440,13 +423,10 @@ detailed descriptions of these arguments.
|
||||
--protect-lib <name> Create a DPI protected library
|
||||
--public Mark signals as public; see docs
|
||||
--public-depth <level> Mark public to specified module depth
|
||||
--public-flat-rw Mark all variables, etc as public_flat_rw
|
||||
--public-ignore Ignore all public comment markings
|
||||
--public-params Mark all parameters as public_flat
|
||||
--public-flat-rw Mark all variables, etc as public_flat_rw
|
||||
-pvalue+<name>=<value> Overwrite toplevel parameter
|
||||
--quiet Minimize additional printing
|
||||
--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
|
||||
--report-unoptflat Extra diagnostics for UNOPTFLAT
|
||||
@@ -457,13 +437,11 @@ detailed descriptions of these arguments.
|
||||
--no-skip-identical Disable skipping identical output
|
||||
--stats Create statistics file
|
||||
--stats-vars Provide statistics on variables
|
||||
--no-std Prevent loading standard files
|
||||
--no-std-package Prevent parsing standard package
|
||||
--no-std-waiver Prevent parsing standard lint waivers
|
||||
--no-std Prevent parsing standard library
|
||||
--no-stop-fail Do not call $stop when assertion fails
|
||||
--structs-packed Convert all unpacked structures to packed structures
|
||||
-sv Enable SystemVerilog parsing
|
||||
+systemverilogext+<ext> Synonym for +1800-2023ext+<ext>
|
||||
+systemverilogext+<ext> Synonym for +1800-2017ext+<ext>
|
||||
--threads <threads> Enable multithreading
|
||||
--threads-dpi <mode> Enable multithreaded DPI
|
||||
--threads-max-mtasks <mtasks> Tune maximum mtask partitioning
|
||||
@@ -477,8 +455,8 @@ detailed descriptions of these arguments.
|
||||
--trace-coverage Enable tracing of coverage
|
||||
--trace-depth <levels> Depth of tracing
|
||||
--trace-fst Enable FST waveform creation
|
||||
--trace-max-array <depth> Maximum array depth for tracing
|
||||
--trace-max-width <width> Maximum bit width for tracing
|
||||
--trace-max-array <depth> Maximum bit width for tracing
|
||||
--trace-max-width <width> Maximum array depth for tracing
|
||||
--trace-params Enable tracing of parameters
|
||||
--trace-structs Enable tracing structure names
|
||||
--trace-threads <threads> Enable FST waveform creation on separate threads
|
||||
@@ -496,10 +474,9 @@ detailed descriptions of these arguments.
|
||||
--no-verilate Skip Verilation and just compile previously Verilated code
|
||||
+verilog1995ext+<ext> Synonym for +1364-1995ext+<ext>
|
||||
+verilog2001ext+<ext> Synonym for +1364-2001ext+<ext>
|
||||
--version Show program version and exits
|
||||
--version Displays program version and exits
|
||||
--vpi Enable VPI compiles
|
||||
--waiver-multiline Create multiline --match for waivers
|
||||
--waiver-output <filename> Create a waiver file based on linter warnings
|
||||
--waiver-output <filename> Create a waiver file based on the linter warnings
|
||||
-Wall Enable all style warnings
|
||||
-Werror-<message> Convert warnings to errors
|
||||
-Wfuture-<message> Disable unknown message warnings
|
||||
@@ -515,6 +492,11 @@ detailed descriptions of these arguments.
|
||||
--x-assign <mode> Assign non-initial Xs to this value
|
||||
--x-initial <mode> Assign initial Xs to this value
|
||||
--x-initial-edge Enable initial X->0 and X->1 edge triggers
|
||||
--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
|
||||
--json-only Create JSON parser output (.tree.json and .meta.json)
|
||||
--json-only-output .tree.json output filename
|
||||
--json-only-meta-output .tree.meta.json output filename
|
||||
--xml-only Create XML parser output
|
||||
--xml-output XML output filename
|
||||
-y <dir> Directory to search for modules
|
||||
@@ -526,28 +508,27 @@ description of these arguments.
|
||||
|
||||
=for VL_SPHINX_EXTRACT "_build/gen/args_verilated.rst"
|
||||
|
||||
+verilator+debug Enable debugging
|
||||
+verilator+debugi+<value> Enable debugging at a level
|
||||
+verilator+debug Enable debugging
|
||||
+verilator+debugi+<value> Enable debugging at a level
|
||||
+verilator+coverage+file+<filename> Set coverage output filename
|
||||
+verilator+error+limit+<value> Set error limit
|
||||
+verilator+help Show help
|
||||
+verilator+noassert Disable assert checking
|
||||
+verilator+error+limit+<value> Set error limit
|
||||
+verilator+help Display help
|
||||
+verilator+noassert Disable assert checking
|
||||
+verilator+prof+exec+file+<filename> Set execution profile filename
|
||||
+verilator+prof+exec+start+<value> Set execution profile starting point
|
||||
+verilator+prof+exec+window+<value> Set execution profile duration
|
||||
+verilator+prof+vlt+file+<filename> Set PGO profile filename
|
||||
+verilator+quiet Minimize additional printing
|
||||
+verilator+rand+reset+<value> Set random reset technique
|
||||
+verilator+seed+<value> Set random seed
|
||||
+verilator+V Show verbose version and config
|
||||
+verilator+version Show version and exit
|
||||
+verilator+rand+reset+<value> Set random reset technique
|
||||
+verilator+seed+<value> Set random seed
|
||||
+verilator+V Verbose version and config
|
||||
+verilator+version Show version and exit
|
||||
|
||||
|
||||
=head1 DISTRIBUTION
|
||||
|
||||
The latest version is available from L<https://verilator.org>.
|
||||
|
||||
Copyright 2003-2025 by Wilson Snyder. This program is free software; you can
|
||||
Copyright 2003-2024 by Wilson Snyder. This program is free software; you can
|
||||
redistribute it and/or modify the Verilator internals under the terms of
|
||||
either the GNU Lesser General Public License Version 3 or the Perl Artistic
|
||||
License Version 2.0.
|
||||
|
||||
@@ -16,7 +16,8 @@ parser = argparse.ArgumentParser(
|
||||
|
||||
For documentation see
|
||||
https://verilator.org/guide/latest/exe_verilator_ccache_report.html""",
|
||||
epilog="""Copyright 2002-2025 by Wilson Snyder. This program is free software; you
|
||||
epilog=
|
||||
"""Copyright 2002-2024 by Wilson Snyder. This program is free software; you
|
||||
can redistribute it and/or modify it under the terms of either the GNU
|
||||
Lesser General Public License Version 3 or the Perl Artistic License
|
||||
Version 2.0.
|
||||
@@ -66,23 +67,30 @@ else:
|
||||
wnames = max(len(_) for _ in results) + 1
|
||||
wresults = max(len(_) for _ in results.values()) + 1
|
||||
for k in sorted(results.keys()):
|
||||
args.o.write("{:{wnames}} : {:{wresults}} : {}s\n".format(k,
|
||||
results[k],
|
||||
elapsed[k].total_seconds(),
|
||||
wnames=wnames,
|
||||
wresults=wresults))
|
||||
args.o.write("{:{wnames}} : {:{wresults}} : {}s\n".format(
|
||||
k,
|
||||
results[k],
|
||||
elapsed[k].total_seconds(),
|
||||
wnames=wnames,
|
||||
wresults=wresults))
|
||||
|
||||
args.o.write("\nSummary:\n")
|
||||
counts = collections.Counter(_ for _ in results.values())
|
||||
total = sum(counts.values())
|
||||
for k in sorted(counts.keys()):
|
||||
c = counts[k]
|
||||
args.o.write("{:{width}}| {} ({:.2%})\n".format(k, c, c / total, width=wresults))
|
||||
args.o.write("{:{width}}| {} ({:.2%})\n".format(k,
|
||||
c,
|
||||
c / total,
|
||||
width=wresults))
|
||||
|
||||
args.o.write("\nLongest:\n")
|
||||
longest = sorted(list(elapsed.items()), key=lambda kv: -kv[1].total_seconds())
|
||||
longest = sorted(list(elapsed.items()),
|
||||
key=lambda kv: -kv[1].total_seconds())
|
||||
for i, (k, v) in enumerate(longest):
|
||||
args.o.write("{:{width}}| {}s\n".format(k, v.total_seconds(), width=wnames))
|
||||
args.o.write("{:{width}}| {}s\n".format(k,
|
||||
v.total_seconds(),
|
||||
width=wnames))
|
||||
if i > 4:
|
||||
break
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env perl
|
||||
######################################################################
|
||||
#
|
||||
# Copyright 2003-2025 by Wilson Snyder. This program is free software; you
|
||||
# Copyright 2003-2024 by Wilson Snyder. This program is free software; you
|
||||
# can redistribute it and/or modify it under the terms of either the GNU
|
||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||
# Version 2.0.
|
||||
@@ -154,9 +154,9 @@ verilator_coverage - Verilator coverage analyzer
|
||||
|
||||
verilator_coverage --annotate <obj>
|
||||
|
||||
verilator_coverage -write merged.dat <datafiles>...
|
||||
verilator_coverage -write merged.dat -read <datafiles>...
|
||||
|
||||
verilator_coverage -write-info merged.info <datafiles>...
|
||||
verilator_coverage -write-info merged.info -read <datafiles>...
|
||||
|
||||
Verilator_coverage processes Verilated model-generated coverage reports.
|
||||
|
||||
@@ -188,7 +188,7 @@ L<https://verilator.org/guide/latest/exe_verilator_coverage.html>.
|
||||
|
||||
The latest version is available from L<https://verilator.org>.
|
||||
|
||||
Copyright 2003-2025 by Wilson Snyder. This program is free software; you
|
||||
Copyright 2003-2024 by Wilson Snyder. This program is free software; you
|
||||
can redistribute it and/or modify the Verilator internals under the terms
|
||||
of either the GNU Lesser General Public License Version 3 or the Perl
|
||||
Artistic License Version 2.0.
|
||||
|
||||
@@ -47,7 +47,8 @@ def diff_dir(a, b):
|
||||
diff_file(a, b)
|
||||
anyfile = True
|
||||
if not anyfile:
|
||||
sys.stderr.write("%Warning: No .tree files found that have similar base names\n")
|
||||
sys.stderr.write(
|
||||
"%Warning: No .tree files found that have similar base names\n")
|
||||
|
||||
|
||||
def diff_file(a, b):
|
||||
@@ -108,14 +109,18 @@ parser = argparse.ArgumentParser(
|
||||
Verilator_difftree is used for debugging Verilator tree output files.
|
||||
It performs a diff between two files, or all files common between two
|
||||
directories, ignoring irrelevant pointer differences.""",
|
||||
epilog="""Copyright 2005-2025 by Wilson Snyder. This program is free software; you
|
||||
epilog=
|
||||
"""Copyright 2005-2024 by Wilson Snyder. This program is free software; you
|
||||
can redistribute it and/or modify it under the terms of either the GNU
|
||||
Lesser General Public License Version 3 or the Perl Artistic License
|
||||
Version 2.0.
|
||||
|
||||
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0""")
|
||||
|
||||
parser.add_argument('--debug', action='store_const', const=9, help='enable debug')
|
||||
parser.add_argument('--debug',
|
||||
action='store_const',
|
||||
const=9,
|
||||
help='enable debug')
|
||||
parser.add_argument('--no-lineno',
|
||||
action='store_false',
|
||||
help='do not show differences in line numbering')
|
||||
|
||||
+68
-47
@@ -15,7 +15,11 @@ LongestVcdStrValueLength = 0
|
||||
Threads = collections.defaultdict(lambda: []) # List of records per thread id
|
||||
Mtasks = collections.defaultdict(lambda: {'elapsed': 0, 'end': 0})
|
||||
Cpus = collections.defaultdict(lambda: {'mtask_time': 0})
|
||||
Global = {'args': {}, 'cpuinfo': collections.defaultdict(lambda: {}), 'stats': {}}
|
||||
Global = {
|
||||
'args': {},
|
||||
'cpuinfo': collections.defaultdict(lambda: {}),
|
||||
'stats': {}
|
||||
}
|
||||
ElapsedTime = None # total elapsed time
|
||||
ExecGraphTime = 0 # total elapsed time excuting an exec graph
|
||||
ExecGraphIntervals = [] # list of (start, end) pairs
|
||||
@@ -27,7 +31,8 @@ def read_data(filename):
|
||||
with open(filename, "r", encoding="utf8") as fh:
|
||||
re_thread = re.compile(r'^VLPROFTHREAD (\d+)$')
|
||||
re_record = re.compile(r'^VLPROFEXEC (\S+) (\d+)(.*)$')
|
||||
re_payload_mtaskBegin = re.compile(r'id (\d+) predictStart (\d+) cpu (\d+)')
|
||||
re_payload_mtaskBegin = re.compile(
|
||||
r'id (\d+) predictStart (\d+) cpu (\d+)')
|
||||
re_payload_mtaskEnd = re.compile(r'id (\d+) predictCost (\d+)')
|
||||
|
||||
re_arg1 = re.compile(r'VLPROF arg\s+(\S+)\+([0-9.]*)\s*')
|
||||
@@ -36,7 +41,7 @@ def read_data(filename):
|
||||
re_proc_cpu = re.compile(r'VLPROFPROC processor\s*:\s*(\d+)\s*$')
|
||||
re_proc_dat = re.compile(r'VLPROFPROC ([a-z_ ]+)\s*:\s*(.*)$')
|
||||
cpu = None
|
||||
thread = 0
|
||||
thread = None
|
||||
execGraphStart = None
|
||||
|
||||
global LongestVcdStrValueLength
|
||||
@@ -52,21 +57,24 @@ def read_data(filename):
|
||||
tick = int(tick)
|
||||
payload = payload.strip()
|
||||
if kind == "SECTION_PUSH":
|
||||
LongestVcdStrValueLength = max(LongestVcdStrValueLength, len(payload))
|
||||
LongestVcdStrValueLength = max(LongestVcdStrValueLength,
|
||||
len(payload))
|
||||
SectionStack.append(payload)
|
||||
Sections[thread].append((tick, tuple(SectionStack)))
|
||||
Sections.append((tick, tuple(SectionStack)))
|
||||
elif kind == "SECTION_POP":
|
||||
assert SectionStack, "SECTION_POP without SECTION_PUSH"
|
||||
SectionStack.pop()
|
||||
Sections[thread].append((tick, tuple(SectionStack)))
|
||||
Sections.append((tick, tuple(SectionStack)))
|
||||
elif kind == "MTASK_BEGIN":
|
||||
mtask, predict_start, ecpu = re_payload_mtaskBegin.match(payload).groups()
|
||||
mtask, predict_start, ecpu = re_payload_mtaskBegin.match(
|
||||
payload).groups()
|
||||
mtask = int(mtask)
|
||||
predict_start = int(predict_start)
|
||||
ecpu = int(ecpu)
|
||||
mTaskThread[mtask] = thread
|
||||
records = Threads[thread]
|
||||
assert not records or records[-1]['start'] <= records[-1]['end'] <= tick
|
||||
assert not records or records[-1]['start'] <= records[-1][
|
||||
'end'] <= tick
|
||||
records.append({
|
||||
'start': tick,
|
||||
'mtask': mtask,
|
||||
@@ -77,7 +85,8 @@ def read_data(filename):
|
||||
Mtasks[mtask]['thread'] = thread
|
||||
Mtasks[mtask]['predict_start'] = predict_start
|
||||
elif kind == "MTASK_END":
|
||||
mtask, predict_cost = re_payload_mtaskEnd.match(payload).groups()
|
||||
mtask, predict_cost = re_payload_mtaskEnd.match(
|
||||
payload).groups()
|
||||
mtask = int(mtask)
|
||||
predict_cost = int(predict_cost)
|
||||
begin = Mtasks[mtask]['begin']
|
||||
@@ -97,7 +106,6 @@ def read_data(filename):
|
||||
print("-Unknown execution trace record: %s" % line)
|
||||
elif re_thread.match(line):
|
||||
thread = int(re_thread.match(line).group(1))
|
||||
Sections.append([])
|
||||
elif re.match(r'^VLPROF(THREAD|VERSION)', line):
|
||||
pass
|
||||
elif re_arg1.match(line):
|
||||
@@ -155,7 +163,8 @@ def report():
|
||||
|
||||
print("\nSummary:")
|
||||
print(" Total elapsed time = {} rdtsc ticks".format(ElapsedTime))
|
||||
print(" Parallelized code = {:.2%} of elapsed time".format(ExecGraphTime / ElapsedTime))
|
||||
print(" Parallelized code = {:.2%} of elapsed time".format(
|
||||
ExecGraphTime / ElapsedTime))
|
||||
print(" Total threads = %d" % nthreads)
|
||||
print(" Total CPUs used = %d" % ncpus)
|
||||
print(" Total mtasks = %d" % len(Mtasks))
|
||||
@@ -167,12 +176,15 @@ def report():
|
||||
|
||||
if nthreads > ncpus:
|
||||
print()
|
||||
print("%%Warning: There were fewer CPUs (%d) than threads (%d)." % (ncpus, nthreads))
|
||||
print("%%Warning: There were fewer CPUs (%d) than threads (%d)." %
|
||||
(ncpus, nthreads))
|
||||
print(" : See docs on use of numactl.")
|
||||
else:
|
||||
if 'cpu_socket_cores_warning' in Global:
|
||||
print()
|
||||
print("%Warning: Multiple threads scheduled on same hyperthreaded core.")
|
||||
print(
|
||||
"%Warning: Multiple threads scheduled on same hyperthreaded core."
|
||||
)
|
||||
print(" : See docs on use of numactl.")
|
||||
if 'cpu_sockets_warning' in Global:
|
||||
print()
|
||||
@@ -216,7 +228,8 @@ def report_mtasks():
|
||||
serialTime = ElapsedTime - ExecGraphTime
|
||||
|
||||
def subReport(elapsed, work):
|
||||
print(" Thread utilization = {:7.2%}".format(work / (elapsed * nthreads)))
|
||||
print(" Thread utilization = {:7.2%}".format(work /
|
||||
(elapsed * nthreads)))
|
||||
print(" Speedup = {:6.3}x".format(work / elapsed))
|
||||
|
||||
print("\nParallelized code, measured:")
|
||||
@@ -243,7 +256,8 @@ def report_mtasks():
|
||||
if Mtasks[mtask]['elapsed'] > 0:
|
||||
if Mtasks[mtask]['predict_cost'] == 0:
|
||||
Mtasks[mtask]['predict_cost'] = 1 # don't log(0) below
|
||||
p2e_ratio = math.log(Mtasks[mtask]['predict_cost'] / Mtasks[mtask]['elapsed'])
|
||||
p2e_ratio = math.log(Mtasks[mtask]['predict_cost'] /
|
||||
Mtasks[mtask]['elapsed'])
|
||||
p2e_ratios.append(p2e_ratio)
|
||||
|
||||
if p2e_ratio > max_p2e:
|
||||
@@ -255,14 +269,18 @@ def report_mtasks():
|
||||
|
||||
print("\nMTask statistics:")
|
||||
print(" Longest mtask id = {}".format(long_mtask))
|
||||
print(" Longest mtask time = {:.2%} of time elapsed in parallelized code".format(
|
||||
long_mtask_time / ExecGraphTime))
|
||||
print(" Longest mtask time = {:.2%} of time elapsed in parallelized code".
|
||||
format(long_mtask_time / ExecGraphTime))
|
||||
print(" min log(p2e) = %0.3f" % min_p2e, end="")
|
||||
|
||||
print(" from mtask %d (predict %d," % (min_mtask, Mtasks[min_mtask]['predict_cost']), end="")
|
||||
print(" from mtask %d (predict %d," %
|
||||
(min_mtask, Mtasks[min_mtask]['predict_cost']),
|
||||
end="")
|
||||
print(" elapsed %d)" % Mtasks[min_mtask]['elapsed'])
|
||||
print(" max log(p2e) = %0.3f" % max_p2e, end="")
|
||||
print(" from mtask %d (predict %d," % (max_mtask, Mtasks[max_mtask]['predict_cost']), end="")
|
||||
print(" from mtask %d (predict %d," %
|
||||
(max_mtask, Mtasks[max_mtask]['predict_cost']),
|
||||
end="")
|
||||
print(" elapsed %d)" % Mtasks[max_mtask]['elapsed'])
|
||||
|
||||
stddev = statistics.pstdev(p2e_ratios)
|
||||
@@ -297,8 +315,8 @@ def report_cpus():
|
||||
model = cpuinfo['model_name']
|
||||
|
||||
print(" {:3d} | {:7.2%} / {:16d} | {:>6s} | {:>4s} | {}".format(
|
||||
cpu, Cpus[cpu]['mtask_time'] / ElapsedTime, Cpus[cpu]['mtask_time'], socket, core,
|
||||
model))
|
||||
cpu, Cpus[cpu]['mtask_time'] / ElapsedTime,
|
||||
Cpus[cpu]['mtask_time'], socket, core, model))
|
||||
|
||||
if len(Global['cpu_sockets']) > 1:
|
||||
Global['cpu_sockets_warning'] = True
|
||||
@@ -308,27 +326,23 @@ def report_cpus():
|
||||
|
||||
|
||||
def report_sections():
|
||||
for thread, section in enumerate(Sections):
|
||||
if section:
|
||||
print(f"\nSection profile for thread {thread}:")
|
||||
report_section(section)
|
||||
if not Sections:
|
||||
return
|
||||
print("\nSection profile:")
|
||||
|
||||
|
||||
def report_section(section):
|
||||
totalTime = collections.defaultdict(lambda: 0)
|
||||
selfTime = collections.defaultdict(lambda: 0)
|
||||
|
||||
sectionTree = [0, {}, 1] # [selfTime, childTrees, numberOfTimesEntered]
|
||||
prevTime = 0
|
||||
prevStack = ()
|
||||
for time, stack in section:
|
||||
for time, stack in Sections:
|
||||
if len(stack) > len(prevStack):
|
||||
scope = sectionTree
|
||||
for item in stack:
|
||||
scope = scope[1].setdefault(item, [0, {}, 0])
|
||||
scope[2] += 1
|
||||
dt = time - prevTime
|
||||
assert dt >= 0
|
||||
scope = sectionTree
|
||||
for item in prevStack:
|
||||
scope = scope[1].setdefault(item, [0, {}, 0])
|
||||
@@ -352,8 +366,8 @@ def report_section(section):
|
||||
|
||||
def printTree(prefix, name, entries, tree):
|
||||
print(" {:7.2%} | {:7.2%} | {:8} | {:10.2f} | {}".format(
|
||||
treeSum(tree) / ElapsedTime, tree[0] / ElapsedTime, tree[2], tree[2] / entries,
|
||||
prefix + name))
|
||||
treeSum(tree) / ElapsedTime, tree[0] / ElapsedTime, tree[2],
|
||||
tree[2] / entries, prefix + name))
|
||||
for k in sorted(tree[1], key=lambda _: -treeSum(tree[1][_])):
|
||||
printTree(prefix + " ", k, tree[2], tree[1][k])
|
||||
|
||||
@@ -424,8 +438,10 @@ def write_vcd(filename):
|
||||
addValue(code, start, mtask)
|
||||
addValue(code, end, None)
|
||||
|
||||
tStart = sorted(_['start'] for records in Threads.values() for _ in records)
|
||||
tEnd = sorted(_['end'] for records in Threads.values() for _ in records)
|
||||
tStart = sorted(_['start'] for records in Threads.values()
|
||||
for _ in records)
|
||||
tEnd = sorted(_['end'] for records in Threads.values()
|
||||
for _ in records)
|
||||
|
||||
# Predicted graph
|
||||
for start, end in ExecGraphIntervals:
|
||||
@@ -439,10 +455,11 @@ def write_vcd(filename):
|
||||
# Predict mtasks that fill the time the execution occupied
|
||||
for mtask in Mtasks:
|
||||
thread = Mtasks[mtask]['thread']
|
||||
pred_scaled_start = start + int(Mtasks[mtask]['predict_start'] * measured_scaling)
|
||||
pred_scaled_start = start + int(
|
||||
Mtasks[mtask]['predict_start'] * measured_scaling)
|
||||
pred_scaled_end = start + int(
|
||||
(Mtasks[mtask]['predict_start'] + Mtasks[mtask]['predict_cost']) *
|
||||
measured_scaling)
|
||||
(Mtasks[mtask]['predict_start'] +
|
||||
Mtasks[mtask]['predict_cost']) * measured_scaling)
|
||||
if pred_scaled_start == pred_scaled_end:
|
||||
continue
|
||||
|
||||
@@ -462,13 +479,12 @@ def write_vcd(filename):
|
||||
addValue(pcode, time, value)
|
||||
|
||||
# Section graph
|
||||
for thread, section in enumerate(Sections):
|
||||
if section:
|
||||
scode = getCode(LongestVcdStrValueLength * 8, "section", f"t{thread}_trace")
|
||||
dcode = getCode(32, "section", f"t{thread}_depth")
|
||||
for time, stack in section:
|
||||
addValue(scode, time, stack[-1] if stack else None)
|
||||
addValue(dcode, time, len(stack))
|
||||
if Sections:
|
||||
scode = getCode(LongestVcdStrValueLength * 8, "section", "trace")
|
||||
dcode = getCode(32, "section", "depth")
|
||||
for time, stack in Sections:
|
||||
addValue(scode, time, stack[-1] if stack else None)
|
||||
addValue(dcode, time, len(stack))
|
||||
|
||||
# Create output file
|
||||
fh.write("$version Generated by verilator_gantt $end\n")
|
||||
@@ -521,7 +537,7 @@ def write_vcd(filename):
|
||||
parser = argparse.ArgumentParser(
|
||||
allow_abbrev=False,
|
||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||
description="""Create Gantt chart of Verilator multi-threaded execution
|
||||
description="""Create Gantt chart of multi-threaded execution.
|
||||
|
||||
Verilator_gantt creates a visual representation to help analyze Verilator
|
||||
#xmultithreaded simulation performance, by showing when each macro-task
|
||||
@@ -529,7 +545,8 @@ Verilator_gantt creates a visual representation to help analyze Verilator
|
||||
|
||||
For documentation see
|
||||
https://verilator.org/guide/latest/exe_verilator_gantt.html""",
|
||||
epilog="""Copyright 2018-2025 by Wilson Snyder. This program is free software; you
|
||||
epilog=
|
||||
"""Copyright 2018-2024 by Wilson Snyder. This program is free software; you
|
||||
can redistribute it and/or modify it under the terms of either the GNU
|
||||
Lesser General Public License Version 3 or the Perl Artistic License
|
||||
Version 2.0.
|
||||
@@ -537,8 +554,12 @@ Version 2.0.
|
||||
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('--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('filename',
|
||||
help='input profile_exec.dat filename to process',
|
||||
default='profile_exec.dat')
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
# pylint: disable=C0114,C0209
|
||||
#
|
||||
# Copyright 2003-2025 by Wilson Snyder. This program is free software; you
|
||||
# Copyright 2003-2024 by Wilson Snyder. This program is free software; you
|
||||
# can redistribute it and/or modify the Verilator internals under the terms
|
||||
# of either the GNU Lesser General Public License Version 3 or the Perl
|
||||
# Artistic License Version 2.0.
|
||||
|
||||
+23
-12
@@ -34,8 +34,9 @@ def profcfunc(filename):
|
||||
|
||||
# Older gprofs have no call column for single-call functions
|
||||
# %time cumesec selfsec {stuff} name
|
||||
match = re.match(r'^\s*([0-9.]+)\s+[0-9.]+\s+([0-9.]+)\s+[^a-zA-Z_]*([a-zA-Z_].*)$',
|
||||
line)
|
||||
match = re.match(
|
||||
r'^\s*([0-9.]+)\s+[0-9.]+\s+([0-9.]+)\s+[^a-zA-Z_]*([a-zA-Z_].*)$',
|
||||
line)
|
||||
if match:
|
||||
pct = float(match.group(1))
|
||||
sec = float(match.group(2))
|
||||
@@ -135,15 +136,19 @@ def profcfunc(filename):
|
||||
|
||||
design_width = 1
|
||||
for func, func_item in vfuncs.items():
|
||||
design_width = max(design_width, len(func_item['design']))
|
||||
if design_width < len(func_item['design']):
|
||||
design_width = len(func_item['design'])
|
||||
|
||||
print("Verilog code profile:")
|
||||
print(" These are split into three categories:")
|
||||
print(" C++: Time in non-Verilated C++ code")
|
||||
print(" Prof: Time in profile overhead")
|
||||
print(" VBlock: Time attributable to a block in a" + " Verilog file and line")
|
||||
print(" VCommon: Time in a Verilated module," + " due to all parts of the design")
|
||||
print(" VLib: Time in Verilated common libraries," + " called by the Verilated code")
|
||||
print(" VBlock: Time attributable to a block in a" +
|
||||
" Verilog file and line")
|
||||
print(" VCommon: Time in a Verilated module," +
|
||||
" due to all parts of the design")
|
||||
print(" VLib: Time in Verilated common libraries," +
|
||||
" called by the Verilated code")
|
||||
print()
|
||||
|
||||
print(" % cumulative self ")
|
||||
@@ -151,11 +156,13 @@ def profcfunc(filename):
|
||||
"s type filename and line number") % "design")
|
||||
|
||||
cume = 0
|
||||
for func in sorted(vfuncs.keys(), key=lambda f: vfuncs[f]['sec'], reverse=True):
|
||||
for func in sorted(vfuncs.keys(),
|
||||
key=lambda f: vfuncs[f]['sec'],
|
||||
reverse=True):
|
||||
cume += vfuncs[func]['sec']
|
||||
print(("%6.2f %9.2f %8.2f %10d %-" + str(design_width) + "s %s") %
|
||||
(vfuncs[func]['pct'], cume, vfuncs[func]['sec'], vfuncs[func]['calls'],
|
||||
vfuncs[func]['design'], func))
|
||||
(vfuncs[func]['pct'], cume, vfuncs[func]['sec'],
|
||||
vfuncs[func]['calls'], vfuncs[func]['design'], func))
|
||||
|
||||
|
||||
######################################################################
|
||||
@@ -164,7 +171,7 @@ def profcfunc(filename):
|
||||
parser = argparse.ArgumentParser(
|
||||
allow_abbrev=False,
|
||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||
description="""Read gprof report created with Verilator --prof-cfuncs
|
||||
description="""Read gprof report created with --prof-cfuncs.
|
||||
|
||||
Verilator_profcfunc reads a profile report created by gprof. The names of
|
||||
the functions are then transformed, assuming the user used Verilator's
|
||||
@@ -173,14 +180,18 @@ in each Verilog block.
|
||||
|
||||
For documentation see
|
||||
https://verilator.org/guide/latest/exe_verilator_profcfunc.html""",
|
||||
epilog="""Copyright 2002-2025 by Wilson Snyder. This program is free software; you
|
||||
epilog=
|
||||
"""Copyright 2002-2024 by Wilson Snyder. This program is free software; you
|
||||
can redistribute it and/or modify it under the terms of either the GNU
|
||||
Lesser General Public License Version 3 or the Perl Artistic License
|
||||
Version 2.0.
|
||||
|
||||
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0""")
|
||||
|
||||
parser.add_argument('--debug', action='store_const', const=9, help='enable debug')
|
||||
parser.add_argument('--debug',
|
||||
action='store_const',
|
||||
const=9,
|
||||
help='enable debug')
|
||||
parser.add_argument('filename', help='input gprof output to process')
|
||||
|
||||
Args = parser.parse_args()
|
||||
|
||||
+19
-13
@@ -60,14 +60,17 @@ if [ "$CI_BUILD_STAGE_NAME" = "build" ]; then
|
||||
sudo apt-get install libgoogle-perftools-dev ||
|
||||
sudo apt-get install libgoogle-perftools-dev
|
||||
fi
|
||||
if [ "$CI_RUNS_ON" = "ubuntu-20.04" ] || [ "$CI_RUNS_ON" = "ubuntu-22.04" ] || [ "$CI_RUNS_ON" = "ubuntu-24.04" ]; then
|
||||
if [ "$CI_RUNS_ON" = "ubuntu-20.04" ] || [ "$CI_RUNS_ON" = "ubuntu-22.04" ]; then
|
||||
sudo apt-get install libsystemc libsystemc-dev ||
|
||||
sudo apt-get install libsystemc libsystemc-dev
|
||||
fi
|
||||
if [ "$CI_RUNS_ON" = "ubuntu-22.04" ] || [ "$CI_RUNS_ON" = "ubuntu-24.04" ]; then
|
||||
if [ "$CI_RUNS_ON" = "ubuntu-22.04" ]; then
|
||||
sudo apt-get install bear mold ||
|
||||
sudo apt-get install bear mold
|
||||
fi
|
||||
if [ "$COVERAGE" = 1 ]; then
|
||||
yes yes | sudo cpan -fi Parallel::Forker
|
||||
fi
|
||||
elif [ "$CI_OS_NAME" = "osx" ]; then
|
||||
brew update
|
||||
brew install ccache perl gperftools
|
||||
@@ -89,31 +92,34 @@ elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then
|
||||
sudo apt-get update ||
|
||||
sudo apt-get update
|
||||
# libfl-dev needed for internal coverage's test runs
|
||||
sudo apt-get install gdb gtkwave lcov libfl-dev ccache jq z3 ||
|
||||
sudo apt-get install gdb gtkwave lcov libfl-dev ccache jq z3
|
||||
# Required for test_regress/t/t_dist_attributes.py
|
||||
if [ "$CI_RUNS_ON" = "ubuntu-22.04" ] || [ "$CI_RUNS_ON" = "ubuntu-24.04" ]; then
|
||||
sudo apt-get install python3-clang mold ||
|
||||
sudo apt-get install python3-clang mold
|
||||
sudo apt-get install gdb gtkwave lcov libfl-dev ccache ||
|
||||
sudo apt-get install gdb gtkwave lcov libfl-dev ccache
|
||||
# Required for test_regress/t/t_dist_attributes.pl
|
||||
if [ "$CI_RUNS_ON" = "ubuntu-22.04" ]; then
|
||||
sudo apt-get install libclang-dev mold ||
|
||||
sudo apt-get install libclang-dev mold
|
||||
pip3 install clang==14.0
|
||||
fi
|
||||
if [ "$CI_RUNS_ON" = "ubuntu-20.04" ] || [ "$CI_RUNS_ON" = "ubuntu-22.04" ] || [ "$CI_RUNS_ON" = "ubuntu-24.04" ]; then
|
||||
if [ "$CI_RUNS_ON" = "ubuntu-20.04" ] || [ "$CI_RUNS_ON" = "ubuntu-22.04" ]; then
|
||||
sudo apt-get install libsystemc-dev ||
|
||||
sudo apt-get install libsystemc-dev
|
||||
fi
|
||||
elif [ "$CI_OS_NAME" = "osx" ]; then
|
||||
brew update
|
||||
# brew cask install gtkwave # fst2vcd hangs at launch, so don't bother
|
||||
brew install ccache perl jq z3
|
||||
brew install ccache perl
|
||||
elif [ "$CI_OS_NAME" = "freebsd" ]; then
|
||||
# fst2vcd fails with "Could not open '<input file>', exiting."
|
||||
sudo pkg install -y ccache gmake perl5 python3 jq z3
|
||||
sudo pkg install -y ccache gmake perl5 python3
|
||||
else
|
||||
fatal "Unknown os: '$CI_OS_NAME'"
|
||||
fi
|
||||
# Common installs
|
||||
if [ "$CI_RUNS_ON" != "ubuntu-14.04" ]; then
|
||||
CI_CPAN_REPO=https://cpan.org
|
||||
fi
|
||||
yes yes | sudo cpan -M $CI_CPAN_REPO -fi Parallel::Forker
|
||||
install-vcddiff
|
||||
# Workaround -fsanitize=address crash
|
||||
sudo sysctl -w vm.mmap_rnd_bits=28
|
||||
else
|
||||
##############################################################################
|
||||
# Unknown build stage
|
||||
|
||||
+11
-29
@@ -33,7 +33,6 @@ elif [ "$CI_OS_NAME" = "freebsd" ]; then
|
||||
else
|
||||
fatal "Unknown os: '$CI_OS_NAME'"
|
||||
fi
|
||||
NPROC=$(expr $NPROC '+' 1)
|
||||
|
||||
if [ "$CI_BUILD_STAGE_NAME" = "build" ]; then
|
||||
##############################################################################
|
||||
@@ -41,7 +40,7 @@ if [ "$CI_BUILD_STAGE_NAME" = "build" ]; then
|
||||
|
||||
if [ "$COVERAGE" != 1 ]; then
|
||||
autoconf
|
||||
./configure --enable-longtests --enable-ccwarn --prefix="$INSTALL_DIR"
|
||||
./configure --enable-longtests --enable-ccwarn
|
||||
ccache -z
|
||||
"$MAKE" -j "$NPROC" -k
|
||||
# 22.04: ccache -s -v
|
||||
@@ -62,7 +61,6 @@ elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then
|
||||
# Run tests
|
||||
|
||||
export VERILATOR_TEST_NO_CONTRIBUTORS=1 # Separate workflow check
|
||||
export VERILATOR_TEST_NO_LINT_PY=1 # Separate workflow check
|
||||
|
||||
if [ "$CI_OS_NAME" = "osx" ]; then
|
||||
export VERILATOR_TEST_NO_GDB=1 # Pain to get GDB to work on OS X
|
||||
@@ -87,42 +85,25 @@ elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then
|
||||
fi
|
||||
|
||||
# Run sanitize on Ubuntu 22.04 only
|
||||
( [ "$CI_RUNS_ON" = 'ubuntu-22.04' ] || [ "$CI_RUNS_ON" = 'ubuntu-24.04' ] ) && sanitize='--sanitize' || sanitize=''
|
||||
|
||||
TEST_REGRESS=test_regress
|
||||
if [ "$CI_RELOC" == 1 ]; then
|
||||
# Testing that the installation is relocatable.
|
||||
"$MAKE" install
|
||||
mkdir -p "$RELOC_DIR"
|
||||
mv "$INSTALL_DIR" "$RELOC_DIR/relocated-install"
|
||||
export VERILATOR_ROOT="$RELOC_DIR/relocated-install/share/verilator"
|
||||
TEST_REGRESS="$RELOC_DIR/test_regress"
|
||||
mv test_regress "$TEST_REGRESS"
|
||||
# Feeling brave?
|
||||
find . -delete
|
||||
ls -la .
|
||||
fi
|
||||
[ "$CI_RUNS_ON" = 'ubuntu-22.04' ] && sanitize='--sanitize' || sanitize=''
|
||||
|
||||
# Run the specified test
|
||||
ccache -z
|
||||
case $TESTS in
|
||||
dist-vlt-0)
|
||||
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt $sanitize" DRIVER_HASHSET=--hashset=0/4
|
||||
"$MAKE" -C test_regress SCENARIOS="--dist --vlt $sanitize" DRIVER_HASHSET=--hashset=0/3
|
||||
;;
|
||||
dist-vlt-1)
|
||||
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt $sanitize" DRIVER_HASHSET=--hashset=1/4
|
||||
"$MAKE" -C test_regress SCENARIOS="--dist --vlt $sanitize" DRIVER_HASHSET=--hashset=1/3
|
||||
;;
|
||||
dist-vlt-2)
|
||||
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt $sanitize" DRIVER_HASHSET=--hashset=2/4
|
||||
;;
|
||||
dist-vlt-3)
|
||||
"$MAKE" -C "$TEST_REGRESS" SCENARIOS="--dist --vlt $sanitize" DRIVER_HASHSET=--hashset=3/4
|
||||
"$MAKE" -C test_regress SCENARIOS="--dist --vlt $sanitize" DRIVER_HASHSET=--hashset=2/3
|
||||
;;
|
||||
vltmt-0)
|
||||
"$MAKE" -C "$TEST_REGRESS" SCENARIOS=--vltmt DRIVER_HASHSET=--hashset=0/2
|
||||
"$MAKE" -C test_regress SCENARIOS=--vltmt DRIVER_HASHSET=--hashset=0/2
|
||||
;;
|
||||
vltmt-1)
|
||||
"$MAKE" -C "$TEST_REGRESS" SCENARIOS=--vltmt DRIVER_HASHSET=--hashset=1/2
|
||||
"$MAKE" -C test_regress SCENARIOS=--vltmt DRIVER_HASHSET=--hashset=1/2
|
||||
;;
|
||||
coverage-all)
|
||||
nodist/code_coverage --stages 1-
|
||||
@@ -194,12 +175,13 @@ elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then
|
||||
fatal "Unknown test: $TESTS"
|
||||
;;
|
||||
esac
|
||||
|
||||
# To see load average (1 minute, 5 minute, 15 minute)
|
||||
uptime
|
||||
# 22.04: ccache -s -v
|
||||
ccache -s
|
||||
|
||||
# Upload coverage data
|
||||
if [[ $TESTS == coverage-* ]]; then
|
||||
bash <(cat ci/coverage-upload.sh) -f nodist/obj_dir/coverage/app_total.info
|
||||
fi
|
||||
else
|
||||
##############################################################################
|
||||
# Unknown build stage
|
||||
|
||||
+8
-21
@@ -1,26 +1,13 @@
|
||||
# DESCRIPTION: Verilator: CI Windows Power Shell - Compile Verilator
|
||||
#
|
||||
# Copyright 2024 by Wilson Snyder. This program is free software; you
|
||||
# can redistribute it and/or modify it under the terms of either the GNU
|
||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||
# Version 2.0.
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
################################################################################
|
||||
|
||||
Set-PSDebug -Trace 1
|
||||
|
||||
if (-Not (Test-Path $PWD/../.ccache/win_bison.exe)) {
|
||||
git clone --depth 1 https://github.com/lexxmark/winflexbison
|
||||
cd winflexbison
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. --install-prefix $PWD/../../../.ccache
|
||||
cmake --build . --config Release -j 3
|
||||
cmake --install . --prefix $PWD/../../../.ccache
|
||||
cd ../..
|
||||
git clone --depth 1 https://github.com/lexxmark/winflexbison
|
||||
cd winflexbison
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. --install-prefix $PWD/../../../.ccache
|
||||
cmake --build . --config Release -j 3
|
||||
cmake --install . --prefix $PWD/../../../.ccache
|
||||
cd ../..
|
||||
}
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. --install-prefix $PWD/../install
|
||||
|
||||
+1
-17
@@ -1,16 +1,3 @@
|
||||
# DESCRIPTION: Verilator: CI Windows Power Shell - Verilate a test
|
||||
#
|
||||
# Copyright 2024 by Wilson Snyder. This program is free software; you
|
||||
# can redistribute it and/or modify it under the terms of either the GNU
|
||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||
# Version 2.0.
|
||||
#
|
||||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
################################################################################
|
||||
|
||||
|
||||
Set-PSDebug -Trace 1
|
||||
|
||||
cd install
|
||||
$Env:VERILATOR_ROOT=$PWD
|
||||
cd examples/cmake_tracing_c
|
||||
@@ -18,9 +5,6 @@ mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
cmake --build . --config Release -j 3
|
||||
|
||||
# TODO put this back in, see issue# 5163
|
||||
# Release/example.exe
|
||||
|
||||
Release/example.exe
|
||||
cd ..
|
||||
Remove-Item -path build -recurse
|
||||
|
||||
BIN
Binary file not shown.
Executable
+1884
File diff suppressed because it is too large
Load Diff
@@ -43,7 +43,6 @@ RUN apt-get update \
|
||||
perl \
|
||||
python3 \
|
||||
wget \
|
||||
z3 \
|
||||
zlib1g \
|
||||
zlib1g-dev \
|
||||
&& apt-get clean \
|
||||
@@ -51,6 +50,8 @@ RUN apt-get update \
|
||||
|
||||
WORKDIR /tmp
|
||||
|
||||
RUN cpan install -fi Parallel::Forker
|
||||
|
||||
RUN git clone https://github.com/veripool/vcddiff.git && \
|
||||
make -C vcddiff && \
|
||||
cp -p vcddiff/vcddiff /usr/local/bin/vcddiff && \
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
.. _Verilator Build Docker Container:
|
||||
|
||||
Verilator Build Docker Container
|
||||
================================
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
Verilator Executable Docker Container
|
||||
@@ -11,11 +11,10 @@ easily as a docker image, e.g.:
|
||||
|
||||
docker run -ti verilator/verilator:latest --version
|
||||
|
||||
This will pull the container from `docker hub
|
||||
<https://hub.docker.com/r/verilator/verilator>`_, run the latest Verilator and print
|
||||
This will install the container, run the latest Verilator and print
|
||||
Verilator's version.
|
||||
|
||||
Containers are automatically built and pushed to docker hub for all released versions, so you may
|
||||
Containers are automatically built for all released versions, so you may
|
||||
easily compare results across versions, e.g.:
|
||||
|
||||
::
|
||||
|
||||
+18
-16
@@ -1,7 +1,6 @@
|
||||
---
|
||||
# DESCRIPTION: codecov.io config
|
||||
#
|
||||
# Copyright 2020-2025 by Wilson Snyder. This program is free software; you
|
||||
# Copyright 2020-2024 by Wilson Snyder. This program is free software; you
|
||||
# can redistribute it and/or modify it under the terms of either the GNU
|
||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||
# Version 2.0.
|
||||
@@ -9,28 +8,31 @@
|
||||
####################
|
||||
# Validate:
|
||||
# curl --data-binary @codecov.yml https://codecov.io/validate
|
||||
#
|
||||
|
||||
codecov:
|
||||
require_ci_to_pass: false
|
||||
require_ci_to_pass: no
|
||||
|
||||
coverage:
|
||||
precision: 2
|
||||
round: down
|
||||
range: 50...100
|
||||
range: "50...100"
|
||||
ignore:
|
||||
- "ci" #
|
||||
- "docs" #
|
||||
- "examples" #
|
||||
- "include/gtkwave" #
|
||||
- "include/vltstd" #
|
||||
- "test_regress" #
|
||||
- "ci"
|
||||
- "docs"
|
||||
- "examples"
|
||||
- "include/gtkwave"
|
||||
- "include/vltstd"
|
||||
- "test_regress"
|
||||
|
||||
parsers:
|
||||
gcov:
|
||||
branch_detection:
|
||||
conditional: true
|
||||
loop: true
|
||||
method: false
|
||||
macro: false
|
||||
conditional: yes
|
||||
loop: yes
|
||||
method: no
|
||||
macro: no
|
||||
|
||||
comment:
|
||||
layout: "reach,diff,flags,tree"
|
||||
behavior: default
|
||||
require_changes: true
|
||||
require_changes: yes
|
||||
|
||||
+35
-90
@@ -1,16 +1,16 @@
|
||||
# DESCRIPTION: Process this file with autoconf to produce a configure script.
|
||||
#
|
||||
# Copyright 2003-2025 by Wilson Snyder. Verilator is free software; you
|
||||
# Copyright 2003-2024 by Wilson Snyder. Verilator is free software; you
|
||||
# can redistribute it and/or modify it under the terms of either the GNU Lesser
|
||||
# General Public License Version 3 or the Perl Artistic License Version 2.0.
|
||||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
# When releasing, also update header of Changes file, and CMakeLists.txt,
|
||||
# When releasing, also update header of Changes file, and CmakeLists.txt,
|
||||
# and commit using "devel release" or "Version bump" message
|
||||
# Then 'make maintainer-dist'
|
||||
#AC_INIT([Verilator],[#.### YYYY-MM-DD])
|
||||
#AC_INIT([Verilator],[#.### devel])
|
||||
AC_INIT([Verilator],[5.034 2025-02-24],
|
||||
AC_INIT([Verilator],[5.022 2024-02-24],
|
||||
[https://verilator.org],
|
||||
[verilator],[https://verilator.org])
|
||||
|
||||
@@ -29,9 +29,6 @@ AC_DEFINE_UNQUOTED([PACKAGE_VERSION_STRING_CHAR],
|
||||
[Package version as a number])
|
||||
AC_SUBST(PACKAGE_VERSION_STRING_CHAR)
|
||||
|
||||
######################################################################
|
||||
## Arguments/flag checking
|
||||
|
||||
# Ignore automake flags passed by Ubuntu builds
|
||||
AC_ARG_ENABLE([dependency-tracking],
|
||||
[AS_HELP_STRING([--disable-dependency-tracking], [ignored])])
|
||||
@@ -137,33 +134,6 @@ AC_ARG_ENABLE([longtests],
|
||||
AC_SUBST(CFG_WITH_LONGTESTS)
|
||||
AC_MSG_RESULT($CFG_WITH_LONGTESTS)
|
||||
|
||||
AC_CHECK_PROG(HAVE_Z3,z3,yes)
|
||||
AC_CHECK_PROG(HAVE_CVC5,cvc5,yes)
|
||||
AC_CHECK_PROG(HAVE_CVC4,cvc4,yes)
|
||||
|
||||
# Special Substitutions - CFG_WITH_SOLVER
|
||||
AC_MSG_CHECKING(for SMT solver)
|
||||
AC_ARG_WITH([solver],
|
||||
[AS_HELP_STRING([--with-solver='z3 --in'],
|
||||
[set default SMT solver for constrained randomization])],
|
||||
[CFG_WITH_SOLVER="${withval}"],
|
||||
[CFG_WITH_SOLVER=no
|
||||
if test "x$HAVE_Z3" = "xyes"; then
|
||||
CFG_WITH_SOLVER="z3 --in"
|
||||
elif test "x$HAVE_CVC5" = "xyes"; then
|
||||
CFG_WITH_SOLVER="cvc5 --incremental"
|
||||
elif test "x$HAVE_CVC4" = "xyes"; then
|
||||
CFG_WITH_SOLVER="cvc4 --lang=smt2 --incremental"
|
||||
fi]
|
||||
)
|
||||
AC_SUBST(CFG_WITH_SOLVER)
|
||||
AC_MSG_RESULT($CFG_WITH_SOLVER)
|
||||
|
||||
######################################################################
|
||||
## Compiler checks
|
||||
|
||||
AC_MSG_RESULT([compiler CXX inbound is set to... $CXX])
|
||||
|
||||
# Compiler flags (ensure they are not empty to avoid configure defaults)
|
||||
CFLAGS="$CFLAGS "
|
||||
CPPFLAGS="$CPPFLAGS "
|
||||
@@ -176,10 +146,8 @@ AC_PROG_CXX
|
||||
AC_PROG_INSTALL
|
||||
|
||||
AC_LANG_PUSH(C++)
|
||||
CFG_CXX_VERSION=`$CXX --version | head -1`
|
||||
AC_MSG_RESULT([compiler $CXX --version = $CFG_CXX_VERSION])
|
||||
AC_SUBST(CFG_CXX_VERSION)
|
||||
|
||||
cxx_version=$($CXX --version | head -1)
|
||||
AC_MSG_RESULT([compiler is $CXX --version = $cxx_version])
|
||||
AC_MSG_CHECKING([that C++ compiler can compile simple program])
|
||||
AC_RUN_IFELSE(
|
||||
[AC_LANG_SOURCE([int main() { return 0; }])],
|
||||
@@ -192,26 +160,24 @@ if test "x$AR" = "x" ; then
|
||||
AC_MSG_ERROR([Cannot find "ar" in your PATH, please install it])
|
||||
fi
|
||||
|
||||
AC_CHECK_PROG(PERL,perl,perl)
|
||||
AC_PATH_PROG(PERL,perl)
|
||||
if test "x$PERL" = "x" ; then
|
||||
AC_MSG_ERROR([Cannot find "perl" in your PATH, please install it])
|
||||
fi
|
||||
|
||||
AC_CHECK_PROG(PYTHON3,python3,python3)
|
||||
AC_PATH_PROG(PYTHON3,python3)
|
||||
if test "x$PYTHON3" = "x" ; then
|
||||
AC_MSG_ERROR([Cannot find "python3" in your PATH, please install it])
|
||||
fi
|
||||
python3_version=$($PYTHON3 --version | head -1)
|
||||
AC_MSG_RESULT([$PYTHON3 --version = $python3_version])
|
||||
|
||||
AC_CHECK_PROG(LEX,flex,flex)
|
||||
AC_PATH_PROG(LEX,flex)
|
||||
if test "x$LEX" = "x" ; then
|
||||
AC_MSG_ERROR([Cannot find "flex" in your PATH, please install it])
|
||||
fi
|
||||
flex_version=$($LEX --version | head -1)
|
||||
AC_MSG_RESULT([$LEX --version = $flex_version])
|
||||
|
||||
AC_CHECK_PROG(YACC,bison,bison)
|
||||
AC_PATH_PROG(YACC,bison)
|
||||
if test "x$YACC" = "x" ; then
|
||||
AC_MSG_ERROR([Cannot find "bison" in your PATH, please install it])
|
||||
fi
|
||||
@@ -300,43 +266,6 @@ AC_DEFUN([_MY_CXX_CHECK_OPT],
|
||||
_MY_CXX_CHECK_IFELSE($2, $1="$$1 $2")
|
||||
])
|
||||
|
||||
AC_DEFUN([_MY_CXX_CHECK_CORO_SET],
|
||||
[# _MY_CXX_CHECK_CORO_SET(variable,option)
|
||||
# Check if compiler supports coroutines with specific option. If it does,
|
||||
# set variable to option, only if not previously set.
|
||||
# Define HAVE_COROUTINES if supported.
|
||||
if test "$$1" = ""; then
|
||||
if test "$2" != ""; then
|
||||
_my_msg_opt=" with $2"
|
||||
else
|
||||
_my_msg_opt=""
|
||||
fi
|
||||
AC_MSG_CHECKING([whether coroutines are supported by $CXX$_my_msg_opt])
|
||||
ACO_SAVE_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $2"
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([
|
||||
#if defined(__clang__) && !defined(__cpp_impl_coroutine)
|
||||
#define __cpp_impl_coroutine 1
|
||||
#endif
|
||||
#include <coroutine>
|
||||
],[[std::coroutine_handle<> h;]])],
|
||||
[_my_result=yes],
|
||||
[AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[#include <experimental/coroutine>],
|
||||
[[std::experimental::coroutine_handle<> h;]])],
|
||||
[_my_result=yes],
|
||||
[_my_result=no])])
|
||||
AC_MSG_RESULT($_my_result)
|
||||
CXXFLAGS="$ACO_SAVE_CXXFLAGS"
|
||||
if test "$_my_result" = "yes" ; then
|
||||
$1="$2"
|
||||
AC_DEFINE([HAVE_COROUTINES],[1],[Defined if coroutines are supported by $CXX])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([_MY_LDLIBS_CHECK_FLAG],
|
||||
[# _MY_LDLIBS_CHECK_FLAG(flag) -- Check if linker supports specific options
|
||||
# Set $_my_result appropriately
|
||||
@@ -422,12 +351,32 @@ _MY_CXX_CHECK_OPT(CFG_CXXFLAGS_WEXTRA,-Wthread-safety)
|
||||
AC_SUBST(CFG_CXXFLAGS_WEXTRA)
|
||||
|
||||
# Flags for coroutine support for dynamic scheduling
|
||||
_MY_CXX_CHECK_CORO_SET(CFG_CXXFLAGS_COROUTINES, "")
|
||||
_MY_CXX_CHECK_CORO_SET(CFG_CXXFLAGS_COROUTINES,-fcoroutines-ts)
|
||||
_MY_CXX_CHECK_CORO_SET(CFG_CXXFLAGS_COROUTINES,-fcoroutines)
|
||||
_MY_CXX_CHECK_CORO_SET(CFG_CXXFLAGS_COROUTINES,-fcoroutines-ts -Wno-deprecated-experimental-coroutine)
|
||||
_MY_CXX_CHECK_CORO_SET(CFG_CXXFLAGS_COROUTINES,-std=gnu++20)
|
||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_COROUTINES,-fcoroutines-ts)
|
||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_COROUTINES,-fcoroutines)
|
||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_COROUTINES,-fcoroutines-ts -Wno-deprecated-experimental-coroutine)
|
||||
AC_SUBST(CFG_CXXFLAGS_COROUTINES)
|
||||
|
||||
# HAVE_COROUTINES
|
||||
# Check if coroutines are supported at all
|
||||
AC_MSG_CHECKING([whether coroutines are supported by $CXX])
|
||||
ACO_SAVE_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $CFG_CXXFLAGS_COROUTINES"
|
||||
AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([
|
||||
#ifdef __clang__
|
||||
#define __cpp_impl_coroutine 1
|
||||
#endif
|
||||
#include <coroutine>
|
||||
],[[]])],
|
||||
[_my_result=yes
|
||||
AC_DEFINE([HAVE_COROUTINES],[1],[Defined if coroutines are supported by $CXX])],
|
||||
[AC_LINK_IFELSE(
|
||||
[AC_LANG_PROGRAM([#include <experimental/coroutine>],[[]])],
|
||||
[_my_result=yes
|
||||
AC_DEFINE([HAVE_COROUTINES],[1],[Defined if coroutines are supported by $CXX])],
|
||||
[_my_result=no])])
|
||||
AC_MSG_RESULT($_my_result)
|
||||
CXXFLAGS="$ACO_SAVE_CXXFLAGS"
|
||||
AC_SUBST(HAVE_COROUTINES)
|
||||
|
||||
# Flags for compiling Verilator internals including parser always
|
||||
@@ -478,7 +427,6 @@ m4_foreach([cflag],[
|
||||
[-Wno-parentheses-equality],
|
||||
[-Wno-shadow],
|
||||
[-Wno-sign-compare],
|
||||
[-Wno-subobject-linkage],
|
||||
[-Wno-tautological-bitwise-compare],
|
||||
[-Wno-tautological-compare],
|
||||
[-Wno-uninitialized],
|
||||
@@ -539,7 +487,7 @@ _MY_LDLIBS_CHECK_IFELSE(
|
||||
[if test "$CFG_WITH_TCMALLOC" != "no"; then
|
||||
CFG_LIBS="$LTCMALLOC $CFG_LIBS";
|
||||
# If using tcmalloc, add some extra options to make the compiler not assume
|
||||
# it is using its own versions of the standard library functions
|
||||
# it is using it's own versions of the standard library functions
|
||||
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-fno-builtin-malloc)
|
||||
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-fno-builtin-calloc)
|
||||
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-fno-builtin-realloc)
|
||||
@@ -636,9 +584,6 @@ AC_SUBST(HAVE_SYSTEMC)
|
||||
|
||||
# Checks for system services
|
||||
|
||||
######################################################################
|
||||
## Output
|
||||
|
||||
# Other install directories
|
||||
pkgdatadir=${datadir}/verilator
|
||||
AC_SUBST(pkgdatadir)
|
||||
|
||||
@@ -7,8 +7,8 @@ This contributing document contains some suggestions that may make
|
||||
contributions flow more efficiently.
|
||||
|
||||
|
||||
Did you find a Verilator bug?
|
||||
-----------------------------
|
||||
Did you find a bug?
|
||||
-------------------
|
||||
|
||||
- Please **ensure the bug was not already reported** by searching
|
||||
`Verilator Issues <https://verilator.org/issues>`__.
|
||||
@@ -28,8 +28,8 @@ Did you find a Verilator bug?
|
||||
<https://github.com/verilator/verilator/blob/master/docs/internals.rst>`__.
|
||||
|
||||
|
||||
Did you write a patch that fixes a Verilator bug?
|
||||
-------------------------------------------------
|
||||
Did you write a patch that fixes a bug?
|
||||
---------------------------------------
|
||||
|
||||
- Please `Open a new Verilator issue <https://verilator.org/issues/new>`__
|
||||
if there is not one already describing the bug.
|
||||
@@ -72,8 +72,8 @@ Did you write a patch that fixes a Verilator bug?
|
||||
- Most important is we get your patch.
|
||||
|
||||
|
||||
Do you have questions on Verilator?
|
||||
-----------------------------------
|
||||
Do you have questions?
|
||||
----------------------
|
||||
|
||||
- Please see FAQ section and rest of the `Verilator
|
||||
manual <https://verilator.org/verilator_doc.html>`__, or `Verilator
|
||||
|
||||
@@ -7,29 +7,22 @@ Adam Bagley
|
||||
Adrian Sampson
|
||||
Adrien Le Masle
|
||||
Ahmed El-Mahmoudy
|
||||
Aidan McNay
|
||||
Aleksander Kiryk
|
||||
Alex Chadwick
|
||||
Alex Solomatnikov
|
||||
Àlex Torregrosa
|
||||
Aliaksei Chapyzhenka
|
||||
Ameya Vikram Singh
|
||||
Andrea Calabrese
|
||||
Andreas Kuster
|
||||
Andrei Kostovski
|
||||
Andrew Miloradovsky
|
||||
Andrew Nolte
|
||||
Anthony Donlon
|
||||
Anthony Moore
|
||||
Arkadiusz Kozdra
|
||||
Arthur Rosa
|
||||
Aylon Chaim Porat
|
||||
Bartłomiej Chmiel
|
||||
Cameron Kirk
|
||||
Chih-Mao Chen
|
||||
Chris Bachhuber
|
||||
Chris Randall
|
||||
Christopher Taylor
|
||||
Chuxuan Wang
|
||||
Chykon
|
||||
Conor McCullough
|
||||
@@ -38,41 +31,31 @@ Daniel Bates
|
||||
David Horton
|
||||
David Ledger
|
||||
David Metz
|
||||
Dave Sargeant
|
||||
David Stanford
|
||||
David Turner
|
||||
Dercury
|
||||
Diego Roux
|
||||
Don Williamson
|
||||
Drew Ranck
|
||||
Drew Taussig
|
||||
Driss Hafdi
|
||||
Edgar E. Iglesias
|
||||
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
|
||||
G-A. Kamendje
|
||||
Garrett Smith
|
||||
Geza Lore
|
||||
Gianfranco Costamagna
|
||||
Gijs Burghoorn
|
||||
Glen Gibb
|
||||
Gökçe Aydos
|
||||
Graham Rushton
|
||||
Greg Davill
|
||||
Guokai Chen
|
||||
Gus Smith
|
||||
Gustav Svensk
|
||||
Han Qi
|
||||
Harald Heckmann
|
||||
Hennadii Chernyshchyk
|
||||
Howard Su
|
||||
@@ -86,7 +69,6 @@ Iru Cai
|
||||
Ivan Vnučec
|
||||
Iztok Jeras
|
||||
Jake Merdich
|
||||
James Bailey
|
||||
James Hanlon
|
||||
James Hutchinson
|
||||
James Pallister
|
||||
@@ -101,7 +83,6 @@ Jesse Taube
|
||||
Jevin Sweval
|
||||
Jiacheng Qian
|
||||
Jiamin Zhu
|
||||
Jitesh Nayak
|
||||
Jinyan Xu
|
||||
Jiuyang Liu
|
||||
Joey Liu
|
||||
@@ -122,20 +103,14 @@ Justin Thiel
|
||||
Kaleb Barrett
|
||||
Kamil Rakoczy
|
||||
Kanad Kanhere
|
||||
Kefa Chen
|
||||
Keith Colbert
|
||||
Kevin Kiningham
|
||||
Kevin Nygaard
|
||||
Kritik Bhimani
|
||||
Krzysztof Bieganski
|
||||
Krzysztof Boronski
|
||||
Krzysztof Boroński
|
||||
Krzysztof Obłonczek
|
||||
Krzysztof Starecki
|
||||
Kuba Ober
|
||||
Larry Doolittle
|
||||
Liam Braun
|
||||
Luca Colagrande
|
||||
Ludwig Rogiers
|
||||
Lukasz Dalek
|
||||
Maarten De Braekeleer
|
||||
@@ -149,7 +124,6 @@ Marshal Qiao
|
||||
Martin Schmidt
|
||||
Martin Stadler
|
||||
Matthew Ballance
|
||||
Michael Bikovitsky
|
||||
Michael Killough
|
||||
Michaël Lefebvre
|
||||
Michal Czyz
|
||||
@@ -158,26 +132,18 @@ Miodrag Milanović
|
||||
Mladen Slijepcevic
|
||||
Morten Borup Petersen
|
||||
Mostafa Gamal
|
||||
Moubarak Jeje
|
||||
Nandu Raj
|
||||
Natan Kreimer
|
||||
Nathan Graybeal
|
||||
Nathan Kohagen
|
||||
Nathan Myers
|
||||
Nick Brereton
|
||||
Nolan Poe
|
||||
Oleh Maksymenko
|
||||
Patrick Stewart
|
||||
Paul Bowen-Huggett
|
||||
Paul Swirhun
|
||||
Paul Wright
|
||||
Pawel Jewstafjew
|
||||
Pawel Sagan
|
||||
Pengcheng Xu
|
||||
Peter Debacker
|
||||
Peter Horvath
|
||||
Peter Monsson
|
||||
Philip Axer
|
||||
Philipp Wagner
|
||||
Pierre-Henri Horrein
|
||||
Pieter Kapsenberg
|
||||
@@ -187,27 +153,22 @@ Quentin Corradi
|
||||
Rafal Kapuscik
|
||||
Rasfunk
|
||||
Raynard Qiao
|
||||
Ricardo Barbedo
|
||||
Richard Myers
|
||||
Risto Pejašinović
|
||||
Robert Balas
|
||||
Rupert Swarbrick
|
||||
Ryan Ziegler
|
||||
Ryszard Rozak
|
||||
Samuel Riedel
|
||||
Sean Cross
|
||||
Sebastien Van Cauwenberghe
|
||||
Sergi Granell
|
||||
Seth Pellegrino
|
||||
Srinivasan Venkataramanan
|
||||
Stefan Wallentowitz
|
||||
Stephen Henry
|
||||
Steven Hugg
|
||||
sumpster
|
||||
Szymon Gizler
|
||||
Sören Tempel
|
||||
Teng Huang
|
||||
Tom Manner
|
||||
Tim Hutt
|
||||
Tim Snyder
|
||||
Tobias Rosenkranz
|
||||
@@ -216,13 +177,10 @@ Todd Strader
|
||||
Tomasz Gorochowik
|
||||
Topa Topino
|
||||
Toru Niina
|
||||
Trung Nguyen
|
||||
Tudor Timi
|
||||
Tymoteusz Blazejczyk
|
||||
Udi Finkelstein
|
||||
Unai Martinez-Corral
|
||||
Udaya Raj Subedi
|
||||
Valentin Atepalikhin
|
||||
Varun Koyyalagunta
|
||||
Vassilis Papaefstathiou
|
||||
Veripool API Bot
|
||||
@@ -231,9 +189,6 @@ Vito Gamberini
|
||||
William D. Jones
|
||||
Wilson Snyder
|
||||
Xi Zhang
|
||||
Yan Xu
|
||||
Yangyu Chen
|
||||
Yilou Wang
|
||||
Yinan Xu
|
||||
Yoda Lee
|
||||
Yossi Nivin
|
||||
@@ -245,4 +200,3 @@ Zhanglei Wang
|
||||
Zhou Shen
|
||||
Zixi Li
|
||||
أحمد المحمودي
|
||||
404allen404
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@
|
||||
#
|
||||
# Code available from: https://verilator.org
|
||||
#
|
||||
# Copyright 2003-2025 by Wilson Snyder. This program is free software; you
|
||||
# Copyright 2003-2024 by Wilson Snyder. This program is free software; you
|
||||
# can redistribute it and/or modify it under the terms of either the GNU
|
||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||
# Version 2.0.
|
||||
@@ -23,7 +23,7 @@ SPHINXBUILD ?= sphinx-build
|
||||
SOURCEDIR = guide
|
||||
BUILDDIR = _build
|
||||
|
||||
SPHINXOPTS ?= -c guide -j 4
|
||||
SPHINXOPTS ?= -c guide
|
||||
ifneq ($(VERILATOR_ANALYTICS_ID),)
|
||||
SPHINXOPTS += -D html_theme_options.analytics_id=$(VERILATOR_ANALYTICS_ID)
|
||||
endif
|
||||
|
||||
@@ -23,7 +23,9 @@ class VlSphinxExtract:
|
||||
outname = match.group(1)
|
||||
print("Writing %s" % outname)
|
||||
fhw = open(outname, "w", encoding="utf8") # pylint: disable=consider-using-with
|
||||
fhw.write(".. comment: generated by vl_sphinx_extract from " + filename + "\n")
|
||||
fhw.write(
|
||||
".. comment: generated by vl_sphinx_extract from " +
|
||||
filename + "\n")
|
||||
fhw.write(".. code-block::\n")
|
||||
elif re.match(r'^[=a-zA-Z0-9_]', line):
|
||||
fhw = None
|
||||
@@ -37,14 +39,18 @@ parser = argparse.ArgumentParser(
|
||||
allow_abbrev=False,
|
||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||
description="""Read a file and extract documentation data.""",
|
||||
epilog=""" Copyright 2021-2025 by Wilson Snyder. This package is free software;
|
||||
epilog=
|
||||
""" Copyright 2021-2024 by Wilson Snyder. This package is free software;
|
||||
you can redistribute it and/or modify it under the terms of either the GNU
|
||||
Lesser General Public License Version 3 or the Perl Artistic License
|
||||
Version 2.0.
|
||||
|
||||
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0""")
|
||||
|
||||
parser.add_argument('--debug', action='store_const', const=9, help='enable debug')
|
||||
parser.add_argument('--debug',
|
||||
action='store_const',
|
||||
const=9,
|
||||
help='enable debug')
|
||||
parser.add_argument('path', help='path to extract from')
|
||||
Args = parser.parse_args()
|
||||
|
||||
|
||||
@@ -18,7 +18,8 @@ class VlSphinxFix:
|
||||
if os.path.isdir(path):
|
||||
for basefile in os.listdir(path):
|
||||
file = os.path.join(path, basefile)
|
||||
if ((basefile != ".") and (basefile != "..") and basefile not in self.SkipBasenames
|
||||
if ((basefile != ".") and (basefile != "..")
|
||||
and basefile not in self.SkipBasenames
|
||||
and not os.path.islink(file)):
|
||||
self.process(file)
|
||||
elif re.search(r'\.(html|tex)$', path):
|
||||
@@ -53,14 +54,18 @@ parser = argparse.ArgumentParser(
|
||||
allow_abbrev=False,
|
||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||
description="""Post-process Sphinx HTML.""",
|
||||
epilog=""" Copyright 2021-2025 by Wilson Snyder. This package is free software;
|
||||
epilog=
|
||||
""" Copyright 2021-2024 by Wilson Snyder. This package is free software;
|
||||
you can redistribute it and/or modify it under the terms of either the GNU
|
||||
Lesser General Public License Version 3 or the Perl Artistic License
|
||||
Version 2.0.
|
||||
|
||||
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0""")
|
||||
|
||||
parser.add_argument('--debug', action='store_const', const=9, help='enable debug')
|
||||
parser.add_argument('--debug',
|
||||
action='store_const',
|
||||
const=9,
|
||||
help='enable debug')
|
||||
parser.add_argument('path', help='path to edit')
|
||||
Args = parser.parse_args()
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
.. comment: generated by t_lint_pinmissing_bad
|
||||
.. code-block:: sv
|
||||
:linenos:
|
||||
:emphasize-lines: 2
|
||||
|
||||
module t;
|
||||
sub sub(); // <--- Warning
|
||||
endmodule
|
||||
module sub
|
||||
(output port);
|
||||
endmodule
|
||||
@@ -1,4 +0,0 @@
|
||||
.. comment: generated by t_lint_pinmissing_bad
|
||||
.. code-block::
|
||||
|
||||
%Warning-PINMISSING: example.v:1:8 Cell has missing pin: 'port'
|
||||
@@ -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
|
||||
@@ -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)
|
||||
@@ -1,4 +1,4 @@
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
****************
|
||||
|
||||
+5
-3
@@ -1,7 +1,7 @@
|
||||
# pylint: disable=C0103,C0114,C0116,C0301,E0402,W0622
|
||||
#
|
||||
# Configuration file for Verilator's Sphinx documentation builder.
|
||||
# Copyright 2003-2025 by Wilson Snyder.
|
||||
# Copyright 2003-2024 by Wilson Snyder.
|
||||
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
#
|
||||
# This file only contains overridden options. For a full list:
|
||||
@@ -23,7 +23,8 @@ def get_vlt_version():
|
||||
filename = "../../Makefile"
|
||||
with open(filename, "r", encoding="utf8") as fh:
|
||||
for line in fh:
|
||||
match = re.search(r"PACKAGE_VERSION *= *([a-z0-9.]+) +([-0-9]+)", line)
|
||||
match = re.search(r"PACKAGE_VERSION *= *([a-z0-9.]+) +([-0-9]+)",
|
||||
line)
|
||||
if match:
|
||||
return match.group(1), match.group(2)
|
||||
match = re.search(r"PACKAGE_VERSION *= *([a-z0-9.]+) +devel", line)
|
||||
@@ -74,7 +75,8 @@ extensions = []
|
||||
# directories to ignore when looking for source files.
|
||||
# This pattern also affects html_static_path and html_extra_path.
|
||||
exclude_patterns = [
|
||||
'_build', 'Thumbs.db', '.DS_Store', 'internals.rst', 'xml.rst', 'gen/ex_*', 'CONTRIBUTING.rst'
|
||||
'_build', 'Thumbs.db', '.DS_Store', 'internals.rst', 'xml.rst', 'gen/ex_*',
|
||||
'CONTRIBUTING.rst'
|
||||
]
|
||||
|
||||
# Warn about refs
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
.. _Connecting:
|
||||
@@ -407,16 +407,6 @@ only a couple of instructions.
|
||||
For signal callbacks to work the main loop of the program must call
|
||||
:code:`VerilatedVpi::callValueCbs()`.
|
||||
|
||||
Verilator also tracks when the model state has been modified via the VPI with
|
||||
an :code:`evalNeeded` flag. This flag can be checked with :code:`VerilatedVpi::evalNeeded()`
|
||||
and it can be cleared with :code:`VerilatedVpi::clearEvalNeeded()`. Used together
|
||||
it is possible to skip :code:`eval()` calls if no model state has been changed
|
||||
since the last :code:`eval()`.
|
||||
|
||||
Any data written via :code:`vpi_put_value` with :code:`vpiInertialDelay` will
|
||||
be deferred for later. These delayed values can be flushed to the model with
|
||||
:code:`VerilatedVpi::doInertialPuts()`.
|
||||
|
||||
|
||||
.. _VPI Example:
|
||||
|
||||
|
||||
+12
-30
@@ -1,4 +1,4 @@
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
*******************************
|
||||
@@ -23,24 +23,24 @@ Next, try the :vlopt:`--debug` option. This will enable additional
|
||||
internal assertions, and may help identify the problem.
|
||||
|
||||
Finally, reduce your code to the smallest possible routine that exhibits
|
||||
the bug (see: :ref:`Minimizing bug-inducing code`). Even better, create
|
||||
a test in the :file:`test_regress/t` directory, as follows:
|
||||
the bug. Even better, create a test in the :file:`test_regress/t`
|
||||
directory, as follows:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
cd test_regress
|
||||
cp -p t/t_EXAMPLE.py t/t_BUG.py
|
||||
cp -p t/t_EXAMPLE.pl t/t_BUG.pl
|
||||
cp -p t/t_EXAMPLE.v t/t_BUG.v
|
||||
|
||||
There are many hints on how to write a good test in the
|
||||
:file:`test_regress/driver.py` documentation which can be seen by running:
|
||||
:file:`test_regress/driver.pl` documentation which can be seen by running:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
cd $VERILATOR_ROOT # Need the original distribution kit
|
||||
test_regress/driver.py --help
|
||||
test_regress/driver.pl --help
|
||||
|
||||
Edit :file:`t/t_BUG.py` to suit your example; you can do anything you want
|
||||
Edit :file:`t/t_BUG.pl` to suit your example; you can do anything you want
|
||||
in the Verilog code there; just make sure it retains the single clk input
|
||||
and no outputs. Now, the following should fail:
|
||||
|
||||
@@ -48,38 +48,20 @@ and no outputs. Now, the following should fail:
|
||||
|
||||
cd $VERILATOR_ROOT # Need the original distribution kit
|
||||
cd test_regress
|
||||
t/t_BUG.py # Run on Verilator
|
||||
t/t_BUG.py --debug # Run on Verilator, passing --debug to Verilator
|
||||
t/t_BUG.py --vcs # Run on VCS simulator
|
||||
t/t_BUG.py --nc|--iv|--ghdl # Likewise on other simulators
|
||||
t/t_BUG.pl # Run on Verilator
|
||||
t/t_BUG.pl --debug # Run on Verilator, passing --debug to Verilator
|
||||
t/t_BUG.pl --vcs # Run on VCS simulator
|
||||
t/t_BUG.pl --nc|--iv|--ghdl # Likewise on other simulators
|
||||
|
||||
The test driver accepts a number of options, many of which mirror the main
|
||||
Verilator options. For example the previous test could have been run with
|
||||
debugging enabled. The full set of test options can be seen by running
|
||||
:command:`driver.py --help` as shown above.
|
||||
:command:`driver.pl --help` as shown above.
|
||||
|
||||
Finally, report the bug at `Verilator Issues
|
||||
<https://verilator.org/issues>`_. The bug will become publicly visible; if
|
||||
this is unacceptable, mail the bug report to ``[email protected]``.
|
||||
|
||||
.. _Minimizing bug-inducing code:
|
||||
|
||||
Minimizing bug-inducing code
|
||||
============================
|
||||
|
||||
In some cases, the part of the code that causes the bug is clearly visible
|
||||
and the design can be easily manually reduced. In other cases, the bug is
|
||||
caused by a complex interaction of many parts of the design, and it is not
|
||||
clear which parts are necessary to reproduce the bug. In these cases, an
|
||||
Open Source tool called `sv-bugpoint
|
||||
<https://github.com/antmicro/sv-bugpoint>_` can be used to automatically
|
||||
reduce a SystemVerilog design to the smallest possible reproducer.
|
||||
It can be used to automatically reduce a design with hundreds of thousands of
|
||||
lines to a minimal test case while preserving the bug-inducing behavior.
|
||||
|
||||
Please refer to the `README
|
||||
<https://github.com/antmicro/sv-bugpoint/blob/main/README.md>`_ file for more
|
||||
information on how to use `sv-bugpoint`.
|
||||
|
||||
.. Contributing
|
||||
.. ============
|
||||
|
||||
+113
-123
@@ -1,4 +1,4 @@
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
************************
|
||||
@@ -34,140 +34,130 @@ MicroTune Inc., picoChip Designs Ltd., Sun Microsystems Inc., Nauticus
|
||||
Networks Inc., SiCortex Inc, Shunyao CAD, and Western Digital Inc.
|
||||
|
||||
The contributors of major functionality are: Jeremy Bennett, Krzysztof
|
||||
Bieganski, Byron Bradley, Lane Brooks, John Coiner, Duane Galbi, Arkadiusz
|
||||
Kozdra, Geza Lore, Todd Strader, Yutetsu Takatsukasa, Stefan Wallentowitz,
|
||||
Paul Wasson, Jie Xu, and Wilson Snyder.
|
||||
Bieganski, Byron Bradley, Lane Brooks, John Coiner, Duane Galbi, Geza Lore,
|
||||
Todd Strader, Yutetsu Takatsukasa, Stefan Wallentowitz, Paul Wasson, Jie
|
||||
Xu, and Wilson Snyder.
|
||||
|
||||
Some of the people who have provided ideas, and feedback for Verilator
|
||||
include:
|
||||
|
||||
David Addison, Tariq B. Ahmad, Nikana Anastasiadis, John David Anglin,
|
||||
Frederic Antonin, Hans Van Antwerpen, Vasu Arasanipalai, Jens Arm, Rohan
|
||||
Arshid, Valentin Atepalikhin, Philip Axer, Gökçe Aydos, Chris Bachhuber,
|
||||
Filip Badáň, Adam Bagley, Sharad Bagri, James Bailey, Robert Balas, Marco
|
||||
Balboni, Matthew Ballance, Ricardo Barbedo, Andrew Bardsley, Ilya Barkov,
|
||||
Matthew Barr, Geoff Barrett, Kaleb Barrett, Daniel Bates, Julius Baxter,
|
||||
Michael Berman, Jean Berniolles, Victor Besyakov, Narayan Bhagavatula,
|
||||
Moinak Bhattacharyya, Kritik Bhimani, David Biancolin, Krzysztof Bieganski,
|
||||
Michael Bikovitsky, David Binderman, Piotr Binkowski, Johan Björk, David
|
||||
Black, Tymoteusz Blazejczyk, Scott Bleiweiss, David van der Bokke, Daniel
|
||||
Bone, Guy Bonneau, Krzysztof Boroński, Gregg Bouchard, Christopher
|
||||
Boumenot, Paul Bowen-Huggett, Nick Bowler, Bryan Brady, Maarten De
|
||||
Braekeleer, Liam Braun, Charlie Brej, J Briquet, John Brownlee, KC
|
||||
Buckenmaier, Gijs Burghoorn, Jeff Bush, Lawrence Butcher, Tony Bybell, Iru
|
||||
Cai, Ted Campbell, Anthony Campos, Chris Candler, Lauren Carlson, Gregory
|
||||
Carver, Donal Casey, Sebastien Van Cauwenberghe, Alex Chadwick, Greg
|
||||
Chadwick, Marcel Chang, Aliaksei Chapyzhenka, Chih-Mao Chen, Guokai Chen,
|
||||
Kefa Chen, Terry Chen, Yangyu Chen, Yi-Chung Chen, Yurii Cherkasov,
|
||||
Hennadii Chernyshchyk, Enzo Chi, Bartłomiej Chmiel, Robert A. Clark, Ryan
|
||||
Clarke, Allan Cochrane, Keith Colbert, Quentin Corradi, Nassim Corteggiani,
|
||||
Arshid, Gökçe Aydos, Adam Bagley, Sharad Bagri, Robert Balas, Marco
|
||||
Balboni, Matthew Ballance, Andrew Bardsley, Ilya Barkov, Matthew Barr,
|
||||
Geoff Barrett, Kaleb Barrett, Daniel Bates, Julius Baxter, Michael Berman,
|
||||
Jean Berniolles, Victor Besyakov, Narayan Bhagavatula, Moinak
|
||||
Bhattacharyya, Kritik Bhimani, David Biancolin, David Binderman, Piotr
|
||||
Binkowski, Johan Björk, David Black, Tymoteusz Blazejczyk, Scott Bleiweiss,
|
||||
David van der Bokke, Daniel Bone, Guy Bonneau, Krzysztof Boroński, Gregg
|
||||
Bouchard, Christopher Boumenot, Nick Bowler, Bryan Brady, Maarten De
|
||||
Braekeleer, Charlie Brej, J Briquet, John Brownlee, KC Buckenmaier, Jeff
|
||||
Bush, Lawrence Butcher, Tony Bybell, Iru Cai, Ted Campbell, Anthony Campos,
|
||||
Chris Candler, Lauren Carlson, Gregory Carver, Donal Casey, Sebastien Van
|
||||
Cauwenberghe, Alex Chadwick, Greg Chadwick, Marcel Chang, Aliaksei
|
||||
Chapyzhenka, Chih-Mao Chen, Guokai Chen, Terry Chen, Yi-Chung Chen, Yurii
|
||||
Cherkasov, Hennadii Chernyshchyk, Enzo Chi, Robert A. Clark, Ryan Clarke,
|
||||
Allan Cochrane, Keith Colbert, Quentin Corradi, Nassim Corteggiani,
|
||||
Gianfranco Costamagna, February Cozzocrea, Sean Cross, George Cuan, Michal
|
||||
Czyz, Joe DErrico, Jim Dai, Lukasz Dalek, Laurens van Dam, Gunter
|
||||
Dannoritzer, Ashutosh Das, Julian Daube, Greg Davill, Bernard Deadman,
|
||||
Peter Debacker, Josse Van Delm, John Demme, Mike Denio, John Deroo, Philip
|
||||
Derrick, Aadi Desai, John Dickol, Ruben Diez, Danny Ding, Jacko Dirks, Ivan
|
||||
Djordjevic, Brad Dobbie, Paul Donahue, Jonathon Donaldson, Anthony Donlon,
|
||||
Caleb Donovick, Larry Doolittle, Leendert van Doorn, Sebastian Dressler,
|
||||
Jonathan Drolet, Justin Yao Du, Maciej Dudek, Alex Duller, Jeff Dutton,
|
||||
Tomas Dzetkulic, Usuario Eda, Charles Eddleston, Chandan Egbert, Joe Eiler,
|
||||
Ahmed El-Mahmoudy, Trevor Elbourne, Mats Engstrom, Robert Farrell, Julien
|
||||
Faucher, Olivier Faure, Eugene Feinberg, Eugen Fekete, Fabrizio Ferrandi,
|
||||
Udi Finkelstein, Brian Flachs, Bill Flynn, Andrea Foletto, Alex Forencich,
|
||||
Aurelien Francillon, Bob Fredieu, Manuel Freiberger, Mostafa Gamal, Vito
|
||||
Gamberini, Mostafa Garnal, Benjamin Gartner, Christian Gelinek, Richard E
|
||||
George, Peter Gerst, Glen Gibb, Michael Gielda, Barbara Gigerl, Nimrod
|
||||
Gileadi, Shankar Giri, Dan Gisselquist, Szymon Gizler, Petr Gladkikh, Sam
|
||||
Gladstone, Mariusz Glebocki, Embedded Go, Andrew Goessling, Amir Gonnen,
|
||||
Chitlesh Goorah, Tomasz Gorochowik, Kai Gossner, Tarik Graba, Sergi
|
||||
Granell, Al Grant, Nathan Graybeal, Alexander Grobman, Qian Gu, Xuan Guo,
|
||||
Prabhat Gupta, Deniz Güzel, Driss Hafdi, Abdul Hameed, Neil Hamilton, James
|
||||
Hanlon, Tang Haojin, Øyvind Harboe, Jannis Harder, David Harris, Junji
|
||||
Hashimoto, Thomas Hawkins, Mitch Hayenga, Harald Heckmann, Robert Henry,
|
||||
Stephen Henry, Sebastian Hesselbarth, David Hewson, Jamey Hicks, Joel
|
||||
Holdsworth, Andrew Holme, Peter Holmes, Hiroki Honda, Alex Hornung,
|
||||
Dannoritzer, Ashutosh Das, Julian Daube, Bernard Deadman, Peter Debacker,
|
||||
John Demme, Mike Denio, John Deroo, Philip Derrick, Aadi Desai, John
|
||||
Dickol, Ruben Diez, Danny Ding, Jacko Dirks, Ivan Djordjevic, Brad Dobbie,
|
||||
Paul Donahue, Jonathon Donaldson, Anthony Donlon, Caleb Donovick, Larry
|
||||
Doolittle, Leendert van Doorn, Sebastian Dressler, Jonathan Drolet, Maciej
|
||||
Dudek, Alex Duller, Jeff Dutton, Tomas Dzetkulic, Usuario Eda, Charles
|
||||
Eddleston, Chandan Egbert, Joe Eiler, Ahmed El-Mahmoudy, Trevor Elbourne,
|
||||
Mats Engstrom, Robert Farrell, Julien Faucher, Olivier Faure, Eugen Fekete,
|
||||
Fabrizio Ferrandi, Udi Finkelstein, Brian Flachs, Bill Flynn, Andrea
|
||||
Foletto, Alex Forencich, Aurelien Francillon, Bob Fredieu, Manuel
|
||||
Freiberger, Mostafa Gamal, Vito Gamberini, Mostafa Garnal, Benjamin
|
||||
Gartner, Christian Gelinek, Richard E George, Peter Gerst, Glen Gibb,
|
||||
Michael Gielda, Barbara Gigerl, Nimrod Gileadi, Shankar Giri, Dan
|
||||
Gisselquist, Petr Gladkikh, Sam Gladstone, Mariusz Glebocki, Embedded Go,
|
||||
Andrew Goessling, Amir Gonnen, Chitlesh Goorah, Tomasz Gorochowik, Kai
|
||||
Gossner, Tarik Graba, Sergi Granell, Al Grant, Nathan Graybeal, Alexander
|
||||
Grobman, Qian Gu, Xuan Guo, Prabhat Gupta, Driss Hafdi, Neil Hamilton,
|
||||
James Hanlon, Tang Haojin, Øyvind Harboe, Jannis Harder, David Harris,
|
||||
Junji Hashimoto, Thomas Hawkins, Mitch Hayenga, Harald Heckmann, Robert
|
||||
Henry, Stephen Henry, Sebastian Hesselbarth, David Hewson, Jamey Hicks,
|
||||
Joel Holdsworth, Andrew Holme, Peter Holmes, Hiroki Honda, Alex Hornung,
|
||||
Pierre-Henri Horrein, David Horton, Peter Horvath, Jae Hossell, Kuoping
|
||||
Hsu, Shou-Li Hsu, Teng Huang, Steven Hugg, Alan Hunter, James Hutchinson,
|
||||
Tim Hutt, Ehab Ibrahim, Edgar E. Iglesias, Shahid Ikram, Jamie Iles, Fuad
|
||||
Ismail, Vighnesh Iyer, Ben Jackson, Daniel Jacques, Shareef Jalloq, Marlon
|
||||
Hsu, Teng Huang, Steven Hugg, Huanghuang Zhou, Alan Hunter, James
|
||||
Hutchinson, Tim Hutt, Ehab Ibrahim, Edgar E. Iglesias, Shahid Ikram, Jamie
|
||||
Iles, Vighnesh Iyer, Ben Jackson, Daniel Jacques, Shareef Jalloq, Marlon
|
||||
James, Krzysztof Jankowski, Eyck Jentzsch, HyungKi Jeong, Iztok Jeras,
|
||||
Pawel Jewstafjew, Alexandre Joannou, James Johnson, Christophe Joly, Justin
|
||||
Jones, William D. Jones, Abe Jordan, Larry Darryl Lee Jr., Franck Jullien,
|
||||
James Jung, Mike Kagen, Arthur Kahlich, Kaalia Kahn, Guy-Armand Kamendje,
|
||||
Vasu Kandadi, Yoshitomo Kaneda, Kanad Kanhere, Patricio Kaplan, Pieter
|
||||
Kapsenberg, Rafal Kapuscik, Ralf Karge, Per Karlsson, Dan Katz, Sol
|
||||
Katzman, Ian Kennedy, Ami Keren, Fabian Keßler, Michael Killough, Sun Kim,
|
||||
Jonathan Kimmitt, Olof Kindgren, Kevin Kiningham, Cameron Kirk, Dan
|
||||
Kirkham, Aleksander Kiryk, Sobhan Klnv, Gernot Koch, Jack Koenig, Soon Koh,
|
||||
Nathan Kohagen, Steve Kolecki, Brett Koonce, Will Korteland, Andrei
|
||||
Kostovski, Wojciech Koszek, Varun Koyyalagunta, Arkadiusz Kozdra, Markus
|
||||
Krause, David Kravitz, Adam Krolnik, Roland Kruse, Mahesh Kumashikar,
|
||||
Andreas Kuster, Sergey Kvachonok, Charles Eric LaForest, Kevin Laeufer, Ed
|
||||
Lander, Steve Lang, Pierre Laroche, Stephane Laurent, Walter Lavino,
|
||||
Christian Leber, David Ledger, Alex Lee, Larry Lee, Yoda Lee, Michaël
|
||||
Lefebvre, Dag Lem, Igor Lesik, John Li, Kay Li, Zixi Li, Davide Libenzi,
|
||||
Nandor Licker, Eivind Liland, Ícaro Lima, Kevin Lin, Yu-Sheng Lin, Charlie
|
||||
Lind, Andrew Ling, Jiuyang Liu, Joey Liu, Paul Liu, Derek Lockhart, Jake
|
||||
Longo, Geza Lore, Arthur Low, Jose Loyola, Stefan Ludwig, Dan Lussier,
|
||||
Konstantin Lübeck, Fred Ma, Liwei Ma, Duraid Madina, Oleh Maksymenko, Affe
|
||||
Mao, Julien Margetts, Chick Markley, Alexis Marquet, Mark Marshall, Alfonso
|
||||
Martinez, Unai Martinez-Corral, Adrien Le Masle, Yves Mathieu, Vladimir
|
||||
Matveyenko, Patrick Maupin, Stan Mayer, Jordan McConnon, Conor McCullough,
|
||||
Jason McMullan, Elliot Mednick, Yuan Mei, Andy Meier, Luiza de Melo,
|
||||
Alexandre Joannou, James Johnson, Christophe Joly, Justin Jones,
|
||||
William D. Jones, Larry Darryl Lee Jr., Franck Jullien, James Jung,
|
||||
Yoshitomo Kaneda, Mike Kagen, Arthur Kahlich, Kaalia Kahn, Guy-Armand
|
||||
Kamendje, Vasu Kandadi, Kanad Kanhere, Patricio Kaplan, Pieter Kapsenberg,
|
||||
Rafal Kapuscik, Ralf Karge, Per Karlsson, Dan Katz, Sol Katzman, Ian
|
||||
Kennedy, Ami Keren, Michael Killough, Sun Kim, Jonathan Kimmitt, Olof
|
||||
Kindgren, Kevin Kiningham, Cameron Kirk, Dan Kirkham, Aleksander Kiryk,
|
||||
Sobhan Klnv, Gernot Koch, Jack Koenig, Soon Koh, Nathan Kohagen, Steve
|
||||
Kolecki, Brett Koonce, Will Korteland, Andrei Kostovski, Wojciech Koszek,
|
||||
Varun Koyyalagunta, Arkadiusz Kozdra, Markus Krause, David Kravitz, Adam
|
||||
Krolnik, Roland Kruse, Mahesh Kumashikar, Andreas Kuster, Sergey Kvachonok,
|
||||
Charles Eric LaForest, Kevin Laeufer, Ed Lander, Steve Lang, Pierre
|
||||
Laroche, Stephane Laurent, Walter Lavino, Christian Leber, David Ledger,
|
||||
Alex Lee, Larry Lee, Yoda Lee, Michaël Lefebvre, Dag Lem, Igor Lesik, John
|
||||
Li, Kay Li, Zixi Li, Davide Libenzi, Nandor Licker, Eivind Liland, Ícaro
|
||||
Lima, Kevin Lin, Yu-Sheng Lin, Charlie Lind, Andrew Ling, Jiuyang Liu, Joey
|
||||
Liu, Paul Liu, Derek Lockhart, Jake Longo, Arthur Low, Jose Loyola, Stefan
|
||||
Ludwig, Dan Lussier, Konstantin Lübeck, Fred Ma, Liwei Ma, Duraid Madina,
|
||||
Oleh Maksymenko, Affe Mao, Julien Margetts, Chick Markley, Alexis Marquet,
|
||||
Mark Marshall, Alfonso Martinez, Unai Martinez-Corral, Adrien Le Masle,
|
||||
Yves Mathieu, Vladimir Matveyenko, Patrick Maupin, Stan Mayer, Conor
|
||||
McCullough, Jason McMullan, Elliot Mednick, Yuan Mei, Andy Meier,
|
||||
Rodrigo A. Melo, Benjamin Menküc, Jake Merdich, David Metz, Wim Michiels,
|
||||
Miodrag Milanović, Darryl Miles, Kevin Millis, Andrew Miloradovsky, David
|
||||
Moberg, Wai Sum Mong, Peter Monsson, Anthony Moore, Sean Moore, Stuart
|
||||
Morris, Dennis Muhlestein, John Murphy, Matt Myers, Nathan Myers, Richard
|
||||
Myers, Alex Mykyta, Eric Müller, Dimitris Nalbantis, Peter Nelson, Felix
|
||||
Neumärker, Bob Newgard, Cong Van Nguyen, Rachit Nigam, Toru Niina, Paul
|
||||
Nitza, Yossi Nivin, Pete Nixon, Lisa Noack, Mark Nodine, Michael Nolan,
|
||||
Andrew Nolte, Joseph Nwabueze, Kevin Nygaard, Kuba Ober, Krzysztof
|
||||
Obłonczek, Andreas Olofsson, Baltazar Ortiz, Aleksander Osman, Don Owen,
|
||||
Tim Paine, Deepa Palaniappan, James Pallister, Vassilis Papaefstathiou,
|
||||
Sanggyu Park, Brad Parker, Risto Pejašinović, Seth Pellegrino, Morten Borup
|
||||
Petersen, Dan Petrisko, Wesley Piard, Maciej Piechotka, David Pierce, Cody
|
||||
Piersall, T. Platz, Michael Platzer, Dominic Plunkett, Nolan Poe, David
|
||||
Poole, Michael Popoloski, Roman Popov, Aylon Chaim Porat, Oron Port, Rich
|
||||
Porter, Rick Porter, Stefan Post, Niranjan Prabhu, Damien Pretet, Harald
|
||||
Pretl, Bill Pringlemeir, Usha Priyadharshini, Mark Jackson Pulver, Prateek
|
||||
Puri, Han Qi, Jiacheng Qian, Marshal Qiao, Raynard Qiao, Yujia Qiao, Jasen
|
||||
Qin, Frank Qiu, Nandu Raj, Kamil Rakoczy, Danilo Ramos, Drew Ranck, Chris
|
||||
Randall, Anton Rapp, Josh Redford, Odd Magne Reitan, Frédéric Requin,
|
||||
Dustin Richmond, Samuel Riedel, Alberto Del Rio, Eric Rippey, Narcis Rodas,
|
||||
Oleg Rodionov, Ludwig Rogiers, Paul Rolfe, Michail Rontionov, Arjen
|
||||
Roodselaar, Arthur Rosa, Tobias Rosenkranz, Yernagula Roshit, Ryszard
|
||||
Miodrag Milanović, Darryl Miles, Kevin Millis, Andrew Miloradovsky, Wai Sum
|
||||
Mong, Peter Monsson, Sean Moore, Stuart Morris, Dennis Muhlestein, John
|
||||
Murphy, Matt Myers, Nathan Myers, Richard Myers, Alex Mykyta, Dimitris
|
||||
Nalbantis, Peter Nelson, Felix Neumärker, Bob Newgard, Cong Van Nguyen,
|
||||
Rachit Nigam, Toru Niina, Paul Nitza, Yossi Nivin, Pete Nixon, Lisa Noack,
|
||||
Mark Nodine, Michael Nolan, Andrew Nolte, Joseph Nwabueze, Kuba Ober,
|
||||
Andreas Olofsson, Baltazar Ortiz, Aleksander Osman, Don Owen, Tim Paine,
|
||||
Deepa Palaniappan, James Pallister, Vassilis Papaefstathiou, Sanggyu Park,
|
||||
Brad Parker, Risto Pejašinović, Morten Borup Petersen, Dan Petrisko, Wesley
|
||||
Piard, Maciej Piechotka, David Pierce, Cody Piersall, T. Platz, Michael
|
||||
Platzer, Dominic Plunkett, David Poole, Michael Popoloski, Roman Popov,
|
||||
Aylon Chaim Porat, Oron Port, Rich Porter, Rick Porter, Stefan Post,
|
||||
Niranjan Prabhu, Damien Pretet, Harald Pretl, Bill Pringlemeir, Usha
|
||||
Priyadharshini, Mark Jackson Pulver, Prateek Puri, Jiacheng Qian, Marshal
|
||||
Qiao, Raynard Qiao, Yujia Qiao, Jasen Qin, Frank Qiu, Nandu Raj, Kamil
|
||||
Rakoczy, Danilo Ramos, Drew Ranck, Chris Randall, Anton Rapp, Josh Redford,
|
||||
Odd Magne Reitan, Frédéric Requin, Dustin Richmond, Samuel Riedel, Alberto
|
||||
Del Rio, Eric Rippey, Oleg Rodionov, Ludwig Rogiers, Paul Rolfe, Michail
|
||||
Rontionov, Arjen Roodselaar, Tobias Rosenkranz, Yernagula Roshit, Ryszard
|
||||
Rozak, Huang Rui, Graham Rushton, Jan Egil Ruud, Denis Rystsov, Pawel
|
||||
Sagan, Robert Sammelson, Adrian Sampson, John Sanguinetti, Josep Sans, Luca
|
||||
Sasselli, Martin Scharrer, Martin Schmidt, Jonathan Schröter, Julie
|
||||
Schwartz, Galen Seitz, Sam Shahrestani, Joseph Shaker, Mark Shaw, Salman
|
||||
Sheikh, Zhou Shen, Hao Shi, James Shi, Michael Shinkarovsky, Rafael
|
||||
Shirakawa, Jeffrey Short, S Shuba, Fan Shupei, Ethan Sifferman, Anderson
|
||||
Ignacio da Silva, Rodney Sinclair, Ameya Vikram Singh, Sanjay Singh, Frans
|
||||
Skarman, Nate Slager, Steven Slatter, Mladen Slijepcevic, Brian Small,
|
||||
Garrett Smith, Gus Smith, Tim Snyder, Maciej Sobkowski, Stan Sokorac, Alex
|
||||
Solomatnikov, Flavien Solt, Wei Song, Trefor Southwell, Martin Stadler, Art
|
||||
Stamness, David Stanford, Krzysztof Starecki, Baruch Sterin, John
|
||||
Stevenson, Pete Stevenson, Patrick Stewart, Rob Stoddard, Tood Strader,
|
||||
John Stroebel, Ray Strouble, Sven Stucki, Howard Su, Udaya Raj Subedi,
|
||||
Emerson Suguimoto, Gene Sullivan, Qingyao Sun, Renga Sundararajan, Kuba
|
||||
Sunderland-Ober, Gustav Svensk, Rupert Swarbrick, Jevin Sweval, Paul
|
||||
Swirhun, Shinya T-Y, Thierry Tambe, Jesse Taube, Drew Taussig, Christopher
|
||||
Taylor, Greg Taylor, Jose Tejada, Sören Tempel, Peter Tengstrand, Wesley
|
||||
Terpstra, Rui Terra, Stefan Thiede, Justin Thiel, Gary Thomas, Ian
|
||||
Thompson, Kevin Thompson, Mike Thyer, Hans Tichelaar, Tudor Timi, Viktor
|
||||
Tomov, Steve Tong, Topa Topino, Àlex Torregrosa, Topa Tota, Michael
|
||||
Tresidder, Lenny Truong, David Turner, Neil Turton, Hideto Ueno, Mike
|
||||
Urbach, Joel Vandergriendt, Srini Vemuri, Srinivasan Venkataramanan, Yuri
|
||||
Victorovich, Ivan Vnučec, Bogdan Vukobratovic, Holger Waechtler, Philipp
|
||||
Wagner, Stefan Wallentowitz, Johannes Walter, CY Wang, Chuxuan Wang, Shawn
|
||||
Wang, Yilou Wang, Zhanglei Wang, Greg Waters, Thomas Watts, Eugene Weber,
|
||||
John Wehle, Tianrui Wei, David Welch, Thomas J Whatson, Martin Whitaker,
|
||||
Marco Widmer, Leon Wildman, Daniel S. Wilkerson, Daniel Wilkerson, Gerald
|
||||
Williams, Trevor Williams, Don Williamson, Jan Van Winkel, Jeff Winston,
|
||||
Joshua Wise, Clifford Wolf, Johan Wouters, Paul Wright, Tobias Wölfel,
|
||||
Junyi Xi, Ding Xiaoliang, Liu Xiaoyi, Jinyan Xu, Mandy Xu, Pengcheng Xu,
|
||||
Shanshan Xu, Yan Xu, Yinan Xu, SU YANG, Felix Yan, Jiaxun Yang, Luke Yang,
|
||||
Amir Yazdanbakhsh, Chentai (Seven) Yuan, Florian Zaruba, Mat Zeno, Keyi
|
||||
Zhang, Xi Zhang, Huanghuang Zhou, Yike Zhou, Jiamin Zhu, Ryan Ziegler.
|
||||
Sagan, Robert Sammelson, John Sanguinetti, Josep Sans, Luca Sasselli,
|
||||
Martin Scharrer, Martin Schmidt, Julie Schwartz, Galen Seitz, Joseph
|
||||
Shaker, Mark Shaw, Salman Sheikh, Zhou Shen, Hao Shi, James Shi, Michael
|
||||
Shinkarovsky, Rafael Shirakawa, Jeffrey Short, S Shuba, Fan Shupei, Ethan
|
||||
Sifferman, Anderson Ignacio da Silva, Rodney Sinclair, Ameya Vikram Singh,
|
||||
Sanjay Singh, Frans Skarman, Nate Slager, Steven Slatter, Mladen
|
||||
Slijepcevic, Brian Small, Garrett Smith, Gus Smith, Tim Snyder, Maciej
|
||||
Sobkowski, Stan Sokorac, Alex Solomatnikov, Flavien Solt, Wei Song, Trefor
|
||||
Southwell, Martin Stadler, Art Stamness, David Stanford, John Stevenson,
|
||||
Pete Stevenson, Patrick Stewart, Rob Stoddard, Tood Strader, John Stroebel,
|
||||
Ray Strouble, Sven Stucki, Howard Su, Emerson Suguimoto, Gene Sullivan,
|
||||
Qingyao Sun, Renga Sundararajan, Kuba Sunderland-Ober, Gustav Svensk,
|
||||
Rupert Swarbrick, Jevin Sweval, Shinya T-Y, Thierry Tambe, Jesse Taube,
|
||||
Drew Taussig, Jose Tejada, Sören Tempel, Peter Tengstrand, Wesley Terpstra,
|
||||
Rui Terra, Stefan Thiede, Justin Thiel, Gary Thomas, Ian Thompson, Kevin
|
||||
Thompson, Mike Thyer, Hans Tichelaar, Tudor Timi, Viktor Tomov, Steve Tong,
|
||||
Topa Topino, Àlex Torregrosa, Topa Tota, Michael Tresidder, Lenny Truong,
|
||||
David Turner, Neil Turton, Hideto Ueno, Mike Urbach, Joel Vandergriendt,
|
||||
Srini Vemuri, Srinivasan Venkataramanan, Yuri Victorovich, Ivan Vnučec,
|
||||
Bogdan Vukobratovic, Holger Waechtler, Philipp Wagner, Johannes Walter, CY
|
||||
Wang, Chuxuan Wang, Shawn Wang, Zhanglei Wang, Greg Waters, Thomas Watts,
|
||||
Eugene Weber, John Wehle, Tianrui Wei, David Welch, Thomas J Whatson,
|
||||
Martin Whitaker, Marco Widmer, Leon Wildman, Daniel S. Wilkerson, Daniel
|
||||
Wilkerson, Gerald Williams, Trevor Williams, Don Williamson, Jan Van
|
||||
Winkel, Jeff Winston, Joshua Wise, Clifford Wolf, Johan Wouters, Paul
|
||||
Wright, Tobias Wölfel, Junyi Xi, Ding Xiaoliang, Liu Xiaoyi, Mandy Xu,
|
||||
Shanshan Xu, Yinan Xu, SU YANG, Felix Yan, Luke Yang, Amir Yazdanbakhsh,
|
||||
Chentai (Seven) Yuan, Florian Zaruba, Mat Zeno, Keyi Zhang, Xi Zhang, Yike
|
||||
Zhou, Jiamin Zhu.
|
||||
|
||||
Thanks to them, and all those we've missed mentioning above, and to those
|
||||
whom have wished to remain anonymous.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
*********
|
||||
@@ -8,7 +8,7 @@ Copyright
|
||||
The latest version of Verilator is available from `https://verilator.org
|
||||
<https://verilator.org>`_.
|
||||
|
||||
Copyright 2003-2025 by Wilson Snyder. This program is free software; you
|
||||
Copyright 2003-2024 by Wilson Snyder. This program is free software; you
|
||||
can redistribute it and/or modify the Verilator internals under the terms
|
||||
of either the GNU Lesser General Public License Version 3 or the Perl
|
||||
Artistic License Version 2.0.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
Deprecations
|
||||
@@ -12,11 +12,8 @@ C++14 compiler support
|
||||
Verilated models with --no-timing.
|
||||
|
||||
Verilator will require C++20 or newer compilers for both compiling
|
||||
Verilator and compiling all Verilated models no sooner than May 2025.
|
||||
(Likely to be removed shortly after GitHub removes Ubuntu 20.04
|
||||
continuous-integration action runners, which are used to test the older
|
||||
C++ standard).
|
||||
Verilator and compiling all Verilated models no sooner than January 2025.
|
||||
|
||||
XML output
|
||||
Verilator currently supports XML parser output (enabled with `--xml-only`).
|
||||
Support for `--xml-*` options will be deprecated no sooner than January 2026.
|
||||
Support for `--xml-*` options will be deprecated no sooner than January 2025.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
Environment
|
||||
@@ -118,12 +118,6 @@ associated programs.
|
||||
|
||||
See :ref:`Installation` for more details.
|
||||
|
||||
.. option:: VERILATOR_SOLVER
|
||||
|
||||
If set, the command to run as a constrained randomization backend, such
|
||||
as :command:`cvc4 --lang=smt2 --incremental`. If not specified, it will use
|
||||
the one supplied or found during configure, or :command:`z3 --in` if empty.
|
||||
|
||||
.. option:: VERILATOR_VALGRIND
|
||||
|
||||
If set, the command to run when using the :vlopt:`--valgrind` option, such as
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
.. _Example Create-Binary Execution:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
.. _Example C++ Execution:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
First you need Verilator installed, see :ref:`Installation`. In brief, if
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
.. _Examples in the Distribution:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
.. _Example SystemC Execution:
|
||||
@@ -28,7 +28,6 @@ Now, let's create an example Verilog, and SystemC wrapper file:
|
||||
|
||||
cat >sc_main.cpp <<'EOF'
|
||||
#include "Vour.h"
|
||||
using namespace sc_core;
|
||||
int sc_main(int argc, char** argv) {
|
||||
Verilated::commandArgs(argc, argv);
|
||||
sc_clock clk{"clk", 10, SC_NS, 0.5, 3, SC_NS, true};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
.. _Examples:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
.. _Simulation Runtime Arguments:
|
||||
@@ -40,8 +40,8 @@ Summary:
|
||||
.. option:: +verilator+error+limit+<value>
|
||||
|
||||
Set number of non-fatal errors (e.g. assertion failures) before exiting
|
||||
simulation runtime. Also affects number of `$stop` calls needed before
|
||||
exit. Does not affect `$fatal`. Defaults to 1.
|
||||
simulation runtime. Also affects number of $stop calls needed before
|
||||
exit. Defaults to 1.
|
||||
|
||||
.. option:: +verilator+help
|
||||
|
||||
@@ -92,11 +92,6 @@ Summary:
|
||||
profile-guided optimization data runtime filename to dump to. Defaults
|
||||
to :file:`profile.vlt`.
|
||||
|
||||
.. option:: +verilator+quiet
|
||||
|
||||
Disable printing the simulation summary report, see :ref:`Simulation
|
||||
Summary Report`.
|
||||
|
||||
.. option:: +verilator+rand+reset+<value>
|
||||
|
||||
When a model was Verilated using
|
||||
|
||||
+68
-239
@@ -1,4 +1,4 @@
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
verilator Arguments
|
||||
@@ -51,8 +51,6 @@ Summary:
|
||||
|
||||
.. option:: +1800-2017ext+<ext>
|
||||
|
||||
.. option:: +1800-2023ext+<ext>
|
||||
|
||||
Specifies the language standard to be used with a specific filename
|
||||
extension, <ext>.
|
||||
|
||||
@@ -201,10 +199,9 @@ Summary:
|
||||
|
||||
.. option:: --compiler <compiler-name>
|
||||
|
||||
Enables workarounds for the specified C++ compiler (list below). This
|
||||
does not change any performance tuning options, but it may in the
|
||||
future. This also does not change default compiler flags; these are
|
||||
determined when Verilator was configured.
|
||||
Enables workarounds for the specified C++ compiler (list below).
|
||||
This does not change any performance tuning options, but it may
|
||||
in the future.
|
||||
|
||||
clang
|
||||
Tune for clang. This may reduce execution speed as it enables several
|
||||
@@ -222,13 +219,6 @@ Summary:
|
||||
expressions into sub-expressions to avoid error C1009, and breaking
|
||||
deep blocks into functions to avoid error C1061.
|
||||
|
||||
.. option:: --compiler-include <header-path>
|
||||
|
||||
Specifies additional headers to be included in the final PCH header.
|
||||
It is required to add them to this header, due to compilers'
|
||||
limitation that allow only one precompiled header per compilation.
|
||||
Use this instead of ::vlopt:`-CFLAGS` with `-include <header-path>`.
|
||||
|
||||
.. option:: --converge-limit <loops>
|
||||
|
||||
Rarely needed. Specifies the maximum number of runtime iterations
|
||||
@@ -237,17 +227,7 @@ Summary:
|
||||
.. option:: --coverage
|
||||
|
||||
Enables all forms of coverage, an alias for :vlopt:`--coverage-line`
|
||||
:vlopt:`--coverage-toggle` :vlopt:`--coverage-expr` :vlopt:`--coverage-user`.
|
||||
|
||||
.. option:: --coverage-expr
|
||||
|
||||
Enables expression coverage analysis. See :ref:`Expression Coverage`.
|
||||
|
||||
.. option:: --coverage-expr-max <value>
|
||||
|
||||
Rarely needed. Specifies the maximum number of permutations able to be
|
||||
covered for a given expression. Defaults to 32. Increasing may slow
|
||||
coverage simulations and make analyzing the results unwieldy.
|
||||
:vlopt:`--coverage-toggle` :vlopt:`--coverage-user`.
|
||||
|
||||
.. option:: --coverage-line
|
||||
|
||||
@@ -368,7 +348,7 @@ Summary:
|
||||
Select the language used by default when first processing each
|
||||
Verilog file. The language value must be "VAMS", "1364-1995",
|
||||
"1364-2001", "1364-2001-noconfig", "1364-2005", "1800-2005",
|
||||
"1800-2009", "1800-2012", "1800-2017", "1800-2023", or "1800+VAMS".
|
||||
"1800-2009", "1800-2012", "1800-2017", or "1800+VAMS".
|
||||
|
||||
Any language associated with a particular file extension (see the
|
||||
various +<lang>*\ ext+ options) will be used in preference to the
|
||||
@@ -381,7 +361,7 @@ Summary:
|
||||
``+<lang>ext+`` options should be used.
|
||||
|
||||
If no language is specified, either by this option or ``+<lang>ext+``
|
||||
options, then the latest SystemVerilog language (IEEE 1800-2023) is
|
||||
options, then the latest SystemVerilog language (IEEE 1800-2017) is
|
||||
used.
|
||||
|
||||
.. option:: +define+<var>=<value>
|
||||
@@ -430,12 +410,6 @@ Summary:
|
||||
:vlopt:`--debug --no-dump-tree <--dump-tree>` may be useful if the dump
|
||||
files are large and not desired.
|
||||
|
||||
.. option:: --dump-tree-json
|
||||
|
||||
Rarely needed. Enable dumping Ast .json.tree debug files with dumping level 3,
|
||||
which dumps the standard critical stages. For details on the format, see
|
||||
the Verilator Internals manual.
|
||||
|
||||
.. option:: --dump-tree-dot
|
||||
|
||||
Rarely needed. Enable dumping Ast .tree.dot debug files in Graphviz
|
||||
@@ -471,11 +445,6 @@ Summary:
|
||||
Rarely needed - for developer use. Set internal Ast dumping level
|
||||
globally to the specified value.
|
||||
|
||||
.. option:: --dumpi-tree-json <level>
|
||||
|
||||
Rarely needed - for developer use. Set internal Ast JSON dumping level
|
||||
globally to the specified value.
|
||||
|
||||
.. option:: --dumpi-<srcfile> <level>
|
||||
|
||||
Rarely needed - for developer use. Set the dumping level in the
|
||||
@@ -490,14 +459,8 @@ Summary:
|
||||
out. Beware of enabling debugging messages, as they will also go to
|
||||
standard out. See :vlopt:`--no-std`, which is implied by this.
|
||||
|
||||
See also :vlopt:`--dump-defines`, :vlopt:`-P`, :vlopt:`--pp-comments`
|
||||
and :vlopt:`--preproc-resolve` options.
|
||||
|
||||
.. option:: --emit-accessors
|
||||
|
||||
Emit getter and setter methods for each top-level signal in the
|
||||
model top class. Signals are still available as public members,
|
||||
but with the `__Vm_sig_` prefix.
|
||||
See also :vlopt:`--dump-defines`, :vlopt:`-P`, and
|
||||
:vlopt:`--pp-comments` options.
|
||||
|
||||
.. option:: --error-limit <value>
|
||||
|
||||
@@ -599,18 +562,10 @@ Summary:
|
||||
|
||||
.. option:: -fno-expand
|
||||
|
||||
.. option:: -fno-func-opt
|
||||
|
||||
.. option:: -fno-func-opt-balance-cat
|
||||
|
||||
.. option:: -fno-func-opt-split-cat
|
||||
|
||||
.. option:: -fno-gate
|
||||
|
||||
.. option:: -fno-inline
|
||||
|
||||
.. option:: -fno-inline-funcs
|
||||
|
||||
.. option:: -fno-life
|
||||
|
||||
.. option:: -fno-life-post
|
||||
@@ -627,8 +582,6 @@ Summary:
|
||||
|
||||
.. option:: -fno-reorder
|
||||
|
||||
.. option:: -fno-slice
|
||||
|
||||
.. option:: -fno-split
|
||||
|
||||
.. option:: -fno-subst
|
||||
@@ -743,13 +696,6 @@ Summary:
|
||||
:option:`/*verilator&32;hier_block*/` metacomment is ignored. See
|
||||
:ref:`Hierarchical Verilation`.
|
||||
|
||||
.. option:: --hierarchical-params-file <filename>
|
||||
|
||||
Internal flag inserted used during :vlopt:`--hierarchical`; specifies
|
||||
name of hierarchical parameters file for deparametrized modules with
|
||||
:option:`/*verilator&32;hier_block*/` metacomment. See
|
||||
:ref:`Hierarchical Verilation`.
|
||||
|
||||
.. option:: -I<dir>
|
||||
|
||||
See :vlopt:`-y`.
|
||||
@@ -761,10 +707,7 @@ Summary:
|
||||
|
||||
.. option:: +incdir+<dir>
|
||||
|
||||
See :vlopt:`-y`. Unlike with :vlopt:`-y`, multiple directories may be
|
||||
specified separated with a `+` symbol; this is for Verilog-XL
|
||||
compatibility and is not recommended usage as this is not supported by
|
||||
some third-party tools.
|
||||
See :vlopt:`-y`.
|
||||
|
||||
.. option:: --inline-mult <value>
|
||||
|
||||
@@ -792,38 +735,6 @@ Summary:
|
||||
the number of threads in the current hardware. Otherwise, must be a
|
||||
positive integer specifying the maximum number of parallel build jobs.
|
||||
|
||||
.. option:: --json-only
|
||||
|
||||
Create JSON output only, do not create any other output.
|
||||
|
||||
The JSON format is intended to be used to leverage Verilator's parser and
|
||||
elaboration to feed to other downstream tools. For details on the format, see
|
||||
the Verilator Internals manual. Be aware that the JSON
|
||||
format is still evolving; there will be some changes in future versions.
|
||||
|
||||
This option disables some more aggressive transformations and dumps only
|
||||
the final state of the AST. For more granular and unaltered dumps, meant
|
||||
mainly for debugging see :vlopt:`--dump-tree-json`.
|
||||
|
||||
.. option:: --json-only-meta-output <filename>
|
||||
|
||||
Specifies the filename for the metadata output file (`.tree.meta.json`) of --json-only.
|
||||
Using this option automatically sets :vlopt:`--json-only`.
|
||||
|
||||
.. option:: --json-only-output <filename>
|
||||
|
||||
Specifies the filename for the main output file (`.tree.json`) of --json-only.
|
||||
Using this option automatically sets :vlopt:`--json-only`.
|
||||
|
||||
.. option:: --no-json-edit-nums
|
||||
|
||||
Don't dump edit number in .tree.json files. This may make the file more
|
||||
run-to-run stable for easier comparison.
|
||||
|
||||
.. option:: --no-json-ids
|
||||
|
||||
Don't use short identifiers instead of addresses/paths in .tree.json.
|
||||
|
||||
.. option:: --l2-name <value>
|
||||
|
||||
Instead of using the module name when showing Verilog scope, use the
|
||||
@@ -892,11 +803,6 @@ Summary:
|
||||
If the design is not to be completely Verilated, see also the
|
||||
:vlopt:`--bbox-sys` and :vlopt:`--bbox-unsup` options.
|
||||
|
||||
.. option:: --localize-max-size <value>
|
||||
|
||||
Rarely needed. Set the maximum variable size in bytes for it to be
|
||||
subject to localizing-to-stack optimization. Defaults to 1024.
|
||||
|
||||
.. option:: --make <build-tool>
|
||||
|
||||
Generates a script for the specified build tool.
|
||||
@@ -1013,22 +919,6 @@ Summary:
|
||||
delayed assignments. This option should only be used when suggested by
|
||||
the developers.
|
||||
|
||||
.. option:: --output-groups <numfiles>
|
||||
|
||||
Enables concatenating the output .cpp files into the given number of
|
||||
effective output .cpp files. This is useful if the compiler startup
|
||||
overhead from compiling many small files becomes unacceptable,
|
||||
which can happen in designs making extensive use of SystemVerilog classes,
|
||||
templates or generate blocks.
|
||||
|
||||
Using :vlopt:`--output-groups` can adversely impact caching and stability
|
||||
(as in reproducibility) of compiled code. Compilation of larger .cpp
|
||||
files also has higher memory requirements. Too low values might result in
|
||||
swap thrashing with large designs, high values give no benefits. The
|
||||
value should range from 2 to 20 for small to medium designs.
|
||||
|
||||
Default is zero, which disables this feature.
|
||||
|
||||
.. option:: --output-split <statements>
|
||||
|
||||
Enables splitting the output .cpp files into multiple outputs. When a
|
||||
@@ -1081,13 +971,6 @@ Summary:
|
||||
:option:`/*verilator&32;sc_bv*/` metacomment to select specific ports to
|
||||
be sc_bv.
|
||||
|
||||
.. option:: --pins-inout-enables
|
||||
|
||||
Specifies that the __en and __out outputs will always be created for
|
||||
inouts in the top-level module. The __en variable has a one in a bit
|
||||
position to indicate the corresponding bit of the __out variable has
|
||||
a value being driven from within the Verilated model.
|
||||
|
||||
.. option:: --pins-sc-uint
|
||||
|
||||
Specifies SystemC inputs/outputs greater than 2 bits wide should use
|
||||
@@ -1095,10 +978,6 @@ Summary:
|
||||
:vlopt:`--pins-sc-biguint` combination, it results in sc_uint being used
|
||||
between 2 and 64 and sc_biguint being used between 65 and 512.
|
||||
|
||||
.. option:: --pins-sc-uint-bool
|
||||
|
||||
Specifies SystemC inputs/outputs one bit wide should use sc_uint<1>.
|
||||
|
||||
.. option:: --pins-sc-biguint
|
||||
|
||||
Specifies SystemC inputs/outputs greater than 65 bits wide should use
|
||||
@@ -1152,20 +1031,6 @@ Summary:
|
||||
prepended to the name of the :vlopt:`--top` option, or V prepended to
|
||||
the first Verilog filename passed on the command line.
|
||||
|
||||
.. option:: --preproc-resolve
|
||||
|
||||
With :vlopt:`-E`, resolve referenced instance modules, to include
|
||||
preprocessed output of submodules. Used to convert a multi-file design
|
||||
into a single output file.
|
||||
|
||||
See :vlopt:`-E`.
|
||||
|
||||
.. option:: --preproc-token-limit <value>
|
||||
|
||||
Rarely needed. Configure the limit of the number of tokens Verilator
|
||||
can process on a single line to prevent infinite loops and other hangs.
|
||||
Defaults to 40000 tokens.
|
||||
|
||||
.. option:: --private
|
||||
|
||||
Opposite of :vlopt:`--public`. This is the default; this option exists for
|
||||
@@ -1267,13 +1132,6 @@ Summary:
|
||||
module specifically enabled it with
|
||||
:option:`/*verilator&32;inline_module*/`.
|
||||
|
||||
|
||||
.. option:: --public-depth <level>
|
||||
|
||||
Enables public as with :vlopt:`--public-flat-rw`, but only to the specified depth of modules.
|
||||
It operates at the module maximum level, so if a module's cells are A.B.X and A.X, the
|
||||
a --public-depth 3 must be used to make module X public, and both A.B.X and A.X will be public.
|
||||
|
||||
.. option:: --public-flat-rw
|
||||
|
||||
Declares all variables, ports, and wires public as if they had
|
||||
@@ -1285,12 +1143,11 @@ Summary:
|
||||
marking only those signals that need public_flat_rw is typically
|
||||
significantly better performing.
|
||||
|
||||
.. option:: --public-ignore
|
||||
.. option:: --public-depth <level>
|
||||
|
||||
Ignore all :code:`/*verilator public* */` metacomments. This is useful
|
||||
for speed-optimizing VPI builds where VPI is not being used. This only
|
||||
affects metacomments; options such as :vlopt:`--public`,
|
||||
:vlopt:`--public-depth`, etc. work normally.
|
||||
Enables public as with :vlopt:`--public-flat-rw`, but only to the specified depth of modules.
|
||||
It operates at the module maximum level, so if a module's cells are A.B.X and A.X, the
|
||||
a --public-depth 3 must be used to make module X public, and both A.B.X and A.X will be public.
|
||||
|
||||
.. option:: --public-params
|
||||
|
||||
@@ -1298,26 +1155,16 @@ Summary:
|
||||
:code:`/*verilator public_flat_rd*/`
|
||||
metacomments.
|
||||
|
||||
|
||||
.. option:: -pvalue+<name>=<value>
|
||||
|
||||
Overwrites the given parameter(s) of the top-level module. See
|
||||
:vlopt:`-G <-G<name>>` for a detailed description.
|
||||
|
||||
.. option:: --quiet
|
||||
|
||||
Alias for :vlopt:`--quiet-exit` :vlopt:`--quiet-stats`.
|
||||
|
||||
.. option:: --quiet-exit
|
||||
|
||||
When exiting due to an error, do not display the "Exiting due to Errors"
|
||||
nor "Command Failed" messages.
|
||||
|
||||
.. option:: --quiet-stats
|
||||
|
||||
Disable printing the Verilation statistics report, see :ref:`Verilation
|
||||
Summary Report`.
|
||||
|
||||
.. option:: --relative-includes
|
||||
|
||||
When a file references an include file, resolve the filename relative to
|
||||
@@ -1435,17 +1282,7 @@ Summary:
|
||||
|
||||
.. option:: --no-std
|
||||
|
||||
Prevents parsing standard input files, alias for
|
||||
:vlopt:`--no-std-package`, :vlopt:`--no-std-waiver`. This may be extended
|
||||
to prevent reading other standardized files in future versions.
|
||||
|
||||
.. option:: --no-std-package
|
||||
|
||||
Prevents parsing standard `std::` package file.
|
||||
|
||||
.. option:: --no-std-waiver
|
||||
|
||||
Prevents parsing standard lint waivers (`verilated_std_waiver.vlt`).
|
||||
Prevents parsing standard library.
|
||||
|
||||
.. option:: --no-stop-fail
|
||||
|
||||
@@ -1461,12 +1298,12 @@ Summary:
|
||||
.. option:: -sv
|
||||
|
||||
Specifies SystemVerilog language features should be enabled; equivalent
|
||||
to :vlopt:`--language 1800-2023 <--language>`. This option is selected
|
||||
to :vlopt:`--language 1800-2017 <--language>`. This option is selected
|
||||
by default; it exists for compatibility with other simulators.
|
||||
|
||||
.. option:: +systemverilogext+<ext>
|
||||
|
||||
A synonym for :vlopt:`+1800-2023ext+\<ext\>`.
|
||||
A synonym for :vlopt:`+1800-2017ext+\<ext\>`.
|
||||
|
||||
.. option:: --threads <threads>
|
||||
|
||||
@@ -1725,15 +1562,6 @@ Summary:
|
||||
|
||||
Enable the use of VPI and linking against the :file:`verilated_vpi.cpp` files.
|
||||
|
||||
.. option:: --waiver-multiline
|
||||
|
||||
When using :vlopt:`--waiver-output \<filename\> <--waiver-output>`,
|
||||
include a match expression that includes the entire multiline error
|
||||
message as a match regular expression, as opposed to the default of only
|
||||
matching the first line of the error message. This provides a starting
|
||||
point for creating complex waivers, but such generated waivers will
|
||||
likely require editing for brevity before being reused.
|
||||
|
||||
.. option:: --waiver-output <filename>
|
||||
|
||||
Generate a waiver file that contains all waiver statements to suppress
|
||||
@@ -1838,19 +1666,18 @@ Summary:
|
||||
``-Wwarn-CASEX`` ``-Wwarn-CASTCONST`` ``-Wwarn-CMPCONST``
|
||||
``-Wwarn-COLONPLUS`` ``-Wwarn-IMPLICIT`` ``-Wwarn-IMPLICITSTATIC``
|
||||
``-Wwarn-LATCH`` ``-Wwarn-MISINDENT`` ``-Wwarn-NEWERSTD``
|
||||
``-Wwarn-PREPROCZERO`` ``-Wwarn-PINMISSING`` ``-Wwarn-REALCVT``
|
||||
``-Wwarn-STATICVAR`` ``-Wwarn-UNSIGNED`` ``-Wwarn-WIDTHTRUNC``
|
||||
``-Wwarn-WIDTHEXPAND`` ``-Wwarn-WIDTHXZEXPAND``.
|
||||
``-Wwarn-PINMISSING`` ``-Wwarn-REALCVT`` ``-Wwarn-STATICVAR``
|
||||
``-Wwarn-UNSIGNED`` ``-Wwarn-WIDTHTRUNC`` ``-Wwarn-WIDTHEXPAND``
|
||||
``-Wwarn-WIDTHXZEXPAND``.
|
||||
|
||||
.. option:: -Wwarn-style
|
||||
|
||||
Enable all code style-related warning messages. This is equivalent to
|
||||
``-Wwarn-ASSIGNDLY`` ``-Wwarn-BLKSEQ`` ``-Wwarn-DECLFILENAME``
|
||||
``-Wwarn-DEFPARAM`` ``-Wwarn-EOFNEWLINE`` ``-Wwarn-GENUNNAMED``
|
||||
``-Wwarn-IMPORTSTAR`` ``-Wwarn-INCABSPATH`` ``-Wwarn-PINCONNECTEMPTY``
|
||||
``-Wwarn-ASSIGNDLY`` ``-Wwarn-DECLFILENAME`` ``-Wwarn-DEFPARAM``
|
||||
``-Wwarn-EOFNEWLINE`` ``-Wwarn-GENUNNAMED`` ``-Wwarn-INCABSPATH``
|
||||
``-Wwarn-PINNOCONNECT`` ``-Wwarn-SYNCASYNCNET`` ``-Wwarn-UNDRIVEN``
|
||||
``-Wwarn-UNUSEDGENVAR`` ``-Wwarn-UNUSEDLOOP`` ``-Wwarn-UNUSEDPARAM``
|
||||
``-Wwarn-UNUSEDSIGNAL`` ``-Wwarn-VARHIDDEN``.
|
||||
``-Wwarn-UNUSEDGENVAR`` ``-Wwarn-UNUSEDPARAM`` ``-Wwarn-UNUSEDSIGNAL``
|
||||
``-Wwarn-VARHIDDEN``.
|
||||
|
||||
.. option:: --x-assign 0
|
||||
|
||||
@@ -1882,9 +1709,9 @@ Summary:
|
||||
|
||||
.. note::
|
||||
|
||||
This option applies only to values explicitly written as X in modules
|
||||
(not classes, nor parameters) in the Verilog source code. Initial
|
||||
values of clocks are set to 0 unless `--x-initial-edge` is
|
||||
This option applies only to values explicitly written as X
|
||||
in modules (not classes) in the Verilog source code. Initial values
|
||||
of clocks are set to 0 unless `--x-initial-edge` is
|
||||
specified. Initial values of all other state holding variables are
|
||||
controlled with `--x-initial`.
|
||||
|
||||
@@ -1949,6 +1776,37 @@ Summary:
|
||||
iterations. This may be another indication of problems with the
|
||||
modeled design that should be addressed.
|
||||
|
||||
.. option:: --json-only
|
||||
|
||||
Create JSON output only, do not create any other output.
|
||||
|
||||
The JSON format is intended to be used to leverage Verilator's parser and
|
||||
elaboration to feed to other downstream tools. For details on the format, see
|
||||
the Verilator Internals manual. Be aware that the JSON
|
||||
format is still evolving; there will be some changes in future versions.
|
||||
|
||||
This option disables some more aggressive transformations and dumps only
|
||||
the final state of the AST.
|
||||
|
||||
.. option:: --json-only-meta-output <filename>
|
||||
|
||||
Specifies the filename for the metadata output file (`.tree.meta.json`) of --json-only.
|
||||
Using this option automatically sets :vlopt:`--json-only`.
|
||||
|
||||
.. option:: --json-only-output <filename>
|
||||
|
||||
Specifies the filename for the main output file (`.tree.json`) of --json-only.
|
||||
Using this option automatically sets :vlopt:`--json-only`.
|
||||
|
||||
.. option:: --no-json-edit-nums
|
||||
|
||||
Don't dump edit number in .tree.json files. This may make the file more
|
||||
run-to-run stable for easier comparison.
|
||||
|
||||
.. option:: --no-json-ids
|
||||
|
||||
Don't use short identifiers instead of addresses/paths in .tree.json.
|
||||
|
||||
.. option:: --xml-only
|
||||
|
||||
Create XML output only, do not create any other output.
|
||||
@@ -1991,12 +1849,8 @@ Configuration Files
|
||||
|
||||
In addition to the command line, warnings and other features for the
|
||||
:command:`verilator` command may be controlled with configuration files,
|
||||
typically named with the `.vlt` extension (what makes it a configuration
|
||||
file is the :option:`\`verilator_config` directive). These files, when
|
||||
named `.vlt`, are read before source code files; if this behavior is
|
||||
undesired, name the config file with a `.v` suffix.
|
||||
|
||||
An example:
|
||||
typically named with the .vlt extension (what makes it a configuration file
|
||||
is the :option:`\`verilator_config` directive). An example:
|
||||
|
||||
.. code-block:: sv
|
||||
|
||||
@@ -2089,13 +1943,6 @@ The grammar of configuration commands is as follows:
|
||||
that the setting is ignored unless the :vlopt:`--hierarchical` option is
|
||||
specified. See :ref:`Hierarchical Verilation`.
|
||||
|
||||
.. option:: hier_params -module "<modulename>"
|
||||
|
||||
Specifies that the module contains parameters a :vlopt:`--hierarchical` block. This option
|
||||
is used internally to specify parameters for deparametrized hier block instances.
|
||||
This option should not be used directly.
|
||||
See :ref:`Hierarchical Verilation`.
|
||||
|
||||
.. option:: inline -module "<modulename>"
|
||||
|
||||
Specifies the module may be inlined into any modules that use this
|
||||
@@ -2133,7 +1980,7 @@ The grammar of configuration commands is as follows:
|
||||
|
||||
.. option:: lint_off [-rule <message>] [-file "<filename>" [-lines <line> [ - <line>]]]
|
||||
|
||||
.. option:: lint_off [-rule <message>] [-file "<filename>"] [-contents "<wildcard>"] [-match "<wildcard>"]
|
||||
.. option:: lint_off [-rule <message>] [-file "<filename>"] [-match "<string>"]
|
||||
|
||||
Enable/disables the specified lint warning, in the specified filename
|
||||
(or wildcard with '\*' or '?', or all files if omitted) and range of
|
||||
@@ -2142,28 +1989,17 @@ The grammar of configuration commands is as follows:
|
||||
With lint_off using "\*" will override any lint_on directives in the
|
||||
source, i.e. the warning will still not be printed.
|
||||
|
||||
If the :code:`-rule` is omitted, all lint warnings (see list in
|
||||
If the -rule is omitted, all lint warnings (see list in
|
||||
:vlopt:`-Wno-lint`) are enabled/disabled. This will override all later
|
||||
lint warning enables for the specified region.
|
||||
|
||||
If :code:`-contents` is provided, the input files must contain the given
|
||||
wildcard (with '\*' or '?'), and are waived in case they match, provided
|
||||
the :code:`-rule`, :code:`-file`, and :code:`-contents` also match. The
|
||||
wildcard should be designed to match a single line; it is unspecified if
|
||||
the wildcard is allowed to match across multiple lines. The input
|
||||
contents does not include :vlopt:`--std <--no-std>` standard files, nor
|
||||
configuration files (with :code:`verilator_config`). Typical use for
|
||||
this is to match a version number present in the Verilog sources, so
|
||||
that the waiver will only apply to that version of the sources.
|
||||
If -match is set, the linter warnings are matched against this
|
||||
(wildcard) string and are waived in case they match, provided with the
|
||||
rule and file also match.
|
||||
|
||||
If :code:`-match` is provided, the linter warnings are matched against
|
||||
the given wildcard (with '\*' or '?'), and are waived in case they
|
||||
match, provided the :code:`-rule`, :code:`-file`, and :code:`-contents`
|
||||
also match. The wildcard is compared across the entire multi-line
|
||||
message; see :vlopt:`--waiver-multiline`.
|
||||
|
||||
Before version 4.026, :code:`-rule` was named :code:`-msg`, and
|
||||
:code:`-msg` remained a deprecated alias until Version 5.000.
|
||||
In previous versions -rule was named -msg. The latter is deprecated, but
|
||||
still works with a deprecation info; it may be removed in future
|
||||
versions.
|
||||
|
||||
.. option:: public [-module "<modulename>"] [-task/-function "<taskname>"] -var "<signame>"
|
||||
|
||||
@@ -2178,13 +2014,6 @@ The grammar of configuration commands is as follows:
|
||||
:option:`/*verilator&32;public_flat*/`, etc., metacomments. See
|
||||
also :ref:`VPI Example`.
|
||||
|
||||
.. option:: profile_data -hier-dpi "<function_name>" -cost <cost_value>
|
||||
|
||||
Internal profiling data inserted during :vlopt:`--hierarchical`; specifies
|
||||
execution cost of a hierarchical DPI wrappers for modules with
|
||||
:option:`/*verilator&32;hier_block*/` metacomment. See
|
||||
:ref:`Hierarchical Verilation`.
|
||||
|
||||
.. option:: profile_data -mtask "<mtask_hash>" -cost <cost_value>
|
||||
|
||||
Feeds profile-guided optimization data into the Verilator algorithms in
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
verilator_coverage
|
||||
@@ -35,11 +35,11 @@ verilator_coverage Example Usage
|
||||
verilator_coverage --help
|
||||
verilator_coverage --version
|
||||
|
||||
verilator_coverage --annotate obj_dir coverage.dat
|
||||
verilator_coverage --annotate <obj>
|
||||
|
||||
verilator_coverage --write merged.dat coverage.dat ...
|
||||
verilator_coverage -write merged.dat -read <datafiles>...
|
||||
|
||||
verilator_coverage --write-info merged.info coverage.dat ...
|
||||
verilator_coverage -write-info merged.info -read <datafiles>...
|
||||
|
||||
|
||||
verilator_coverage Arguments
|
||||
@@ -58,36 +58,32 @@ to read multiple inputs. If no data file is specified, by default,
|
||||
Specifies the directory name to which source files with annotated coverage
|
||||
data should be written.
|
||||
|
||||
Points are children of each line coverage- branches, expressions or toggle points.
|
||||
When point counts are aggregated into a line, the minimum and maximum counts
|
||||
are used to determine the status of the line (complete, partial, failing)
|
||||
The count is equal to the maximum of the points.
|
||||
Converting from the Verilator coverage data format to the info format is
|
||||
lossy; the info will have all forms of coverage merged line coverage, and
|
||||
if there are multiple coverage points on a single line they will merge.
|
||||
The minimum coverage across all merged points will be used to report
|
||||
coverage of the line.
|
||||
|
||||
Coverage data is annotated at the beginning of the line and is formatted
|
||||
as a special character followed by the number of coverage hits. The special
|
||||
characters " ,%,~,+,-" indicate summary of the coverage, and allow use of grep
|
||||
characters " ,%,+,-" indicate summary of the coverage, and allow use of grep
|
||||
to filter the report.
|
||||
|
||||
* " " (whitespace) indicates that all points on the line are above the coverage min.
|
||||
* "%" indicates that all points on the line are below the coverage min.
|
||||
* "~" indicates that some points on the line are above the coverage min and some are below.
|
||||
* "+" coverage point was at or above the min. Only used with :option:`--annotate-points`.
|
||||
* "-" coverage point was below the min. Only used with :option:`--annotate-points`.
|
||||
* " " (whitespace) indicates that all points on the line are above the coverage limit.
|
||||
* "%" indicates at least one point on the line was below the coverage limit.
|
||||
* "+" coverage point was at or above the limit. Only used with :option:`--annotate-points`.
|
||||
* "-" coverage point was below the limit. Only used with :option:`--annotate-points`.
|
||||
|
||||
.. code-block::
|
||||
|
||||
100000 input logic a; // Begins with whitespace, because
|
||||
// number of hits (100000) is above the min.
|
||||
+100000 point: comment=a // Begins with +, because
|
||||
// number of hits (100000) is above the min.
|
||||
%000000 input logic b; // Begins with %, because
|
||||
// number of hits (0) is below the min.
|
||||
-000000 point: comment=b // Begins with -, because
|
||||
// number of hits (0) is below the min.
|
||||
~000010 if (cyc!=0) begin // Begins with ~, because
|
||||
// branches are below and above the min.
|
||||
+000010 point: comment=if // The if branch is above the min.
|
||||
-000000 point: comment=else // The else branch is below the min.
|
||||
100000 input logic a; // Begins with whitespace, because
|
||||
// number of hits (100000) is above the limit.
|
||||
+100000 point: comment=a // Begins with +, because
|
||||
// number of hits (100000) is above the limit.
|
||||
%000000 input logic b; // Begins with %, because
|
||||
// number of hits (0) is below the limit.
|
||||
-000000 point: comment=b // Begins with -, because
|
||||
// number of hits (0) is below the limit.
|
||||
|
||||
.. option:: --annotate-all
|
||||
|
||||
@@ -158,7 +154,10 @@ generated from random test runs) into one master coverage file.
|
||||
Specifies the aggregate coverage results, summed across all the files,
|
||||
should be written to the given filename in :command:`lcov` .info format.
|
||||
This may be used to feed into :command:`lcov` to aggregate or generate
|
||||
reports. This format lacks the comments for cover points that the
|
||||
verilator_coverage format has. It can be used with :command:`genhtml`
|
||||
to generate an HTML report. :command:`genhtml --branch-coverage` will
|
||||
also display the branch coverage, analogous to :option:`--annotate-points`
|
||||
reports.
|
||||
|
||||
Converting from the Verilator coverage data format to the info format is
|
||||
lossy; the info will have all forms of coverage merged line coverage, and
|
||||
if there are multiple coverage points on a single line they will merge.
|
||||
The minimum coverage across all merged points will be used to report
|
||||
coverage of the line.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
verilator_gantt
|
||||
@@ -62,17 +62,6 @@ predicted_thread#_mtask
|
||||
executing.
|
||||
|
||||
|
||||
verilator_gantt Example Usage
|
||||
-----------------------------
|
||||
|
||||
..
|
||||
|
||||
verilator_gantt --help
|
||||
verilator_gantt --version
|
||||
|
||||
verilator_gantt profile_exec.dat
|
||||
|
||||
|
||||
verilator_gantt Arguments
|
||||
-------------------------
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
verilator_profcfunc
|
||||
@@ -15,17 +15,6 @@ reported as a rounding error.
|
||||
|
||||
For an overview of the use of verilator_profcfunc, see :ref:`Profiling`.
|
||||
|
||||
verilator_profcfunc Example Usage
|
||||
---------------------------------
|
||||
|
||||
..
|
||||
|
||||
verilator_profcfunc --help
|
||||
verilator_profcfunc --version
|
||||
|
||||
verilator_profcfunc gprof.out
|
||||
|
||||
|
||||
verilator_profcfunc Arguments
|
||||
-----------------------------
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
*********************************
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
*******************
|
||||
@@ -36,7 +36,8 @@ or "`ifdef`"'s may break other tools.
|
||||
.. option:: """ [string] """
|
||||
|
||||
A triple-quoted block specifies a string that may include newlines and
|
||||
single quotes. This extension was standardized in IEEE 1800-2023.
|
||||
single quotes. This extension is experimental and may be removed
|
||||
without deprecation.
|
||||
|
||||
.. option:: $c([string], ...);
|
||||
|
||||
@@ -576,10 +577,6 @@ or "`ifdef`"'s may break other tools.
|
||||
|
||||
.. option:: /*verilator&32;trace_init_task*/
|
||||
|
||||
Removed.
|
||||
|
||||
In versions before 5.024:
|
||||
|
||||
Attached to a DPI import to indicate that function should be called when
|
||||
initializing tracing. This attribute is indented only to be used
|
||||
internally in code that Verilator generates when :vlopt:`--lib-create`
|
||||
@@ -622,4 +619,4 @@ or "`ifdef`"'s may break other tools.
|
||||
symbols. Also, the data represents the C++ stack; the SystemVerilog
|
||||
functions/tasks involved may be renamed and/or inlined before becoming
|
||||
the C++ functions that may be visible in the stack trace. This
|
||||
extension was standardized in IEEE 1800-2023.
|
||||
extension is experimental and may be removed without deprecation.
|
||||
|
||||
+8
-13
@@ -1,4 +1,4 @@
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
******************************
|
||||
@@ -128,13 +128,10 @@ How do I generate waveforms (traces) in C++?
|
||||
|
||||
See also the next question for tracing in SystemC mode.
|
||||
|
||||
A. Pass the :vlopt:`--trace` option to Verilator. Then you may use ``$dumpfile`` and
|
||||
``$dumpvars`` to enable traces, the same as with any Verilog simulator,
|
||||
although Verilator ignores the arguments to ``$dumpvars``. See
|
||||
``examples/make_tracing_c`` in the distribution.
|
||||
|
||||
If writing the top-level C code, call ``Verilated::traceEverOn(true)``;
|
||||
this is done for you if using :vlopt:`--binary`.
|
||||
A. Pass the :vlopt:`--trace` option to Verilator, and in your top-level C
|
||||
code, call ``Verilated::traceEverOn(true)``. Then you may use
|
||||
``$dumpfile`` and ``$dumpvars`` to enable traces, the same as with any
|
||||
Verilog simulator. See ``examples/make_tracing_c`` in the distribution.
|
||||
|
||||
B. Or, for finer-grained control, or C++ files with multiple Verilated
|
||||
modules, you may also create the trace purely from C++. Create a
|
||||
@@ -259,11 +256,9 @@ How do I view waveforms (aka dumps or traces)?
|
||||
""""""""""""""""""""""""""""""""""""""""""""""
|
||||
|
||||
Verilator creates standard VCD (Value Change Dump) and FST files. VCD
|
||||
files are viewable with the open-source
|
||||
`GTKWave <http://gtkwave.sourceforge.net/>`_,
|
||||
`Surfer <https://surfer-project.org/>`_, Dinotrace (legacy), or any of the
|
||||
many closed-source viewer offerings; FST is supported only by GTKWave and
|
||||
Surfer.
|
||||
files are viewable with the open-source GTKWave (recommended), or Dinotrace
|
||||
(legacy) programs, or any of the many closed-source offerings; FST is
|
||||
supported only by GTKWave.
|
||||
|
||||
|
||||
How do I speed up writing large waveform (trace) files?
|
||||
|
||||
+11
-13
@@ -1,4 +1,4 @@
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
*****
|
||||
@@ -48,6 +48,12 @@ For --cc/--sc, it creates:
|
||||
- Make include file for compiling (from --make gmake)
|
||||
* - *{prefix}*\ _classes.mk
|
||||
- Make include file with class names (from --make gmake)
|
||||
* - *{prefix}*\ _hier.mk
|
||||
- Make file for hierarchy blocks (from --make gmake)
|
||||
* - *{prefix}*\ __hierMkArgs.f
|
||||
- Arguments for hierarchical Verilation (from --make gmake)
|
||||
* - *{prefix}*\ __hierCMakeArgs.f
|
||||
- Arguments for hierarchical Verilation (from --make cmake)
|
||||
* - *{prefix}*\ .h
|
||||
- Model header
|
||||
* - *{prefix}*\ .cpp
|
||||
@@ -89,24 +95,16 @@ For --cc/--sc, it creates:
|
||||
* - *{prefix}{each_verilog_module}{__DepSet_hash__n}*\ .cpp
|
||||
- Additional lower C++ files (hashed to reduce build times)
|
||||
|
||||
For --hierarchical mode, it creates:
|
||||
For --hierarchy mode, it creates:
|
||||
|
||||
.. list-table::
|
||||
|
||||
* - V\ *{hier_block}*\ /
|
||||
- Directory to Verilate each hierarchical block (from --hierarchical)
|
||||
- Directory to Verilate each hierarchy block (from --hierarchy)
|
||||
* - *{prefix}*\ __hierVer.d
|
||||
- Make dependencies of the top module (from --hierarchical)
|
||||
* - *{prefix}*\ _hier.mk
|
||||
- Make file for hierarchical blocks (from --make gmake)
|
||||
* - *{prefix}*\ __hierCMakeArgs.f
|
||||
- Arguments for hierarchical Verilation (from --make cmake)
|
||||
* - *{prefix}*\ __hierMkArgs.f
|
||||
- Arguments for hierarchical Verilation (from --make gmake)
|
||||
* - *{prefix}*\ __hierParameters.v
|
||||
- Module parameters for hierarchical blocks
|
||||
- Make dependencies of the top module (from --hierarchy)
|
||||
* - *{prefix}*\ __hier.dir
|
||||
- Directory to store .dot, .vpp, .tree of top module (from --hierarchical)
|
||||
- Directory to store .dot, .vpp, .tree of top module (from --hierarchy)
|
||||
|
||||
In specific debug and other modes, it also creates:
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
######################
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
.. _CMakeInstallation:
|
||||
|
||||
+24
-56
@@ -1,4 +1,4 @@
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
.. _Installation:
|
||||
@@ -19,33 +19,13 @@ started. (Note packages are unlikely to have the most recent version, so
|
||||
:ref:`Git Install` might be a better alternative.) To install as a
|
||||
package:
|
||||
|
||||
.. code-block:: shell
|
||||
::
|
||||
|
||||
apt-get install verilator # On Ubuntu
|
||||
|
||||
For other distributions, refer to `Repology Verilator Distro Packages
|
||||
<https://repology.org/project/verilator>`__.
|
||||
|
||||
.. _pre-commit Quick Install:
|
||||
|
||||
pre-commit Quick Install
|
||||
=============================
|
||||
|
||||
You can use Verilator's `pre-commit <https://pre-commit.com/>`__ hook to
|
||||
lint your code before committing it. It encapsulates the :ref:`Verilator
|
||||
Build Docker Container`, so you need docker on your system to use it. The
|
||||
verilator image will be downloaded automatically.
|
||||
|
||||
To use the hook, add the following entry to your :code:`.pre-commit-config.yaml`:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
repos:
|
||||
- repo: https://github.com/verilator/verilator
|
||||
rev: v5.026 # or later
|
||||
hooks:
|
||||
- id: verilator
|
||||
|
||||
.. _Git Install:
|
||||
|
||||
Git Quick Install
|
||||
@@ -56,7 +36,7 @@ options and details, see :ref:`Detailed Build Instructions` below.
|
||||
|
||||
In brief, to install from git:
|
||||
|
||||
.. code-block:: shell
|
||||
::
|
||||
|
||||
# Prerequisites:
|
||||
#sudo apt-get install git help2man perl python3 make autoconf g++ flex bison ccache
|
||||
@@ -109,7 +89,7 @@ Install Prerequisites
|
||||
|
||||
To build or run Verilator, you need these standard packages:
|
||||
|
||||
.. code-block:: shell
|
||||
::
|
||||
|
||||
sudo apt-get install git help2man perl python3 make
|
||||
sudo apt-get install g++ # Alternatively, clang
|
||||
@@ -121,7 +101,7 @@ To build or run Verilator, you need these standard packages:
|
||||
To build or run Verilator, the following are optional but should be installed
|
||||
for good performance:
|
||||
|
||||
.. code-block:: shell
|
||||
::
|
||||
|
||||
sudo apt-get install ccache # If present at build, needed for run
|
||||
sudo apt-get install mold # If present at build, needed for run
|
||||
@@ -130,26 +110,26 @@ for good performance:
|
||||
The following is optional but is recommended for nicely rendered command line
|
||||
help when running Verilator:
|
||||
|
||||
.. code-block:: shell
|
||||
::
|
||||
|
||||
sudo apt-get install perl-doc
|
||||
|
||||
To build Verilator you will need to install these packages; these do not
|
||||
need to be present to run Verilator:
|
||||
|
||||
.. code-block:: shell
|
||||
::
|
||||
|
||||
sudo apt-get install git autoconf flex bison
|
||||
|
||||
Those developing Verilator itself may also want these (see internals.rst):
|
||||
|
||||
.. code-block:: shell
|
||||
::
|
||||
|
||||
sudo apt-get install clang clang-format-14 cmake gdb gprof graphviz lcov
|
||||
sudo apt-get install python3-clang yapf3 bear jq
|
||||
sudo pip3 install sphinx sphinx_rtd_theme sphinxcontrib-spelling breathe ruff
|
||||
sudo pip3 install git+https://github.com/antmicro/astsee.git
|
||||
sudo apt-get install libclang-dev yapf3 bear
|
||||
sudo pip3 install clang sphinx sphinx_rtd_theme sphinxcontrib-spelling breathe ruff
|
||||
cpan install Pod::Perldoc
|
||||
cpan install Parallel::Forker
|
||||
|
||||
|
||||
Install SystemC
|
||||
@@ -171,17 +151,6 @@ To make use of Verilator FST tracing you will want `GTKwave
|
||||
required at Verilator build time.
|
||||
|
||||
|
||||
Install Z3
|
||||
^^^^^^^^^^
|
||||
|
||||
In order to use constrained randomization the `Z3 Theorem Prover
|
||||
<https://github.com/z3prover/z3#readme>`__ must be installed, however this is
|
||||
not required at Verilator build time. There are other compatible SMT solvers,
|
||||
like CVC5/CVC4, but they are not guaranteed to work. Since different solvers are
|
||||
faster for different scenarios, the solver to use at run-time can be specified
|
||||
by the environment variable :option:`VERILATOR_SOLVER`.
|
||||
|
||||
|
||||
.. _Obtain Sources:
|
||||
|
||||
Obtain Sources
|
||||
@@ -190,14 +159,14 @@ Obtain Sources
|
||||
Get the sources from the git repository: (You need to do this only once,
|
||||
ever.)
|
||||
|
||||
.. code-block:: shell
|
||||
::
|
||||
|
||||
git clone https://github.com/verilator/verilator # Only first time
|
||||
## Note the URL above is not a page you can see with a browser; it's for git only
|
||||
|
||||
Enter the checkout and determine what version/branch to use:
|
||||
|
||||
.. code-block:: shell
|
||||
::
|
||||
|
||||
cd verilator
|
||||
git pull # Make sure we're up-to-date
|
||||
@@ -212,7 +181,7 @@ Auto Configure
|
||||
|
||||
Create the configuration script:
|
||||
|
||||
.. code-block:: shell
|
||||
::
|
||||
|
||||
autoconf # Create ./configure script
|
||||
|
||||
@@ -223,9 +192,8 @@ Eventual Installation Options
|
||||
Before configuring the build, you must decide how you're going to
|
||||
eventually install Verilator onto your system. Verilator will be compiling
|
||||
the current value of the environment variables :option:`VERILATOR_ROOT`,
|
||||
:option:`VERILATOR_SOLVER`, :option:`SYSTEMC_INCLUDE`, and
|
||||
:option:`SYSTEMC_LIBDIR` as defaults into the executable, so they must be
|
||||
correct before configuring.
|
||||
:option:`SYSTEMC_INCLUDE`, and :option:`SYSTEMC_LIBDIR` as defaults into
|
||||
the executable, so they must be correct before configuring.
|
||||
|
||||
These are the installation options:
|
||||
|
||||
@@ -238,7 +206,7 @@ directory (don't run ``make install``). This allows the easiest
|
||||
experimentation and upgrading, and allows many versions of Verilator to
|
||||
co-exist on a system.
|
||||
|
||||
.. code-block:: shell
|
||||
::
|
||||
|
||||
export VERILATOR_ROOT=`pwd` # if your shell is bash
|
||||
setenv VERILATOR_ROOT `pwd` # if your shell is csh
|
||||
@@ -260,7 +228,7 @@ that may support multiple versions of every tool. Tell configure the
|
||||
eventual destination directory name. We recommend that the destination
|
||||
location include the Verilator version name:
|
||||
|
||||
.. code-block:: shell
|
||||
::
|
||||
|
||||
unset VERILATOR_ROOT # if your shell is bash
|
||||
unsetenv VERILATOR_ROOT # if your shell is csh
|
||||
@@ -272,7 +240,7 @@ the ``bin`` directory to your ``PATH``. Or, if you use `modulecmd
|
||||
<http://modules.sourceforge.net/>`__, you'll want a module file like the
|
||||
following:
|
||||
|
||||
.. code-block:: shell
|
||||
::
|
||||
|
||||
set install_root /CAD_DISK/verilator/{version-number-used-above}
|
||||
unsetenv VERILATOR_ROOT
|
||||
@@ -287,7 +255,7 @@ following:
|
||||
The final option is to eventually install Verilator globally, using
|
||||
configure's default system paths:
|
||||
|
||||
.. code-block:: shell
|
||||
::
|
||||
|
||||
unset VERILATOR_ROOT # if your shell is bash
|
||||
unsetenv VERILATOR_ROOT # if your shell is csh
|
||||
@@ -304,7 +272,7 @@ The command to configure the package was described in the previous step.
|
||||
Developers should configure to have more complete developer tests.
|
||||
Additional packages may be required for these tests.
|
||||
|
||||
.. code-block:: shell
|
||||
::
|
||||
|
||||
export VERILATOR_AUTHOR_SITE=1 # Put in your .bashrc
|
||||
./configure --enable-longtests ...above options...
|
||||
@@ -315,7 +283,7 @@ Compile
|
||||
|
||||
Compile Verilator:
|
||||
|
||||
.. code-block:: shell
|
||||
::
|
||||
|
||||
make -j `nproc` # Or if error on `nproc`, the number of CPUs in system
|
||||
|
||||
@@ -325,7 +293,7 @@ Test
|
||||
|
||||
Check the compilation by running self-tests:
|
||||
|
||||
.. code-block:: shell
|
||||
::
|
||||
|
||||
make test
|
||||
|
||||
@@ -337,7 +305,7 @@ If you used any install option other than the `1. Run-in-Place from
|
||||
VERILATOR_ROOT <#_1_run_in_place_from_verilator_root>`__ scheme, install
|
||||
the files:
|
||||
|
||||
.. code-block:: shell
|
||||
::
|
||||
|
||||
make install
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
***************
|
||||
@@ -62,23 +62,12 @@ Verilator supports the 2017 "for" loop constructs and several cleanups IEEE
|
||||
made in 1800-2017.
|
||||
|
||||
|
||||
SystemVerilog 2023 (IEEE 1800-2023) Support
|
||||
-------------------------------------------
|
||||
|
||||
Verilator supports some of the 2023 improvements, including triple-quoted
|
||||
string blocks that may include newlines and single quotes.
|
||||
|
||||
Verilator implements a full IEEE 1800-2023 compliant preprocessor,
|
||||
including triple-quoted strings, and \`ifdef expressions.
|
||||
|
||||
|
||||
Verilog AMS Support
|
||||
-------------------
|
||||
|
||||
Verilator implements a very small subset of Verilog AMS (Verilog Analog and
|
||||
Mixed-Signal Extensions) with the subset corresponding to those VMS
|
||||
keywords with near-equivalents in Verilog IEEE 1364 or SystemVerilog
|
||||
IEEE 1800.
|
||||
keywords with near-equivalents in Verilog 2005 or SystemVerilog 2017.
|
||||
|
||||
AMS parsing is enabled with :vlopt:`--language VAMS <--language>` or
|
||||
:vlopt:`--language 1800+VAMS <--language>`.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
********
|
||||
@@ -50,6 +50,6 @@ The best place to get started is to try the :ref:`Examples`.
|
||||
.. [#] SystemVerilog is defined by the `Institute of Electrical and
|
||||
Electronics Engineers (IEEE) Standard for SystemVerilog - Unified
|
||||
Hardware Design, Specification, and Verification Language`, Standard
|
||||
1800, released in 2005, 2009, 2012, 2017, and 2023. The Verilator
|
||||
documentation uses the shorthand e.g., "IEEE 1800-2023", to refer to
|
||||
the, e.g., 2023 version of this standard.
|
||||
1800, released in 2005, 2009, 2012, and 2017. The Verilator
|
||||
documentation uses the shorthand e.g., "IEEE 1800-2017", to refer to
|
||||
the, e.g., 2017 version of this standard.
|
||||
|
||||
+9
-109
@@ -1,4 +1,4 @@
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
.. _Simulating:
|
||||
@@ -12,62 +12,6 @@ Verilated model's executable. For the runtime arguments to a simulated
|
||||
model, see :ref:`Simulation Runtime Arguments`.
|
||||
|
||||
|
||||
.. _Simulation Summary Report:
|
||||
|
||||
Simulation Summary Report
|
||||
=========================
|
||||
|
||||
When simulation finishes, it will print a report to stdout summarizing the
|
||||
simulation. This requires the model being Verilated with :vlopt:`--main`,
|
||||
or the user's `main()` calling `VerilatedContext->statsPrintSummary()`.
|
||||
|
||||
The report may be disabled with :vlopt:`+verilator+quiet`.
|
||||
|
||||
For example:
|
||||
|
||||
.. code-block::
|
||||
|
||||
- S i m u l a t i o n R e p o r t: Verilator ...
|
||||
- Verilator: End at simtime 123 ns; walltime 1234.001 s; speed 123 ns/s
|
||||
- Verilator: cpu 22.001 s on 4 threads; alloced 123 MB
|
||||
|
||||
The information in this report is:
|
||||
|
||||
.. describe:: "Verilator ..."
|
||||
|
||||
Program version.
|
||||
|
||||
.. describe:: "End at simtime 123 ns"
|
||||
|
||||
Verilog $time at which the model finished or stopped.
|
||||
|
||||
.. describe:: "walltime 1234.001 s"
|
||||
|
||||
Real elapsed wall time in seconds.
|
||||
|
||||
.. describe:: "speed 123.1 ns/s"
|
||||
|
||||
Simulated time (if non-zero) divided by wall time. e.g. `123 ns/s` means
|
||||
123 simulated nanoseconds took 1 second of wall time; for a model with
|
||||
only a 1 GHz clock that would be equivalent to 123.1 cycles per
|
||||
second. The units are automatically selected to give a number between 1
|
||||
and 1000. The wall time includes initialization, initial and final
|
||||
process blocks, so indicates a slower speed than if the model had a
|
||||
longer runtime.
|
||||
|
||||
.. describe:: "cpu 22 s"
|
||||
|
||||
CPU time used total across all CPU threads in seconds.
|
||||
|
||||
.. describe:: "4 threads"
|
||||
|
||||
Number of simultaneous threads used.
|
||||
|
||||
.. describe:: "alloced 123 MB"
|
||||
|
||||
Total memory used during simulation in megabytes.
|
||||
|
||||
|
||||
.. _Benchmarking & Optimization:
|
||||
|
||||
Benchmarking & Optimization
|
||||
@@ -224,6 +168,14 @@ at branches). At each such branch, a counter is incremented. At the end
|
||||
of a test, the counters, filename, and line number corresponding to each
|
||||
counter are written into the coverage file.
|
||||
|
||||
Verilator automatically disables coverage of branches with a $stop in
|
||||
them, as it is assumed that $stop branches contain an error check that should
|
||||
not occur. A :option:`/*verilator&32;coverage_block_off*/` metacomment
|
||||
will perform a similar function on any code in that block or below, or
|
||||
:option:`/*verilator&32;coverage_off*/` and
|
||||
:option:`/*verilator&32;coverage_on*/` will disable and enable coverage
|
||||
respectively around a block of code.
|
||||
|
||||
Verilator may over-count combinatorial (non-clocked) blocks when those
|
||||
blocks receive signals which have had the :option:`UNOPTFLAT` warning
|
||||
disabled; for the most accurate results, do not disable this warning when
|
||||
@@ -270,58 +222,6 @@ A :option:`/*verilator&32;coverage_off*/`
|
||||
signals that do not need toggle analysis, such as RAMs and register files.
|
||||
|
||||
|
||||
.. _Expression Coverage:
|
||||
|
||||
Expression Coverage
|
||||
-------------------
|
||||
|
||||
With :vlopt:`--coverage` or :vlopt:`--coverage-expr`, Verilator will
|
||||
automatically add coverage analysis at each expression, indicating with a
|
||||
truth table how every Boolean truth-table possibility in the expression
|
||||
occurred.
|
||||
|
||||
Multi-bit expressions are ignored, but sub-expressions with are entirely
|
||||
Boolean are analyzed. Expression coverage does not fully explore the truth
|
||||
table of an expression, rather is looks at each term's contribution. E.g.
|
||||
an AND operation will check coverage for TT, XF and FX.
|
||||
|
||||
Some expressions may produce too many cover points. Verilator limits the
|
||||
maximum number of cover points per expression to 32, but this may be
|
||||
controlled with :vlopt:`--coverage-expr-max`.
|
||||
|
||||
Below is an example showing expression coverage produced from `verilator_coverage`
|
||||
as applied to the condition expression inside an if statement. Each line
|
||||
shows the minimum number of terms and their values (e.g. `(t1==0 && t2==1)`) needed
|
||||
to reach a result for the overall expression (e.g. `=> 1`). Each line also
|
||||
shows the number of times this combination was hit. Note that individual lines
|
||||
are not mutually exclusive.
|
||||
|
||||
.. code-block::
|
||||
|
||||
%000004 if ((~t1 && t2) || (~t3 && t4)) $write("");
|
||||
-000002 point: comment=(t1==0 && t2==1) => 1 hier=top.t
|
||||
-000002 point: comment=(t1==1 && t3==1) => 0 hier=top.t
|
||||
-000004 point: comment=(t1==1 && t4==0) => 0 hier=top.t
|
||||
-000002 point: comment=(t2==0 && t3==1) => 0 hier=top.t
|
||||
-000003 point: comment=(t2==0 && t4==0) => 0 hier=top.t
|
||||
-000002 point: comment=(t3==0 && t4==1) => 1 hier=top.t
|
||||
|
||||
.. _Suppressing Coverage:
|
||||
|
||||
Suppressing Coverage
|
||||
--------------------
|
||||
|
||||
Using :option:`/*verilator&32;coverage_off*/` and
|
||||
:option:`/*verilator&32;coverage_on*/` around a block of code will disable
|
||||
and enable coverage respectively around that block. Or, use the
|
||||
:option:`coverage_block_off` configuration file option.
|
||||
|
||||
Verilator automatically disables coverage of lines and branches with a
|
||||
$stop in them, as it is assumed that $stop branches contain an error check
|
||||
that should not occur. A :option:`/*verilator&32;coverage_block_off*/`
|
||||
metacomment will perform a similar function on any code in that block or
|
||||
below.
|
||||
|
||||
.. _Coverage Collection:
|
||||
|
||||
Coverage Collection
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
**********
|
||||
@@ -304,9 +304,9 @@ GNU Make
|
||||
========
|
||||
|
||||
Verilator defaults to creating GNU Make makefiles for the model. Verilator
|
||||
will call make automatically when the :vlopt:`--build` option is used.
|
||||
will call make automatically when the :vlopt:'--build' option is used.
|
||||
|
||||
If calling Verilator from a makefile, the :vlopt:`--MMD` option will create
|
||||
If calling Verilator from a makefile, the :vlopt:'-MMD' option will create
|
||||
a dependency file, allowing Make to only run Verilator if input Verilog
|
||||
files change.
|
||||
|
||||
@@ -498,78 +498,3 @@ The search paths can be configured by setting some variables:
|
||||
|
||||
Sets the installation prefix of an installed SystemC library. (Same as
|
||||
SYSTEMC_ROOT).
|
||||
|
||||
|
||||
.. _Verilation Summary Report:
|
||||
|
||||
Verilation Summary Report
|
||||
=========================
|
||||
|
||||
When Verilator generates code, unless :vlopt:`--quiet-stats` is used, it
|
||||
will print a report to stdout summarizing the build. For example:
|
||||
|
||||
.. code-block::
|
||||
|
||||
- V e r i l a t i o n R e p o r t: Verilator ....
|
||||
- Verilator: Built from 354 MB sources in 247 modules,
|
||||
into 74 MB in 89 C++ files needing 0.192 MB
|
||||
- Verilator: Walltime 26.580 s (elab=2.096, cvt=18.268,
|
||||
bld=2.100); cpu 26.548 s on 1 threads; alloced 2894.672 MB
|
||||
|
||||
The information in this report is:
|
||||
|
||||
.. describe:: "Verilator ..."
|
||||
|
||||
Program version.
|
||||
|
||||
.. describe:: "234 MB sources"
|
||||
|
||||
Characters of post-preprocessed text in all input
|
||||
Verilog and Verilator Control files in megabytes.
|
||||
|
||||
.. describe:: "247 modules"
|
||||
|
||||
Number of interfaces/modules/classes/packages in design before
|
||||
elaboration.
|
||||
|
||||
.. describe:: "into 74 MB"
|
||||
|
||||
Characters of output C++ code, including comments in megabytes.
|
||||
|
||||
.. describe:: "89 C++ files"
|
||||
|
||||
Number of .cpp files created.
|
||||
|
||||
.. describe:: "needing 192MB"
|
||||
|
||||
Verilation-time minimum-bound estimate of memory needed to run model in
|
||||
megabytes. (Expect to need significantly more.)
|
||||
|
||||
.. describe:: "Walltime 26.580 s"
|
||||
|
||||
Real elapsed wall time for Verilation and build.
|
||||
|
||||
.. describe:: "elab=2.096"
|
||||
|
||||
Wall time to read in files and complete elaboration.
|
||||
|
||||
.. describe:: "cvt=18.268"
|
||||
|
||||
Wall time for Verilator to process and write output.
|
||||
|
||||
.. describe:: "bld=2.1"
|
||||
|
||||
Wall time to compile gcc/clang (if using :vlopt:`--build`).
|
||||
|
||||
.. describe:: "cpu 22.548 s"
|
||||
|
||||
CPU time used, total across all CPU threads.
|
||||
|
||||
.. describe:: "4 threads"
|
||||
|
||||
Number of simultaneous threads used.
|
||||
|
||||
.. describe:: "alloced 123 MB"
|
||||
|
||||
Total memory used during build by Verilator executable (excludes
|
||||
:vlopt:`--build` compiler's usage) in megabytes.
|
||||
|
||||
+48
-144
@@ -1,4 +1,4 @@
|
||||
.. Copyright 2003-2025 by Wilson Snyder.
|
||||
.. Copyright 2003-2024 by Wilson Snyder.
|
||||
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||
|
||||
*******************
|
||||
@@ -44,7 +44,7 @@ Warnings may be disabled in multiple ways:
|
||||
|
||||
.. code-block:: sv
|
||||
|
||||
lint_off -rule UNSIGNED -file "*/example.v" -lines 1
|
||||
lint_off -rule UNSIGNED -file "*/example.v" -line 1
|
||||
|
||||
|
||||
Error And Warning Format
|
||||
@@ -161,8 +161,8 @@ List Of Warnings
|
||||
.. option:: BADSTDPRAGMA
|
||||
|
||||
An error that a pragma is badly formed, for pragmas defined by IEEE
|
||||
1800-2023. For example, an empty pragma line, or an incorrectly used
|
||||
'pragma protect'. Third-party pragmas not defined by IEEE 1800-2023 are
|
||||
1800-2017. For example, an empty pragma line, or an incorrectly used
|
||||
'pragma protect'. Third-party pragmas not defined by IEEE 1800-2017 are
|
||||
ignored.
|
||||
|
||||
|
||||
@@ -210,35 +210,22 @@ List Of Warnings
|
||||
|
||||
.. option:: BLKLOOPINIT
|
||||
|
||||
Indicates certain constructs where non-blocking assignments to unpacked
|
||||
arrays (memories) are not supported inside loops. These typically appear in
|
||||
initialization/reset code:
|
||||
.. TODO better example
|
||||
|
||||
This indicates that the initialization of an array needs to use
|
||||
non-delayed assignments. This is done in the interest of speed; if
|
||||
delayed assignments were used, the simulator would have to copy large
|
||||
arrays every cycle. (In smaller loops, loop unrolling allows the
|
||||
delayed assignment to work, though it's a bit slower than a non-delayed
|
||||
assignment.) Here's an example
|
||||
|
||||
.. code-block:: sv
|
||||
|
||||
always @(posedge clk)
|
||||
if (~reset_l)
|
||||
for (i=0; i<`ARRAY_SIZE; i++)
|
||||
array[i] <= 0; // Non-blocking assignment inside loop
|
||||
else
|
||||
array[address] <= data;
|
||||
array[i] = 0; // Non-delayed for verilator
|
||||
|
||||
While this is supported in typical synthesizeable code (including the
|
||||
example above), some complicated cases are not supported. Namely:
|
||||
|
||||
1. If the above loop is inside a suspendable process or fork statement.
|
||||
|
||||
2. If the variable is also the target of a '<=' non-blocking assignment
|
||||
in a suspendable process or fork statement (in addition to a synthesizable
|
||||
loop).
|
||||
|
||||
3. If the element type of the array is a compound type.
|
||||
|
||||
4. In versions before 5.026, any delayed assignment to an array.
|
||||
|
||||
It might slightly improve run-time performance if you change the
|
||||
non-blocking assignment inside the loop into a blocking assignment
|
||||
(that is: use '=' instead of '<='), if possible.
|
||||
|
||||
This message is only seen on large or complicated loops because
|
||||
Verilator generally unrolls small loops. You may want to try increasing
|
||||
@@ -296,7 +283,7 @@ List Of Warnings
|
||||
Unique case statements that select on an enumerated variable, where all
|
||||
of the enumerated values are covered by case items, are considered
|
||||
complete even if the case statement does not cover illegal
|
||||
non-enumerated values (IEEE 1800-2023 12.5.3). To check that illegal
|
||||
non-enumerated values (IEEE 1800-2017 12.5.3). To check that illegal
|
||||
values are not hit, use :vlopt:`--assert`.
|
||||
|
||||
Ignoring this warning will only suppress the lint check; it will
|
||||
@@ -419,9 +406,9 @@ List Of Warnings
|
||||
|
||||
.. option:: CONSTRAINTIGN
|
||||
|
||||
Warns that Verilator does not support certain forms of
|
||||
:code:`constraint`, :code:`constraint_mode`, or :code:`rand_mode`, and
|
||||
the construct was are ignored.
|
||||
Warns that Verilator does not support :code:`constraint`,
|
||||
:code:`constraint_mode`, or :code:`rand_mode`, and the construct was are
|
||||
ignored.
|
||||
|
||||
Ignoring this warning may make Verilator randomize() simulations differ
|
||||
from other simulators.
|
||||
@@ -445,18 +432,6 @@ List Of Warnings
|
||||
correctly.
|
||||
|
||||
|
||||
.. option:: COVERIGN
|
||||
|
||||
Warns that Verilator does not support certain forms of
|
||||
:code:`covergroup`, :code:`coverpoint`, and coverage options, and the
|
||||
construct was are ignored.
|
||||
|
||||
Disabling the :option:`UNSUPPORTED` error also disables this warning.
|
||||
|
||||
Ignoring this warning may make Verilator ignore lint checking on the
|
||||
construct, and collect coverage data differently from other simulators.
|
||||
|
||||
|
||||
.. option:: DECLFILENAME
|
||||
|
||||
.. TODO better example
|
||||
@@ -504,7 +479,7 @@ List Of Warnings
|
||||
|
||||
.. code-block::
|
||||
|
||||
%Warning-DEFPARAM: example.v:5:15: defparam is deprecated (IEEE 1800-2023 C.4.1)
|
||||
%Warning-DEFPARAM: example.v:5:15: defparam is deprecated (IEEE 1800-2017 C.4.1)
|
||||
: ... Suggest use instantiation with #(.MY_PARAM(...etc...))
|
||||
|
||||
To repair use :code:`#(.PARAMETER(...))` syntax. Repaired Example:
|
||||
@@ -732,7 +707,7 @@ List Of Warnings
|
||||
|
||||
.. code-block::
|
||||
|
||||
%Warning-GENUNNAMED: example.v:2:9: Unnamed generate block (IEEE 1800-2023 27.6)
|
||||
%Warning-GENUNNAMED: example.v:2:9: Unnamed generate block (IEEE 1800-2017 27.6)
|
||||
|
||||
To fix this assign a label (often with the naming convention prefix of
|
||||
:code:`gen_` or :code:`g_`), for example:
|
||||
@@ -788,7 +763,7 @@ List Of Warnings
|
||||
|
||||
.. code-block::
|
||||
|
||||
%Warning-IGNOREDRETURN: example.v:5:9: Ignoring return value of non-void function (IEEE 1800-2023 13.4.1)
|
||||
%Warning-IGNOREDRETURN: example.v:5:9: Ignoring return value of non-void function (IEEE 1800-2017 13.4.1)
|
||||
|
||||
The portable way to suppress this warning (in SystemVerilog) is to use a
|
||||
void cast, for example:
|
||||
@@ -1229,14 +1204,6 @@ List Of Warnings
|
||||
:vlopt:`--no-timing` option.
|
||||
|
||||
|
||||
.. option:: NONSTD
|
||||
|
||||
Warns when a non-standard language feature is used that has a standard
|
||||
equivalent, which might behave differently in corner cases. For example
|
||||
:code:`$psprintf` system function is replaced by its standard equivalent
|
||||
:code:`$sformatf`.
|
||||
|
||||
|
||||
.. option:: NULLPORT
|
||||
|
||||
Warns that a null port was detected in the module definition port
|
||||
@@ -1276,7 +1243,7 @@ List Of Warnings
|
||||
|
||||
.. option:: PINMISSING
|
||||
|
||||
.. TODO better example (frequent)
|
||||
.. TODO better example
|
||||
|
||||
Warns that a module has a pin that is not mentioned in an instance. If
|
||||
a pin is not missing it should still be specified on the instance
|
||||
@@ -1285,22 +1252,6 @@ List Of Warnings
|
||||
Ignoring this warning will only suppress the lint check; it will
|
||||
simulate correctly.
|
||||
|
||||
Faulty example:
|
||||
|
||||
.. include:: ../../docs/gen/ex_PKGNODECL_faulty.rst
|
||||
|
||||
Results in:
|
||||
|
||||
.. include:: ../../docs/gen/ex_PKGNODECL_msg.rst
|
||||
|
||||
Repaired example:
|
||||
|
||||
.. code-block:: sv
|
||||
:emphasize-lines: 2
|
||||
|
||||
sub sub (
|
||||
.port());
|
||||
|
||||
Other tools with similar warnings: Icarus Verilog's portbind, "warning:
|
||||
Instantiating module ... with dangling input port (...)". Slang's
|
||||
unconnected-port, "port '...' has no connection".
|
||||
@@ -1332,7 +1283,7 @@ List Of Warnings
|
||||
generate
|
||||
if (A==0) begin
|
||||
b b_inst1 (.x(1'b0)); //<--- error nonexistent port
|
||||
b #(.PX(1'b0)) b_inst2 (); //<--- error nonexistent parameter
|
||||
b #(.PX(1'b0)) b_inst2 (); //<--- error nonexistent parameter
|
||||
end
|
||||
endgenerate
|
||||
endmodule
|
||||
@@ -1374,47 +1325,11 @@ List Of Warnings
|
||||
|
||||
.. option:: PKGNODECL
|
||||
|
||||
An error that a package/class appears to have been referenced that has
|
||||
not yet been declared. According to IEEE 1800-2023 26.3, all packages
|
||||
must be declared before being used.
|
||||
.. TODO better example
|
||||
|
||||
Faulty example:
|
||||
|
||||
.. include:: ../../docs/gen/ex_PKGNODECL_faulty.rst
|
||||
|
||||
Results in:
|
||||
|
||||
.. include:: ../../docs/gen/ex_PKGNODECL_msg.rst
|
||||
|
||||
Often the package is declared in its own header file. In this case add
|
||||
an include of that package header file to the referencing file. (And
|
||||
make sure you have header guards in the package's header file to prevent
|
||||
multiple declarations of the package.)
|
||||
|
||||
|
||||
.. option:: PREPROCZERO
|
||||
|
||||
Warns that a preprocessor \`ifdef/\`ifndef expression (added in IEEE
|
||||
1800-2023) evaluates a define value which has a value of :code:`0`.
|
||||
This will evaluate in the expression as :code:`1` because the define has
|
||||
a definition, unlike in the C preprocessor, which evaluates using the
|
||||
define's value (of :code:`1`).
|
||||
|
||||
Referring to a define with an empty value does not give this warning, as
|
||||
in C, the preprocessor will give an error on a preprocessor expression
|
||||
of a define that is empty.
|
||||
|
||||
.. code-block:: sv
|
||||
:linenos:
|
||||
:emphasize-lines: 2
|
||||
|
||||
`define ZERO 0
|
||||
`ifdef (ZERO || ZERO) //<--- warning PREPROCZERO
|
||||
`error This_will_error_which_might_be_not_the_intent
|
||||
`endif
|
||||
|
||||
The portable way to suppress this warning is to use a define value other
|
||||
than zero, when it is to be used in a preprocessor expression.
|
||||
An error that a package/class appears to have been referenced that has not
|
||||
yet been declared. According to IEEE 1800-2017 26.3, all packages must
|
||||
be declared before being used.
|
||||
|
||||
|
||||
.. option:: PROCASSWIRE
|
||||
@@ -1704,9 +1619,6 @@ List Of Warnings
|
||||
Warning that a symbol matches a C++ reserved word, and using this as a
|
||||
symbol name would result in odd C++ compiler errors. You may disable
|
||||
this warning, but Verilator will rename the symbol to avoid conflict.
|
||||
If you are using `--vpi` and only mark things as public for VPI access
|
||||
(and not C++ access) then it is advisable to disable this warning with
|
||||
:code:`-Wno-SYMRSVDWORD`.
|
||||
|
||||
|
||||
.. option:: SYNCASYNCNET
|
||||
@@ -1795,7 +1707,7 @@ List Of Warnings
|
||||
|
||||
.. code-block::
|
||||
|
||||
%Warning-TIMESCALEMOD: example.v:1:8: Timescale missing on this module as other modules have it (IEEE 1800-2023 3.14.2.3)
|
||||
%Warning-TIMESCALEMOD: example.v:1:8: Timescale missing on this module as other modules have it (IEEE 1800-2017 3.14.2.3)
|
||||
|
||||
Recommend using :vlopt:`--timescale` argument, or in front of all
|
||||
modules use:
|
||||
@@ -1939,8 +1851,7 @@ List Of Warnings
|
||||
|
||||
.. option:: UNPACKED
|
||||
|
||||
Warns that unpacked structs and unions are not supported because
|
||||
:vlopt:`--structs-packed` was used, or by up through version 5.004.
|
||||
Warns that unpacked structs and unions are not supported.
|
||||
|
||||
Ignoring this warning will make Verilator treat the structure as packed,
|
||||
which may make Verilator simulations differ from other simulators. This
|
||||
@@ -1991,16 +1902,14 @@ List Of Warnings
|
||||
|
||||
.. TODO better example
|
||||
|
||||
Warns that the specified genvar is never used/consumed. See similar
|
||||
:option:`UNUSEDSIGNAL`.
|
||||
Warns that the specified genvar is never used/consumed.
|
||||
|
||||
|
||||
.. option:: UNUSEDPARAM
|
||||
|
||||
.. TODO better example
|
||||
|
||||
Warns that the specified parameter is never used/consumed. See similar
|
||||
:option:`UNUSEDSIGNAL`.
|
||||
Warns that the specified parameter is never used/consumed.
|
||||
|
||||
|
||||
.. option:: UNUSEDSIGNAL
|
||||
@@ -2021,12 +1930,12 @@ List Of Warnings
|
||||
|
||||
.. code-block:: sv
|
||||
|
||||
wire _unused_ok = 1'b0 && &{1'b0,
|
||||
wire _unused_ok = &{1'b0,
|
||||
sig_not_used_a,
|
||||
sig_not_used_yet_b, // To be fixed
|
||||
1'b0};
|
||||
|
||||
The AND with constant zero mean the net will always be zero,
|
||||
The reduction AND and constant zeros mean the net will always be zero,
|
||||
so won't use simulation runtime. The redundant leading and trailing
|
||||
zeros avoid syntax errors if there are no signals between them. The
|
||||
magic name "unused" (controlled by the :vlopt:`--unused-regexp` option)
|
||||
@@ -2040,7 +1949,7 @@ List Of Warnings
|
||||
.. option:: USERERROR
|
||||
|
||||
A SystemVerilog elaboration-time assertion error was executed.
|
||||
IEEE 1800-2023 20.11 requires this error.
|
||||
IEEE 1800-2017 20.11 requires this error.
|
||||
|
||||
Faulty example:
|
||||
|
||||
@@ -2056,7 +1965,7 @@ List Of Warnings
|
||||
.. option:: USERFATAL
|
||||
|
||||
A SystemVerilog elaboration-time assertion fatal was executed.
|
||||
IEEE 1800-2023 20.11 requires this error.
|
||||
IEEE 1800-2017 20.11 requires this error.
|
||||
|
||||
Faulty example:
|
||||
|
||||
@@ -2072,7 +1981,7 @@ List Of Warnings
|
||||
.. option:: USERINFO
|
||||
|
||||
A SystemVerilog elaboration-time assertion print was executed. This is
|
||||
not an error or warning, and IEEE 1800-2023 20.11 requires this
|
||||
not an error or warning, and IEEE 1800-2017 20.11 requires this
|
||||
behavior.
|
||||
|
||||
Example:
|
||||
@@ -2087,7 +1996,7 @@ List Of Warnings
|
||||
.. option:: USERWARN
|
||||
|
||||
A SystemVerilog elaboration-time assertion warning was executed.
|
||||
IEEE 1800-2023 20.11 requires this warning.
|
||||
IEEE 1800-2017 20.11 requires this warning.
|
||||
|
||||
Faulty example:
|
||||
|
||||
@@ -2123,6 +2032,10 @@ List Of Warnings
|
||||
|
||||
.. option:: WAITCONST
|
||||
|
||||
.. code-block:: sv
|
||||
|
||||
wait(1); // Blocks forever
|
||||
|
||||
Warns that a `wait` statement awaits a constant condition, which means it
|
||||
either blocks forever or never blocks.
|
||||
|
||||
@@ -2130,12 +2043,6 @@ List Of Warnings
|
||||
something that elaborates to zero), does not warn, as it is presumed the
|
||||
code is making the intent clear.
|
||||
|
||||
Faulty example:
|
||||
|
||||
.. code-block:: sv
|
||||
|
||||
wait(1); // Blocks forever
|
||||
|
||||
|
||||
.. option:: WIDTH
|
||||
|
||||
@@ -2172,7 +2079,7 @@ List Of Warnings
|
||||
|
||||
.. include:: ../../docs/gen/ex_WIDTHEXPAND_1_faulty.rst
|
||||
|
||||
Results in a :option:`WIDTHEXPAND` warning:
|
||||
Results in a WIDTHEXPAND warning:
|
||||
|
||||
.. include:: ../../docs/gen/ex_WIDTHEXPAND_1_msg.rst
|
||||
|
||||
@@ -2183,18 +2090,15 @@ List Of Warnings
|
||||
|
||||
.. option:: WIDTHTRUNC
|
||||
|
||||
A more granular :option:`WIDTH` warning, for when a value is
|
||||
truncated. See :option:`WIDTH`.
|
||||
A more granular WIDTH warning, for when a value is truncated.
|
||||
|
||||
.. option:: WIDTHEXPAND
|
||||
|
||||
A more granular :option:`WIDTH` warning, for when a value is zero
|
||||
expanded. See :option:`WIDTH`.
|
||||
A more granular WIDTH warning, for when a value is zero expanded.
|
||||
|
||||
.. option:: WIDTHXZEXPAND
|
||||
|
||||
A more granular :option:`WIDTH` warning, for when a value is X/Z
|
||||
expanded. See :option:`WIDTH`.
|
||||
A more granular WIDTH warning, for when a value is X/Z expanded.
|
||||
|
||||
.. option:: WIDTHCONCAT
|
||||
|
||||
@@ -2231,7 +2135,7 @@ List Of Warnings
|
||||
.. option:: ZEROREPL
|
||||
|
||||
Warns that zero is used as the replication value in the replication
|
||||
operator. This is specified as an error by IEEE 1800-2023 11.4.12.1.
|
||||
operator. This is specified as an error by IEEE 1800-2017 11.4.12.1.
|
||||
|
||||
Faulty example:
|
||||
|
||||
@@ -2243,7 +2147,7 @@ List Of Warnings
|
||||
#(parameter int MY_PARAM = 0);
|
||||
reg [7:0] data;
|
||||
always @* begin
|
||||
data = {MY_PARAM{1'b1}}; //<--- Warning
|
||||
data = {MY_PARAM{1'b1}}; //<--- WARNING
|
||||
end
|
||||
endmodule
|
||||
|
||||
@@ -2251,7 +2155,7 @@ List Of Warnings
|
||||
|
||||
.. code-block::
|
||||
|
||||
%Error-ZEROREPL: test.v:5:22: Replication value of 0 is only legal under a concatenation (IEEE 1800-2023 11.4.12.1)
|
||||
%Error-ZEROREPL: test.v:5:22: Replication value of 0 is only legal under a concatenation (IEEE 1800-2017 11.4.12.1)
|
||||
|
||||
Note that in some cases, this warning may be false, when a condition
|
||||
upstream or downstream of the access means the zero replication will
|
||||
@@ -2264,7 +2168,7 @@ List Of Warnings
|
||||
:emphasize-lines: 2
|
||||
|
||||
module dut
|
||||
#(parameter int MY_PARAM = 1); //<--- REPAIRED
|
||||
#(parameter int MY_PARAM = 1); //<--- REPAIRED
|
||||
reg [7:0] data;
|
||||
always @* begin
|
||||
data = {MY_PARAM{1'b1}};
|
||||
|
||||
+77
-167
@@ -224,7 +224,7 @@ Scheduling
|
||||
----------
|
||||
|
||||
Verilator implements the Active and NBA regions of the SystemVerilog scheduling
|
||||
model as described in IEEE 1800-2023 chapter 4, and in particular sections
|
||||
model as described in IEEE 1800-2017 chapter 4, and in particular sections
|
||||
4.5 and Figure 4.1. The static (Verilation time) scheduling of SystemVerilog
|
||||
processes is performed by code in the ``V3Sched`` namespace. The single
|
||||
entry point to the scheduling algorithm is ``V3Sched::schedule``. Some
|
||||
@@ -312,7 +312,7 @@ Scheduling of clocked and combinational logic
|
||||
For performance, clocked and combinational logic needs to be ordered.
|
||||
Conceptually this minimizes the iterations through the evaluation loop
|
||||
presented in the reference algorithm in the SystemVerilog standard (IEEE
|
||||
1800-2023 section 4.5), by evaluating logic constructs in data-flow order.
|
||||
1800-2017 section 4.5), by evaluating logic constructs in data-flow order.
|
||||
Without going into a lot of detail here, accept that well thought out ordering
|
||||
is crucial to good simulation performance, and also enables further
|
||||
optimizations later on.
|
||||
@@ -407,7 +407,7 @@ triggered due to a combinational signal change from the previous evaluation
|
||||
pass, and a combinational loop settling due to hybrid logic, if the clocked
|
||||
logic reads the not yet settled combinationally driven signal. Such a race
|
||||
is indeed possible, but our evaluation is consistent with the SystemVerilog
|
||||
scheduling semantics (IEEE 1800-2023 chapter 4), and therefore any program
|
||||
scheduling semantics (IEEE 1800-2017 chapter 4), and therefore any program
|
||||
that exhibits such a race has non-deterministic behavior according to the
|
||||
SystemVerilog semantics, so we accept this.
|
||||
|
||||
@@ -1031,91 +1031,6 @@ the evaluation process records a bitmask of variables that might have
|
||||
changed; if clear, checking those signals for changes may be skipped.
|
||||
|
||||
|
||||
Constrained randomization
|
||||
-------------------------
|
||||
|
||||
Because general constrained randomization is a co-NP-hard problem, not all
|
||||
cases are implemented in Verilator, and an external specialized SMT solver is
|
||||
used for any non-obvious ones.
|
||||
|
||||
The ``randomize()`` method spawns an SMT solver in a sub-process. Then the
|
||||
solver gets a setup query, then the definition of variables, then all the
|
||||
constraints (SMT assertions) about the variables. Since the solver has no
|
||||
information about the class' PRNG state, if the problem is satisfiable,
|
||||
the solution space is further constrained by adding extra random constraints,
|
||||
and querying the values satisfying the problem statement.
|
||||
The constraint is currently constructed as fixing a simple xor of randomly
|
||||
chosen bits of the variables being randomized.
|
||||
|
||||
The runtime classes used for handling the randomization are defined in
|
||||
``verilated_random.h`` and ``verilated_random.cpp``.
|
||||
|
||||
|
||||
``VlSubprocess``
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
Subprocess handle, responsible for keeping track of the resources like child
|
||||
PID, read and write file descriptors, and presenting them as a C++ iostream.
|
||||
|
||||
|
||||
``VlRandomizer``
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
Randomizer class, responsible for keeping track of variables and constraints,
|
||||
and communicating with the solver subprocess.
|
||||
|
||||
The solver gets the constraints in `SMT-LIB2
|
||||
<https://smtlib.cs.uiowa.edu/>`__ textual format in the following syntax:
|
||||
|
||||
::
|
||||
|
||||
(set-info :smt-lib-version 2.0)
|
||||
(set-option :produce-models true)
|
||||
(set-logic QF_BV)
|
||||
|
||||
(declare-fun v () (_ BitVec 16))
|
||||
(declare-fun w () (_ BitVec 64))
|
||||
(declare-fun x () (_ BitVec 48))
|
||||
(declare-fun z () (_ BitVec 24))
|
||||
(declare-fun t () (_ BitVec 23))
|
||||
(assert (or (= v #x0003) (= v #x0008)))
|
||||
(assert (= w #x0000000000000009))
|
||||
(assert (or (or (= x #x000000000001) (= x #x000000000002)) (or (= x #x000000000004) (= x #x000000000009))))
|
||||
(assert (bvult ((_ zero_extend 8) z) #x00000015))
|
||||
(assert (bvugt ((_ zero_extend 8) z) #x0000000d))
|
||||
|
||||
(check-sat)
|
||||
|
||||
The solver responds with either ``sat`` or ``unsat``. Then the initial solution
|
||||
is queried with:
|
||||
|
||||
::
|
||||
|
||||
(get-value (v w x z t ))
|
||||
|
||||
The solver then responds with e.g.:
|
||||
|
||||
::
|
||||
|
||||
((v #x0008)
|
||||
(w #x0000000000000005)
|
||||
(x #x000000000002)
|
||||
(z #x000010)
|
||||
(t #b00000000000000000000000))
|
||||
|
||||
And then a follow-up query (or a series thereof) is asked, and the solver gets
|
||||
reset, so that it can be reused by subsequent randomization attempts:
|
||||
|
||||
::
|
||||
|
||||
(assert (= (bvxor (bvxor <...> (bvxor ((_ extract 21 21) z) ((_ extract 39 39) x)) ((_ extract 5 5) w)) <...> ((_ extract 10 10) w)) #b0))
|
||||
(check-sat)
|
||||
(get-value)
|
||||
...
|
||||
(reset)
|
||||
|
||||
|
||||
|
||||
Coding Conventions
|
||||
==================
|
||||
|
||||
@@ -1472,6 +1387,9 @@ For all tests to pass, you must install the following packages:
|
||||
|
||||
- SystemC to compile the SystemC outputs, see http://systemc.org
|
||||
|
||||
- Parallel::Forker from CPAN to run tests in parallel; you can install
|
||||
this with e.g. "sudo cpan install Parallel::Forker".
|
||||
|
||||
- vcddiff to find differences in VCD outputs. See the readme at
|
||||
https://github.com/veripool/vcddiff
|
||||
|
||||
@@ -1481,7 +1399,7 @@ For all tests to pass, you must install the following packages:
|
||||
Controlling the Test Driver
|
||||
---------------------------
|
||||
|
||||
The test driver script `driver.py` runs tests; see the `Test Driver`
|
||||
The test driver script `driver.pl` runs tests; see the `Test Driver`
|
||||
section. The individual test drivers are written in Perl; see `Test
|
||||
Language`.
|
||||
|
||||
@@ -1494,7 +1412,7 @@ A specific regression test can be executed manually. To start the
|
||||
|
||||
::
|
||||
|
||||
test_regress/t/t_EXAMPLE.py
|
||||
test_regress/t/t_EXAMPLE.pl
|
||||
|
||||
|
||||
Regression Testing for Developers
|
||||
@@ -1514,6 +1432,13 @@ Developers will also want to call ./configure with two extra flags:
|
||||
disabled by default, as SystemC installation problems would otherwise
|
||||
falsely indicate a Verilator problem.
|
||||
|
||||
When enabling the long tests, some additional Perl modules are needed,
|
||||
which you can install using cpan.
|
||||
|
||||
::
|
||||
|
||||
cpan install Parallel::Forker
|
||||
|
||||
There are some traps to avoid when running regression tests
|
||||
|
||||
- When checking the MANIFEST, the test will fail on unexpected code in the
|
||||
@@ -1656,7 +1581,7 @@ field in the section below.
|
||||
+---------------+--------------------------------------------------------+
|
||||
| ``1:2:`` | The hierarchy of the ``VAR`` is the ``op2p`` |
|
||||
| | pointer under the ``MODULE``, which in turn is the |
|
||||
| | ``op1p`` pointer under the ``NETLIST``. |
|
||||
| | ``op1p`` pointer under the ``NETLIST`` |
|
||||
+---------------+--------------------------------------------------------+
|
||||
| ``VAR`` | The AstNodeType (e.g. ``AstVar``). |
|
||||
+---------------+--------------------------------------------------------+
|
||||
@@ -1670,7 +1595,7 @@ field in the section below.
|
||||
| | and "aa" the 27th. Then line 22 in that file, then |
|
||||
| | column 8 (aa=0, az=25, ba=26, ...). |
|
||||
+---------------+--------------------------------------------------------+
|
||||
| ``@dt=0x...`` | The address of the data type this node references. |
|
||||
| ``@dt=0x...`` | The address of the data type this node contains. |
|
||||
+---------------+--------------------------------------------------------+
|
||||
| ``w32`` | The data-type width() is 32 bits. |
|
||||
+---------------+--------------------------------------------------------+
|
||||
@@ -1678,7 +1603,7 @@ field in the section below.
|
||||
| | variable. |
|
||||
+---------------+--------------------------------------------------------+
|
||||
| ``[O]`` | Flags which vary with the type of node, in this |
|
||||
| | case of a VAR, it means the variable is an output. |
|
||||
| | case, it means the variable is an output. |
|
||||
+---------------+--------------------------------------------------------+
|
||||
|
||||
In more detail, the following fields are dumped common to all nodes. They
|
||||
@@ -1776,7 +1701,7 @@ Similarly, the ``NETLIST`` has a list of modules referred to by its
|
||||
|
||||
``.tree.json``` is an alternative dump format to ``.tree`` that is meant for
|
||||
programmatic processing (e.g. with `astsee <https://github.com/antmicro/astsee>`_).
|
||||
To enable this dump format, use :vlopt:`--dump-tree-json` or :vlopt:`--json-only`.
|
||||
To enable this dump format, use :vlopt:`--json-only`.
|
||||
|
||||
Structure:
|
||||
::
|
||||
@@ -1818,8 +1743,8 @@ Structure:
|
||||
|
||||
.tree.meta.json Output
|
||||
----------------
|
||||
.tree.meta.json contains metadata that is common across the whole AST tree
|
||||
(in case of --dump-tree-json, multiple trees share one meta file).
|
||||
|
||||
.tree.meta.json contains metadata that is common across the whole AST tree.
|
||||
|
||||
Besides de-duplication of data shared between multiple stages, .meta.json enables offloading
|
||||
unstable data (that can vary from machine-to-machine or run-to-run) from main .tree.json.
|
||||
@@ -1829,11 +1754,11 @@ This offloading allows, for example, to use byte-to-byte comparisons of AST dump
|
||||
|
||||
{"files": {
|
||||
/* Map id to filename, and other metadata */
|
||||
"d": {"filename":"/home/ant/tmp/verilator/include/verilated_std.sv", "realpath":"/home/ant/tmp/verilator/include/verilated_std.sv", "language":"1800-2023"},
|
||||
"a": {"filename":"<built-in>", "realpath":"<built-in>", "language":"1800-2023"},
|
||||
"b": {"filename":"<command-line>", "realpath":"<command-line>", "language":"1800-2023"},
|
||||
"c": {"filename":"input.vc", "realpath":"/home/ant/tmp/verilator/test_regress/input.vc", "language":"1800-2023"},
|
||||
"e": {"filename":"t/t_EXAMPLE.v", "realpath":"/home/ant/tmp/verilator/test_regress/t/t_EXAMPLE.v", "language":"1800-2023"}
|
||||
"d": {"filename":"/home/ant/tmp/verilator/include/verilated_std.sv", "realpath":"/home/ant/tmp/verilator/include/verilated_std.sv", "language":"1800-2017"},
|
||||
"a": {"filename":"<built-in>", "realpath":"<built-in>", "language":"1800-2017"},
|
||||
"b": {"filename":"<command-line>", "realpath":"<command-line>", "language":"1800-2017"},
|
||||
"c": {"filename":"input.vc", "realpath":"/home/ant/tmp/verilator/test_regress/input.vc", "language":"1800-2017"},
|
||||
"e": {"filename":"t/t_EXAMPLE.v", "realpath":"/home/ant/tmp/verilator/test_regress/t/t_EXAMPLE.v", "language":"1800-2017"}
|
||||
},"pointers": {
|
||||
/* Map id to real address */
|
||||
"(AG)": "0x562997289180",
|
||||
@@ -1861,7 +1786,7 @@ represent the pointers (``op1p``, ``op2p``, etc) between the nodes.
|
||||
Debugging with GDB
|
||||
------------------
|
||||
|
||||
The `driver.py` script accepts ``--debug --gdb`` to start
|
||||
The `driver.pl` script accepts ``--debug --gdb`` to start
|
||||
Verilator under gdb and break when an error is hit, or the program is about
|
||||
to exit. You can also use ``--debug --gdbbt`` to just backtrace and then
|
||||
exit gdb. To debug the Verilated executable, use ``--gdbsim``.
|
||||
@@ -1872,7 +1797,7 @@ can use ``--debug`` and look at the underlying invocation of
|
||||
|
||||
::
|
||||
|
||||
t/t_alw_dly.py --debug
|
||||
t/t_alw_dly.pl --debug
|
||||
|
||||
shows it invokes the command:
|
||||
|
||||
@@ -1921,20 +1846,6 @@ To print a node:
|
||||
pnt nodep
|
||||
# or: call dumpTreeGdb(nodep) # aliased to "pnt" in src/.gdbinit
|
||||
|
||||
``src/.gdbinit`` and ``src/.gdbinit.py`` define handy utilities for working with
|
||||
JSON AST dumps. For example:
|
||||
|
||||
* ``jstash nodep`` - Perform a JSON AST dump and save it into GDB value history (e.g. ``$1``)
|
||||
* ``jtree nodep`` - Perform a JSON AST dump and pretty print it using ``astsee_verilator``.
|
||||
* ``jtree $1`` - Pretty print a dump that was previously saved by ``jstash``.
|
||||
* ``jtree nodep -d '.file, .timeunit'`` - Perform a JSON AST dump, filter out some fields and pretty print it.
|
||||
* ``jtree 0x55555613dca0`` - Pretty print using address literal (rather than actual pointer).
|
||||
* ``jtree $1 nodep`` - Diff ``nodep`` against an older dump.
|
||||
|
||||
A detailed description of ``jstash`` and ``jtree`` can be displayed using ``gdb``'s ``help`` command.
|
||||
|
||||
These commands require `astsee <https://github.com/antmicro/astsee>`_ to be installed.
|
||||
|
||||
When GDB halts, it is useful to understand that the backtrace will commonly
|
||||
show the iterator functions between each invocation of ``visit`` in the
|
||||
backtrace. You will typically see a frame sequence something like:
|
||||
@@ -1969,7 +1880,7 @@ Generally, what would you do to add a new feature?
|
||||
Follow the convention described above about the AstNode type hierarchy.
|
||||
Ordering of definitions is enforced by ``astgen``.
|
||||
|
||||
5. Now you can run ``test_regress/t/t_<newtestcase>.py --debug`` and it'll
|
||||
5. Now you can run ``test_regress/t/t_<newtestcase>.pl --debug`` and it'll
|
||||
probably fail, but you'll see a
|
||||
``test_regress/obj_dir/t_<newtestcase>/*.tree`` file which you can examine
|
||||
to see if the parsing worked. See also the sections above on debugging.
|
||||
@@ -1996,21 +1907,21 @@ Verilator ideally would support all of IEEE, and has the goal to get close
|
||||
to full support. However the following IEEE sections and features are not
|
||||
anticipated to be ever implemented for the reasons indicated.
|
||||
|
||||
IEEE 1800-2023 3.3 modules within modules
|
||||
IEEE 1800-2017 3.3 modules within modules
|
||||
Little/no tool support, and arguably not a good practice.
|
||||
IEEE 1800-2023 6.12 "shortreal"
|
||||
IEEE 1800-2017 6.12 "shortreal"
|
||||
Little/no tool support, and easily promoted to real.
|
||||
IEEE 1800-2023 11.11 Min, typ, max
|
||||
IEEE 1800-2017 11.11 Min, typ, max
|
||||
No SDF support, so will always use typical.
|
||||
IEEE 1800-2023 20.16 Stochastic analysis
|
||||
IEEE 1800-2017 20.16 Stochastic analysis
|
||||
Little industry use.
|
||||
IEEE 1800-2023 20.17 PLA modeling
|
||||
IEEE 1800-2017 20.17 PLA modeling
|
||||
Little industry use and outdated technology.
|
||||
IEEE 1800-2023 31 Timing checks
|
||||
IEEE 1800-2017 31 Timing checks
|
||||
No longer relevant with static timing analysis tools.
|
||||
IEEE 1800-2023 32 SDF annotation
|
||||
IEEE 1800-2017 32 SDF annotation
|
||||
No longer relevant with static timing analysis tools.
|
||||
IEEE 1800-2023 33 Config
|
||||
IEEE 1800-2017 33 Config
|
||||
Little industry use.
|
||||
|
||||
|
||||
@@ -2018,7 +1929,7 @@ IEEE 1800-2023 33 Config
|
||||
Test Driver
|
||||
===========
|
||||
|
||||
This section documents the test driver script, `driver.py`. driver.py
|
||||
This section documents the test driver script, `driver.pl`. driver.pl
|
||||
invokes Verilator or another simulator on each test file. For test file
|
||||
contents description see `Test Language`.
|
||||
|
||||
@@ -2030,7 +1941,7 @@ the regression tests with OBJCACHE enabled and in parallel on a machine
|
||||
with many cores. See the -j option and OBJCACHE environment variable.
|
||||
|
||||
|
||||
driver.py Non-Scenario Arguments
|
||||
driver.pl Non-Scenario Arguments
|
||||
--------------------------------
|
||||
|
||||
--benchmark [<cycles>]
|
||||
@@ -2051,10 +1962,6 @@ driver.py Non-Scenario Arguments
|
||||
files with dumping level 3, which dumps the standard critical stages.
|
||||
For details on the format see `.tree Output`.
|
||||
|
||||
--fail-max <numtests>
|
||||
Set the number of failing tests, after which the driver will stop running
|
||||
additional tests. Defaults to 20, 0 disables.
|
||||
|
||||
--gdb
|
||||
Same as ``verilator --gdb``: Run Verilator under the debugger.
|
||||
|
||||
@@ -2100,13 +2007,13 @@ driver.py Non-Scenario Arguments
|
||||
memory leaks.
|
||||
|
||||
--site
|
||||
Run site-specific tests also.
|
||||
Run site specific tests also.
|
||||
|
||||
--stop
|
||||
Stop on the first error.
|
||||
|
||||
--trace
|
||||
Set the simulator-specific flags to request waveform tracing.
|
||||
Set the simulator specific flags to request waveform tracing.
|
||||
|
||||
--valgrind
|
||||
Same as ``verilator --valgrind``: Run Verilator under `Valgrind <https://valgrind.org/>`_.
|
||||
@@ -2119,7 +2026,7 @@ driver.py Non-Scenario Arguments
|
||||
For tests using the standard C++ wrapper, enable runtime debug mode.
|
||||
|
||||
|
||||
driver.py Scenario Arguments
|
||||
driver.pl Scenario Arguments
|
||||
----------------------------
|
||||
|
||||
The following options control which simulator is used, and which tests are
|
||||
@@ -2161,7 +2068,7 @@ simultaneously.
|
||||
Run Xilinx XSim simulator tests.
|
||||
|
||||
|
||||
driver.py Environment
|
||||
driver.pl Environment
|
||||
---------------------
|
||||
|
||||
HARNESS_UPDATE_GOLDEN
|
||||
@@ -2200,10 +2107,6 @@ VERILATOR_ROOT
|
||||
Standard path to Verilator distribution root; see primary Verilator
|
||||
documentation.
|
||||
|
||||
VERILATOR_SOLVER
|
||||
SMT solver command for constrained randomization; see primary Verilator
|
||||
documentation.
|
||||
|
||||
VERILATOR_TESTS_SITE
|
||||
Used with ``--site``, a colon-separated list of directories with tests to
|
||||
be added to testlist.
|
||||
@@ -2221,30 +2124,30 @@ VERILATOR_XVLOG
|
||||
Test Language
|
||||
=============
|
||||
|
||||
This section describes the format of the ``test_regress/t/*.py`` test
|
||||
language files, executed by `driver.py`.
|
||||
This section describes the format of the ``test_regress/t/*.pl`` test
|
||||
language files, executed by `driver.pl`.
|
||||
|
||||
Test Language Summary
|
||||
---------------------
|
||||
|
||||
For convenience, a summary of the most commonly used features is provided
|
||||
here, with a reference in a later section. All test files typically have a
|
||||
call to the ``test.lint`` or ``test.compile`` methods to compile the
|
||||
test. For run-time tests, this is followed by a call to the
|
||||
``test.execute`` method. Both of these functions can optionally be provided
|
||||
with arguments specifying additional options.
|
||||
call to the ``lint`` or ``compile`` subroutine to compile the test. For
|
||||
run-time tests, this is followed by a call to the ``execute``
|
||||
subroutine. Both of these functions can optionally be provided with
|
||||
arguments specifying additional options.
|
||||
|
||||
If those complete, the script calls ``test.passes`` to increment the count
|
||||
of successful tests.
|
||||
If those complete, the script calls ``ok`` to increment the count of
|
||||
successful tests and then returns 1 as its result.
|
||||
|
||||
The driver.py script assumes by default that the source Verilog file name
|
||||
The driver.pl script assumes by default that the source Verilog file name
|
||||
matches the test script name. So a test whose driver is
|
||||
``t/t_mytest.py`` will expect a Verilog source file ``t/t_mytest.v``.
|
||||
``t/t_mytest.pl`` will expect a Verilog source file ``t/t_mytest.v``.
|
||||
This can be changed using the ``top_filename`` subroutine, for example
|
||||
|
||||
::
|
||||
|
||||
test.top_filename = "t/t_myothertest.v"
|
||||
top_filename("t/t_myothertest.v");
|
||||
|
||||
By default, all tests will run with major simulators (Icarus Verilog, NC,
|
||||
VCS, ModelSim, etc.) as well as Verilator, to allow results to be
|
||||
@@ -2253,25 +2156,26 @@ can use the following:
|
||||
|
||||
::
|
||||
|
||||
test.scenarios('vlt')
|
||||
scenarios(vlt => 1);
|
||||
|
||||
Of the many options that can be set through arguments to ``test.compiler``
|
||||
and ``test.execute``, the following are particularly useful:
|
||||
Of the many options that can be set through arguments to ``compiler`` and
|
||||
``execute``, the following are particularly useful:
|
||||
|
||||
``verilator_flags2``
|
||||
A list of flags to be passed to verilator when compiling.
|
||||
|
||||
``fails``
|
||||
Set true to indicate that the compilation or execution is intended to fail.
|
||||
Set to 1 to indicate that the compilation or execution is intended to fail.
|
||||
|
||||
For example, the following would specify that compilation requires two
|
||||
defines and is expected to fail.
|
||||
|
||||
::
|
||||
|
||||
test.compile(
|
||||
compile(
|
||||
verilator_flags2 => ["-DSMALL_CLOCK -DGATED_COMMENT"],
|
||||
fails = True)
|
||||
fails => 1,
|
||||
);
|
||||
|
||||
Hints On Writing Tests
|
||||
----------------------
|
||||
@@ -2284,10 +2188,10 @@ same name as the test, but with .cpp as suffix
|
||||
|
||||
::
|
||||
|
||||
test.compile(
|
||||
make_top_shell=False,
|
||||
make_main=False,
|
||||
verilator_flags2=["--exe", test.t_dir + "/" + test.name + ".cpp"])
|
||||
compile(
|
||||
make_top_shell => 0,
|
||||
make_main => 0,
|
||||
verilator_flags2 => ["--exe $Self->{t_dir}/$Self->{name}.cpp"], );
|
||||
|
||||
Tests should be self-checking, rather than producing lots of output. If a
|
||||
test succeeds it should print ``*-* All Finished *-*`` to standard output
|
||||
@@ -2327,8 +2231,9 @@ compile time, it is the only option. For example:
|
||||
::
|
||||
|
||||
compile(
|
||||
fails=True,
|
||||
expect_filename=test.golden_filename)
|
||||
fails => 1,
|
||||
expect_filename => $Self->{golden_filename},
|
||||
);
|
||||
|
||||
Note ``expect_filename`` strips some debugging information from the logfile
|
||||
when comparing.
|
||||
@@ -2337,9 +2242,9 @@ when comparing.
|
||||
Test Language Compile/Lint/Run Arguments
|
||||
----------------------------------------
|
||||
|
||||
This section describes common arguments to ``test.compile``, ``test.lint``,
|
||||
and ``test.run``. The full list of arguments can be found by looking at
|
||||
the ``driver.py`` source code.
|
||||
This section describes common arguments to ``compile()``, ``lint()``, and
|
||||
``run()``. The full list of arguments can be found by looking at the
|
||||
``driver.pl`` source code.
|
||||
|
||||
all_run_flags
|
||||
A list of flags to be passed when running the simulator (Verilated model
|
||||
@@ -2350,6 +2255,11 @@ check_finished
|
||||
string ``*-* All Finished *-*`` being printed on standard output. This is
|
||||
the normal way for successful tests to finish.
|
||||
|
||||
expect
|
||||
A quoted list of strings or regular expression to be matched in the
|
||||
output. See `Hints On Writing Tests` for more detail on how this argument
|
||||
should be used.
|
||||
|
||||
fails
|
||||
True to indicate this step is expected to fail. Tests that are expected
|
||||
to fail generally have _bad in their filename.
|
||||
@@ -2411,7 +2321,7 @@ xsim_flags / xsim_flags2 / xsim_run_flags
|
||||
Distribution
|
||||
============
|
||||
|
||||
Copyright 2008-2025 by Wilson Snyder. Verilator is free software; you can
|
||||
Copyright 2008-2024 by Wilson Snyder. Verilator is free software; you can
|
||||
redistribute it and/or modify it under the terms of either the GNU Lesser
|
||||
General Public License Version 3 or the Perl Artistic License Version 2.0.
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ Ashutosh
|
||||
Ast
|
||||
Atmel
|
||||
Aurelien
|
||||
Badáň
|
||||
Bagri
|
||||
Balboni
|
||||
Baltazar
|
||||
@@ -41,7 +40,6 @@ Brej
|
||||
Briquet
|
||||
Brownlee
|
||||
Buckenmaier
|
||||
Burghoorn
|
||||
Bybell
|
||||
CLang
|
||||
CMake
|
||||
@@ -73,9 +71,7 @@ Deadman
|
||||
Debacker
|
||||
Deepa
|
||||
Defparams
|
||||
Delm
|
||||
Denio
|
||||
Deniz
|
||||
Deprecations
|
||||
Deroo
|
||||
Desai
|
||||
@@ -104,7 +100,6 @@ Eiler
|
||||
Eivind
|
||||
El
|
||||
Elbourne
|
||||
Elzeftawi
|
||||
Embecosm
|
||||
Engstrom
|
||||
Enzo
|
||||
@@ -112,10 +107,8 @@ Eugen
|
||||
Fabrizio
|
||||
Faucher
|
||||
Faure
|
||||
Feinberg
|
||||
Fekete
|
||||
Ferrandi
|
||||
Filip
|
||||
Flachs
|
||||
Flavien
|
||||
Florian
|
||||
@@ -137,7 +130,6 @@ Gernot
|
||||
Gerst
|
||||
Gielda
|
||||
Gigerl
|
||||
Gijs
|
||||
Gileadi
|
||||
Giri
|
||||
Gisselquist
|
||||
@@ -154,8 +146,6 @@ Grulfen
|
||||
Gu
|
||||
Gunter
|
||||
Guo
|
||||
Güzel
|
||||
Hameed
|
||||
Hao
|
||||
Haojin
|
||||
Harboe
|
||||
@@ -172,7 +162,6 @@ Homebrew
|
||||
Hornung
|
||||
Hossell
|
||||
Hsu
|
||||
Huggett
|
||||
Hutt
|
||||
Hyperthreading
|
||||
Ibrahim
|
||||
@@ -195,7 +184,6 @@ Jiaxun
|
||||
Jiuyang
|
||||
Joannou
|
||||
Joly
|
||||
Josse
|
||||
Jullien
|
||||
Junji
|
||||
Junyi
|
||||
@@ -249,7 +237,6 @@ Liwei
|
||||
Lockhart
|
||||
Longo
|
||||
Luca
|
||||
Luiza
|
||||
Lussier
|
||||
Lübeck
|
||||
MMD
|
||||
@@ -280,8 +267,6 @@ MinW
|
||||
Mindspeed
|
||||
MingW
|
||||
Miodrag
|
||||
Moberg
|
||||
Mobert
|
||||
ModelSim
|
||||
Modport
|
||||
Moinak
|
||||
@@ -295,7 +280,6 @@ NaN
|
||||
Nalbantis
|
||||
Nandor
|
||||
Narayan
|
||||
Narcis
|
||||
Nassim
|
||||
Nauticus
|
||||
Newgard
|
||||
@@ -345,7 +329,6 @@ Redhat
|
||||
Reitan
|
||||
Renga
|
||||
Requin
|
||||
Rodas
|
||||
Rodionov
|
||||
Rohan
|
||||
Rolfe
|
||||
@@ -363,10 +346,8 @@ Sanguinetti
|
||||
Sanjay
|
||||
Sasselli
|
||||
Scharrer
|
||||
Schless
|
||||
Seitz
|
||||
Shahid
|
||||
Shahrestani
|
||||
Shankar
|
||||
Shanshan
|
||||
Sharad
|
||||
@@ -377,7 +358,6 @@ Shi
|
||||
Shinkarovsky
|
||||
Shinya
|
||||
Shirakawa
|
||||
Shou
|
||||
Shuba
|
||||
Shunyao
|
||||
Slager
|
||||
@@ -389,12 +369,10 @@ Solaris
|
||||
Solomatnikov
|
||||
Solt
|
||||
Southwell
|
||||
Spack
|
||||
Srini
|
||||
Srinivasan
|
||||
Stamness
|
||||
Stephane
|
||||
Sterin
|
||||
Stoddard
|
||||
Stroebel
|
||||
Strouble
|
||||
@@ -460,7 +438,6 @@ Verilog
|
||||
Vighnesh
|
||||
Viktor
|
||||
Vilp
|
||||
Vlip
|
||||
Vm
|
||||
Vukobratovic
|
||||
Wai
|
||||
@@ -477,7 +454,6 @@ Wojciech
|
||||
Wolfel
|
||||
Wouters
|
||||
Wpedantic
|
||||
Wunused
|
||||
Wwarn
|
||||
XSim
|
||||
Xcelium
|
||||
@@ -485,7 +461,6 @@ Xiaoliang
|
||||
Xiaoyi
|
||||
Xuan
|
||||
Xuanqi
|
||||
Yao
|
||||
Yazdanbakhsh
|
||||
Yernagula
|
||||
Yi
|
||||
@@ -514,7 +489,6 @@ architected
|
||||
args
|
||||
arrarys
|
||||
assertOn
|
||||
assertcontrol
|
||||
astgen
|
||||
async
|
||||
atClone
|
||||
@@ -531,7 +505,6 @@ basename
|
||||
bbox
|
||||
benchmarking
|
||||
biguint
|
||||
bindir
|
||||
biops
|
||||
bisonpre
|
||||
bitOpTree
|
||||
@@ -601,7 +574,6 @@ datadir
|
||||
datafiles
|
||||
david
|
||||
ddd
|
||||
de
|
||||
deassign
|
||||
debugi
|
||||
defenv
|
||||
@@ -609,7 +581,6 @@ defname
|
||||
defparam
|
||||
demangling
|
||||
dep
|
||||
deparametrized
|
||||
der
|
||||
dereference
|
||||
desassign
|
||||
@@ -668,7 +639,6 @@ envvar
|
||||
eof
|
||||
errae
|
||||
erroring
|
||||
esynr
|
||||
et
|
||||
eval
|
||||
evals
|
||||
@@ -697,11 +667,9 @@ fno
|
||||
fopen
|
||||
forceable
|
||||
foreach
|
||||
fourstate
|
||||
fprintf
|
||||
fprofile
|
||||
fread
|
||||
freloop
|
||||
frewind
|
||||
fs
|
||||
fscanf
|
||||
@@ -723,7 +691,6 @@ genvar
|
||||
genvars
|
||||
getenv
|
||||
getline
|
||||
getter
|
||||
ggdb
|
||||
glibc
|
||||
gmake
|
||||
@@ -737,7 +704,6 @@ hh
|
||||
hier
|
||||
hierCMakeArgs
|
||||
hierMkArgs
|
||||
hierParameters
|
||||
hierVer
|
||||
hx
|
||||
hyperthreading
|
||||
@@ -869,8 +835,6 @@ parallelized
|
||||
param
|
||||
parameterization
|
||||
parameterized
|
||||
parameterized
|
||||
parameterless
|
||||
params
|
||||
parens
|
||||
pawel
|
||||
@@ -883,7 +847,6 @@ phelter
|
||||
picoChip
|
||||
pinIndex
|
||||
pinout
|
||||
pkgdatadir
|
||||
plusargs
|
||||
pmos
|
||||
poping
|
||||
@@ -903,7 +866,6 @@ predefines
|
||||
prepareClone
|
||||
prepend
|
||||
prepended
|
||||
preproc
|
||||
preprocess
|
||||
preprocessed
|
||||
preprocessing
|
||||
@@ -916,9 +878,7 @@ profcfunc
|
||||
profiler
|
||||
prototyptes
|
||||
ps
|
||||
psprintf
|
||||
pthread
|
||||
pthreads
|
||||
ptr
|
||||
pulldown
|
||||
pulldowns
|
||||
@@ -949,7 +909,6 @@ redeclaring
|
||||
regs
|
||||
reloop
|
||||
replaceShiftOp
|
||||
reproducibility
|
||||
resetall
|
||||
respecified
|
||||
rodata
|
||||
@@ -1002,20 +961,13 @@ submakes
|
||||
submodule
|
||||
submodules
|
||||
substring
|
||||
superclass
|
||||
suspendable
|
||||
suspendables
|
||||
sv
|
||||
svBitVal
|
||||
svBitVecVal
|
||||
svGet
|
||||
svGetTime
|
||||
svGetTimePrecision
|
||||
svLogicVal
|
||||
svdpi
|
||||
svgGetTimeUnit
|
||||
swrite
|
||||
synthesizeable
|
||||
sys
|
||||
systemc
|
||||
tenghtt
|
||||
@@ -1034,13 +986,10 @@ toolchain
|
||||
topcell
|
||||
toplevel
|
||||
toupper
|
||||
traceCapable
|
||||
traceEverOn
|
||||
tran
|
||||
treei
|
||||
tri
|
||||
triand
|
||||
trior
|
||||
tristate
|
||||
tristates
|
||||
trunc
|
||||
@@ -1101,7 +1050,6 @@ vluint
|
||||
vpi
|
||||
vpiConstType
|
||||
vpiDefName
|
||||
vpiInertialDelay
|
||||
vpiInstance
|
||||
vpiLeftRange
|
||||
vpiModule
|
||||
@@ -1116,7 +1064,6 @@ warmup
|
||||
waveforms
|
||||
whitespace
|
||||
widthed
|
||||
wor
|
||||
wreal
|
||||
writeb
|
||||
writeme
|
||||
|
||||
+1
-1
@@ -70,7 +70,7 @@ The XML document consists of 4 sections within the top level
|
||||
Distribution
|
||||
============
|
||||
|
||||
Copyright 2020-2025 by Wilson Snyder. Verilator is free software; you can
|
||||
Copyright 2020-2024 by Wilson Snyder. Verilator is free software; you can
|
||||
redistribute it and/or modify it under the terms of either the GNU Lesser
|
||||
General Public License Version 3 or the Perl Artistic License Version 2.0.
|
||||
|
||||
|
||||
@@ -24,19 +24,14 @@ cmake_policy(SET CMP0074 NEW)
|
||||
project(cmake_hello_c)
|
||||
|
||||
find_package(verilator HINTS $ENV{VERILATOR_ROOT} ${VERILATOR_ROOT})
|
||||
if(NOT verilator_FOUND)
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"Verilator was not found. Either install it, or set the VERILATOR_ROOT environment variable"
|
||||
)
|
||||
if (NOT verilator_FOUND)
|
||||
message(FATAL_ERROR "Verilator was not found. Either install it, or set the VERILATOR_ROOT environment variable")
|
||||
endif()
|
||||
|
||||
# Create a new executable target that will contain all your sources
|
||||
add_executable(example ../make_hello_c/sim_main.cpp)
|
||||
target_compile_features(example PUBLIC cxx_std_14)
|
||||
|
||||
# Add the Verilated circuit to the target
|
||||
verilate(example
|
||||
INCLUDE_DIRS "../make_hello_c"
|
||||
SOURCES ../make_hello_c/top.v
|
||||
)
|
||||
SOURCES ../make_hello_c/top.v)
|
||||
|
||||
@@ -31,7 +31,7 @@ endif
|
||||
ifeq ($(shell which cmake),)
|
||||
TARGET := nocmake
|
||||
else
|
||||
CMAKE_VERSION := $(shell cmake --version | grep -o '[0-9][.0-9]\+')
|
||||
CMAKE_VERSION := $(shell cmake --version | grep -Po '(\d[\.\d]+)')
|
||||
CMAKE_MAJOR := $(shell echo $(CMAKE_VERSION) | cut -f1 -d.)
|
||||
CMAKE_MINOR := $(shell echo $(CMAKE_VERSION) | cut -f2 -d.)
|
||||
CMAKE_GT_3_8 := $(shell [ $(CMAKE_MAJOR) -gt 3 -o \( $(CMAKE_MAJOR) -eq 3 -a $(CMAKE_MINOR) -ge 8 \) ] && echo true)
|
||||
|
||||
@@ -24,11 +24,8 @@ cmake_policy(SET CMP0074 NEW)
|
||||
project(cmake_hello_sc CXX)
|
||||
|
||||
find_package(verilator HINTS $ENV{VERILATOR_ROOT} ${VERILATOR_ROOT})
|
||||
if(NOT verilator_FOUND)
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"Verilator was not found. Either install it, or set the VERILATOR_ROOT environment variable"
|
||||
)
|
||||
if (NOT verilator_FOUND)
|
||||
message(FATAL_ERROR "Verilator was not found. Either install it, or set the VERILATOR_ROOT environment variable")
|
||||
endif()
|
||||
|
||||
# SystemC dependencies
|
||||
@@ -40,14 +37,15 @@ find_package(SystemCLanguage QUIET)
|
||||
|
||||
# Create a new executable target that will contain all your sources
|
||||
add_executable(example ../make_hello_sc/sc_main.cpp)
|
||||
target_compile_features(example PUBLIC cxx_std_14)
|
||||
|
||||
set_property(TARGET example PROPERTY CXX_STANDARD ${SystemC_CXX_STANDARD})
|
||||
set_property(
|
||||
TARGET example
|
||||
PROPERTY CXX_STANDARD ${SystemC_CXX_STANDARD}
|
||||
)
|
||||
|
||||
# Add the Verilated circuit to the target
|
||||
verilate(example SYSTEMC
|
||||
INCLUDE_DIRS "../make_hello_sc"
|
||||
SOURCES ../make_hello_sc/top.v
|
||||
)
|
||||
SOURCES ../make_hello_sc/top.v)
|
||||
|
||||
verilator_link_systemc(example)
|
||||
|
||||
@@ -31,7 +31,7 @@ endif
|
||||
ifeq ($(shell which cmake),)
|
||||
TARGET := nocmake
|
||||
else
|
||||
CMAKE_VERSION := $(shell cmake --version | grep -o '[0-9][.0-9]\+')
|
||||
CMAKE_VERSION := $(shell cmake --version | grep -Po '(\d[\.\d]+)')
|
||||
CMAKE_MAJOR := $(shell echo $(CMAKE_VERSION) | cut -f1 -d.)
|
||||
CMAKE_MINOR := $(shell echo $(CMAKE_VERSION) | cut -f2 -d.)
|
||||
CMAKE_GT_3_8 := $(shell [ $(CMAKE_MAJOR) -gt 3 -o \( $(CMAKE_MAJOR) -eq 3 -a $(CMAKE_MINOR) -ge 8 \) ] && echo true)
|
||||
|
||||
@@ -24,21 +24,15 @@ cmake_policy(SET CMP0074 NEW)
|
||||
project(cmake_protect_lib)
|
||||
|
||||
find_package(verilator HINTS $ENV{VERILATOR_ROOT} ${VERILATOR_ROOT})
|
||||
if(NOT verilator_FOUND)
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"Verilator was not found. Either install it, or set the VERILATOR_ROOT environment variable"
|
||||
)
|
||||
if (NOT verilator_FOUND)
|
||||
message(FATAL_ERROR "Verilator was not found. Either install it, or set the VERILATOR_ROOT environment variable")
|
||||
endif()
|
||||
|
||||
# Create the main executable target
|
||||
add_executable(example ../make_protect_lib/sim_main.cpp)
|
||||
target_compile_features(example PUBLIC cxx_std_14)
|
||||
|
||||
# Create a secret library
|
||||
add_library(verilated_secret STATIC) # or SHARED for a shared library
|
||||
target_compile_features(verilated_secret PUBLIC cxx_std_14)
|
||||
|
||||
target_link_libraries(example PRIVATE verilated_secret)
|
||||
# To create both libraries on CMake >= 3.12 replace the above 2 lines with the following:
|
||||
# add_library(verilated_secret OBJECT)
|
||||
@@ -58,11 +52,9 @@ verilate(verilated_secret
|
||||
VERILATOR_ARGS --protect-lib verilated_secret
|
||||
--protect-key ${PROTECT_KEY}
|
||||
DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/verilated_secret
|
||||
SOURCES ../make_protect_lib/secret_impl.v
|
||||
)
|
||||
SOURCES ../make_protect_lib/secret_impl.v)
|
||||
|
||||
# Include location of verilated_secret.sv wrapper
|
||||
verilate(example
|
||||
VERILATOR_ARGS "-I${CMAKE_CURRENT_BINARY_DIR}/verilated_secret"
|
||||
SOURCES ../make_protect_lib/top.v
|
||||
)
|
||||
SOURCES ../make_protect_lib/top.v)
|
||||
|
||||
@@ -31,7 +31,7 @@ endif
|
||||
ifeq ($(shell which cmake),)
|
||||
TARGET := nocmake
|
||||
else
|
||||
CMAKE_VERSION := $(shell cmake --version | grep -o '[0-9][.0-9]\+')
|
||||
CMAKE_VERSION := $(shell cmake --version | grep -Po '(\d[\.\d]+)')
|
||||
CMAKE_MAJOR := $(shell echo $(CMAKE_VERSION) | cut -f1 -d.)
|
||||
CMAKE_MINOR := $(shell echo $(CMAKE_VERSION) | cut -f2 -d.)
|
||||
CMAKE_GT_3_8 := $(shell [ $(CMAKE_MAJOR) -gt 3 -o \( $(CMAKE_MAJOR) -eq 3 -a $(CMAKE_MINOR) -ge 8 \) ] && echo true)
|
||||
|
||||
@@ -24,20 +24,15 @@ cmake_policy(SET CMP0074 NEW)
|
||||
project(cmake_tracing_c)
|
||||
|
||||
find_package(verilator HINTS $ENV{VERILATOR_ROOT} ${VERILATOR_ROOT})
|
||||
if(NOT verilator_FOUND)
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"Verilator was not found. Either install it, or set the VERILATOR_ROOT environment variable"
|
||||
)
|
||||
if (NOT verilator_FOUND)
|
||||
message(FATAL_ERROR "Verilator was not found. Either install it, or set the VERILATOR_ROOT environment variable")
|
||||
endif()
|
||||
|
||||
# Create a new executable target that will contain all your sources
|
||||
add_executable(example ../make_tracing_c/sim_main.cpp)
|
||||
target_compile_features(example PUBLIC cxx_std_14)
|
||||
|
||||
# Add the Verilated circuit to the target
|
||||
verilate(example COVERAGE TRACE
|
||||
INCLUDE_DIRS "../make_tracing_c"
|
||||
VERILATOR_ARGS -f ../make_tracing_c/input.vc -x-assign fast
|
||||
SOURCES ../make_tracing_c/top.v
|
||||
)
|
||||
SOURCES ../make_tracing_c/top.v)
|
||||
|
||||
@@ -31,7 +31,7 @@ endif
|
||||
ifeq ($(shell which cmake),)
|
||||
TARGET := nocmake
|
||||
else
|
||||
CMAKE_VERSION := $(shell cmake --version | grep -o '[0-9][.0-9]\+')
|
||||
CMAKE_VERSION := $(shell cmake --version | grep -Po '(\d[\.\d]+)')
|
||||
CMAKE_MAJOR := $(shell echo $(CMAKE_VERSION) | cut -f1 -d.)
|
||||
CMAKE_MINOR := $(shell echo $(CMAKE_VERSION) | cut -f2 -d.)
|
||||
CMAKE_GT_3_8 := $(shell [ $(CMAKE_MAJOR) -gt 3 -o \( $(CMAKE_MAJOR) -eq 3 -a $(CMAKE_MINOR) -ge 8 \) ] && echo true)
|
||||
|
||||
@@ -25,11 +25,8 @@ cmake_policy(SET CMP0074 NEW)
|
||||
project(cmake_tracing_sc_example CXX)
|
||||
|
||||
find_package(verilator HINTS $ENV{VERILATOR_ROOT} ${VERILATOR_ROOT})
|
||||
if(NOT verilator_FOUND)
|
||||
message(
|
||||
FATAL_ERROR
|
||||
"Verilator was not found. Either install it, or set the VERILATOR_ROOT environment variable"
|
||||
)
|
||||
if (NOT verilator_FOUND)
|
||||
message(FATAL_ERROR "Verilator was not found. Either install it, or set the VERILATOR_ROOT environment variable")
|
||||
endif()
|
||||
|
||||
# SystemC dependencies
|
||||
@@ -41,15 +38,16 @@ find_package(SystemCLanguage QUIET)
|
||||
|
||||
# Create a new executable target that will contain all your sources
|
||||
add_executable(example ../make_tracing_sc/sc_main.cpp)
|
||||
target_compile_features(example PUBLIC cxx_std_14)
|
||||
|
||||
set_property(TARGET example PROPERTY CXX_STANDARD ${SystemC_CXX_STANDARD})
|
||||
set_property(
|
||||
TARGET example
|
||||
PROPERTY CXX_STANDARD ${SystemC_CXX_STANDARD}
|
||||
)
|
||||
|
||||
# Add the Verilated circuit to the target
|
||||
verilate(example SYSTEMC COVERAGE TRACE
|
||||
INCLUDE_DIRS "../make_tracing_sc"
|
||||
VERILATOR_ARGS -f ../make_tracing_sc/input.vc -x-assign fast
|
||||
SOURCES ../make_tracing_sc/top.v
|
||||
)
|
||||
SOURCES ../make_tracing_sc/top.v)
|
||||
|
||||
verilator_link_systemc(example)
|
||||
|
||||
@@ -31,7 +31,7 @@ endif
|
||||
ifeq ($(shell which cmake),)
|
||||
TARGET := nocmake
|
||||
else
|
||||
CMAKE_VERSION := $(shell cmake --version | grep -o '[0-9][.0-9]\+')
|
||||
CMAKE_VERSION := $(shell cmake --version | grep -Po '(\d[\.\d]+)')
|
||||
CMAKE_MAJOR := $(shell echo $(CMAKE_VERSION) | cut -f1 -d.)
|
||||
CMAKE_MINOR := $(shell echo $(CMAKE_VERSION) | cut -f2 -d.)
|
||||
CMAKE_GT_3_8 := $(shell [ $(CMAKE_MAJOR) -gt 3 -o \( $(CMAKE_MAJOR) -eq 3 -a $(CMAKE_MINOR) -ge 8 \) ] && echo true)
|
||||
|
||||
@@ -13,6 +13,6 @@ module sub
|
||||
);
|
||||
|
||||
// Some simple logic
|
||||
always_comb out = ~in;
|
||||
always_comb out = ~ in;
|
||||
|
||||
endmodule
|
||||
|
||||
@@ -25,7 +25,8 @@ class VlFileCopy:
|
||||
|
||||
self.debug = debug
|
||||
|
||||
with NamedTemporaryFile() as tree_temp, NamedTemporaryFile() as meta_temp:
|
||||
with NamedTemporaryFile() as tree_temp, NamedTemporaryFile(
|
||||
) as meta_temp:
|
||||
vargs = [
|
||||
'--json-only-output',
|
||||
tree_temp.name,
|
||||
@@ -60,7 +61,8 @@ class VlFileCopy:
|
||||
print("\t%s " % command)
|
||||
status = subprocess.call(command, shell=True)
|
||||
if status != 0:
|
||||
raise RuntimeError("Command failed running Verilator with '" + command + "', stopped")
|
||||
raise RuntimeError("Command failed running Verilator with '" +
|
||||
command + "', stopped")
|
||||
|
||||
|
||||
#######################################################################
|
||||
@@ -69,7 +71,8 @@ if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser(
|
||||
allow_abbrev=False,
|
||||
formatter_class=argparse.RawTextHelpFormatter,
|
||||
description="""Example of using Verilator JSON output to copy a list of files to an
|
||||
description=
|
||||
"""Example of using Verilator JSON output to copy a list of files to an
|
||||
output directory (-odir, defaults to 'copied'), e.g. to easily create a
|
||||
tarball of the design to pass to others.
|
||||
|
||||
@@ -92,7 +95,11 @@ This file ONLY is placed under the Creative Commons Public Domain, for
|
||||
any use, without warranty, 2019 by Wilson Snyder.
|
||||
SPDX-License-Identifier: CC0-1.0
|
||||
""")
|
||||
parser.add_argument('-debug', '--debug', action='store_const', const=9, help='enable debug')
|
||||
parser.add_argument('-debug',
|
||||
'--debug',
|
||||
action='store_const',
|
||||
const=9,
|
||||
help='enable debug')
|
||||
parser.add_argument('-odir',
|
||||
'--odir',
|
||||
action='store',
|
||||
@@ -101,7 +108,9 @@ SPDX-License-Identifier: CC0-1.0
|
||||
help='target output directory')
|
||||
(args, rem) = parser.parse_known_args()
|
||||
|
||||
print("NOTE: vl_file_copy is only an example starting point for writing your own tool.")
|
||||
print(
|
||||
"NOTE: vl_file_copy is only an example starting point for writing your own tool."
|
||||
)
|
||||
# That is:
|
||||
# 1. We will accept basic patches
|
||||
# 2. We are not expecting to make this globally useful. (e.g. we don't cleanup obj_dir)
|
||||
|
||||
@@ -24,7 +24,8 @@ class VlHierGraph:
|
||||
self.next_vertex_number = 0
|
||||
self.addr_to_number = {}
|
||||
|
||||
with NamedTemporaryFile() as tree_temp, NamedTemporaryFile() as meta_temp:
|
||||
with NamedTemporaryFile() as tree_temp, NamedTemporaryFile(
|
||||
) as meta_temp:
|
||||
vargs = [
|
||||
'--json-only-output',
|
||||
tree_temp.name,
|
||||
@@ -44,7 +45,9 @@ class VlHierGraph:
|
||||
fh.write("digraph {\n")
|
||||
fh.write(" dpi=300;\n")
|
||||
fh.write(" order=LR;\n")
|
||||
fh.write(" node [fontsize=8 shape=\"box\" margin=0.01 width=0 height=0]")
|
||||
fh.write(
|
||||
" node [fontsize=8 shape=\"box\" margin=0.01 width=0 height=0]"
|
||||
)
|
||||
fh.write(" edge [fontsize=6]")
|
||||
# Find cells
|
||||
modules = self.flatten(self.tree, lambda n: n['type'] == "MODULE")
|
||||
@@ -98,7 +101,8 @@ class VlHierGraph:
|
||||
print("\t%s " % command)
|
||||
status = subprocess.call(command, shell=True)
|
||||
if status != 0:
|
||||
raise RuntimeError("Command failed running Verilator with '" + command + "', stopped")
|
||||
raise RuntimeError("Command failed running Verilator with '" +
|
||||
command + "', stopped")
|
||||
|
||||
|
||||
#######################################################################
|
||||
@@ -107,7 +111,8 @@ if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser(
|
||||
allow_abbrev=False,
|
||||
formatter_class=argparse.RawTextHelpFormatter,
|
||||
description="""Example of using Verilator JSON output to create a .dot file showing the
|
||||
description=
|
||||
"""Example of using Verilator JSON output to create a .dot file showing the
|
||||
design module hierarchy.
|
||||
|
||||
Example usage:
|
||||
@@ -129,7 +134,11 @@ This file ONLY is placed under the Creative Commons Public Domain, for
|
||||
any use, without warranty, 2019 by Wilson Snyder.
|
||||
SPDX-License-Identifier: CC0-1.0
|
||||
""")
|
||||
parser.add_argument('-debug', '--debug', action='store_const', const=9, help='enable debug')
|
||||
parser.add_argument('-debug',
|
||||
'--debug',
|
||||
action='store_const',
|
||||
const=9,
|
||||
help='enable debug')
|
||||
parser.add_argument('-o',
|
||||
'--o',
|
||||
action='store',
|
||||
@@ -138,14 +147,18 @@ SPDX-License-Identifier: CC0-1.0
|
||||
help='output filename')
|
||||
(args, rem) = parser.parse_known_args()
|
||||
|
||||
print("NOTE: vl_hier_graph is only an example starting point for writing your own tool.")
|
||||
print(
|
||||
"NOTE: vl_hier_graph is only an example starting point for writing your own tool."
|
||||
)
|
||||
# That is:
|
||||
# 1. We will accept basic patches
|
||||
# 2. We are not expecting to make this globally useful. (e.g. we don't cleanup obj_dir)
|
||||
# 3. "make install" will not install this.
|
||||
# 4. This has not had production-worthy validation.
|
||||
|
||||
fc = VlHierGraph(output_filename=args.o, debug=args.debug, verilator_args=rem)
|
||||
fc = VlHierGraph(output_filename=args.o,
|
||||
debug=args.debug,
|
||||
verilator_args=rem)
|
||||
|
||||
######################################################################
|
||||
# Local Variables:
|
||||
|
||||
@@ -17,8 +17,7 @@
|
||||
#endif
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
if (false && argc && argv) {}
|
||||
|
||||
// Construct context to hold simulation time, etc
|
||||
const std::unique_ptr<VerilatedContext> contextp{new VerilatedContext};
|
||||
@@ -47,12 +46,12 @@ int main(int argc, char** argv) {
|
||||
|
||||
// Simulate until $finish
|
||||
while (!contextp->gotFinish()) {
|
||||
contextp->timeInc(1);
|
||||
top->clk = ~top->clk & 0x1;
|
||||
top->eval();
|
||||
#if VM_TRACE
|
||||
if (tfp) tfp->dump(contextp->time());
|
||||
#endif
|
||||
contextp->timeInc(1);
|
||||
}
|
||||
|
||||
// Final model cleanup
|
||||
|
||||
@@ -117,9 +117,6 @@ int main(int argc, char** argv) {
|
||||
contextp->coveragep()->write("logs/coverage.dat");
|
||||
#endif
|
||||
|
||||
// Final simulation summary
|
||||
contextp->statsPrintSummary();
|
||||
|
||||
// Return good completion status
|
||||
// Don't use exit() or destructor won't get called
|
||||
return 0;
|
||||
|
||||
@@ -13,7 +13,7 @@ module sub
|
||||
|
||||
// Example counter/flop
|
||||
reg [31:0] count_c;
|
||||
always_ff @(posedge clk) begin
|
||||
always_ff @ (posedge clk) begin
|
||||
if (!reset_l) begin
|
||||
/*AUTORESET*/
|
||||
// Beginning of autoreset for uninitialized flops
|
||||
@@ -32,11 +32,11 @@ module sub
|
||||
end
|
||||
|
||||
// An example assertion
|
||||
always_ff @(posedge clk) begin
|
||||
AssertionExample : assert (!reset_l || count_c < 100);
|
||||
always_ff @ (posedge clk) begin
|
||||
AssertionExample: assert (!reset_l || count_c<100);
|
||||
end
|
||||
|
||||
// And example coverage analysis
|
||||
cover property (@(posedge clk) count_c == 3);
|
||||
cover property (@(posedge clk) count_c==3);
|
||||
|
||||
endmodule
|
||||
|
||||
@@ -14,7 +14,7 @@ module sub
|
||||
|
||||
// Example counter/flop
|
||||
reg [31:0] count_f;
|
||||
always_ff @(posedge fastclk) begin
|
||||
always_ff @ (posedge fastclk) begin
|
||||
if (!reset_l) begin
|
||||
/*AUTORESET*/
|
||||
// Beginning of autoreset for uninitialized flops
|
||||
@@ -28,7 +28,7 @@ module sub
|
||||
|
||||
// Another example flop
|
||||
reg [31:0] count_c;
|
||||
always_ff @(posedge clk) begin
|
||||
always_ff @ (posedge clk) begin
|
||||
if (!reset_l) begin
|
||||
/*AUTORESET*/
|
||||
// Beginning of autoreset for uninitialized flops
|
||||
@@ -38,7 +38,8 @@ module sub
|
||||
else begin
|
||||
count_c <= count_c + 1;
|
||||
if (count_c >= 3) begin
|
||||
$display("[%0t] fastclk is %0d times faster than clk\n", $time, count_f / count_c);
|
||||
$display("[%0t] fastclk is %0d times faster than clk\n",
|
||||
$time, count_f/count_c);
|
||||
// This write is a magic value the Makefile uses to make sure the
|
||||
// test completes successfully.
|
||||
$write("*-* All Finished *-*\n");
|
||||
@@ -48,11 +49,11 @@ module sub
|
||||
end
|
||||
|
||||
// An example assertion
|
||||
always_ff @(posedge clk) begin
|
||||
AssertionExample : assert (!reset_l || count_c < 100);
|
||||
always_ff @ (posedge clk) begin
|
||||
AssertionExample: assert(!reset_l || count_c<100);
|
||||
end
|
||||
|
||||
// And example coverage analysis
|
||||
cover property (@(posedge clk) count_c == 3);
|
||||
cover property (@(posedge clk) count_c==3);
|
||||
|
||||
endmodule
|
||||
|
||||
+11
-31
@@ -130,7 +130,6 @@ void **JenkinsIns(void *base_i, const unsigned char *mem, uint32_t length, uint3
|
||||
#define FST_HDR_TIMEZERO_SIZE (8)
|
||||
#define FST_GZIO_LEN (32768)
|
||||
#define FST_HDR_FOURPACK_DUO_SIZE (4*1024*1024)
|
||||
#define FST_ZWRAPPER_HDR_SIZE (1+8+8)
|
||||
|
||||
#if defined(__APPLE__) && defined(__MACH__)
|
||||
#define FST_MACOSX
|
||||
@@ -348,9 +347,8 @@ return(NULL);
|
||||
|
||||
static void *fstMmap2(size_t __len, int __fd, fst_off_t __off)
|
||||
{
|
||||
DWORD64 len64 = __len; /* Must be 64-bit for shift below */
|
||||
HANDLE handle = CreateFileMapping((HANDLE)_get_osfhandle(__fd), NULL,
|
||||
PAGE_READWRITE, (DWORD)(len64 >> 32),
|
||||
PAGE_READWRITE, (DWORD)(__len >> 32),
|
||||
(DWORD)__len, NULL);
|
||||
if (!handle) { return NULL; }
|
||||
|
||||
@@ -550,9 +548,8 @@ return(rc);
|
||||
|
||||
static uint32_t fstReaderVarint32(FILE *f)
|
||||
{
|
||||
const int chk_len_max = 5; /* TALOS-2023-1783 */
|
||||
int chk_len = chk_len_max;
|
||||
unsigned char buf[chk_len_max];
|
||||
int chk_len = 5; /* TALOS-2023-1783 */
|
||||
unsigned char buf[chk_len];
|
||||
unsigned char *mem = buf;
|
||||
uint32_t rc = 0;
|
||||
int ch;
|
||||
@@ -583,9 +580,8 @@ return(rc);
|
||||
|
||||
static uint32_t fstReaderVarint32WithSkip(FILE *f, uint32_t *skiplen)
|
||||
{
|
||||
const int chk_len_max = 5; /* TALOS-2023-1783 */
|
||||
int chk_len = chk_len_max;
|
||||
unsigned char buf[chk_len_max];
|
||||
int chk_len = 5; /* TALOS-2023-1783 */
|
||||
unsigned char buf[chk_len];
|
||||
unsigned char *mem = buf;
|
||||
uint32_t rc = 0;
|
||||
int ch;
|
||||
@@ -617,9 +613,8 @@ return(rc);
|
||||
|
||||
static uint64_t fstReaderVarint64(FILE *f)
|
||||
{
|
||||
const int chk_len_max = 16; /* TALOS-2023-1783 */
|
||||
int chk_len = chk_len_max;
|
||||
unsigned char buf[chk_len_max];
|
||||
int chk_len = 16; /* TALOS-2023-1783 */
|
||||
unsigned char buf[chk_len];
|
||||
unsigned char *mem = buf;
|
||||
uint64_t rc = 0;
|
||||
int ch;
|
||||
@@ -1651,11 +1646,7 @@ if(1)
|
||||
{
|
||||
if(vm4ip[2] != prev_alias)
|
||||
{
|
||||
int32_t t_i32 = ((int32_t)(prev_alias = vm4ip[2])); /* vm4ip is generic unsigned data */
|
||||
int64_t t_i64 = (int64_t)t_i32; /* convert to signed */
|
||||
uint64_t t_u64 = (uint64_t)t_i64; /* sign extend through 64b */
|
||||
|
||||
fpos += fstWriterSVarint(f, (int64_t)((t_u64 << 1) | 1)); /* all in this block was: fpos += fstWriterSVarint(f, (((int64_t)((int32_t)(prev_alias = vm4ip[2]))) << 1) | 1); */
|
||||
fpos += fstWriterSVarint(f, (((int64_t)((int32_t)(prev_alias = vm4ip[2]))) << 1) | 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -3907,18 +3898,16 @@ while (value)
|
||||
static int fstVcdIDForFwrite(char *buf, unsigned int value)
|
||||
{
|
||||
char *pnt = buf;
|
||||
int len = 0;
|
||||
|
||||
/* zero is illegal for a value...it is assumed they start at one */
|
||||
while (value && len < 14)
|
||||
while (value)
|
||||
{
|
||||
value--;
|
||||
++len;
|
||||
*(pnt++) = (char)('!' + value % 94);
|
||||
value = value / 94;
|
||||
}
|
||||
|
||||
return len;
|
||||
return(pnt - buf);
|
||||
}
|
||||
|
||||
|
||||
@@ -4639,14 +4628,9 @@ if(sectype == FST_BL_ZWRAPPER)
|
||||
}
|
||||
#endif
|
||||
|
||||
fstReaderFseeko(xc, xc->f, FST_ZWRAPPER_HDR_SIZE, SEEK_SET);
|
||||
fstReaderFseeko(xc, xc->f, 1+8+8, SEEK_SET);
|
||||
#ifndef __MINGW32__
|
||||
fflush(xc->f);
|
||||
#else
|
||||
/* Windows UCRT runtime library reads one byte ahead in the file
|
||||
even with buffering disabled and does not synchronise the
|
||||
file position after fseek. */
|
||||
_lseek(fileno(xc->f), FST_ZWRAPPER_HDR_SIZE, SEEK_SET);
|
||||
#endif
|
||||
|
||||
zfd = dup(fileno(xc->f));
|
||||
@@ -6196,9 +6180,7 @@ struct fstReaderContext *xc = (struct fstReaderContext *)ctx;
|
||||
fst_off_t blkpos = 0, prev_blkpos;
|
||||
uint64_t beg_tim, end_tim, beg_tim2, end_tim2;
|
||||
int sectype;
|
||||
#ifdef FST_DEBUG
|
||||
unsigned int secnum = 0;
|
||||
#endif
|
||||
uint64_t seclen;
|
||||
uint64_t tsec_uclen = 0, tsec_clen = 0;
|
||||
uint64_t tsec_nitems;
|
||||
@@ -6290,9 +6272,7 @@ for(;;)
|
||||
}
|
||||
|
||||
blkpos += seclen;
|
||||
#ifdef FST_DEBUG
|
||||
secnum++;
|
||||
#endif
|
||||
}
|
||||
|
||||
xc->rvat_beg_tim = beg_tim;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user