feat: add Verilator simulation tool support - #265
Draft
martin-velay wants to merge 2 commits into
Draft
martin-velay wants to merge 2 commits into
martin-velay wants to merge 2 commits into
Conversation
Signed-off-by: Martin Velay <mvelay@lowrisc.org>
Signed-off-by: Martin Velay <mvelay@lowrisc.org>
martin-velay
force-pushed
the
verilator_support
branch
from
September 18, 2026 15:15
c7be479 to
b0f0097
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add Verilator as a DVSim simulation tool.
The new tool plugin:
verilator_coverage --report summary, including line, toggle, branch,expression, FSM, and user coverage; and
The registration change is kept in a separate commit from the plugin and its
tests, which should make the generic tool-discovery change easy to review.
This is the DVSim dependency for
lowRISC/opentitan-embargoed-peppermint#163.
Validation
ruff format --check src testsruff check --config=ruff-ci.toml src testspyright --pythonpath .venv/bin/python src/dvsim/sim/tool/verilator.py src/dvsim/tool/utils.pypytest --strict -q tests/tool/test_verilator.py tests/tool/test_utils.py(
29 passed)442.667 s, run wall time20.321 s, and simulated time545 usareextracted correctly.
--waves fstpath: thewave-enabled Verilator build and
chip_soc_mbx_ahb_smokepassed and produceda 2.8 MiB
waves.fst. FST and VCD selection remain project configuration,using DVSim's existing
{waves}substitution and waves build mode.The full local suite reached 425 passing tests. Four Git tests are not runnable
in this workspace because its
/tmp/.gitsandbox marker changes repositorydetection. The local-backend long-line stress test timed out under the full-suite
load, but passes when run by itself.