@@ -63,7 +63,7 @@ package neorv32_package is
63
63
-- Architecture Constants (do not modify!) ------------------------------------------------
64
64
-- -------------------------------------------------------------------------------------------
65
65
constant data_width_c : natural := 32 ; -- native data path width - do not change!
66
- constant hw_version_c : std_ulogic_vector (31 downto 0 ) := x"01070506 " ; -- NEORV32 version - no touchy!
66
+ constant hw_version_c : std_ulogic_vector (31 downto 0 ) := x"01070507 " ; -- NEORV32 version - no touchy!
67
67
constant archid_c : natural := 19 ; -- official RISC-V architecture ID - hands off!
68
68
69
69
-- Check if we're inside the Matrix -------------------------------------------------------
@@ -111,6 +111,7 @@ package neorv32_package is
111
111
function xor_reduce_f (a : std_ulogic_vector ) return std_ulogic ;
112
112
function to_hexchar_f (input : std_ulogic_vector (3 downto 0 )) return character ;
113
113
function to_hstring32_f (input : std_ulogic_vector (31 downto 0 )) return string ;
114
+ function hexchar_to_stdulogicvector_f (input : character ) return std_ulogic_vector ;
114
115
function bit_rev_f (input : std_ulogic_vector ) return std_ulogic_vector ;
115
116
function is_power_of_two_f (input : natural ) return boolean ;
116
117
function bswap32_f (input : std_ulogic_vector ) return std_ulogic_vector ;
@@ -2396,6 +2397,33 @@ package body neorv32_package is
2396
2397
return res_v;
2397
2398
end function to_hstring32_f ;
2398
2399
2400
+ -- Function: Convert hex char to 4-bit std_ulogic_vector ----------------------------------
2401
+ -- -------------------------------------------------------------------------------------------
2402
+ function hexchar_to_stdulogicvector_f (input : character ) return std_ulogic_vector is
2403
+ variable res_v : std_ulogic_vector (3 downto 0 );
2404
+ begin
2405
+ case input is
2406
+ when '0' => res_v := x"0" ;
2407
+ when '1' => res_v := x"1" ;
2408
+ when ' 2' => res_v := x"2" ;
2409
+ when ' 3' => res_v := x"3" ;
2410
+ when ' 4' => res_v := x"4" ;
2411
+ when ' 5' => res_v := x"5" ;
2412
+ when ' 6' => res_v := x"6" ;
2413
+ when ' 7' => res_v := x"7" ;
2414
+ when ' 8' => res_v := x"8" ;
2415
+ when ' 9' => res_v := x"9" ;
2416
+ when ' a' | ' A' => res_v := x"a" ;
2417
+ when ' b' | ' B' => res_v := x"b" ;
2418
+ when ' c' | ' C' => res_v := x"c" ;
2419
+ when ' d' | ' D' => res_v := x"d" ;
2420
+ when ' e' | ' E' => res_v := x"e" ;
2421
+ when ' f' | ' F' => res_v := x"f" ;
2422
+ when others => res_v := x"0" ;
2423
+ end case ;
2424
+ return res_v;
2425
+ end function hexchar_to_stdulogicvector_f ;
2426
+
2399
2427
-- Function: Bit reversal -----------------------------------------------------------------
2400
2428
-- -------------------------------------------------------------------------------------------
2401
2429
function bit_rev_f (input : std_ulogic_vector ) return std_ulogic_vector is
0 commit comments