Skip to content

[top,dv] Add the rom_ctrl integrity check test - #834

Open
martin-velay wants to merge 1 commit into
lowRISC:mainfrom
martin-velay:rom-ctrl-integrity-check
Open

martin-velay wants to merge 1 commit into
lowRISC:mainfrom
martin-velay:rom-ctrl-integrity-check

Conversation

@martin-velay

Copy link
Copy Markdown
Contributor

Implements chip_rom_ctrl_integrity_check (V2, testplan in #668) as a vseq with no SW image.

Before reset the vseq flips one data bit of a random ROM word through the backdoor, with the ECC rewritten to match, so only the digest check can catch it.
It then checks that rom_ctrl reports done but not good, that pwrmgr keeps fetch_en Off, and that the AXI scoreboard compares no transaction, since u_rom_isolate holds the first CVA6 fetch.

To support it:

  • The ROM backdoor in tb.sv is now a rom_ctrl_bkdr_util, which reaches a word by its logical address.
    The sim cfg gains the crypto_dpi_prince build flags it needs.
  • rom_check_if exposes rom_ctrl's report to pwrmgr and pwrmgr's fetch_en.
  • exp_axi_traffic in the env cfg lets a test expect no AXI transaction at all.

Checked with Xcelium on several seeds, including words of the digest itself.
Each of three mutations fails the test: an uncorrupted ROM, the same with the fetch_en check removed, and the ROM isolation tied open in the RTL.

rom_ctrl_integrity_check pointed to a SW test that was never written
and to a ROM image that is no longer built. Replace it with a vseq that
needs no SW. Before reset, it flips one data bit of a random ROM word
through the backdoor and gives the word the ECC of its new data. It
then checks that rom_ctrl reports the check done but not good, that
pwrmgr keeps fetch_en Off, and that no AXI transaction completes, since
u_rom_isolate holds the first CVA6 fetch.

The ROM backdoor is now a rom_ctrl_bkdr_util, so the vseq can reach a
word by its logical address. rom_check_if gives the vseq rom_ctrl's
report to pwrmgr and pwrmgr's fetch_en. The environment configuration
gets exp_axi_traffic, which makes the AXI scoreboard report any
transaction it compared instead of a run that compared none.

Signed-off-by: Martin Velay <mvelay@lowrisc.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant