mirror of
https://github.com/stnolting/neorv32.git
synced 2025-04-24 14:17:51 -04:00
[rtl] added new generic FAST_SHIFT_EN to enable fast (but large) barrel shifter for shift operations (default = false)
This commit is contained in:
parent
99c94460e1
commit
78bee91b13
7 changed files with 16 additions and 3 deletions
|
@ -64,6 +64,7 @@ entity neorv32_cpu is
|
|||
CPU_EXTENSION_RISCV_Zifencei : boolean := true; -- implement instruction stream sync.?
|
||||
-- Extension Options --
|
||||
FAST_MUL_EN : boolean := false; -- use DSPs for M extension's multiplier
|
||||
FAST_SHIFT_EN : boolean := false; -- use barrel shifter for shift operations
|
||||
-- Physical Memory Protection (PMP) --
|
||||
PMP_USE : boolean := false; -- implement PMP?
|
||||
PMP_NUM_REGIONS : natural := 4; -- number of regions (max 8)
|
||||
|
@ -243,7 +244,8 @@ begin
|
|||
-- -------------------------------------------------------------------------------------------
|
||||
neorv32_cpu_alu_inst: neorv32_cpu_alu
|
||||
generic map (
|
||||
CPU_EXTENSION_RISCV_M => CPU_EXTENSION_RISCV_M -- implement muld/div extension?
|
||||
CPU_EXTENSION_RISCV_M => CPU_EXTENSION_RISCV_M, -- implement muld/div extension?
|
||||
FAST_SHIFT_EN => FAST_SHIFT_EN -- use barrel shifter for shift operations
|
||||
)
|
||||
port map (
|
||||
-- global control --
|
||||
|
|
|
@ -41,7 +41,7 @@ package neorv32_package is
|
|||
-- Architecture Constants -----------------------------------------------------------------
|
||||
-- -------------------------------------------------------------------------------------------
|
||||
constant data_width_c : natural := 32; -- data width - do not change!
|
||||
constant hw_version_c : std_ulogic_vector(31 downto 0) := x"01040502"; -- no touchy!
|
||||
constant hw_version_c : std_ulogic_vector(31 downto 0) := x"01040504"; -- no touchy!
|
||||
constant pmp_max_r_c : natural := 8; -- max PMP regions - FIXED!
|
||||
constant archid_c : natural := 19; -- official NEORV32 architecture ID - hands off!
|
||||
|
||||
|
@ -456,6 +456,7 @@ package neorv32_package is
|
|||
CPU_EXTENSION_RISCV_Zifencei : boolean := true; -- implement instruction stream sync.?
|
||||
-- Extension Options --
|
||||
FAST_MUL_EN : boolean := false; -- use DSPs for M extension's multiplier
|
||||
FAST_SHIFT_EN : boolean := false; -- use barrel shifter for shift operations
|
||||
-- Physical Memory Protection (PMP) --
|
||||
PMP_USE : boolean := false; -- implement PMP?
|
||||
PMP_NUM_REGIONS : natural := 4; -- number of regions (max 8)
|
||||
|
@ -536,6 +537,7 @@ package neorv32_package is
|
|||
CPU_EXTENSION_RISCV_Zifencei : boolean := true; -- implement instruction stream sync.?
|
||||
-- Extension Options --
|
||||
FAST_MUL_EN : boolean := false; -- use DSPs for M extension's multiplier
|
||||
FAST_SHIFT_EN : boolean := false; -- use barrel shifter for shift operations
|
||||
-- Physical Memory Protection (PMP) --
|
||||
PMP_USE : boolean := false; -- implement PMP?
|
||||
PMP_NUM_REGIONS : natural := 4; -- number of regions (max 8)
|
||||
|
@ -664,7 +666,8 @@ package neorv32_package is
|
|||
-- -------------------------------------------------------------------------------------------
|
||||
component neorv32_cpu_alu
|
||||
generic (
|
||||
CPU_EXTENSION_RISCV_M : boolean := true -- implement muld/div extension?
|
||||
CPU_EXTENSION_RISCV_M : boolean := true; -- implement muld/div extension?
|
||||
FAST_SHIFT_EN : boolean := false -- use barrel shifter for shift operations
|
||||
);
|
||||
port (
|
||||
-- global control --
|
||||
|
|
|
@ -60,6 +60,7 @@ entity neorv32_top is
|
|||
CPU_EXTENSION_RISCV_Zifencei : boolean := true; -- implement instruction stream sync.?
|
||||
-- Extension Options --
|
||||
FAST_MUL_EN : boolean := false; -- use DSPs for M extension's multiplier
|
||||
FAST_SHIFT_EN : boolean := false; -- use barrel shifter for shift operations
|
||||
-- Physical Memory Protection (PMP) --
|
||||
PMP_USE : boolean := false; -- implement PMP?
|
||||
PMP_NUM_REGIONS : natural := 4; -- number of regions (max 8)
|
||||
|
@ -318,6 +319,7 @@ begin
|
|||
CPU_EXTENSION_RISCV_Zifencei => CPU_EXTENSION_RISCV_Zifencei, -- implement instruction stream sync.?
|
||||
-- Extension Options --
|
||||
FAST_MUL_EN => FAST_MUL_EN, -- use DSPs for M extension's multiplier
|
||||
FAST_SHIFT_EN => FAST_SHIFT_EN, -- use barrel shifter for shift operations
|
||||
-- Physical Memory Protection (PMP) --
|
||||
PMP_USE => PMP_USE, -- implement PMP?
|
||||
PMP_NUM_REGIONS => PMP_NUM_REGIONS, -- number of regions (max 8)
|
||||
|
|
|
@ -53,6 +53,7 @@ entity neorv32_cpu_stdlogic is
|
|||
CPU_EXTENSION_RISCV_Zifencei : boolean := true; -- implement instruction stream sync.?
|
||||
-- Extension Options --
|
||||
FAST_MUL_EN : boolean := false; -- use DSPs for M extension's multiplier
|
||||
FAST_SHIFT_EN : boolean := false; -- use barrel shifter for shift operations
|
||||
-- Physical Memory Protection (PMP) --
|
||||
PMP_USE : boolean := false; -- implement PMP?
|
||||
PMP_NUM_REGIONS : natural := 4; -- number of regions (max 8)
|
||||
|
@ -138,6 +139,7 @@ begin
|
|||
CPU_EXTENSION_RISCV_Zifencei => CPU_EXTENSION_RISCV_Zifencei, -- implement instruction stream sync.?
|
||||
-- Extension Options --
|
||||
FAST_MUL_EN => FAST_MUL_EN, -- use DSPs for M extension's multiplier
|
||||
FAST_SHIFT_EN => FAST_SHIFT_EN, -- use barrel shifter for shift operations
|
||||
-- Physical Memory Protection (PMP) --
|
||||
PMP_USE => PMP_USE, -- implement PMP?
|
||||
PMP_NUM_REGIONS => PMP_NUM_REGIONS, -- number of regions (max 8)
|
||||
|
|
|
@ -81,6 +81,7 @@ begin
|
|||
CPU_EXTENSION_RISCV_Zifencei => true, -- implement instruction stream sync.?
|
||||
-- Extension Options --
|
||||
FAST_MUL_EN => false, -- use DSPs for M extension's multiplier
|
||||
FAST_SHIFT_EN => false, -- use barrel shifter for shift operations
|
||||
-- Physical Memory Protection (PMP) --
|
||||
PMP_USE => false, -- implement PMP?
|
||||
PMP_NUM_REGIONS => 4, -- number of regions (max 16)
|
||||
|
|
|
@ -54,6 +54,7 @@ entity neorv32_top_stdlogic is
|
|||
CPU_EXTENSION_RISCV_Zifencei : boolean := true; -- implement instruction stream sync.?
|
||||
-- Extension Options --
|
||||
FAST_MUL_EN : boolean := false; -- use DSPs for M extension's multiplier
|
||||
FAST_SHIFT_EN : boolean := false; -- use barrel shifter for shift operations
|
||||
-- Physical Memory Protection (PMP) --
|
||||
PMP_USE : boolean := false; -- implement PMP?
|
||||
PMP_NUM_REGIONS : natural := 4; -- number of regions (max 8)
|
||||
|
@ -174,6 +175,7 @@ begin
|
|||
CPU_EXTENSION_RISCV_Zifencei => CPU_EXTENSION_RISCV_Zifencei, -- implement instruction stream sync.?
|
||||
-- Extension Options --
|
||||
FAST_MUL_EN => FAST_MUL_EN, -- use DSPs for M extension's multiplier
|
||||
FAST_SHIFT_EN => FAST_SHIFT_EN, -- use barrel shifter for shift operations
|
||||
-- Physical Memory Protection (PMP) --
|
||||
PMP_USE => PMP_USE, -- implement PMP?
|
||||
PMP_NUM_REGIONS => PMP_NUM_REGIONS, -- number of regions (max 16)
|
||||
|
|
|
@ -167,6 +167,7 @@ begin
|
|||
CPU_EXTENSION_RISCV_Zifencei => true, -- implement instruction stream sync.?
|
||||
-- Extension Options --
|
||||
FAST_MUL_EN => false, -- use DSPs for M extension's multiplier
|
||||
FAST_SHIFT_EN => false, -- use barrel shifter for shift operations
|
||||
-- Physical Memory Protection (PMP) --
|
||||
PMP_USE => true, -- implement PMP?
|
||||
PMP_NUM_REGIONS => 4, -- number of regions (max 16)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue