[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] Galois-form LFSR now in trunk (r4613)

From: Johnathan Corgan
Subject: [Discuss-gnuradio] Galois-form LFSR now in trunk (r4613)
Date: Fri, 23 Feb 2007 10:47:46 -0800
User-agent: Thunderbird (X11/20070103)

An implementation of a Galois-form LFSR pseudo-random sequence generator
is now in the trunk as of r4613.

gr.glfsr_source_b(degree, repeat=True, mask=0, seed=1)

degree: The shift register length, 1-32 inclusive
repeat: whether to repeat once sequence completes (True, False)
        defaults to True
mask:   The LFSR polynomial mask to use.  If not supplied, a suitable
        one is chosen based on the degree specified.
seed:   The initial shift register value.  This should not be zero, and
        if not supplied, defaults to 1

The block outputs a series of bytes equal to 0 or 1, forming a maximal
length sequence (m-sequence) of length 2^degree-1.  The output of this
block can be further processed by other blocks to map it to other
values, pack it into bytes, etc.

The simplest use is to specify only the degree:

src = gr.glfsr_source_b(32)

This will generate a 2^32-1 length m-sequence and repeat until the the
application is exited.

M-sequences are useful as digital noise sources, as they contain energy
at every discrete frequency interval up to the Nyquist frequency, for a
given sampling rate and sequence length.

Johnathan Corgan
Corgan Enterprises LLC

reply via email to

[Prev in Thread] Current Thread [Next in Thread]