[cheriot,rtl] Add TRVK filter to Ibex sources - #2455
Conversation
This commit updates the vendored ibex to `thommythomaso/ibex-tbenz-pub`. This has to be updated to point to `lowrisc/ibex` as soon as lowRISC/ibex#2455 and lowRISC/ibex#2456 are merged. Signed-off-by: Thomas Benz <tbenz@lowrisc.org>
This commit updates the vendored ibex to `thommythomaso/ibex-tbenz-pub`. This has to be updated to point to `lowrisc/ibex` as soon as lowRISC/ibex#2455 and lowRISC/ibex#2456 are merged. Signed-off-by: Thomas Benz <tbenz@lowrisc.org>
6e28f03 to
588c2d9
Compare
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document. By submitting this pull request comment, I am hereby confirming my acceptance of the terms of the CLA Document and my agreement to be legally bound by its terms. |
588c2d9 to
49af40a
Compare
The `stream_fork` and `stream_join` modules are used in some CHERIoT memory IPs. Signed-off-by: Thomas Benz <tbenz@lowrisc.org>
Signed-off-by: Thomas Benz <tbenz@lowrisc.org>
49af40a to
c4ad698
Compare
marnovandermaas
left a comment
There was a problem hiding this comment.
I've left a few comments on this, mainly to make the code more clear. Do we have any tests for this load filter? We should include at least a smoke test before merging this.
| parameter int unsigned CPERMS_W = 6; | ||
|
|
||
|
|
||
| // Obtain 32-bit representation of top |
| // Obtain 32-bit representation of top | ||
| function automatic logic[32:0] get_bound33(logic [TOP_W-1:0] top, logic [1:0] cor, | ||
| logic [EXP_W-1:0] exponent, logic [31:0] addr); | ||
| logic [32:0] t1, t2, mask, cor_val; |
There was a problem hiding this comment.
t1 and t2 should have more descriptive names.
There was a problem hiding this comment.
Agreed, but we should align ourself with the nomenclature used in the core. @SamuelRiedel, will you rename these signals?
| function automatic logic [2:0] update_temp_fields(logic [TOP_W-1:0] top, logic [BOT_W-1:0] base, | ||
| logic [BOT_W-1:0] addrmi); | ||
| logic top_hi, addr_hi; | ||
| logic [2:0] res3; |
There was a problem hiding this comment.
This should probably be called something like "correction_bits"
There was a problem hiding this comment.
I would keep this aligned with the name originally used by the reference implementation of Microsoft. The plan is to merge the current ibex_cheriot_pkg.sv with the one that will be introduced with the core.
| .oup_ready_i(1'b1) | ||
| ); | ||
|
|
||
| // Forward OBI payload between host and device |
There was a problem hiding this comment.
You use host and device terminology here but downstream and upstream terminology for the signals. Does it make sense to align these?
| assign upstream_rdata_intg_o = downstream_rsp_out.intg; | ||
| assign upstream_err_o = downstream_rsp_out.err; | ||
|
|
||
| // Forward host to device CHERIoT tag w/o changes |
There was a problem hiding this comment.
Nit, probably best to spell out "without" here.
| // We have loaded valid capability pointer, now we see valid metadata, not a sealing cap, | ||
| // and are pointing into the revocation bitmap | ||
| assign revbm_req_required = !is_sealing_cap && // Not sealing cap | ||
| ptr_store_valid_q && // The base pointer stored is valid |
There was a problem hiding this comment.
This one really confused me, it would be much clearer if this signal was named "cap_load_valid_q"
| // Licensed under the Apache License, Version 2.0, see LICENSE for details. | ||
| // SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| module ibex_trvk #( |
There was a problem hiding this comment.
I would prefer to rename this. One idea I had is "ibex_cap_load_filter".
There was a problem hiding this comment.
I would keep this aligned with the nomenclature introduced by Microsoft.
| /////////////////// | ||
|
|
||
| // Pointer buffer is filled iff tag valid & 64-bit aligned | ||
| assign ptr_store_enable = downstream_rsp_out.tag && !align_out && align_out_valid && |
There was a problem hiding this comment.
I would prefer to rename this "ptr_load_enable". I was very confused by this code thinking that this was about storing a pointer not loading one.
There was a problem hiding this comment.
Also we should probably rename "ptr" to "cap".
| assign revbm_req_required = !is_sealing_cap && // Not sealing cap | ||
| ptr_store_valid_q && // The base pointer stored is valid | ||
| downstream_rsp_out.tag && // We are looking at a capability | ||
| downstream_rsp_out_valid && // The stored response is valid |
There was a problem hiding this comment.
Maybe the comment should say "The latched load response is valid"
| downstream_rsp_out.tag && // We are looking at a capability | ||
| downstream_rsp_out_valid && // The stored response is valid | ||
| align_out && // We are on the second word of the cap | ||
| align_out_valid && // The alignment store is valid |
There was a problem hiding this comment.
Maybe this comment should say "The latched alignment bits are valid"
I have a smoke test in OpenTitan of the entire CHERIoT subsystem. I would suggest to not add a dedicated test for just the filter here, especially as we are planning to merge the core soon which then will use and verify the filter. |
No description provided.