scoreboard optimization & profiling
This commit is contained in:
@@ -19,6 +19,10 @@ module VX_schedule import VX_gpu_pkg::*; #(
|
||||
input wire clk,
|
||||
input wire reset,
|
||||
|
||||
`ifdef PERF_ENABLE
|
||||
VX_pipeline_perf_if.schedule perf_schedule_if,
|
||||
`endif
|
||||
|
||||
// configuration
|
||||
input base_dcrs_t base_dcrs,
|
||||
|
||||
@@ -376,4 +380,21 @@ module VX_schedule import VX_gpu_pkg::*; #(
|
||||
end
|
||||
`RUNTIME_ASSERT(timeout_ctr < `STALL_TIMEOUT, ("%t: *** core%0d-scheduler-timeout: stalled_warps=%b", $time, CORE_ID, stalled_warps));
|
||||
|
||||
`ifdef PERF_ENABLE
|
||||
reg [`PERF_CTR_BITS-1:0] perf_sched_stalls;
|
||||
reg [`PERF_CTR_BITS-1:0] perf_fetch_stalls;
|
||||
always @(posedge clk) begin
|
||||
if (reset) begin
|
||||
perf_sched_stalls <= '0;
|
||||
perf_fetch_stalls <= '0;
|
||||
end else begin
|
||||
perf_sched_stalls <= perf_sched_stalls + `PERF_CTR_BITS'(!schedule_valid);
|
||||
perf_fetch_stalls <= perf_fetch_stalls + `PERF_CTR_BITS'(schedule_if.valid && !schedule_if.ready);
|
||||
end
|
||||
end
|
||||
|
||||
assign perf_schedule_if.sched_stalls = perf_sched_stalls;
|
||||
assign perf_schedule_if.fetch_stalls = perf_fetch_stalls;
|
||||
`endif
|
||||
|
||||
endmodule
|
||||
|
||||
Reference in New Issue
Block a user