Skip to content

Commit 5da1679

Browse files
Razer6rswarbrick
authored andcommitted
[ibex_tracer] Use static variables in always/final blocks
Signed-off-by: Robert Schilling <[email protected]>
1 parent 4d722d3 commit 5da1679

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

rtl/ibex_tracer.sv

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -740,19 +740,18 @@ module ibex_tracer (
740740
// as a blocking assignment to xx. They then complain about the mixture with that an the
741741
// non-blocking assignment we use when opening the file. The bug is fixed with recent versions
742742
// of Verilator, but this hack is probably worth it for now.
743-
int fh = file_handle;
743+
static int fh = file_handle;
744744
$fclose(fh);
745745
end
746746
end
747747

748748
// log execution
749749
always @(posedge clk_i) begin
750750
if (rvfi_valid && trace_log_enable) begin
751-
752-
int fh = file_handle;
751+
static int fh = file_handle;
753752

754753
if (fh == 32'h0) begin
755-
string file_name_base = "trace_core";
754+
static string file_name_base = "trace_core";
756755
void'($value$plusargs("ibex_tracer_file_base=%s", file_name_base));
757756
$sformat(file_name, "%s_%h.log", file_name_base, hart_id_i);
758757

0 commit comments

Comments
 (0)