70 likes | 163 Views
Introduction to Experiment 5 Programmable PRNG. 4. D. Q. ena. coeff. 8. 4. D. Q. 2. ena. PRNG. 0. 8. 1. out put. 2. seed. 4. D. Q. 3. ena. 2. address. 4. data. 4. D. Q. ena. w rite. clk. load. reset. seed(7..4). coeff(7..4). coeff(3..0). seed(3..0).
E N D
Introduction to Experiment 5 Programmable PRNG
4 D Q ena coeff 8 4 D Q 2 ena PRNG 0 8 1 output 2 seed 4 D Q 3 ena 2 address 4 data 4 D Q ena write clk load reset
seed(7..4) coeff(7..4) coeff(3..0) seed(3..0) PRNG 7..4 PRNG 3..0 1 0 coeff(7..4)="0000" clk load 2 PRNG clk load output
Linear Feedback Shift Register (LFSR) Each stage = D flip-flop L, C(D) Length Connection polynomial, C(D) C(D) = 1 + c1D + c2D2 + . . . + cLDL
Sj-1 Sj-2 Sj-(L-1) Sj-L Initial state [sL-1, sL-2, . . . , s1, s0] LSFR recursion: sj = c1sj-1 c2sj-2 . . . cL-1sj-(L-1) cLsj-L for j L
Example of LFSR 4, 1+D+D4 Length Connection polynomial, C(D) C(D) = 1 + 1D + 0D2 + 0D3 +1D4 c1=1 c2=0 c4=1 c3=0
LFSR State Sequence s4 s3 s2 s1 s0 s4 = c1s3c2s2 c3s1 c4s0 = s3 s0