Skip to content

Commit

Permalink
diff: fix dpi_perfCtrl_clean
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaokamikami committed Nov 25, 2024
1 parent 9af8f51 commit 0d42b8c
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions src/test/vsrc/vcs/DifftestEndpoint.v
Original file line number Diff line number Diff line change
Expand Up @@ -185,27 +185,21 @@ initial begin
end
end

reg dpi_perfCtrl_clean;
reg dpic_perfCtrl_clean;
assign difftest_logCtrl_begin = difftest_logCtrl_begin_r;
assign difftest_logCtrl_end = difftest_logCtrl_end_r;
assign difftest_logCtrl_level = 0;
assign difftest_perfCtrl_clean = dpi_perfCtrl_clean;
assign difftest_perfCtrl_clean = dpic_perfCtrl_clean;
assign difftest_uart_in_ch = 8'hff;

export "DPI-C" task clear_perfcnt;
task clear_perfcnt();
dpi_perfCtrl_clean <= 1'b1;
dpic_perfCtrl_clean = 1'b1;
endtask

always @(posedge clock) begin
if (reset) begin
dpi_perfCtrl_clean <= 1'b0;
end else begin
if (dpi_perfCtrl_clean) begin
dpi_perfCtrl_clean <= 1'b0;
$display("claer perfCnt");
end
end
if (dpic_perfCtrl_clean == 1'b1)
dpic_perfCtrl_clean = 1'b0;
end

always @(posedge clock) begin
Expand Down

0 comments on commit 0d42b8c

Please sign in to comment.