minor update
This commit is contained in:
@@ -39,10 +39,8 @@ module VX_warp_sched #(
|
|||||||
// wspawn
|
// wspawn
|
||||||
reg [31:0] use_wspawn_pc;
|
reg [31:0] use_wspawn_pc;
|
||||||
reg [`NUM_WARPS-1:0] use_wspawn;
|
reg [`NUM_WARPS-1:0] use_wspawn;
|
||||||
|
reg [`NW_BITS-1:0] scheduled_warp;
|
||||||
reg [31:0] warp_pc;
|
wire warp_scheduled;
|
||||||
reg [`NW_BITS-1:0] warp_to_schedule;
|
|
||||||
wire scheduled_warp;
|
|
||||||
|
|
||||||
reg didnt_split;
|
reg didnt_split;
|
||||||
|
|
||||||
@@ -63,8 +61,8 @@ module VX_warp_sched #(
|
|||||||
if (warp_ctl_if.valid && warp_ctl_if.tmc.valid) begin
|
if (warp_ctl_if.valid && warp_ctl_if.tmc.valid) begin
|
||||||
schedule_table_n[warp_ctl_if.wid] = (warp_ctl_if.tmc.tmask != 0);
|
schedule_table_n[warp_ctl_if.wid] = (warp_ctl_if.tmc.tmask != 0);
|
||||||
end
|
end
|
||||||
if (scheduled_warp) begin // remove scheduled warp (round-robin)
|
if (warp_scheduled) begin // remove scheduled warp (round-robin)
|
||||||
schedule_table_n[warp_to_schedule] = 0;
|
schedule_table_n[scheduled_warp] = 0;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -122,9 +120,9 @@ module VX_warp_sched #(
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if (use_wspawn[warp_to_schedule] && scheduled_warp) begin
|
if (use_wspawn[scheduled_warp] && warp_scheduled) begin
|
||||||
use_wspawn[warp_to_schedule] <= 0;
|
use_wspawn[scheduled_warp] <= 0;
|
||||||
thread_masks[warp_to_schedule] <= 1;
|
thread_masks[scheduled_warp] <= 1;
|
||||||
end
|
end
|
||||||
|
|
||||||
// Stalling the scheduling of warps
|
// Stalling the scheduling of warps
|
||||||
@@ -141,8 +139,8 @@ module VX_warp_sched #(
|
|||||||
end
|
end
|
||||||
|
|
||||||
// Lock warp until instruction decode to resolve branches
|
// Lock warp until instruction decode to resolve branches
|
||||||
if (scheduled_warp) begin
|
if (warp_scheduled) begin
|
||||||
fetch_lock[warp_to_schedule] <= 1;
|
fetch_lock[scheduled_warp] <= 1;
|
||||||
end
|
end
|
||||||
if (ifetch_rsp_fire) begin
|
if (ifetch_rsp_fire) begin
|
||||||
fetch_lock[ifetch_rsp_if.wid] <= 0;
|
fetch_lock[ifetch_rsp_if.wid] <= 0;
|
||||||
@@ -207,8 +205,9 @@ module VX_warp_sched #(
|
|||||||
|
|
||||||
// calculate next warp schedule
|
// calculate next warp schedule
|
||||||
|
|
||||||
reg schedule_valid;
|
|
||||||
reg [`NUM_THREADS-1:0] thread_mask;
|
reg [`NUM_THREADS-1:0] thread_mask;
|
||||||
|
reg schedule_valid;
|
||||||
|
reg [31:0] warp_pc;
|
||||||
|
|
||||||
wire [`NUM_WARPS-1:0] schedule_ready = schedule_table & ~(stalled_warps | total_barrier_stall | fetch_lock);
|
wire [`NUM_WARPS-1:0] schedule_ready = schedule_table & ~(stalled_warps | total_barrier_stall | fetch_lock);
|
||||||
|
|
||||||
@@ -216,13 +215,13 @@ module VX_warp_sched #(
|
|||||||
schedule_valid = 0;
|
schedule_valid = 0;
|
||||||
thread_mask = 'x;
|
thread_mask = 'x;
|
||||||
warp_pc = 'x;
|
warp_pc = 'x;
|
||||||
warp_to_schedule = 'x;
|
scheduled_warp = 'x;
|
||||||
for (integer i = 0; i < `NUM_WARPS; ++i) begin
|
for (integer i = 0; i < `NUM_WARPS; ++i) begin
|
||||||
if (schedule_ready[i]) begin
|
if (schedule_ready[i]) begin
|
||||||
schedule_valid = 1;
|
schedule_valid = 1;
|
||||||
thread_mask = use_wspawn[i] ? `NUM_THREADS'(1) : thread_masks[i];
|
thread_mask = use_wspawn[i] ? `NUM_THREADS'(1) : thread_masks[i];
|
||||||
warp_pc = use_wspawn[i] ? use_wspawn_pc : warp_pcs[i];
|
warp_pc = use_wspawn[i] ? use_wspawn_pc : warp_pcs[i];
|
||||||
warp_to_schedule = `NW_BITS'(i);
|
scheduled_warp = `NW_BITS'(i);
|
||||||
break;
|
break;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -230,7 +229,7 @@ module VX_warp_sched #(
|
|||||||
|
|
||||||
wire stall_out = ~ifetch_req_if.ready && ifetch_req_if.valid;
|
wire stall_out = ~ifetch_req_if.ready && ifetch_req_if.valid;
|
||||||
|
|
||||||
assign scheduled_warp = schedule_valid && ~stall_out;
|
assign warp_scheduled = schedule_valid && ~stall_out;
|
||||||
|
|
||||||
VX_pipe_register #(
|
VX_pipe_register #(
|
||||||
.DATAW (1 + `NUM_THREADS + 32 + `NW_BITS),
|
.DATAW (1 + `NUM_THREADS + 32 + `NW_BITS),
|
||||||
@@ -239,17 +238,17 @@ module VX_warp_sched #(
|
|||||||
.clk (clk),
|
.clk (clk),
|
||||||
.reset (reset),
|
.reset (reset),
|
||||||
.enable (!stall_out),
|
.enable (!stall_out),
|
||||||
.data_in ({scheduled_warp, thread_mask, warp_pc, warp_to_schedule}),
|
.data_in ({warp_scheduled, thread_mask, warp_pc, scheduled_warp}),
|
||||||
.data_out ({ifetch_req_if.valid, ifetch_req_if.tmask, ifetch_req_if.PC, ifetch_req_if.wid})
|
.data_out ({ifetch_req_if.valid, ifetch_req_if.tmask, ifetch_req_if.PC, ifetch_req_if.wid})
|
||||||
);
|
);
|
||||||
|
|
||||||
assign busy = (active_warps != 0);
|
assign busy = (active_warps != 0);
|
||||||
|
|
||||||
`SCOPE_ASSIGN (wsched_scheduled_warp, scheduled_warp);
|
`SCOPE_ASSIGN (wsched_scheduled_warp, warp_scheduled);
|
||||||
`SCOPE_ASSIGN (wsched_active_warps, active_warps);
|
`SCOPE_ASSIGN (wsched_active_warps, active_warps);
|
||||||
`SCOPE_ASSIGN (wsched_schedule_table, schedule_table);
|
`SCOPE_ASSIGN (wsched_schedule_table, schedule_table);
|
||||||
`SCOPE_ASSIGN (wsched_schedule_ready, schedule_ready);
|
`SCOPE_ASSIGN (wsched_schedule_ready, schedule_ready);
|
||||||
`SCOPE_ASSIGN (wsched_warp_to_schedule, warp_to_schedule);
|
`SCOPE_ASSIGN (wsched_warp_to_schedule, scheduled_warp);
|
||||||
`SCOPE_ASSIGN (wsched_warp_pc, warp_pc);
|
`SCOPE_ASSIGN (wsched_warp_pc, warp_pc);
|
||||||
|
|
||||||
endmodule
|
endmodule
|
||||||
Reference in New Issue
Block a user