Skip to content

Commit

Permalink
fix vid not consider result_queue_full
Browse files Browse the repository at this point in the history
  • Loading branch information
wayne-win committed Nov 24, 2024
1 parent e6994c7 commit cb8b55d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hardware/src/masku/masku.sv
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ module masku import ara_pkg::*; import rvv_pkg::*; #(

// iteration count for masked instrctions
always_comb begin
if (vinsn_issue_valid && (&masku_operand_alu_valid || &masku_operand_vs2_seq_valid)) begin
if (vinsn_issue_valid && (&masku_operand_alu_valid || &masku_operand_vs2_seq_valid) && !result_queue_full) begin
iteration_count_d = iteration_count_q + 1'b1;
end else begin
iteration_count_d = iteration_count_q;
Expand Down

1 comment on commit cb8b55d

@wayne-win
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

I've observed that the iteration_count register is being updated continuously, potentially leading to data loss when the result_queue is full. As seen in the highlighted section of the figure, the alu_result_vm continues to generate results while the result_queue is already saturated. To mitigate this issue, I suggest incorporating the result_queue_full signal into the logic that updates the iteration_count_d register

Please sign in to comment.