Forum Discussion
Altera_Forum
Honored Contributor
10 years agoyou realise there are issues with this, because the final result can be -4 to +4. You declared adaptacao as an array of unsigned(2 downto 0), so while this only represents 0 to 7, if the input is 10101010 or 01010101 then apdaptacao will be 100 (+4)