← ProblemsCircuits / Sequential Logic / Shift Registers
Left/right arithmetic shift by 1 or 8
15%shift-registersvectorsBuild a 64-bit arithmetic shift register with parallel load. An arithmetic right shift replicates the sign bit (q[63]) into the vacated positions instead of shifting in zeros; an arithmetic left shift is identical to a logical left shift.
load— loaddata[63:0](priority over shifting)ena— perform a shiftamount[1:0]selects the shift:2'b00— shift left by 12'b01— shift left by 82'b10— arithmetic shift right by 12'b11— arithmetic shift right by 8
There is no reset.