Created
October 8, 2017 16:00
-
-
Save wayne1029jihad/11b57a7257ba231eb3f6541bf3bc3895 to your computer and use it in GitHub Desktop.
LAB03_LFS
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 LFSR (CLK, RESET_n, out); | |
input CLK, RESET_n; | |
output wire out; | |
always @(`CLK)begin | |
if(RESET) | |
dff[4:0] <= 5'b00001; | |
else | |
dff[4:0] <= {exdff[3:0],exdff[1] ^ exdff[4]}; | |
end | |
always @ * exdff = dff; | |
assign out = dff[4]; | |
endmodule |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment