Skip to content

Arjan b pkg import

Created by: Silabs-ArjanB

Fix for #384 (closed) and #301

Furtermore I cleaned up the inconsistent and undesired dependence on defines. The following defines were assumed in the original code:

  • SYNTHESIS
  • VERILATOR
  • APU_TRACE
  • TRACE_EXECUTION
  • PULP_FPGA_EMUL

SYNTHESIS was used for

  • guarding non-synthesizble RTL (clock gate)
  • guarding $display statements
  • guarding $fatal statements
  • guarding assertions

VERILATOR was used for:

  • guarding (non-synthesizable) cv32e40p_tracer
  • guarding assertions

APU_TRACE was used for:

  • APU trace generation

TRACE_EXECUTION was used for:

  • trace generation

Now all this has been removed (except for the guard around assertions which will be removed soon as well as the assertions will move out of the RTL files).

The following was done to remove the dependency on defines and to not have behavioral code inside the RTL:

  • Moved behavioral tracer file and its package out of rtl directory to tb/core/cv32e40p_tracer.sv and tb/core/include/cv32e40p_tracer_pkg.sv respectively
  • Moved behavioral clock gate file out of rtl directory to (new) bhv directory
  • Moved $display parts out of RTL files into testbench (new file tb/core/cv32e40p_core_log.sv)
  • Moved APU trace part out of RTL into testbench (new file tb/core/cv32e40p_apu_tracer.sv)
  • Moved tracer instantiation out of RTL into testbench (notice that also Ibex moved this behavioral code out of there top level RTL)
  • Renamed TRACE_EXECUTION to CV32E40P_TRACE_EXECUTION
  • Renamed APU_TRACE to CV32E40P_APU_TRACE
  • Both FPGA and ASIC version of clock gate are now handled via manifest file (removed custom ifdefs from cv32e40p_sim_clock_gate.sv) (originally one target was handled via ifdef, the other one via manifest)
  • Guarded assertions by ifdef ASSERT_ON (and no longer by ifndef VERILATOR or `ifndef SYNTHESIS). The verification team is going to move assertions to separate files our of the rtl directory, after which also this final define will have been removed from the RTL (they can rename ASSERT_ON to something else and/or put the ifdefs around the bind commands instead) .
  • defines by localparam in various places

Merge request reports

Loading