Forum Discussion
Altera_Forum
Honored Contributor
13 years agoThanks kaz for your reply!
--- Quote Start --- sum = (num1 + num2)/2**4; --- Quote End --- I guess that in this case sum must have the same size as num1 and num2? I would rather have that sum already has the smaller size. --- Quote Start --- alternatively if you can accept truncation errors then: sum <= num1(6 downto 4) + num2(6 downto 4); --- Quote End --- I think I will go with this one. If there would be a way to avoid truncation errors, please let me know.