Skip to content

Commit

Permalink
Allow RVFI to be unset
Browse files Browse the repository at this point in the history
This change enables one to leave RVFI unset. When this is done,
ibexc_top_tracing is equivilant to ibexc_top, which is useful when using
the same module hierachy for both simulation and synthesis.
  • Loading branch information
HU90m committed Mar 20, 2024
1 parent cc0602f commit beb71aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
3 changes: 0 additions & 3 deletions ibex_top_tracing.core
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ parameters:
RVFI:
datatype: bool
paramtype: vlogdefine
default: true

SYNTHESIS:
datatype: bool
Expand Down Expand Up @@ -111,8 +110,6 @@ targets:
default: &default_target
filesets:
- files_rtl
parameters:
- RVFI=true
toplevel: ibex_top_tracing

lint:
Expand Down
7 changes: 2 additions & 5 deletions rtl/ibexc_top_tracing.sv
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ module ibex_top_tracing import ibex_pkg::*; import cheri_pkg::*; #(
input logic scan_rst_ni
);


`ifdef RVFI
logic rvfi_valid;
logic [63:0] rvfi_order;
logic [31:0] rvfi_insn;
Expand Down Expand Up @@ -142,6 +142,7 @@ module ibex_top_tracing import ibex_pkg::*; import cheri_pkg::*; #(
assign unused_rvfi_ext_nmi = rvfi_ext_nmi;
assign unused_rvfi_ext_debug_req = rvfi_ext_debug_req;
assign unused_rvfi_ext_mcycle = rvfi_ext_mcycle;
`endif

ibex_top #(
.DmHaltAddr (DmHaltAddr ),
Expand Down Expand Up @@ -265,10 +266,6 @@ module ibex_top_tracing import ibex_pkg::*; import cheri_pkg::*; #(

// ibex_tracer relies on the signals from the RISC-V Formal Interface
// synthesis translate_off
`ifndef RVFI
$fatal("Fatal error: RVFI needs to be defined globally.");
`endif

`ifdef RVFI
ibex_tracer #(
.DataWidth (DataWidth)
Expand Down

0 comments on commit beb71aa

Please sign in to comment.