Created
September 28, 2014 17:46
-
-
Save coldcue/b439bf0b3518d9e7467b to your computer and use it in GitHub Desktop.
Revisions
-
coldcue created this gist
Sep 28, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ 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