Draft preview. Lessons are being written and reviewed.

Verilog practice / Problem 16

MediumCombinational

Rotate left by any amount

Rotate the 8-bit input d left by amt places (0 to 7). Bits that fall off the top come back in at the bottom. For example, d = 8'b1000_0001 rotated by 1 gives 8'b0000_0011.

Ports

NameDirectionBits
dinput8
amtinput3
youtput8

How it's checked

The test tries the input combinations and checks every output for each one.

Stuck? Read the lesson Barrel shifters and glitches.

rotate8.vCtrl + Enter runs