Digital Systems Design with Programmable Logic Spring
Barrel shifter is used in most of the high performance computing system where low latency is needed for shift operations for any amount. The diagram of a barrel shifter is shown below. The input is an 8-bit vector. The output is a shifted version of the input, with the amount of shift defined by the "shift" input (from 0 to 7). The circuit consists of three individual barrel shifters arranged in columns. Notice that the first barrel has only one 0 connected to one of the multiplexers (bottom left corner), while the second has two, and the third has four. For larger vectors, we would just keep doubling the number of 0 inputs. If shift = "001", for example, then only the first barrel should cause a shift; on the other hand, if shift = "111", then all barrels should cause a shift.
Write a fully structural design for the above circuit and simulate it for the correct functionality.