Skip to content

[sram,dv] Implement the AXI SRAM vplan V1 tests and DV environment - #764

Open
tchilikov-semify wants to merge 5 commits into
lowRISC:mainfrom
tchilikov-semify:sram_verification
Open

tchilikov-semify wants to merge 5 commits into
lowRISC:mainfrom
tchilikov-semify:sram_verification

Conversation

@tchilikov-semify

@tchilikov-semify tchilikov-semify commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

This PR implements the V1 block level testbench for the axi_sram.

In particular, the commits:

  1. Move the vPlan to hw/ip/axi_sram/data/ and link each item to the assertions and tests that cover it.
  2. Add the dvsim testplan, with every testpoint planned: the four smoke tests are V1, and the V2 testpoints list no tests yet.
  3. Add the SRAM assertions and bind them into every axi_sram instance.
  4. Add the block-level env: a scoreboard for data and CHERI tags against a reference model, tag coverage, and a cfg that allows passive reuse at top level.
  5. Add the block level testbench, the 4 V1 tests, and a smoke regression.

Additionally, #783 is still open.

The tests can be run with:
dvsim hw/ip/axi_sram/dv/axi_sram_sim_cfg.hjson -i block --cov: 4/4

@tchilikov-semify tchilikov-semify changed the title [sram,dv] Implement the AXI SRAM vplan and DV environment [sram,dv] Implement the AXI SRAM vplan tests and DV environment Oct 22, 2026
@tchilikov-semify
tchilikov-semify force-pushed the sram_verification branch 7 times, most recently from 67490bd to 0630ee8 Compare November 5, 2026 14:42
@tchilikov-semify
tchilikov-semify force-pushed the sram_verification branch 2 times, most recently from fda1df2 to ca559f5 Compare November 9, 2026 16:11

@martin-velay martin-velay left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commits 1 and 2 change every top-level build (sim_tops is now tb_cfg), not just the SRAM tests. Could the PR description say so and list what you ran, with the expected failures?

@tchilikov-semify

Copy link
Copy Markdown
Collaborator Author

@martin-velay this PR is dependent on #761, so the first two commits are actually just a clone/copy of #761. They will eventually be replaced by the final contents of #761 once its merged.

@tchilikov-semify
tchilikov-semify marked this pull request as ready for review November 25, 2026 09:38
@martin-velay

Copy link
Copy Markdown
Contributor

Now that #761 is in, could the description say what the four commits add, that the SRAM assertions are bound into every top build, and that wuser_mismatch, wuser_partial_strobe, burst_read_mixed_tags and burst_write_tags fail until #717, #778 and #780 are settled?

@martin-velay martin-velay left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the structure side, it should be reworked.

  1. axi_sram is a Mocha IP, so it would sit in hw/ip/axi_sram/ like rng and mailbox, with the vPlan in data/ and the DV in dv/. Could you move the DV and the vPlan there, and the RTL and axi_sram.core too if the RTL owners agree?
  2. axi_sram_test_pkg holds the model, the scoreboard, the env, every vseq and the base test. Could you split it into env/axi_sram_env_pkg, seq_lib/axi_sram_seq_pkg (importing the env) and tests/axi_sram_test_pkg with axi_sram_base_test? A top-level bench can then reuse the scoreboard on the SRAM port without compiling the sequences and tests.
  3. The env reads its vifs from config_db and calls set_drive_x_when_idle itself, and the virtual sequencer holds two clk_rst_if handles. Could an axi_sram_env_cfg, created by the base test, hold the vifs, the SRAM size, en_scb, en_cov and is_active?
  4. axi_sram_cov is a module in the block TB that rebuilds the bursts from the pins alongside the monitor. Could it become an axi_sram_env_cov class in the env, sampled from the monitor's transactions when en_cov is set? It would then also run at top level.
  5. Could the TB be tb/tb.sv with module tb, and the sim cfg and core axi_sram_sim_cfg.hjson and axi_sram_sim.core at the dv/ root, as for the mailbox?
  6. The class files in seq_lib/ could be .svh like the rest of env/, with the extern layout mailbox_env uses.

@tchilikov-semify
tchilikov-semify force-pushed the sram_verification branch 2 times, most recently from b8e3a7c to 7944730 Compare November 25, 2026 14:05
@tchilikov-semify

Copy link
Copy Markdown
Collaborator Author

Hi @martin-velay, thanks for the structural feedback. I've gone through and addressed most of this. I think the suggestion to move the RTL is good, and I'm for this, since I think the SRAM is better placed in the IP folder. Before making the RTL move, I would like to run it past @marnovandermaas. Marno, what do you think about the move?

- replace the TODOs with the assertions and tests that cover them
- drop suffixes so the test names match dvsim
- add clarifying comments and issue links
The bind is pulled into top_chip_sim.core, so the top level tb checks
them too.
Add reference model, scoreboard, coverage model, and a cfg that lets a top level
testbench reuse the env passively.
Add the tb, base test, and one vseq per V1 testpoint. Register axi_sram in
mocha_sim_cfgs. Run with dvsim hw/ip/axi_sram/dv/axi_sram_sim_cfg.hjson
@tchilikov-semify tchilikov-semify changed the title [sram,dv] Implement the AXI SRAM vplan tests and DV environment [sram,dv] Implement the AXI SRAM vplan V1 tests and DV environment Nov 26, 2026
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.

2 participants