Forum Discussion
Altera_Forum
Honored Contributor
17 years agostd_logic_vector
Just want to ask a very simple question but it troubled me alot, let say i have to input a and b with the format of std_logic_vector(7 downto 0) and output c with the format of std_logic_vector...
Altera_Forum
Honored Contributor
17 years agoTry this method(one of many) if your values are meant to be signed, otherwise use unsigned
c <= std_logic_vector(resize(signed(a),16) + resize(signed(b),16));