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 13, 2024
1 parent 5551e68 commit 6d3c7a6
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 @@ -94,7 +94,7 @@ module ibex_top_tracing import ibex_pkg::*; import cheri_pkg::*; #(
output logic alert_major_bus_o
);


`ifdef RVFI
logic rvfi_valid;
logic [63:0] rvfi_order;
logic [31:0] rvfi_insn;
Expand Down Expand Up @@ -140,6 +140,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

ibexc_top #(
.DmHaltAddr (DmHaltAddr ),
Expand Down Expand Up @@ -263,10 +264,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 6d3c7a6

Please sign in to comment.