Skip to content

Commit

Permalink
[ibex_tracer] Use static variables in always/final blocks
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Schilling <rschilling@rivosinc.com>
  • Loading branch information
Razer6 authored and rswarbrick committed Jan 10, 2025
1 parent 4d722d3 commit 5da1679
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions rtl/ibex_tracer.sv
Original file line number Diff line number Diff line change
Expand Up @@ -740,19 +740,18 @@ module ibex_tracer (
// as a blocking assignment to xx. They then complain about the mixture with that an the
// non-blocking assignment we use when opening the file. The bug is fixed with recent versions
// of Verilator, but this hack is probably worth it for now.
int fh = file_handle;
static int fh = file_handle;
$fclose(fh);
end
end

// log execution
always @(posedge clk_i) begin
if (rvfi_valid && trace_log_enable) begin

int fh = file_handle;
static int fh = file_handle;

if (fh == 32'h0) begin
string file_name_base = "trace_core";
static string file_name_base = "trace_core";
void'($value$plusargs("ibex_tracer_file_base=%s", file_name_base));
$sformat(file_name, "%s_%h.log", file_name_base, hart_id_i);

Expand Down

0 comments on commit 5da1679

Please sign in to comment.