Repository navigation
[top,dv] Add the rom_ctrl integrity check test - #834
Open
martin-velay wants to merge 1 commit into
Open
martin-velay wants to merge 1 commit into
martin-velay wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_enOff, and that the AXI scoreboard compares no transaction, sinceu_rom_isolateholds the first CVA6 fetch.To support it:
tb.svis now arom_ctrl_bkdr_util, which reaches a word by its logical address.The sim cfg gains the
crypto_dpi_princebuild flags it needs.rom_check_ifexposes rom_ctrl's report to pwrmgr and pwrmgr'sfetch_en.exp_axi_trafficin 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_encheck removed, and the ROM isolation tied open in the RTL.