lowRISC / lowRISC/opentitan

[dv] Knobs for ignoring TL errors in top-level sims

Open
#15,803 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Component:DV Earlgrey-PROD Candidate
Dominant language
SystemVerilog
Stars
3.6k
Forks
1.1k
Avg merge
2d 22h
Merged PRs (30d)
141

Description

As initially discovered in https://github.com/lowRISC/opentitan/issues/15737#issuecomment-1293644085, some of the DV knobs to ignore TL error conditions do not work correctly in top-level sims, which causes breakages such as: #14200.

Quoted comment:

> DV has knobs to ignore these error conditions on RV_DM:
>
> https://github.com/lowRISC/opentitan/blob/cb9bee67989b2c0ef31d47936ac9501c9e2b798f/hw/top_earlgrey/dv/env/chip_env_cfg.sv#L238-L248
>
>
> They seem to work at the block-level, but at the chip-level, they do not have the desired effect.
> This may be due to the different hierarchy of the chip RAL, which has one level of indirection more than the block-level RAL.
> I.e., if I understand correctly, the function call below tries to retrieve a property from the chip RAL and not from the block where we actually set the property:
> https://github.com/lowRISC/opentitan/blob/cb9bee67989b2c0ef31d47936ac9501c9e2b798f/hw/dv/sv/cip_lib/cip_base_scoreboard.sv#L562

The fix is relatively straightforward for `get_supports_sub_word_csr_writes()` and could be done by getting the register instance by address and then grab the associated reg block using `get_parent()`, see draft here: #15793.

However, for `get_unmapped_access_ok()` this does not seem to be as straightforward, since for unmapped accesses there is by definition no mapped register that could be used to get the associated reg block as described above - hence some more work would be needed to figure out which reg block the access goes to.

I ended up fixing the RTL with #15737, so a DV fix may not be needed for M2 - but we should probably fix these DV knobs at some point.

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

Start with the DV knobs in hw/top_earlgrey/dv/env/chip_env_cfg.sv and the property lookup in hw/dv/sv/cip_lib/cip_base_scoreboard.sv. Review draft #15793 and trace how get_supports_sub_word_csr_writes() and get_unmapped_access_ok() resolve registers or register blocks in top-level simulations. Done means both knobs work correctly at the chip level, including unmapped accesses.

Written by the indexing model from the issue text.

Assessment

Domain
testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.