Random Number Generator Has A Predefined Distribution

Jan. 8, 2001
Many digital designs incorporate high-speed generation of pseudorandom numbers. Typically, pseudorandom number generation is implemented using linear-feedback shift register (LFSR). An LFSR produces a sequence of numbers that appears to be uniformly...

Many digital designs incorporate high-speed generation of pseudorandom numbers. Typically, pseudorandom number generation is implemented using linear-feedback shift register (LFSR). An LFSR produces a sequence of numbers that appears to be uniformly distributed over the range 1 to 2n − 1, where n is the LFSR size. For this type of generator, each output value has an equal probability of appearing.

Some applications, however, require the generation of random numbers that aren't uniformly distributed. Instead, they obey a predefined, arbitrary distribution. This example of an arbitrary probability distribution function (PDF) expresses the occurrence probability of 10 values (Fig. 1). The cumulative distribution function (CDF) is an incremental aggregation of the PDF.

Since by definition the CDF is a positive monotonic function with values from 0 to 1, it's apparent that an inverse CDF always exists.

The inverse CDF may be interpreted as a function mapping uniformly distributed values to some arbitrary distribution described by the PDF. Such an explanation leads to a straightforward digital hardware im-plementation (Fig. 2).

Two basic components make up the design. One is an LFSR functioning as a pseudorandom number generator. As such, it generates values uniformly distributed over a specific range in accordance with the LFSR size (M). The other is a programmable ROM (PROM) containing the inverse CDF function. This PROM acts as a lookup table with the LFSR outputs used as input lines. The PROM is a sequence of random numbers, distributed with respect to the PDF, used as output lines (N). Depending on the requirements of the specific application, the PROM may be replaced with a RAM device.

Precision may be flexibly determined by choosing the LFSR and ROM sizes that meet with design needs. Longer LFSR widths and wider ROM addresses result in finer granularity.

This technique also is attractive in terms of speed. The critical path is composed of merely an LFSR (on the order of a single-gate level) and a memory component, yielding very high clock rates.

Sponsored Recommendations

Near- and Far-Field Measurements

April 16, 2024
In this comprehensive application note, we delve into the methods of measuring the transmission (or reception) pattern, a key determinant of antenna gain, using a vector network...

DigiKey Factory Tomorrow Season 3: Sustainable Manufacturing

April 16, 2024
Industry 4.0 is helping manufacturers develop and integrate technologies such as AI, edge computing and connectivity for the factories of tomorrow. Learn more at DigiKey today...

Connectivity – The Backbone of Sustainable Automation

April 16, 2024
Advanced interfaces for signals, data, and electrical power are essential. They help save resources and costs when networking production equipment.

Empowered by Cutting-Edge Automation Technology: The Sustainable Journey

April 16, 2024
Advanced automation is key to efficient production and is a powerful tool for optimizing infrastructure and processes in terms of sustainability.

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!