Forum Discussion
Altera_Forum
Honored Contributor
13 years agoThe testbench shows that the ALU works perfectly. The result is always right. But I'm sure the overflow detector is wrong. You didn't post the code. The problem is in the substraction. Look at the the first sub: -128 - ( +2) = -130. But you can't store -130 in 8 bits. So it's an overflow. Signal overflow should be '1'.