//-----------------------------------------------------// Design Name : lfsr// File Name : lfsr.v// Function : Linear feedback shift register// Coder : Deepak Kumar Tala//-----------------------------------------------------modulelfsr(out,// Output of the counterenable,// Enable for counterclk,// clock inputreset// reset input);//----------Output Ports--------------output[7:0]out;//------------Input Ports--------------inputenable,clk,reset;//------------Internal Variables--------reg[7:0]out;wirelinear_feedback;//-------------Code Starts Here-------assignlinear_feedback=!(out[7]^out[3]);always@(posedgeclk)if(reset)begin// active high resetout<=8'b0;endelseif(enable)beginout<={out[6],out[5],out[4],out[3],out[2],out[1],out[0],linear_feedback};endendmodule// End Of Module counter