Skip to content
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

[hmac, rtl] Do not skip padding after a hash stop command #25590

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions hw/ip/prim/rtl/prim_sha2_pad.sv
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,13 @@ module prim_sha2_pad import prim_sha2_pkg::*;
end
endcase

if (!sha_en_i) st_d = StIdle;
else if (hash_go) st_d = StFifoReceive;
if (!sha_en_i) begin
st_d = StIdle;
// We do not allow the cancellation of an ongoing padding operation, i.e., reverting back to the
// `StFifoReceive` state while being in the states `StPad80`, `StPad00`, `StLenHi` or `StLenLo`.
end else if (hash_go && (st_q inside {StIdle, StFifoReceive})) begin
st_d = StFifoReceive;
end
end

// tx_count
Expand Down
Loading