Skip to content
Browse files

TMU prefetch: fix qpram read-after-write

  • Loading branch information...
1 parent 639f124 commit 2c430c95c8a06edd24315943e6974d705c8b10dc @sbourdeauducq sbourdeauducq committed
Showing with 17 additions and 12 deletions.
  1. +17 −12 cores/tmu2/rtl/tmu2_datamem.v
View
29 cores/tmu2/rtl/tmu2_datamem.v
@@ -146,11 +146,12 @@ always @(posedge sys_clk) begin
end
end
-reg state;
-reg next_state;
+reg [1:0] state;
+reg [1:0] next_state;
-parameter RUNNING = 1'd0;
-parameter COMMIT = 1'd1;
+parameter RUNNING = 2'd0;
+parameter COMMIT = 2'd1;
+parameter STROBE = 2'd2;
always @(posedge sys_clk) begin
if(sys_rst)
@@ -224,14 +225,18 @@ always @(*) begin
missmask_we = 1'b1;
we = 1'b1;
end
- end else begin
- pipe_stb_o = 1'b1;
- if(pipe_ack_i) begin
- retry = 1'b0;
- req_ce = 1'b1;
- frag_pipe_ack_o = 1'b1;
- next_state = RUNNING;
- end
+ end else
+ next_state = STROBE;
+ end
+ STROBE: begin
+ busy = 1'b1;
+ retry = 1'b1;
+ pipe_stb_o = 1'b1;
+ if(pipe_ack_i) begin
+ retry = 1'b0;
+ req_ce = 1'b1;
+ frag_pipe_ack_o = 1'b1;
+ next_state = RUNNING;
end
end
endcase

0 comments on commit 2c430c9

Please sign in to comment.
Something went wrong with that request. Please try again.