Skip to content

[hw] CVA6 updated with HPDCache#520

Draft
marnovandermaas wants to merge 10 commits intolowRISC:mainfrom
marnovandermaas:cva6_hpdcache
Draft

[hw] CVA6 updated with HPDCache#520
marnovandermaas wants to merge 10 commits intolowRISC:mainfrom
marnovandermaas:cva6_hpdcache

Conversation

@marnovandermaas
Copy link
Copy Markdown
Collaborator

@marnovandermaas marnovandermaas commented May 4, 2026

This is the first major update of CVA6 since our initial integration. The core has seen quite a few fixes and most importantly the HPDCache is now integrated for use.

Closes: #245

This moves the Mocha specific changes to the top instead of a commit in
the vendored in repository.
This commit also switches CVA6's core file to use the HPDCache
configuration and to depend on the HPDCache.
It also adds the License information for the HPDCache in REUSE.toml
@marnovandermaas marnovandermaas marked this pull request as draft May 4, 2026 14:32
@marnovandermaas marnovandermaas marked this pull request as draft May 4, 2026 14:32
@marnovandermaas marnovandermaas marked this pull request as ready for review May 5, 2026 08:02
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If we intend to merge the testrig harness into mocha, its worth noting that the rvfi_dii_generator module within this generate block is currently used by the harness for instruction injection. In this case since the ports are just a subset of the icache ports, I think it should be possible to hook the injector into the icache fairly easily.

The only challenge in this case is omitting the real icache during elaboration, and taking the DII instruction injector instead, which could be solved via a systemverilog config file (if we dont want to change the .core files). This would add a little bit of complexity, but could still work cleanly.

Alternatively, we could leave the generator instantiation in.

Both approaches are OK from my perspective, just a matter of taste and weather we are OK with having simulation-only modules instantiated explicitly inside the RTL.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I think for now we can leave it in but I agree that in the long run we should not have simulation only modules corrupting our RTL.

Comment thread hw/top_chip/rtl/top_chip_system.sv
Copy link
Copy Markdown
Contributor

@raylau1 raylau1 left a comment

Choose a reason for hiding this comment

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

The hardware changes look good, though there are DV failures about FIFO unknown data that needs to be resolved first.

Nit: The link in commit 9e623b7 description is broken because it is split into 2 lines

Comment thread hw/top_chip/lint/top_chip_system.vlt Outdated
Update code from upstream repository
https://github.com/Capabilities-Limited/cv-hpdcache.git
to revision
07f4ebe7bd074e2f82f6b10c2386026bc12455d8

Signed-off-by: Marno van der Maas <mvdmaas+git@lowrisc.org>
This is a big code change because there has been a rebase on upstream
non-CHERI CVA6 as well as work to enable HPDCache.

This vendor is based on the following release:
https://github.com/Capabilities-Limited/cheri-cva6/releases/tag/cva6-april-2026
PCC specific types have been removed in favour of register types, make
the appropriate change when definding the boot capability.
Using $clog2 to determine the width of a signal that has size 1 will
erroneously give zero. This changes that.
Ibex is not integrated in Mocha, so this can be removed.
Usage is zero when FIFO is empty as well as full, so we need to take
into account the full signal when assigning to empty.
@marnovandermaas marnovandermaas marked this pull request as draft May 6, 2026 09:36
@marnovandermaas
Copy link
Copy Markdown
Collaborator Author

I'm marking this as draft because there are X propagation issues in CHERI mode.

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.

CVA6-CHERI with HPDCache

3 participants