-
Notifications
You must be signed in to change notification settings - Fork 58
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
hw: Replace non-resettable FFs #154
Conversation
23a0335
to
c619022
Compare
5de3bcf
to
39fd927
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.
LGTM, except for the change suggested.
hw/snitch_ipu/src/snitch_int_ss.sv
Outdated
@@ -601,20 +601,21 @@ module snitch_int_ss import riscv_instr::*; import snitch_ipu_pkg::*; import sni | |||
); | |||
|
|||
for (genvar i = 0; i < 2; i++) begin : gen_multi_cycle_buffer | |||
`FFLNR(imd_val_q[i], imd_val_q[i], imd_val_we[i], clk_i) | |||
`FFL(imd_val_q[i], imd_val_q[i], imd_val_we[i], '0, clk_i, rst_i) |
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.
As an active-low FF, this should use rst_ni
, or be changed to `FFLAR
. Please double-check everywhere that `FFL
gets an active-low reset, and viceversa.
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 catch, thanks! I double-checked everything else again.
Replace all non-resettable FlipFlops with resettable ones. Non-resettable FlipFlops have a marginally smaller area but can cause undefined behavior, and the common agreement is that non-resettable FlipFlops should be replaced everywhere if possible.
This PR also replaces all deprecated macros e.g.
FFARN
withFF
, and adapts the parameters in thesnitch_regfile
modules to the CamelCase naming convention.TODO