Skip to content

Add SimulationTest marker #4849

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add SimulationTest marker #4849

wants to merge 1 commit into from

Conversation

fabianschuiki
Copy link
Contributor

The FIRRTL spec is about to define a simulation construct to indicate that a module should be executed as a simulation test. Add a user-facing SimulationTest class that can be used to mark a module as to be executed as a simulation test. This would commonly be used inside a test harness module to mark the surrounding module as a test. For example:

class TestHarness extends RawModule {
  SimulationTest(this)
}

The simulation test can be given an optional name and a map of parameters. The parameters are identical to the ones accepted by the FormalTest marker. Multiple simulation test markers may be added to a single module, which may be useful if a test should be run with different sets of user-defined parameters.

Contributor Checklist

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

Type of Improvement

  • Feature (or new API)

Desired Merge Strategy

  • Squash: The PR will be squashed and merged (choose this if you have no preference).

Release Notes

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) and clean up the commit message.
    • Merge: Ensure that contributor has cleaned up their commit history, then merge with Create a merge commit.

@fabianschuiki fabianschuiki added the Feature New feature, will be included in release notes label Apr 1, 2025
@fabianschuiki fabianschuiki requested a review from seldridge April 1, 2025 16:58
The FIRRTL spec is about to define a `simulation` construct to indicate
that a module should be executed as a simulation test. Add a user-facing
`SimulationTest` class that can be used to mark a module as to be
executed as a simulation test. This would commonly be used inside a test
harness module to mark the surrounding module as a test. For example:

    class TestHarness extends RawModule {
      SimulationTest(this)
    }

The simulation test can be given an optional name and a map of
parameters. The parameters are identical to the ones accepted by the
`FormalTest` marker. Multiple simulation test markers may be added to a
single module, which may be useful if a test should be run with
different sets of user-defined parameters.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Feature New feature, will be included in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant