-
Notifications
You must be signed in to change notification settings - Fork 823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[rtl] MuBi encoding of iCache memory ctrl signals #23292
Conversation
8f01369
to
19c9c46
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for porting this over @nasahlpa . This looks mostly good, I've spotted one case where the MuBi protection can be very easily extended from one set of registers to the next. I would be nice to get this in, too.
hw/ip/prim/rtl/prim_ram_1p_adv.sv
Outdated
prim_buf #( | ||
.Width(MuBi4Width) | ||
) u_req_d_buf ( | ||
.in_i ((req_d)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Want to remove the double parens? ((req_d))
-> (req_d)
?
hw/ip/prim/rtl/prim_ram_1p_adv.sv
Outdated
prim_buf #( | ||
.Width(MuBi4Width) | ||
) u_write_d_buf ( | ||
.in_i ((write_d)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Want to remove the double parens? ((write_d))
-> (write_d)
?
hw/ip/prim/rtl/prim_ram_1p_scr.sv
Outdated
prim_buf #( | ||
.Width(MuBi4Width) | ||
) u_read_en_buf ( | ||
.in_i ((read_en)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Want to remove the double parens? ((read_en))
-> (read_en)
?
hw/ip/prim/rtl/prim_ram_1p_scr.sv
Outdated
prim_buf #( | ||
.Width(MuBi4Width) | ||
) u_write_en_d_buf ( | ||
.in_i ((write_en_d)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Want to remove the double parens? ((write_en_d))
-> (write_en_d)
?
hw/ip/prim/rtl/prim_ram_1p_scr.sv
Outdated
assign addr_collision_d = mubi4_bool_to_mubi(mubi4_test_true_loose( | ||
mubi4_and_hi(mubi4_or_hi(write_en_q, write_pending_q), read_en_buf)) & | ||
(addr_scr == waddr_scr_q)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be converted as follows:
- Create a mubi signal holding
addr_scr == waddr_scr_q
and buffer it with a prim_buf. addr_collision_d = mubi4_and_hi(mubi4_and_hi(mubi4_or_hi(write_en_q, write_pending_q), read_en_buf), addr_match_buf);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because right now, you have several mubi inputs and a mubi target register. But just before driving the register you convert to boolean and then again mubi.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I've changed the code accordingly.
4dc644d
to
45e163e
Compare
Thanks @nasahlpa , this looks great now! |
The bitstream splicing seems to not work currently in CI due to an infrastructure issue. Thus all FPGA tests fail at the moment. I think we people are working on fixing this. |
db3d587
to
1bbd6bc
Compare
This commit encodes all flopped 1-bit control signals into multi bit signals in the `prim_ram_1p_scr` and `prim_ram_1p_adv` module. When an encoding error is detected, a major alert is triggered within Ibex. Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org>
Thanks for the review! After a rebase CI now passed. |
This commit adds the error port to the iCache which was introduced with lowRISC/opentitan#23292. Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org>
This commit adds the error port to the iCache which was introduced with lowRISC/opentitan#23292. Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org>
This commit adds the error port to the iCache which was introduced with lowRISC/opentitan#23292. Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org>
lowRISC#23292 protected security-critical signals within the prim_ram modules against FI by multi-bit encoding. This commit adds a FI test that checks whether injecting bit-flips into these signals trigger the expected alert. Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org>
lowRISC#23292 protected security-critical signals within the prim_ram modules against FI by multi-bit encoding. This commit adds a FI test that checks whether injecting bit-flips into these signals trigger the expected alert. Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org>
lowRISC#23292 protected security-critical signals within the prim_ram modules against FI by multi-bit encoding. This commit adds a FI test that checks whether injecting bit-flips into these signals trigger the expected alert. Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org>
lowRISC#23292 protected security-critical signals within the prim_ram modules against FI by multi-bit encoding. This commit adds a FI test that checks whether injecting bit-flips into these signals trigger the expected alert. Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org>
#23292 protected security-critical signals within the prim_ram modules against FI by multi-bit encoding. This commit adds a FI test that checks whether injecting bit-flips into these signals trigger the expected alert. Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org>
lowRISC#23292 protected security-critical signals within the prim_ram modules against FI by multi-bit encoding. This commit adds a FI test that checks whether injecting bit-flips into these signals trigger the expected alert. Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org>
lowRISC#23292 protected security-critical signals within the prim_ram modules against FI by multi-bit encoding. This commit adds a FI test that checks whether injecting bit-flips into these signals trigger the expected alert. Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org>
lowRISC#23292 protected security-critical signals within the prim_ram modules against FI by multi-bit encoding. This commit adds a FI test that checks whether injecting bit-flips into these signals trigger the expected alert. Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org>
PR lowRISC#23292 introduced MuBi encoding for the prim_ram_1p_scr module. However, adding the corresponding countermeasure label PRIM_RAM.CTRL.MUBI was forgotten. Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org>
PR #23292 introduced MuBi encoding for the prim_ram_1p_scr module. However, adding the corresponding countermeasure label PRIM_RAM.CTRL.MUBI was forgotten. Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org>
This commit encodes all flopped 1-bit control signals into multi bit signals in the
prim_ram_1p_scr
andprim_ram_1p_adv
module. When an encoding error is detected, a major alert is triggered within Ibex.