mirror of
https://github.com/openhwgroup/cve2.git
synced 2025-04-20 12:08:05 -04:00
Keep bit-manipulation extension control option as localparam (#55)
Signed-off-by: Szymon Bieganski <szymon.bieganski@oss.nxp.com> Co-authored-by: Szymon Bieganski <szymon.bieganski@oss.nxp.com>
This commit is contained in:
parent
e7559f327d
commit
2aa3bf8b2d
3 changed files with 9 additions and 13 deletions
|
@ -19,7 +19,6 @@ Instantiation Template
|
|||
.MHPMCounterWidth ( 40 ),
|
||||
.RV32E ( 0 ),
|
||||
.RV32M ( cve2_pkg::RV32MFast ),
|
||||
.RV32B ( cve2_pkg::RV32BNone ),
|
||||
.RegFile ( cve2_pkg::RegFileFF ),
|
||||
.ICache ( 0 ),
|
||||
.ICacheECC ( 0 ),
|
||||
|
@ -101,12 +100,6 @@ Parameters
|
|||
| | | | "cve2_pkg::RV32MFast": 3-4 cycle multiplier, iterative divider |
|
||||
| | | | "cve2_pkg::RV32MSingleCycle": 1-2 cycle multiplier, iterative divider |
|
||||
+------------------------------+---------------------+------------+-----------------------------------------------------------------------+
|
||||
| ``RV32B`` | cve2_pkg::rv32b_e | RV32BNone | B(itmanipulation) extension select: |
|
||||
| | | | "cve2_pkg::RV32BNone": No B-extension |
|
||||
| | | | "cve2_pkg::RV32BBalanced": Sub-extensions Zba, Zbb, Zbs, Zbf and Zbt |
|
||||
| | | | "cve2_pkg::RV32BOTEarlGrey": All sub-extensions except Zbe |
|
||||
| | | | "cve2_pkg::RV32BFull": All sub-extensions |
|
||||
+------------------------------+---------------------+------------+-----------------------------------------------------------------------+
|
||||
| ``RegFile`` | cve2_pkg::regfile_e | RegFileFF | Register file implementation select: |
|
||||
| | | | "cve2_pkg::RegFileFF": Generic flip-flop-based register file |
|
||||
| | | | "cve2_pkg::RegFileFPGA": Register file for FPGA targets |
|
||||
|
@ -143,7 +136,7 @@ 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``.
|
||||
Note that Ibex uses SystemVerilog enum parameters e.g. for ``RV32M``.
|
||||
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.
|
||||
|
|
|
@ -66,15 +66,16 @@ Other blocks use the ALU for the following tasks:
|
|||
|
||||
Bit-Manipulation Extension
|
||||
Support for the `RISC-V Bit-Manipulation Extension version 1.0.0 <https://github.com/riscv/riscv-bitmanip/releases/download/1.0.0/bitmanip-1.0.0-38-g865e7a7.pdf>`_ and `draft version 0.93 from January 10, 2021 <https://github.com/riscv/riscv-bitmanip/blob/master/bitmanip-0.93.pdf>`_ is optional. [#B_draft]_
|
||||
It can be enabled via the enumerated parameter ``RV32B`` defined in :file:`rtl/cve2_pkg.sv`.
|
||||
It can be enabled via the enumerated local parameter ``RV32B`` defined in :file:`rtl/cve2_pkg.sv`.
|
||||
By default, this parameter is set to "cve2_pkg::RV32BNone" to disable the bit-manipulation extension.
|
||||
RVB is currently not maintained and activation should be done at the users responsibility.
|
||||
|
||||
There are three versions of the bit-manipulation extension available:
|
||||
The balanced version comprises a set of sub-extensions aiming for good benefits at a reasonable area overhead.
|
||||
It can be selected by setting the ``RV32B`` parameter to "cve2_pkg::RV32BBalanced".
|
||||
It can be selected by setting the ``RV32B`` local parameter to "cve2_pkg::RV32BBalanced".
|
||||
The OTEarlGrey version comprises all sub-extensions except for the Zbe.
|
||||
This version can be selected by setting the ``RV32B`` parameter to "cve2_pkg::RV32BOTEarlGrey".
|
||||
The full version comprises all sub-extensions and can be selected by setting the ``RV32B`` parameter to "cve2_pkg::RV32BFull".
|
||||
This version can be selected by setting the ``RV32B`` local parameter to "cve2_pkg::RV32BOTEarlGrey".
|
||||
The full version comprises all sub-extensions and can be selected by setting the ``RV32B`` local parameter to "cve2_pkg::RV32BFull".
|
||||
The following table gives an overview of which sub-extensions are implemented in each version and of which instructions are implemented as multi-cycle instructions.
|
||||
Multi-cycle instructions are completed in 2 cycles.
|
||||
All remaining instructions complete in a single cycle.
|
||||
|
|
|
@ -17,7 +17,6 @@ module cve2_top import cve2_pkg::*; #(
|
|||
parameter int unsigned MHPMCounterWidth = 40,
|
||||
parameter bit RV32E = 1'b0,
|
||||
parameter rv32m_e RV32M = RV32MFast,
|
||||
parameter rv32b_e RV32B = RV32BNone,
|
||||
parameter regfile_e RegFile = RegFileFF,
|
||||
parameter bit WritebackStage = 1'b0,
|
||||
parameter bit ICache = 1'b0,
|
||||
|
@ -148,6 +147,9 @@ module cve2_top import cve2_pkg::*; #(
|
|||
localparam bit DbgTriggerEn = 1'b1;
|
||||
localparam int unsigned DbgHwBreakNum = 1;
|
||||
|
||||
// Bit manipulation extension
|
||||
localparam rv32b_e RV32B = RV32BNone;
|
||||
|
||||
// Clock signals
|
||||
logic clk;
|
||||
logic core_busy_d, core_busy_q;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue