Closed eschkufz closed 5 years ago
There is a bug in the implementation of operator >>. Specifically, shift amounts in excess of the bit-width of the target variable produce undefined behavior. A minimal example is below.
eg[54:0] subtrahend = 55'h7bcb43d769f764; reg[10:0] exponent_diff = 11'h056; initial begin $display("%h >> %d = %h", subtrahend, exponent_diff, (subtrahend >> exponent_diff)); end
Overview
There is a bug in the implementation of operator >>. Specifically, shift amounts in excess of the bit-width of the target variable produce undefined behavior. A minimal example is below.
Deliverables