Tingers All American 747 Posts user info edit post |
I need to do a register shift on 2’s complement numbers in verilog. From my readings the arithmetic shift or “>>>” should handle this, however it does not seem to work.
I have written a function that will do this for me, however if there is an operand that will work in Verilog, I imagine it will be more efficient for hardware and easier to read. Does anyone know of an operator that can right shift 2’s complement numbers?
Right shift Negative numbers – shift right and populate with 1’s Positive numbers – shift right and populate with 0’s 6/2/2010 6:55:31 PM |