Skip to content

Commit

Permalink
vcs: fix on nodeferred workload-list
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaokamikami committed Feb 23, 2024
1 parent 6edd3a2 commit a25ab82
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/test/vsrc/vcs/top.v
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ DeferredControl deferred(
.step(difftest_step),
.simv_result(simv_result)
);
`else
reg [31:0] tarp;
`endif // CONFIG_DIFFTEST_DEFERRED_RESULT
`endif // TB_NO_DPIC

Expand Down Expand Up @@ -257,9 +259,16 @@ always @(posedge clock) begin
`else
else if (|difftest_step) begin
// check errors
if (simv_nstep(difftest_step)) begin
$display("DIFFTEST FAILED at cycle %d", n_cycles);
$finish();
if (tarp) begin
if (tarp == STATE_LIMIT_EXCEEDED && workload_list_en == 1'b1)begin
soft_rst_en <= 1'b1;
end
else begin
$display("DIFFTEST FAILED at cycle %d", n_cycles);
$finish();
end
end else begin
tarp <= simv_nstep(difftest_step);
end
end
`endif // CONFIG_DIFFTEST_DEFERRED_RESULT
Expand Down

0 comments on commit a25ab82

Please sign in to comment.