chisel icon indicating copy to clipboard operation
chisel copied to clipboard

[svsim] Handle Chisel assertions more elegantly

Open jackkoenig opened this issue 1 year ago • 2 comments

This is a bugfix but I'm not sure if it should be backported [yet] because adding new arguments, even with default arguments, to public methods breaks binary compatibility. I don't feel like dealing with that at the moment. If we need to backport it later, we can. We could backport just the bugfix part of it I guess.

The returned exception is now a lot more elegant than svsim.Simulation.UnexpectedEndOfMessages. This also fixes an issue where the Verilator crashes could create core dumps depending on the user's ulimit settings.

I have not yet tested this with VCS, so there may be follow up work (possibly in a follow up PR).

Contributor Checklist

  • [ ] Did you add Scaladoc to every public function/method?
  • [x] Did you add at least one test demonstrating the PR?
  • [x] Did you delete any extraneous printlns/debugging code?
  • [x] Did you specify the type of improvement?
  • [ ] Did you add appropriate documentation in docs/src?
  • [x] Did you request a desired merge strategy?
  • [x] Did you add text to be included in the Release Notes for this change?

Type of Improvement

  • Bugfix

Desired Merge Strategy

  • Squash

Release Notes

  • svsim now overrides Verilators $fatal handling to more elegantly report the error.
  • svsim can now accept a java.io.OutputStream to consume the stderr from the simulation process. This is especially useful for testing.

Reviewer Checklist (only modified by reviewer)

  • [ ] Did you add the appropriate labels? (Select the most appropriate one based on the "Type of Improvement")
  • [ ] Did you mark the proper milestone (Bug fix: 3.6.x, 5.x, or 6.x depending on impact, API modification or big change: 7.0)?
  • [ ] Did you review?
  • [ ] Did you check whether all relevant Contributor checkboxes have been checked?
  • [ ] Did you do one of the following when ready to merge:
    • [ ] Squash: You/ the contributor Enable auto-merge (squash), clean up the commit message, and label with Please Merge.
    • [ ] Merge: Ensure that contributor has cleaned up their commit history, then merge with Create a merge commit.

jackkoenig avatar Sep 06 '24 22:09 jackkoenig