Doc support for overriding enum/string parameters at the top level

Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
This commit is contained in:
Pirmin Vogel 2020-08-20 09:46:00 +02:00
parent 2ef5e5e3f2
commit 4c3f1e8a3b
3 changed files with 18 additions and 2 deletions

View file

@ -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
----------

View file

@ -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

View file

@ -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