lowRISC / lowRISC/opentitan

[dv] Remaining OTBN DV TODOs

Open
#19,034 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

OTBN TODOs have been reviewed (for commit
https://github.com/lowRISC/opentitan/blob/be4c7d1a7e72e5d0944d82c250c076d77e4997c5). This tracks the remaining TODOs which don't need to be addressed for M2.5.2

https://github.com/lowRISC/opentitan/blob/be4c7d1a7e72e5d0944d82c250c076d77e4997c5/hw/ip/otbn/dv/otbnsim/sim/stats.py#L272

  • Small improvement to utility script not directly DV related

https://github.com/lowRISC/opentitan/blob/be4c7d1a7e72e5d0944d82c250c076d77e4997c5/hw/ip/otbn/dv/otbnsim/sim/gpr.py#L119

  • We may be missing a check that the secure wipe zeros the call stack. Not a concern for V2.5 as a bad zeroing of the call stack isn't a functional problem and only a minor security concern

https://github.com/lowRISC/opentitan/blob/be4c7d1a7e72e5d0944d82c250c076d77e4997c5/hw/ip/otbn/dv/otbnsim/sim/ext_regs.py#L268

  • Suggestion for future design improvement, no concern for V2.5

https://github.com/lowRISC/opentitan/blob/be4c7d1a7e72e5d0944d82c250c076d77e4997c5/hw/ip/otbn/dv/uvm/otbn_sim_cfg.hjson#L31

  • Minor cleanup, no concern for V2.5

https://github.com/lowRISC/opentitan/blob/be4c7d1a7e72e5d0944d82c250c076d77e4997c5/hw/ip/otbn/dv/uvm/otbn_sim_cfg.hjson#L73
https://github.com/lowRISC/opentitan/blob/be4c7d1a7e72e5d0944d82c250c076d77e4997c5/hw/ip/otbn/dv/uvm/tb.sv#L276

  • Known issue already triaged out of V2.5 scope

https://github.com/lowRISC/opentitan/blob/be4c7d1a7e72e5d0944d82c250c076d77e4997c5/hw/ip/otbn/dv/uvm/otbn_model_agent/otbn_model_monitor.sv#L25

  • Minor improvement, no concern for V2.5

https://github.com/lowRISC/opentitan/blob/be4c7d1a7e72e5d0944d82c250c076d77e4997c5/hw/ip/otbn/dv/uvm/env/otbn_scoreboard.sv#L231
https://github.com/lowRISC/opentitan/blob/be4c7d1a7e72e5d0944d82c250c076d77e4997c5/hw/ip/otbn/dv/uvm/env/otbn_scoreboard.sv#L241
https://github.com/lowRISC/opentitan/blob/be4c7d1a7e72e5d0944d82c250c076d77e4997c5/hw/ip/otbn/dv/uvm/env/otbn_scoreboard.sv#L248
https://github.com/lowRISC/opentitan/blob/be4c7d1a7e72e5d0944d82c250c076d77e4997c5/hw/ip/otbn/dv/uvm/env/otbn_scoreboard.sv#L256
https://github.com/lowRISC/opentitan/blob/be4c7d1a7e72e5d0944d82c250c076d77e4997c5/hw/ip/otbn/dv/uvm/env/otbn_scoreboard.sv#L264

  • Potential improvements to how the testbench processes TL register accesses, not a V2.5 concern. Detailed modeling of these is already handled by the python OTBN model

https://github.com/lowRISC/opentitan/blob/be4c7d1a7e72e5d0944d82c250c076d77e4997c5/hw/ip/otbn/dv/model/otbn_model.cc#L712

  • ISS modeling of integrity bits needs improving to handle this case. We skip checks where the ISS thinks a word has valid ECC bits but they're invalid in the RTL. Cases where the RTL has written incorrect ECC bits will be caught by other tests (e.g. spurious alerts from integrity related errors or mismatches aganst the model on instruction execution)

https://github.com/lowRISC/opentitan/blob/be4c7d1a7e72e5d0944d82c250c076d77e4997c5/hw/ip/otbn/dv/model/otbn_core_model.sv#L428

  • Minor cleanup, only an issue if there are mlutiple OTBN instances in a testbench that uses the OTBN model

https://github.com/lowRISC/opentitan/blob/be4c7d1a7e72e5d0944d82c250c076d77e4997c5/hw/ip/otbn/dv/tracer/rtl/otbn_trace_if.sv#L231

  • Minor improvement, no concern for V2.5

https://github.com/lowRISC/opentitan/blob/be4c7d1a7e72e5d0944d82c250c076d77e4997c5/hw/ip/otbn/dv/doc/fcov.md#L181

  • Missing functional coverage point around disabling the promotion of software errors to alerts after running with it enabled. Low concern as the correct functioning of this mechanism is already demonstrated (in particular in the top-level OTBN smoke test).

https://github.com/lowRISC/opentitan/blob/be4c7d1a7e72e5d0944d82c250c076d77e4997c5/hw/ip/otbn/dv/rig/rig/gens/bad_deep_loop.py#L160
https://github.com/lowRISC/opentitan/blob/be4c7d1a7e72e5d0944d82c250c076d77e4997c5/hw/ip/otbn/dv/rig/rig/gens/bad_deep_loop.py#L187

  • Random instruction generator clean-ups

https://github.com/lowRISC/opentitan/blob/be4c7d1a7e72e5d0944d82c250c076d77e4997c5/hw/ip/otbn/dv/rig/rig/gens/loop.py#L405

  • Minor improvements to random instruction generator, no concern for V2.5

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

Choose one unchecked TODO and start with the linked location in files such as hw/ip/otbn/dv/env/otbn_scoreboard.sv, hw/ip/otbn/dv/model/otbn_model.cc, hw/ip/otbn/dv/doc/fcov.md, or hw/ip/otbn/dv/rig/rig/gens/loop.py. Read the surrounding code and related OTBN DV behavior; done means the selected TODO is addressed and the relevant verification evidence is updated.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
embedded-iot, security, testing
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.