fixed l3cache hang using memory arbiter in afu
This commit is contained in:
@@ -64,23 +64,27 @@ module VX_scoreboard #(
|
||||
assign ibuf_deq_if.ready = ~(delay || exe_delay || gpr_delay);
|
||||
|
||||
`ifdef DBG_PRINT_PIPELINE
|
||||
always @(posedge clk) begin
|
||||
if (ibuf_deq_if.valid && ~ibuf_deq_if.ready) begin
|
||||
$display("%t: core%0d-stall: wid=%0d, PC=%0h, rd=%0d, wb=%0d, inuse=%b%b%b%b, exe=%b, gpr=%b",
|
||||
$time, CORE_ID, ibuf_deq_if.wid, ibuf_deq_if.PC, ibuf_deq_if.rd, ibuf_deq_if.wb,
|
||||
inuse_regs[ibuf_deq_if.rd], inuse_regs[ibuf_deq_if.rs1], inuse_regs[ibuf_deq_if.rs2], inuse_regs[ibuf_deq_if.rs3], exe_delay, gpr_delay);
|
||||
end
|
||||
end
|
||||
`endif
|
||||
|
||||
reg [31:0] stall_ctr;
|
||||
always @(posedge clk) begin
|
||||
if (reset) begin
|
||||
stall_ctr <= 0;
|
||||
end else if (ibuf_deq_if.valid && ~ibuf_deq_if.ready) begin
|
||||
$display("%t: core%0d-stall: wid=%0d, PC=%0h, rd=%0d, wb=%0d, inuse=%b%b%b%b, exe=%b, gpr=%b",
|
||||
stall_ctr <= stall_ctr + 1;
|
||||
assert(stall_ctr < 100000) else $error("%t: core%0d-stalled: wid=%0d, PC=%0h, rd=%0d, wb=%0d, inuse=%b%b%b%b, exe=%b, gpr=%b",
|
||||
$time, CORE_ID, ibuf_deq_if.wid, ibuf_deq_if.PC, ibuf_deq_if.rd, ibuf_deq_if.wb,
|
||||
inuse_regs[ibuf_deq_if.rd], inuse_regs[ibuf_deq_if.rs1], inuse_regs[ibuf_deq_if.rs2], inuse_regs[ibuf_deq_if.rs3], exe_delay, gpr_delay);
|
||||
stall_ctr <= stall_ctr + 1;
|
||||
if (stall_ctr >= 2000) begin
|
||||
$fflush();
|
||||
assert(0);
|
||||
end
|
||||
end else if (ibuf_deq_if.valid && ibuf_deq_if.ready) begin
|
||||
stall_ctr <= 0;
|
||||
end
|
||||
end
|
||||
`endif
|
||||
end
|
||||
|
||||
endmodule
|
||||
Reference in New Issue
Block a user