Chisel asserts should give file and line number to Chisel as well as systemverilog

Open
#4,984 4 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
scala
Domain
compilers

Research direction

Start by tracing how ChiselSim extracts assertion failures from the generated XxxTestBench_Verification_Assert.sv file and simulation-log.txt. Determine where Chisel source location information is available or lost during assertion generation, then verify that failures report the originating .scala filename and line number alongside the SystemVerilog location.

Written by the indexing model from the issue text.

Description

Type of issue: Feature Request

  chisel3.simulator.Exceptions$AssertionFailed: One or more assertions failed during Chiselsim simulation
------------------------------------------------------------------------------
The following assertion failures were extracted from the log file:

  lineNo  line
  ----------------------------------------------------------------------------
       0  [21] %Error: XxxTestBench_Verification_Assert.sv:301: Assertion failed in TOP.svsimTestbench.dut.verification_assert.unnamedblk1: Assertion failed: Must be positive

For more information, see the complete log file:

  test_run_dir/aptos.Simulator_889627/workdir-default/simulation-log.txt

Is your feature request related to a problem? Please describe.

I have to dig into the XxxTestBench_Verification_Assert.sv file to find the Chisel .scala file and line number

Describe the solution you'd like

Print out the .scala filename and line number of the assert

Dominant language
Scala
Stars
4.8k
Forks
669
Avg merge
1d 12h
Merged PRs (30d)
25

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from chipsalliance/chisel

All issues in chipsalliance/chisel

Similar issues

More Scala issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.