线性移位寄存器LFSR电路设计
时间:2011-03-11 来源:齐威王
module LFSR
(
input clk,
output out
);
reg [9:0] q;
wire tap = q[2]^q[9];
assign out = q[9];
always @ (posedge clk)
begin
q<= 10'b1010101010;
q<= {q[8:0],tap};
end
endmodule
将LFSR赋初始值1010101010,最低为q0=q2 xor q9,输出为最高位q9;
相关阅读 更多 +