Skip to content

Transparently support Verilator v4 and v5.

Created by: zchamski

This PR provides transparent support for Verilator v4 and v5 at the Verilator C++ testbench level.

Appropriate headers and data structure accesses are selected depending on the value of C++ macro VERILATOR_VERSION_INTEGER:

  • In Verilator v4 this macro is not defined and therefore, evaluates to 0 if used in arithmetic context.
  • In Verilator v5 it takes a value that is greater or equal to 5 million (the formula is "major_version * 1000000 + minor_version * 1000 + patch_level".)

There is no need to force the --no-timing option to Verilator in the CVA6 Makefile. Instead, an appropriate definition of the Makefile variable verilator can be provided by the core-v-verif infrastructure depending on the Verilator version used.

Merge request reports

Loading