diff --git a/doc/integration.rst b/doc/integration.rst index 5d2d9d6d..254d3f47 100644 --- a/doc/integration.rst +++ b/doc/integration.rst @@ -125,6 +125,16 @@ Parameters Any parameter marked *EXPERIMENTAL* when enabled is not verified to the same standard as the rest of the Ibex core. +Note that Ibex uses SystemVerilog enum parameters e.g. for ``RV32M`` and ``RV32B``. +This is well supported by most tools but some care is needed when overriding these parameters at the top level: + +* Synopsys VCS does not support overriding enum and string parameters at the top level via command line. + As a workaround, SystemVerilog defines are used in Ibex top level files simulated with VCS. + These defines can be set via command line. + +* Yosys does not support overriding enum parameters at the top level by setting enum names. + Instead, the enum values need to be used. + Interfaces ---------- diff --git a/dv/uvm/core_ibex/tb/core_ibex_tb_top.sv b/dv/uvm/core_ibex/tb/core_ibex_tb_top.sv index 34603c29..6581369b 100644 --- a/dv/uvm/core_ibex/tb/core_ibex_tb_top.sv +++ b/dv/uvm/core_ibex/tb/core_ibex_tb_top.sv @@ -29,8 +29,10 @@ module core_ibex_tb_top; // CSR access interface core_ibex_csr_if csr_if(.clk(clk)); - // You cannot override string parameters in VCS via the command line so a `define is used instead - // that can be set from the command line. If no value has been specified this gives a default. + // VCS does not support overriding enum and string parameters via command line. Instead, a + // `define is used that can be set from the command line. If no value has been specified, this + // gives a default. Other simulators don't take the detour via `define and can override the + // corresponding parameters directly. `ifndef IBEX_CFG_RV32M `define IBEX_CFG_RV32M ibex_pkg::RV32MFast `endif diff --git a/examples/simple_system/rtl/ibex_simple_system.sv b/examples/simple_system/rtl/ibex_simple_system.sv index 3af4dbac..6a4769a3 100644 --- a/examples/simple_system/rtl/ibex_simple_system.sv +++ b/examples/simple_system/rtl/ibex_simple_system.sv @@ -2,6 +2,10 @@ // Licensed under the Apache License, Version 2.0, see LICENSE for details. // SPDX-License-Identifier: Apache-2.0 +// VCS does not support overriding enum and string parameters via command line. Instead, a `define +// is used that can be set from the command line. If no value has been specified, this gives a +// default. Other simulators don't take the detour via `define and can override the corresponding +// parameters directly. `ifndef RV32M `define RV32M ibex_pkg::RV32MFast `endif