lowRISC / lowRISC/opentitan

[otp_ctrl,dv] Fields lc_cnt and lc_state swapped in the base vseq

Open
#27,451 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Component:DV IP:otp_ctrl
Dominant language
SystemVerilog
Stars
3.6k
Forks
1.1k
Avg merge
2d 22h
Merged PRs (30d)
141

Description

The otp_ctrl_base_vseq has a bug. Here below is the modif to do, but we should also investigate why it hasn't been raised before.

Here:
https://github.com/lowRISC/opentitan/blob/c0fece937cd5d23a824cd28ad73c833152f3efba/hw/ip_templates/otp_ctrl/dv/env/seq_lib/otp_ctrl_base_vseq.sv.tpl#L606

It should be:

  cfg.m_lc_prog_pull_agent_cfg.add_h_user_data({lc_state, lc_cnt});

As defined here:
https://github.com/lowRISC/opentitan/blob/c0fece937cd5d23a824cd28ad73c833152f3efba/hw/ip/otp_ctrl/rtl/otp_ctrl_pkg.sv#L73-L77

Minor additional change to do, as it's wrong and confusing when debugging:
https://github.com/lowRISC/opentitan/blob/c0fece937cd5d23a824cd28ad73c833152f3efba/hw/ip_templates/otp_ctrl/dv/env/otp_ctrl_scoreboard.sv.tpl#L1046

It should be:

  `DV_CHECK_EQ(item.d_data, csr.get_mirrored_value(),

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 referenced otp_ctrl_base_vseq.sv.tpl location and compare the field ordering with otp_ctrl_pkg.sv. Then inspect otp_ctrl_scoreboard.sv.tpl at the referenced check; done means correcting both expressions and investigating why the swapped fields were not previously detected.

Written by the indexing model from the issue text.

Assessment

Domain
embedded-iot, testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.