Skip to content

[vendor, hw, sw] Modify axi_to_mem to support CHERI and integrate it#390

Open
thommythomaso wants to merge 4 commits intolowRISC:mainfrom
thommythomaso:tbenz/axi_to_mem
Open

[vendor, hw, sw] Modify axi_to_mem to support CHERI and integrate it#390
thommythomaso wants to merge 4 commits intolowRISC:mainfrom
thommythomaso:tbenz/axi_to_mem

Conversation

@thommythomaso
Copy link
Copy Markdown
Contributor

Addresses #343. Updates #358.

Possible optimizations:

@thommythomaso
Copy link
Copy Markdown
Contributor Author

I had to reopen this PR as the visibility change closed #358.
I addressed your feedback: I implemented tag clearing on partial access as well as a separate tag store, and included @raylau1's tests.

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.

Thanks for the good work! I'm glad to see verilator and FPGA tests passing in CI and dvsim tests passing locally on my side. Note that I'll be on vacation and won't be able to give further reviews next week.

Comment on lines +389 to +394
if (DataWidth == 32'd64) begin : gen_DW64_w_cap_checks
assign is_w_cap_sized = (meta.size == 3'd3) & (meta.len == 8'd1);
assign is_w_cap_aligned = meta.last ? meta.addr[3:0] == 4'd8 : meta.addr[3:0] == 4'd0;
end else if (DataWidth == 32'd128) begin : gen_DW128_w_cap_checks
assign is_w_cap_sized = (meta.size == 3'd4) & (meta.len == 8'd0);
assign is_w_cap_aligned = meta.addr[3:0] == 4'd0;
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.

This will work fine in the current cache-less system but will malfunction with accesses which contain more than 1 capabilities after we integrate caches. I'm not sure if that should be left as a future enhancement. @marnovandermaas what do you think?

Copy link
Copy Markdown
Contributor Author

@thommythomaso thommythomaso Mar 30, 2026

Choose a reason for hiding this comment

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

I am fully aware of this limitation. How to handle (longer) bursts (of capabilities or mixed data) will be a fundamental question. Currently the burden of detecting valid capability accesses lays with the SRAM controller (which I personally don't find a good idea); adding bursts will make this detection much more complex.

In the presence of a more sophisticated cache, which fetches more than 128 bit at a time, the cache has to ensure to handle sub-capability accesses properly and invalidating them. If this is the case, we can safely remove these checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants