Verilog程序LSFR不理解
时间:10-02
整理:3721RD
点击:
always @ ( posedge CLK ) //Detect the rising edge of the clock and reset the falling edge
if( CLK )
begin
LastPinIn 'd10) begin
if(PinIn==0) begin
rPinOut <= 'b1;
end
count <= 'd0;
En <= 'b0;
end
if(rPinOut==1) begin
rPinOut <= 'b0;
end
end
这个语句具体讲的是什么意思呀
always @ ( posedge CLK ) //Detect the rising edge of the clock and reset the falling edge
begin
case(i)
'd0 : i<=i;
'd1 :begin //The LFSR program makes a selection of pseudo-random numbers
rand_num[0] <= rand_num[7];
rand_num[1] <= rand_num[0];
rand_num[2] <= rand_num[1];
rand_num[3] <= rand_num[2];
rand_num[4] <= rand_num[3]^rand_num[7];
rand_num[5] <= rand_num[4]^rand_num[7];
rand_num[6] <= rand_num[5]^rand_num[7];
rand_num[7] <= rand_num[6];
temp1 <= rand_num[7:2];
temp2 <= temp1;
temp3 <= temp2;
temp4 <= temp3;
temp5 <= temp4;
if(Key3=='b1) begin
i <= 2;
cnt <= 'd0;
end
end
这个LSFR的产生随机数是怎么产生的。求大神
if( CLK )
begin
LastPinIn 'd10) begin
if(PinIn==0) begin
rPinOut <= 'b1;
end
count <= 'd0;
En <= 'b0;
end
if(rPinOut==1) begin
rPinOut <= 'b0;
end
end
这个语句具体讲的是什么意思呀
always @ ( posedge CLK ) //Detect the rising edge of the clock and reset the falling edge
begin
case(i)
'd0 : i<=i;
'd1 :begin //The LFSR program makes a selection of pseudo-random numbers
rand_num[0] <= rand_num[7];
rand_num[1] <= rand_num[0];
rand_num[2] <= rand_num[1];
rand_num[3] <= rand_num[2];
rand_num[4] <= rand_num[3]^rand_num[7];
rand_num[5] <= rand_num[4]^rand_num[7];
rand_num[6] <= rand_num[5]^rand_num[7];
rand_num[7] <= rand_num[6];
temp1 <= rand_num[7:2];
temp2 <= temp1;
temp3 <= temp2;
temp4 <= temp3;
temp5 <= temp4;
if(Key3=='b1) begin
i <= 2;
cnt <= 'd0;
end
end
这个LSFR的产生随机数是怎么产生的。求大神
我也想问这个,知道答案的能说一下吗?