SB11: Linear Feedback Shift Register Megafunction
Altera Corporation 3
Performance
The LFSR megafunction is designed for both FLEX 10K and FLEX 8000 device
architectures. In FLEX 10K devices, the megafunction are designed for maximum
performance, and does not use embedded array blocks (EABs).
Table 3 illustrates the typical device utilization and maximum clock frequency for the
LFSR megafunction in an EPF10K10-3 device. Custom configurations differ in logic cell
usage, but generally maintain the same speed performance.
Applications
The megafunction’s use in encryption/decryption, direct sequence spread spectrum,
and data scrambling/descrambling applications are described below.
Encryption/Decryption
The user can encrypt and decrypt serial data streams by initializing the transmitting
LFSR megafunction with a desired sequence or key. The serial data stream to be
encrypted is simply combined with the LFSR output using an exclusive-
OR
gate. To
decrypt the data, the receiving LFSR megafunction performs the same operation. It is
initialized with the same key used by the transmitting megafunction. The encrypted
data is then combined with the LFSR output using an exclusive-
OR
gate. The received
data stream must be aligned with the LFSR output sequence. Moreover, synchronized
pattern is used to detect the first bit. Normally, the synchronization pattern is not
encrypted, which makes detecting the first data bit and performing the PN code
alignment much easier.
In addition, an LFSR megafunction can generate long sequences of nearly random data.
A 50-bit LFSR megafunction has a repetition period of 2
50
– 1 clock periods. Longer bit
lengths will cause longer repetition cycles. For example, when clocking at the maximum
rate of 75 MHz, a 50-bit pattern in continuous operation would not repeat for six
months.
Direct Sequence Spread Spectrum
Direct sequence spread spectrum is a modulation technique used to “spread” the
energy of a transmitted signal over a wide band of frequencies. The wide band
spreading causes the modulated signal to appear spectrally as random noise. The clock
rate of the PN generator is usually much higher than the data rate. A long PN sequence
operating at a high frequency produces a wide band signal. The high frequencies are
produced when the PN generator sequences through a series of alternating 1s and 0s
(e.g., 101010101). In contrast, low frequencies are produced when the PN generator
sequences through long patterns of 1s and 0s (e.g., 1111111. . . 0000000. . .).
In direct sequence spread spectrum, the transmitted signal is immune to continuous
wave (CW) interference from either intentional or unintentional sources. A CW tone
appears in the frequency domain as a narrow band signal. During transmission, CW
tones are imposed onto the wide band signal. The signal plus interference are despread
at the receiver. The despreading causes the wide band signal to revert to a narrow band
signal. The CW interference appears as wide band noise after despreading and can be
attenuated by narrow band filtering.
Table 3. Typical Device Utilization for the LFSR Megafunction in an EPF10K10-3 Device
Implementation Clock (f
MAX
) Logic Cells EABs
Shift register size = 32 bits 78 MHz 325 0