M
move
Hi all:
is negative in VHDL free of overflow?
like this
signal din : std_logic_vector(7 downto 0);
......
when i do
cout <= std_logic_vector(- signed(din));
for example when din equal b"10000000" in complient binary = -128,
after negate it, we got 128 : b"10000000" , is it a overflow? how to
get the right answer? what is the best way to do
a = - b ; ?
Thanks ALL in advance !!!
liubenyuan
is negative in VHDL free of overflow?
like this
signal din : std_logic_vector(7 downto 0);
......
when i do
cout <= std_logic_vector(- signed(din));
for example when din equal b"10000000" in complient binary = -128,
after negate it, we got 128 : b"10000000" , is it a overflow? how to
get the right answer? what is the best way to do
a = - b ; ?
Thanks ALL in advance !!!
liubenyuan