disabling fetch's deadlock check when L1 caches are present
This commit is contained in:
@@ -291,6 +291,13 @@
|
|||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
`ifdef ICACHE_ENABLE
|
||||||
|
`define L1_ENABLE
|
||||||
|
`endif
|
||||||
|
`ifdef DCACHE_ENABLE
|
||||||
|
`define L1_ENABLE
|
||||||
|
`endif
|
||||||
|
|
||||||
`ifdef L2_ENABLE
|
`ifdef L2_ENABLE
|
||||||
`define L2_LINE_SIZE `MEM_BLOCK_SIZE
|
`define L2_LINE_SIZE `MEM_BLOCK_SIZE
|
||||||
`else
|
`else
|
||||||
|
|||||||
@@ -533,8 +533,9 @@ module VX_decode #(
|
|||||||
assign decode_sched_if.valid = fetch_fire;
|
assign decode_sched_if.valid = fetch_fire;
|
||||||
assign decode_sched_if.wid = fetch_if.data.wid;
|
assign decode_sched_if.wid = fetch_if.data.wid;
|
||||||
assign decode_sched_if.is_wstall = is_wstall;
|
assign decode_sched_if.is_wstall = is_wstall;
|
||||||
|
`ifndef L1_ENABLE
|
||||||
assign fetch_if.ibuf_pop = decode_if.ibuf_pop;
|
assign fetch_if.ibuf_pop = decode_if.ibuf_pop;
|
||||||
|
`endif
|
||||||
|
|
||||||
`ifdef DBG_TRACE_CORE_PIPELINE
|
`ifdef DBG_TRACE_CORE_PIPELINE
|
||||||
always @(posedge clk) begin
|
always @(posedge clk) begin
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ module VX_fetch import VX_gpu_pkg::*; #(
|
|||||||
);
|
);
|
||||||
`UNUSED_PARAM (CORE_ID)
|
`UNUSED_PARAM (CORE_ID)
|
||||||
`UNUSED_VAR (reset)
|
`UNUSED_VAR (reset)
|
||||||
localparam ISW_WIDTH = `LOG2UP(`ISSUE_WIDTH);
|
|
||||||
|
|
||||||
wire icache_req_valid;
|
wire icache_req_valid;
|
||||||
wire [ICACHE_ADDR_WIDTH-1:0] icache_req_addr;
|
wire [ICACHE_ADDR_WIDTH-1:0] icache_req_addr;
|
||||||
@@ -44,8 +43,6 @@ module VX_fetch import VX_gpu_pkg::*; #(
|
|||||||
|
|
||||||
wire icache_req_fire = icache_req_valid && icache_req_ready;
|
wire icache_req_fire = icache_req_valid && icache_req_ready;
|
||||||
|
|
||||||
wire [ISW_WIDTH-1:0] schedule_isw = wid_to_isw(schedule_if.data.wid);
|
|
||||||
|
|
||||||
assign req_tag = schedule_if.data.wid;
|
assign req_tag = schedule_if.data.wid;
|
||||||
|
|
||||||
assign {rsp_uuid, rsp_tag} = icache_bus_if.rsp_data.tag;
|
assign {rsp_uuid, rsp_tag} = icache_bus_if.rsp_data.tag;
|
||||||
@@ -68,9 +65,12 @@ module VX_fetch import VX_gpu_pkg::*; #(
|
|||||||
.rdata ({rsp_PC, rsp_tmask})
|
.rdata ({rsp_PC, rsp_tmask})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
`ifndef L1_ENABLE
|
||||||
// Ensure that the ibuffer doesn't fill up.
|
// Ensure that the ibuffer doesn't fill up.
|
||||||
// This resolves potential deadlock if ibuffer fills and the LSU stalls the execute stage due to pending dcache request.
|
// This resolves potential deadlock if ibuffer fills and the LSU stalls the execute stage due to pending dcache request.
|
||||||
// This issue is particularly prevalent when the icache and dcache is disabled and both requests share the same bus.
|
// This issue is particularly prevalent when the icache and dcache is disabled and both requests share the same bus.
|
||||||
|
wire [ISSUE_ISW-1:0] schedule_isw = wid_to_isw(schedule_if.data.wid);
|
||||||
|
|
||||||
wire [`ISSUE_WIDTH-1:0] pending_ibuf_full;
|
wire [`ISSUE_WIDTH-1:0] pending_ibuf_full;
|
||||||
for (genvar i = 0; i < `ISSUE_WIDTH; ++i) begin
|
for (genvar i = 0; i < `ISSUE_WIDTH; ++i) begin
|
||||||
VX_pending_size #(
|
VX_pending_size #(
|
||||||
@@ -85,13 +85,16 @@ module VX_fetch import VX_gpu_pkg::*; #(
|
|||||||
`UNUSED_PIN (empty)
|
`UNUSED_PIN (empty)
|
||||||
);
|
);
|
||||||
end
|
end
|
||||||
|
wire ibuf_ready = ~pending_ibuf_full[schedule_isw];
|
||||||
|
`else
|
||||||
|
wire ibuf_ready = 1'b1;
|
||||||
|
`endif
|
||||||
|
|
||||||
`RUNTIME_ASSERT((!schedule_if.valid || schedule_if.data.PC != 0),
|
`RUNTIME_ASSERT((!schedule_if.valid || schedule_if.data.PC != 0),
|
||||||
("%t: *** invalid PC=0x%0h, wid=%0d, tmask=%b (#%0d)", $time, schedule_if.data.PC, schedule_if.data.wid, schedule_if.data.tmask, schedule_if.data.uuid))
|
("%t: *** invalid PC=0x%0h, wid=%0d, tmask=%b (#%0d)", $time, schedule_if.data.PC, schedule_if.data.wid, schedule_if.data.tmask, schedule_if.data.uuid))
|
||||||
|
|
||||||
// Icache Request
|
// Icache Request
|
||||||
|
|
||||||
wire ibuf_ready = ~pending_ibuf_full[schedule_isw];
|
|
||||||
assign icache_req_valid = schedule_if.valid && ibuf_ready;
|
assign icache_req_valid = schedule_if.valid && ibuf_ready;
|
||||||
assign icache_req_addr = schedule_if.data.PC[`MEM_ADDR_WIDTH-1:2];
|
assign icache_req_addr = schedule_if.data.PC[`MEM_ADDR_WIDTH-1:2];
|
||||||
assign icache_req_tag = {schedule_if.data.uuid, req_tag};
|
assign icache_req_tag = {schedule_if.data.uuid, req_tag};
|
||||||
|
|||||||
@@ -66,8 +66,9 @@ module VX_ibuffer import VX_gpu_pkg::*; #(
|
|||||||
.valid_out (ibuffer_if[i].valid),
|
.valid_out (ibuffer_if[i].valid),
|
||||||
.ready_out(ibuffer_if[i].ready)
|
.ready_out(ibuffer_if[i].ready)
|
||||||
);
|
);
|
||||||
|
`ifndef L1_ENABLE
|
||||||
assign decode_if.ibuf_pop[i] = ibuffer_if[i].valid && ibuffer_if[i].ready;
|
assign decode_if.ibuf_pop[i] = ibuffer_if[i].valid && ibuffer_if[i].ready;
|
||||||
|
`endif
|
||||||
end
|
end
|
||||||
|
|
||||||
endmodule
|
endmodule
|
||||||
|
|||||||
@@ -36,21 +36,26 @@ interface VX_decode_if ();
|
|||||||
logic valid;
|
logic valid;
|
||||||
data_t data;
|
data_t data;
|
||||||
logic ready;
|
logic ready;
|
||||||
|
`ifndef L1_ENABLE
|
||||||
wire [`ISSUE_WIDTH-1:0] ibuf_pop;
|
logic [`ISSUE_WIDTH-1:0] ibuf_pop;
|
||||||
|
`endif
|
||||||
|
|
||||||
modport master (
|
modport master (
|
||||||
output valid,
|
output valid,
|
||||||
output data,
|
output data,
|
||||||
input ibuf_pop,
|
|
||||||
input ready
|
input ready
|
||||||
|
`ifndef L1_ENABLE
|
||||||
|
, input ibuf_pop
|
||||||
|
`endif
|
||||||
);
|
);
|
||||||
|
|
||||||
modport slave (
|
modport slave (
|
||||||
input valid,
|
input valid,
|
||||||
input data,
|
input data,
|
||||||
output ibuf_pop,
|
|
||||||
output ready
|
output ready
|
||||||
|
`ifndef L1_ENABLE
|
||||||
|
, output ibuf_pop
|
||||||
|
`endif
|
||||||
);
|
);
|
||||||
|
|
||||||
endinterface
|
endinterface
|
||||||
|
|||||||
@@ -26,21 +26,26 @@ interface VX_fetch_if ();
|
|||||||
logic valid;
|
logic valid;
|
||||||
data_t data;
|
data_t data;
|
||||||
logic ready;
|
logic ready;
|
||||||
|
`ifndef L1_ENABLE
|
||||||
logic [`ISSUE_WIDTH-1:0] ibuf_pop;
|
logic [`ISSUE_WIDTH-1:0] ibuf_pop;
|
||||||
|
`endif
|
||||||
|
|
||||||
modport master (
|
modport master (
|
||||||
output valid,
|
output valid,
|
||||||
output data,
|
output data,
|
||||||
input ibuf_pop,
|
|
||||||
input ready
|
input ready
|
||||||
|
`ifndef L1_ENABLE
|
||||||
|
, input ibuf_pop
|
||||||
|
`endif
|
||||||
);
|
);
|
||||||
|
|
||||||
modport slave (
|
modport slave (
|
||||||
input valid,
|
input valid,
|
||||||
input data,
|
input data,
|
||||||
output ibuf_pop,
|
|
||||||
output ready
|
output ready
|
||||||
|
`ifndef L1_ENABLE
|
||||||
|
, output ibuf_pop
|
||||||
|
`endif
|
||||||
);
|
);
|
||||||
|
|
||||||
endinterface
|
endinterface
|
||||||
|
|||||||
Reference in New Issue
Block a user