lowRISC / lowRISC/opentitan

[otbn, dv] otbn_ctrl_redun test fails because of assertions

Open
#29,233 0 comments 0 reactions 0 assignees View on GitHub
Component:DV IP:otbn
Dominant language
SystemVerilog
Stars
3.6k
Forks
1.1k
Avg merge
2d 22h
Merged PRs (30d)
141

Description

### Description

With the delayed escalation (see #28815 ) some cases of the test `otbn_ctrl_redun` fail because of assertions triggering which should not trigger in case of a fault.

### OnlyWriteLoadDataBaseWhenDMemValid_A or OnlyWriteLoadDataBignumWhenDMemValid_A
Seed to reproduce: `85792109201481505344153306756591323451413592059551548089270047665991397442863`

These assertions fail because in this test case the signal `ld_insn` gets forced to zero for the BN.LID instruction. If we force the ld_insn signal to zero during a LW or BN.LID instruction, OTBN will stall but not place a DMEM request. The predecode error will escalate in the next cycle but then the OTBN also wants to write LSU response to the register file in this cycle. But there is no valid response and thus the assertions `OnlyWriteLoadDataBaseWhenDMemValid_A` or `OnlyWriteLoadDataBignumWhenDMemValid_A` fail. Without the delayed escalation OTBN would have aborted in the first cycle. This test case can be fixed by disabling these assertions.

### NoStallOnBranch
Seed to reproduce: `103405847484584584193229638819996896324836961272412666455926727321893312679336`

In case the instruction where we inject the error into is a branch instruction the assertion `NoStallOnBranch` in the controller fails. However, this assertion is not meaningful in this case and maybe could be disabled.

Contributor guide

Open the contributing guide

Research direction

Start with the otbn_ctrl_redun test and reproduce the failures using the two seeds in the issue. Read the controller assertions OnlyWriteLoadDataBaseWhenDMemValid_A, OnlyWriteLoadDataBignumWhenDMemValid_A, and NoStallOnBranch in the relevant OTBN verification code; done means the fault-injection cases no longer trigger assertions that are not meaningful under delayed escalation.

Written by the indexing model from the issue text.

Assessment

Domain
embedded-iot, testing-qa
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.