always @ ( posedge CLK ) //Detect the rising edge of the clock and reset the falling edge
if( CLK )
begin
LastPinIn <= PinIn;
if( (PinIn==0)&&(LastPinIn==1) ) begin
En<='b1;
end
if(En==1) begin
count <= count + 'b1;
end
if(count>'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 selec
tion 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的产生随机数是怎么产生的。。求大神
一周热门 更多>