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,dv] Fix fifo_empty interrupt #25683

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
12 changes: 9 additions & 3 deletions hw/ip/hmac/dv/env/hmac_scoreboard.sv
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,12 @@ task hmac_scoreboard::hmac_process_fifo_status();
hmac_fifo_full = hmac_fifo_depth == HMAC_MSG_FIFO_DEPTH_WR;
hmac_fifo_empty = hmac_fifo_depth == 0;

// Check whether FIFO full should be cleared (for another reason than the emptiness)
if (hmac_start_posedge || hmac_process_posedge || hmac_stopped_posedge ||
hmac_continue_posedge) begin
fifo_full_detected = 0;
end

// The FIFO empty interrupt is raised only if the message FIFO is actually writable by
// software, i.e., if all of the following conditions are met:
// 1- The HMAC block is not running in HMAC mode and performing the second round of
Expand All @@ -653,11 +659,11 @@ task hmac_scoreboard::hmac_process_fifo_status();
end
join_none

// Reset full flag when emptiness has been reached
if (hmac_fifo_empty) begin
fifo_full_detected = 0;
// Check whether FIFO full has been detected for the ongoing message but the retrictions cases
// have the priority in case full is set at the same moment
if (hmac_fifo_empty || hmac_start_posedge || hmac_process_posedge ||
hmac_stopped_posedge || hmac_continue_posedge) begin
fifo_full_detected = 0;
end else if (hmac_fifo_full) begin
fifo_full_detected = 1;
end
Expand Down
Loading