Forum Discussion
Altera_Forum
Honored Contributor
14 years agoAdding and resizing in one step
Hi, Is there a way to add two unsigned numbers and extract only the x most significant bits from it in one step? I want something like this: sum <= resize(number1 + number2,4) In...
Altera_Forum
Honored Contributor
14 years agoI forget if VHDL has a right shift operator but if it does you could use that to take the 8 bit value and only assign the upper 4 bits to the destination.
What Tricky said is how I typically do this in verilog even though >> would get the job done.