Saturday 4 July 2015

Combinational circuits- Prbs generator 4bit


4 BIT PRBS GENERATOR
module prbs4bit(q,rst,clk,en);
output [3:0]q;
input rst,clk,en;
reg [3:0]q;
always @(posedge clk)
begin
if(rst)
q<=4'd1;
else if(en);
q<={q[2:0],q[2]^q[1]};
end
endmodule

No comments:

Post a Comment