ECE444 Advanced Digital Design
Assignment 5

In class Wednesday (28 Oct) we talked about shifters - behavioral vs. logarithmic. We also talked about rotators, although we did no examples. Suppose we have a module:

module rotator(
input [31:0] inp,  // input word
input [4:0] shamt,  // shift amount
input ror, // direction of rotatation 1 = right, 0 = left
output [31:0] out // output word
);

General rotation (right) is

   assign out = (inp<<(-shamt))|(inp>>shamt);

Design the two versions of this module, demonstrate through simulation that it works properly, and determine the number of LEs and execution time for the two versions.

Download barrel.zip for the modules we covered Wednesday.


Maintained by John Loomis, last updated 30 October 2009