mirror of
https://github.com/openhwgroup/cve2.git
synced 2025-04-23 21:47:20 -04:00
B extension: Correct doc and parameter usage
Signed-off-by: Pirmin Vogel <vogelpi@lowrisc.org>
This commit is contained in:
parent
8364e356c2
commit
4127a5464b
11 changed files with 19 additions and 25 deletions
|
@ -67,10 +67,13 @@ Other blocks use the ALU for the following tasks:
|
|||
Bit Manipulation Extension
|
||||
Support for the `RISC-V Bit Manipulation Extension (draft version 0.92 from November 8, 2019) <https://github.com/riscv/riscv-bitmanip/blob/master/bitmanip-0.92.pdf>`_ is optional. [#B_draft]_
|
||||
It can be enabled via the enumerated parameter ``RV32B`` defined in :file:`rtl/ibex_pkg.sv`.
|
||||
By default, this parameter is set to "ibex_pkg::RV32BNone" to disable the bit manipulation extension.
|
||||
|
||||
There are two versions of the bit manipulation extension available:
|
||||
The balanced implementation 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 "ibex_pkg::RV32BBalanced".
|
||||
The full implementation comprises all 32 bit instructions defined in the extension.
|
||||
This version can be selected by setting the ``RV32B`` parameter to "ibex_pkg::RV32BFull".
|
||||
The following table lists the implemented instructions in each version.
|
||||
Multi-cycle instructions are completed in 2 cycles.
|
||||
All remaining instructions complete in a single cycle.
|
||||
|
@ -84,7 +87,7 @@ Bit Manipulation Extension
|
|||
+---------------------------------+---------------+--------------------------+
|
||||
| Zbp (Permutation) | Full | None |
|
||||
+---------------------------------+---------------+--------------------------+
|
||||
| Zbp (Bit extract/deposit) | Full | All |
|
||||
| Zbe (Bit extract/deposit) | Full | All |
|
||||
+---------------------------------+---------------+--------------------------+
|
||||
| Zbf (Bit-field place) | Balanced/Full | All |
|
||||
+---------------------------------+---------------+--------------------------+
|
||||
|
|
|
@ -93,11 +93,10 @@ Parameters
|
|||
+------------------------------+-------------------+------------+-----------------------------------------------------------------+
|
||||
| ``RV32M`` | bit | 1 | M(ultiply) extension enable |
|
||||
+------------------------------+-------------------+------------+-----------------------------------------------------------------+
|
||||
| ``RV32B`` | ibex_pkg::rv32b_e | RV32BNone | *EXPERIMENTAL* - B(itmanipulation) extension select: |
|
||||
| | | | "RV32BNone": No B-extension |
|
||||
| | | | "RV32BBalanced": Sub-extensions Zbb, Zbs, Zbf and |
|
||||
| | | | Zbt |
|
||||
| | | | "RV32Full": All sub-extensions |
|
||||
| ``RV32B`` | ibex_pkg::rv32b_e | RV32BNone | B(itmanipulation) extension select: |
|
||||
| | | | "ibex_pkg::RV32BNone": No B-extension |
|
||||
| | | | "ibex_pkg::RV32BBalanced": Sub-extensions Zbb, Zbs, Zbf and Zbt |
|
||||
| | | | "ibex_pkg::RV32Full": All sub-extensions |
|
||||
+------------------------------+-------------------+------------+-----------------------------------------------------------------+
|
||||
| ``BranchTargetALU`` | bit | 0 | *EXPERIMENTAL* - Enables branch target ALU removing a stall |
|
||||
| | | | cycle from taken branches |
|
||||
|
|
|
@ -40,7 +40,7 @@ parameters:
|
|||
datatype: str
|
||||
default: ibex_pkg::RV32BNone
|
||||
paramtype: vlogdefine
|
||||
description: "Bitmanip implementation parameter enum. See ibex_pkg.sv (EXPERIMENTAL)"
|
||||
description: "Bitmanip implementation parameter enum. See the ibex_pkg::rv32b_e enum in ibex_pkg.sv for permitted values."
|
||||
|
||||
MultiplierImplementation:
|
||||
datatype: str
|
||||
|
|
|
@ -20,7 +20,7 @@ module ibex_riscv_compliance (
|
|||
parameter int unsigned PMPNumRegions = 4;
|
||||
parameter bit RV32E = 1'b0;
|
||||
parameter bit RV32M = 1'b1;
|
||||
parameter bit RV32B = 1'b0;
|
||||
parameter ibex_pkg::rv32b_e RV32B = ibex_pkg::RV32BNone;
|
||||
parameter MultiplierImplementation = "fast";
|
||||
parameter bit BranchTargetALU = 1'b0;
|
||||
parameter bit WritebackStage = 1'b0;
|
||||
|
|
|
@ -39,7 +39,7 @@ parameters:
|
|||
datatype: str
|
||||
default: ibex_pkg::RV32BNone
|
||||
paramtype: vlogdefine
|
||||
description: "Bitmanip implementation parameter enum. See ibex_pkg.sv (EXPERIMENTAL)"
|
||||
description: "Bitmanip implementation parameter enum. See the ibex_pkg::rv32b_e enum in ibex_pkg.sv for permitted values."
|
||||
|
||||
SRAMInitFile:
|
||||
datatype: str
|
||||
|
|
|
@ -80,7 +80,7 @@ parameters:
|
|||
datatype: str
|
||||
default: ibex_pkg::RV32BNone
|
||||
paramtype: vlogdefine
|
||||
description: "Bitmanip implementation parameter enum. See ibex_pkg.sv (EXPERIMENTAL)"
|
||||
description: "Bitmanip implementation parameter enum. See the ibex_pkg::rv32b_e enum in ibex_pkg.sv for permitted values."
|
||||
|
||||
MultiplierImplementation:
|
||||
datatype: str
|
||||
|
|
|
@ -38,7 +38,7 @@ parameters:
|
|||
datatype: str
|
||||
default: ibex_pkg::RV32BNone
|
||||
paramtype: vlogdefine
|
||||
description: "Bitmanip implementation parameter enum. See ibex_pkg.sv (EXPERIMENTAL)"
|
||||
description: "Bitmanip implementation parameter enum. See the ibex_pkg::rv32b_e enum in ibex_pkg.sv for permitted values."
|
||||
|
||||
MultiplierImplementation:
|
||||
datatype: str
|
||||
|
|
|
@ -9,10 +9,6 @@
|
|||
|
||||
`include "prim_assert.sv"
|
||||
|
||||
`ifndef RV32B
|
||||
`define RV32B ibex_pkg::RV32BNone
|
||||
`endif
|
||||
|
||||
/**
|
||||
* Top level module of the ibex RISC-V core
|
||||
*/
|
||||
|
@ -24,7 +20,7 @@ module ibex_core #(
|
|||
parameter int unsigned MHPMCounterWidth = 40,
|
||||
parameter bit RV32E = 1'b0,
|
||||
parameter bit RV32M = 1'b1,
|
||||
parameter ibex_pkg::rv32b_e RV32B = `RV32B,
|
||||
parameter ibex_pkg::rv32b_e RV32B = ibex_pkg::RV32BNone,
|
||||
parameter bit BranchTargetALU = 1'b0,
|
||||
parameter bit WritebackStage = 1'b0,
|
||||
parameter MultiplierImplementation = "fast",
|
||||
|
|
|
@ -2,10 +2,6 @@
|
|||
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
`ifndef RV32B
|
||||
`define RV32B ibex_pkg::RV32BNone
|
||||
`endif
|
||||
|
||||
/**
|
||||
* Top level module of the ibex RISC-V core with tracing enabled
|
||||
*/
|
||||
|
@ -18,7 +14,7 @@ module ibex_core_tracing #(
|
|||
parameter int unsigned MHPMCounterWidth = 40,
|
||||
parameter bit RV32E = 1'b0,
|
||||
parameter bit RV32M = 1'b1,
|
||||
parameter ibex_pkg::rv32b_e RV32B = `RV32B,
|
||||
parameter ibex_pkg::rv32b_e RV32B = ibex_pkg::RV32BNone,
|
||||
parameter bit BranchTargetALU = 1'b0,
|
||||
parameter bit WritebackStage = 1'b0,
|
||||
parameter MultiplierImplementation = "fast",
|
||||
|
|
|
@ -13,9 +13,9 @@ package ibex_pkg;
|
|||
/////////////////////////
|
||||
|
||||
typedef enum integer {
|
||||
RV32BNone,
|
||||
RV32BBalanced,
|
||||
RV32BFull
|
||||
RV32BNone = 0,
|
||||
RV32BBalanced = 1,
|
||||
RV32BFull = 2
|
||||
} rv32b_e;
|
||||
|
||||
/////////////
|
||||
|
|
|
@ -15,7 +15,7 @@ set_flow_bool_var flatten 1 "flatten"
|
|||
set_flow_bool_var timing_run 0 "timing run"
|
||||
set_flow_bool_var ibex_branch_target_alu 0 "Enable branch target ALU in Ibex"
|
||||
set_flow_bool_var ibex_writeback_stage 0 "Enable writeback stage in Ibex"
|
||||
set_flow_var ibex_bitmanip 0 "Bitmanip extenion setting for Ibex (0,1,2 - enums not supported)"
|
||||
set_flow_var ibex_bitmanip 0 "Bitmanip extenion setting for Ibex (see ibex_pkg::rv32b_e for permitted values. Enum names are not supported in Yosys.)"
|
||||
set_flow_var ibex_multiplier "fast" "Multiplier implementation for Ibex (slow/fast/single-cycle)"
|
||||
|
||||
source $lr_synth_config_file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue