Skip to content

Commit

Permalink
[rtl] minor rtl edits
Browse files Browse the repository at this point in the history
  • Loading branch information
stnolting committed Dec 21, 2024
1 parent 8029d79 commit 45a0219
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
6 changes: 4 additions & 2 deletions rtl/core/neorv32_cpu_cp_crypto.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,10 @@ begin
res_o <= (others => '0'); -- default
if (done = '1') then
case out_sel is
when "100" => res_o <= xperm_res;
when "101" | "110" => res_o <= blk_res;
when "100" =>
res_o <= xperm_res;
when "101" | "110" =>
res_o <= blk_res;
when others =>
if EN_ZKSH and (ctrl_i.ir_opcode(5) = '0') and (funct12(3) = '1') then
res_o <= sm3_res;
Expand Down
12 changes: 4 additions & 8 deletions rtl/core/neorv32_cpu_lsu.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,10 @@ begin
case ctrl_i.ir_funct3(1 downto 0) is
when "00" => -- byte
case mar(1 downto 0) is
when "00" => -- byte 0
rdata_o <= replicate_f((not ctrl_i.ir_funct3(2)) and dbus_rsp_i.data(7), 24) & dbus_rsp_i.data(7 downto 0);
when "01" => -- byte 1
rdata_o <= replicate_f((not ctrl_i.ir_funct3(2)) and dbus_rsp_i.data(15), 24) & dbus_rsp_i.data(15 downto 8);
when "10" => -- byte 2
rdata_o <= replicate_f((not ctrl_i.ir_funct3(2)) and dbus_rsp_i.data(23), 24) & dbus_rsp_i.data(23 downto 16);
when others => -- byte 3
rdata_o <= replicate_f((not ctrl_i.ir_funct3(2)) and dbus_rsp_i.data(31), 24) & dbus_rsp_i.data(31 downto 24);
when "00" => rdata_o <= replicate_f((not ctrl_i.ir_funct3(2)) and dbus_rsp_i.data(7), 24) & dbus_rsp_i.data(7 downto 0);
when "01" => rdata_o <= replicate_f((not ctrl_i.ir_funct3(2)) and dbus_rsp_i.data(15), 24) & dbus_rsp_i.data(15 downto 8);
when "10" => rdata_o <= replicate_f((not ctrl_i.ir_funct3(2)) and dbus_rsp_i.data(23), 24) & dbus_rsp_i.data(23 downto 16);
when others => rdata_o <= replicate_f((not ctrl_i.ir_funct3(2)) and dbus_rsp_i.data(31), 24) & dbus_rsp_i.data(31 downto 24);
end case;
when "01" => -- half-word
if (mar(1) = '0') then -- low half-word
Expand Down
2 changes: 1 addition & 1 deletion rtl/core/neorv32_package.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ package neorv32_package is

-- Architecture Constants -----------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
constant hw_version_c : std_ulogic_vector(31 downto 0) := x"01100705"; -- hardware version
constant hw_version_c : std_ulogic_vector(31 downto 0) := x"01100706"; -- hardware version
constant archid_c : natural := 19; -- official RISC-V architecture ID
constant XLEN : natural := 32; -- native data path width

Expand Down

0 comments on commit 45a0219

Please sign in to comment.