Field-Programmable Gate Arrays: Reconfigurable Logic for Rapid Prototyping and Implementation of Digital Systems
by John V. Oldfield, Richard C. Dorf
5.3 PSEUDORANDOM NUMBER GENERATION
Random numbers can be very useful in simulation and testing digital circuits. Here we will use these numbers in testing the parallel adder described earlier. The term pseudorandom is used because the process is in fact completely predictable. The linear feedback shift register (LFSR) method is a particularly simple one, which can generate a sequence of length 2n – 1 for a register n bits long, provided it has the correct feedback connections. Figure 5–20 shows a 4-bit LFSR that can generate a sequence of length 15, not including the all-Is state, which is a lock-up state—once entered, the register will stay in this state indefinitely. Table 5–2 shows the feedback connections to produce a maximal length sequence for various register lengths.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access