Verilog Barrel Shifter
问题 I want to create a 64-bit barrel shifter in verilog (rotate right for now). I want to know if there is a way to do it without writing a 65 part case statement? Is there a way to write some simple code such as: Y = {S[i - 1:0], S[63:i]}; I tried the code above in Xilinx and get an error: i is not a constant. Main Question: Is there a way to do this without a huge case statment? 回答1: I've simplified some of the rules for clarity, but here are the details. In the statement Y = {S[i - 1:0], S[63