minor update
This commit is contained in:
@@ -110,10 +110,11 @@ module VX_ibuffer #(
|
|||||||
|
|
||||||
// schedule the next instruction to issue
|
// schedule the next instruction to issue
|
||||||
always @(*) begin
|
always @(*) begin
|
||||||
|
deq_valid_n = enq_fire;
|
||||||
|
deq_wid_n = decode_if.wid;
|
||||||
|
deq_instr_n = q_data_in;
|
||||||
if (num_warps > 1) begin
|
if (num_warps > 1) begin
|
||||||
deq_valid_n = 1;
|
deq_valid_n = 1;
|
||||||
deq_wid_n = 'x;
|
|
||||||
deq_instr_n = 'x;
|
|
||||||
for (integer i = `NUM_WARPS-1; i >= 0; --i) begin
|
for (integer i = `NUM_WARPS-1; i >= 0; --i) begin
|
||||||
if (schedule_table[i]) begin
|
if (schedule_table[i]) begin
|
||||||
deq_wid_n = `NW_BITS'(i);
|
deq_wid_n = `NW_BITS'(i);
|
||||||
@@ -124,17 +125,12 @@ module VX_ibuffer #(
|
|||||||
deq_valid_n = 1;
|
deq_valid_n = 1;
|
||||||
deq_wid_n = deq_wid;
|
deq_wid_n = deq_wid;
|
||||||
deq_instr_n = deq_fire ? q_data_prev[deq_wid] : q_data_out[deq_wid];
|
deq_instr_n = deq_fire ? q_data_prev[deq_wid] : q_data_out[deq_wid];
|
||||||
end else begin
|
|
||||||
deq_valid_n = enq_fire;
|
|
||||||
deq_wid_n = decode_if.wid;
|
|
||||||
deq_instr_n = q_data_in;
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
// do round-robin scheduling with multiple active warps
|
// do round-robin scheduling with multiple active warps
|
||||||
always @(*) begin
|
always @(*) begin
|
||||||
if (1 == $countones(schedule_table)
|
if ($countones(schedule_table) <= 1) begin
|
||||||
|| (num_warps < 2)) begin
|
|
||||||
schedule_table_n = valid_table_n;
|
schedule_table_n = valid_table_n;
|
||||||
end else begin
|
end else begin
|
||||||
schedule_table_n = schedule_table;
|
schedule_table_n = schedule_table;
|
||||||
@@ -150,6 +146,7 @@ module VX_ibuffer #(
|
|||||||
valid_table <= 0;
|
valid_table <= 0;
|
||||||
deq_valid <= 0;
|
deq_valid <= 0;
|
||||||
num_warps <= 0;
|
num_warps <= 0;
|
||||||
|
schedule_table <= 0;
|
||||||
end else begin
|
end else begin
|
||||||
valid_table <= valid_table_n;
|
valid_table <= valid_table_n;
|
||||||
deq_valid <= deq_valid_n;
|
deq_valid <= deq_valid_n;
|
||||||
|
|||||||
37
hw/rtl/cache/VX_nc_bypass.v
vendored
37
hw/rtl/cache/VX_nc_bypass.v
vendored
@@ -264,33 +264,18 @@ module VX_nc_bypass #(
|
|||||||
|
|
||||||
if (NUM_REQS > 1) begin
|
if (NUM_REQS > 1) begin
|
||||||
wire [CORE_REQ_TIDW-1:0] rsp_tid = mem_rsp_tag_in[(CORE_TAG_WIDTH + D) +: CORE_REQ_TIDW];
|
wire [CORE_REQ_TIDW-1:0] rsp_tid = mem_rsp_tag_in[(CORE_TAG_WIDTH + D) +: CORE_REQ_TIDW];
|
||||||
if (NUM_RSP_TAGS > 1) begin
|
always @(*) begin
|
||||||
always @(*) begin
|
if (is_mem_rsp_nc) begin
|
||||||
if (is_mem_rsp_nc) begin
|
core_rsp_valid_out_r = 0;
|
||||||
core_rsp_valid_out_r = 0;
|
core_rsp_valid_out_r[rsp_tid] = 1;
|
||||||
core_rsp_valid_out_r[rsp_tid] = 1;
|
for (integer i = 0; i < NUM_RSP_TAGS; ++i) begin
|
||||||
for (integer i = 0; i < NUM_REQS; ++i) begin
|
core_rsp_tag_out_r[i] = mem_rsp_tag_in[CORE_TAG_WIDTH-1:0];
|
||||||
core_rsp_tag_out_r[i] = mem_rsp_tag_in[CORE_TAG_WIDTH-1:0];
|
|
||||||
end
|
|
||||||
core_rsp_ready_in_r = 0;
|
|
||||||
end else begin
|
|
||||||
core_rsp_valid_out_r = core_rsp_valid_in;
|
|
||||||
core_rsp_tag_out_r = core_rsp_tag_in;
|
|
||||||
core_rsp_ready_in_r = core_rsp_ready_out;
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end else begin
|
|
||||||
always @(*) begin
|
|
||||||
if (is_mem_rsp_nc) begin
|
|
||||||
core_rsp_valid_out_r = 0;
|
|
||||||
core_rsp_valid_out_r[rsp_tid] = 1;
|
|
||||||
core_rsp_tag_out_r = mem_rsp_tag_in[CORE_TAG_WIDTH-1:0];
|
|
||||||
core_rsp_ready_in_r = 0;
|
|
||||||
end else begin
|
|
||||||
core_rsp_valid_out_r = core_rsp_valid_in;
|
|
||||||
core_rsp_tag_out_r = core_rsp_tag_in;
|
|
||||||
core_rsp_ready_in_r = core_rsp_ready_out;
|
|
||||||
end
|
end
|
||||||
|
core_rsp_ready_in_r = 0;
|
||||||
|
end else begin
|
||||||
|
core_rsp_valid_out_r = core_rsp_valid_in;
|
||||||
|
core_rsp_tag_out_r = core_rsp_tag_in;
|
||||||
|
core_rsp_ready_in_r = core_rsp_ready_out;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end else begin
|
end else begin
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ module VX_onehot_encoder #(
|
|||||||
end
|
end
|
||||||
|
|
||||||
assign data_out = addr[levels_lp][`LOG2UP(N)-1:0];
|
assign data_out = addr[levels_lp][`LOG2UP(N)-1:0];
|
||||||
assign valid = (| data_in);
|
assign valid = v[levels_lp][0];
|
||||||
`IGNORE_WARNINGS_END
|
`IGNORE_WARNINGS_END
|
||||||
end else begin
|
end else begin
|
||||||
|
|
||||||
|
|||||||
@@ -22,10 +22,10 @@ module VX_stream_arbiter #(
|
|||||||
localparam LOG_NUM_REQS = $clog2(NUM_REQS);
|
localparam LOG_NUM_REQS = $clog2(NUM_REQS);
|
||||||
|
|
||||||
if (NUM_REQS > 1) begin
|
if (NUM_REQS > 1) begin
|
||||||
wire sel_enable;
|
|
||||||
wire sel_valid;
|
wire sel_valid;
|
||||||
|
wire sel_ready;
|
||||||
wire [LOG_NUM_REQS-1:0] sel_idx;
|
wire [LOG_NUM_REQS-1:0] sel_idx;
|
||||||
wire [NUM_REQS-1:0] sel_1hot;
|
wire [NUM_REQS-1:0] sel_1hot;
|
||||||
|
|
||||||
if (TYPE == "X") begin
|
if (TYPE == "X") begin
|
||||||
VX_fixed_arbiter #(
|
VX_fixed_arbiter #(
|
||||||
@@ -35,7 +35,7 @@ module VX_stream_arbiter #(
|
|||||||
.clk (clk),
|
.clk (clk),
|
||||||
.reset (reset),
|
.reset (reset),
|
||||||
.requests (valid_in),
|
.requests (valid_in),
|
||||||
.enable (sel_enable),
|
.enable (sel_ready),
|
||||||
.grant_valid (sel_valid),
|
.grant_valid (sel_valid),
|
||||||
.grant_index (sel_idx),
|
.grant_index (sel_idx),
|
||||||
.grant_onehot (sel_1hot)
|
.grant_onehot (sel_1hot)
|
||||||
@@ -48,7 +48,7 @@ module VX_stream_arbiter #(
|
|||||||
.clk (clk),
|
.clk (clk),
|
||||||
.reset (reset),
|
.reset (reset),
|
||||||
.requests (valid_in),
|
.requests (valid_in),
|
||||||
.enable (sel_enable),
|
.enable (sel_ready),
|
||||||
.grant_valid (sel_valid),
|
.grant_valid (sel_valid),
|
||||||
.grant_index (sel_idx),
|
.grant_index (sel_idx),
|
||||||
.grant_onehot (sel_1hot)
|
.grant_onehot (sel_1hot)
|
||||||
@@ -61,7 +61,7 @@ module VX_stream_arbiter #(
|
|||||||
.clk (clk),
|
.clk (clk),
|
||||||
.reset (reset),
|
.reset (reset),
|
||||||
.requests (valid_in),
|
.requests (valid_in),
|
||||||
.enable (sel_enable),
|
.enable (sel_ready),
|
||||||
.grant_valid (sel_valid),
|
.grant_valid (sel_valid),
|
||||||
.grant_index (sel_idx),
|
.grant_index (sel_idx),
|
||||||
.grant_onehot (sel_1hot)
|
.grant_onehot (sel_1hot)
|
||||||
@@ -74,7 +74,7 @@ module VX_stream_arbiter #(
|
|||||||
.clk (clk),
|
.clk (clk),
|
||||||
.reset (reset),
|
.reset (reset),
|
||||||
.requests (valid_in),
|
.requests (valid_in),
|
||||||
.enable (sel_enable),
|
.enable (sel_ready),
|
||||||
.grant_valid (sel_valid),
|
.grant_valid (sel_valid),
|
||||||
.grant_index (sel_idx),
|
.grant_index (sel_idx),
|
||||||
.grant_onehot (sel_1hot)
|
.grant_onehot (sel_1hot)
|
||||||
@@ -83,8 +83,6 @@ module VX_stream_arbiter #(
|
|||||||
$error ("invalid parameter");
|
$error ("invalid parameter");
|
||||||
end
|
end
|
||||||
|
|
||||||
wire ready_in_sel;
|
|
||||||
|
|
||||||
VX_skid_buffer #(
|
VX_skid_buffer #(
|
||||||
.DATAW (DATAW),
|
.DATAW (DATAW),
|
||||||
.PASSTHRU (!BUFFERED)
|
.PASSTHRU (!BUFFERED)
|
||||||
@@ -93,16 +91,14 @@ module VX_stream_arbiter #(
|
|||||||
.reset (reset),
|
.reset (reset),
|
||||||
.valid_in (sel_valid),
|
.valid_in (sel_valid),
|
||||||
.data_in (data_in[sel_idx]),
|
.data_in (data_in[sel_idx]),
|
||||||
.ready_in (ready_in_sel),
|
.ready_in (sel_ready),
|
||||||
.valid_out (valid_out),
|
.valid_out (valid_out),
|
||||||
.data_out (data_out),
|
.data_out (data_out),
|
||||||
.ready_out (ready_out)
|
.ready_out (ready_out)
|
||||||
);
|
);
|
||||||
|
|
||||||
assign sel_enable = ready_in_sel;
|
|
||||||
|
|
||||||
for (genvar i = 0; i < NUM_REQS; i++) begin
|
for (genvar i = 0; i < NUM_REQS; i++) begin
|
||||||
assign ready_in[i] = sel_1hot[i] && ready_in_sel;
|
assign ready_in[i] = sel_1hot[i] && sel_ready;
|
||||||
end
|
end
|
||||||
|
|
||||||
end else begin
|
end else begin
|
||||||
|
|||||||
Reference in New Issue
Block a user