core_wrapper: Use finished and !reset to determine termination

This commit is contained in:
Hansung Kim
2024-06-11 16:27:23 -07:00
parent de10d5a957
commit 5218292b6f

View File

@@ -495,15 +495,20 @@ module Vortex import VX_gpu_pkg::*; #(
// .busy(busy)
// );
always @(*) begin
if (busy === 1'b0) begin
$display("---------------- no more active warps ----------------");
always @(posedge clock) begin
if (!reset) begin
if (finished) begin
`ifdef SIMULATION
if ($time >= 60000) begin
$display("simulation has probably ended. exiting");
@(posedge clock) $finish();
end
$display("---------------- core%2d has no more active warps ----------------", CORE_ID);
$display("simulation has ended. exiting");
$finish();
`endif
// `ifdef SIMULATION
// if ($time >= 60000) begin
// $display("simulation has probably ended. exiting");
// @(posedge clock) $finish();
// end
// `endif
// TODO: lane assumed to be 4
// `ifndef SYNTHESIS
// for (integer j = 0; j < `NUM_WARPS; j++) begin
@@ -519,6 +524,7 @@ module Vortex import VX_gpu_pkg::*; #(
// @(posedge clock) $finish();
end
end
end
endmodule : Vortex