Forum Discussion
Altera_Forum
Honored Contributor
13 years agoInvert the sign bit is the solution i use with logical gates, before my investigation on CONV_SIGNED fnction.
I stop trying to understand convert function. I keep the basic solution in vhdl : library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; ENTITY INVBITBUS IS PORT( a_bus : IN bit_vector(2 downto 0); s_bus : OUT bit_vector(2 downto 0)); SIGNAL a, b ,c : BIT; END INVBITBUS ; ARCHITECTURE dataflow OF INVBITBUS IS BEGIN a <= a_bus(2); b <= a_bus(1); c <= a_bus(0); s_bus (2) <= NOT (a); s_bus (1) <= b; s_bus (0) <= c; END dataflow ;