Created
September 28, 2014 17:46
-
-
Save coldcue/b439bf0b3518d9e7467b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module shr_4( | |
input clk, | |
input ce, | |
input rst, | |
output [3:0] out | |
); | |
reg [3:0] shr; | |
assign out = shr; | |
always @ (posedge clk) | |
if(rst) | |
shr <= 4'b1110; | |
else if(ce) | |
shr <= {shr[2:0],shr[3]}; | |
endmodule |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment