Forum Discussion
Altera_Forum
Honored Contributor
15 years ago --- Quote Start --- Suppose the 32-bit output is "00000011010100100000111100001010"...how would you ignore the first 6 0-bits and then output the 16 MSB "1101010010000011"? --- Quote End --- I think the thread has gone off track. It is very unrealistic supposition. Why multiply then discard 6 MSBs. It is more realistic to discard one or two bits.
-- discarding two MSBs
if data(31) = data(30) and data(31) = data(29) then
data_out <= data(29 downto 14);
elsif data(31) = '0' then
data_out <= x"7FFF";
else
data_out <= x"8001";
end if;