lowRISC / lowRISC/ibex

[dv] Randomize hart_id

Open
#1,852 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Component:DV Type:Enhancement
Dominant language
SystemVerilog
Stars
2.1k
Forks
810
Avg merge
5d 23h
Merged PRs (30d)
9

Description

Ibex has a top-level `hart_id_i` input which provides the value for the `MHARTID` CSR. Currently it is fixed in the testbench. We should randomize it for every test to ensure the CSR is reporting the correct value from the top-level input.

Pushed to V3 as the feature is very simple and by inspection looks correct. Furthermore as OpenTitan has a single core it has no use for the `MHARTID` CSR so an issue here is unlikely to have notable impact.

Contributor guide

Open the contributing guide

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.

Research direction

Locate the testbench that currently fixes the top-level hart_id_i input and inspect how each test drives it. Verify how the MHARTID CSR is checked, then make the per-test value vary and confirm the CSR reports the corresponding input value across the test suite.

Written by the indexing model from the issue text.

Assessment

Domain
testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.