Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save wayne1029jihad/11b57a7257ba231eb3f6541bf3bc3895 to your computer and use it in GitHub Desktop.
Save wayne1029jihad/11b57a7257ba231eb3f6541bf3bc3895 to your computer and use it in GitHub Desktop.
LAB03_LFS
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