Forum Discussion
Altera_Forum
Honored Contributor
9 years agoHi,
Read function description: function TO_UNSIGNED ( ARG,SIZE: NATURAL) return UNSIGNED; -- Result subtype: UNSIGNED (SIZE-1 downto 0) -- Result: Converts a non-negative INTEGER to an UNSIGNED vector with -- the specified SIZE. As you can see you did not specify "SIZE" parameter and your REG_ADDR_IN has to be integer type also. I recomend googling about libraries and packages usage in VHDL. I usualy use just two libraries: use ieee.std_logic_1164.all; use ieee.numeric_std.all; and if you need some type conversion use: https://www.doulos.com/knowhow/vhdl_designers_guide/numeric_std/ (https://www.doulos.com/knowhow/vhdl_designers_guide/numeric_std/)