Discussion:
PRBS generation on FPGA
(too old to reply)
asper
17 years ago
Permalink
I Folk,

I need to generate a
Pseudo Random Binary Sequence (PRBS) on board of the FPGA.

The PRBS is more general
than the n-sequence, which is a special pseudo-random binary sequence
of n bits generated as the output of a linear shift register.

It is 'pseudo' because it
is deterministic and after N elements it starts to repeat itself. For
PRBS the number N is N = 2^k ? 1 where k is the delay in number of
bits.

In the FPGA VI library is
included a "White Noise Generator (FPGA Module)", where the
help file says that the parameter "White Noise Type"
contains the option "Uniform" that "Generates a
uniformly distributed, pseudorandom pattern whose values are in the
range [?a:a?1], where a is the value of Amplitude."

1- Is the "uniformly
distributed, pseudorandom pattern" a "Pseudo Random Binary
Sequence"?

2- In the "White
Noise Generator (FPGA Module)", which is the parameter "k"
that fixes the number N of elements after that the PRBS starts to
repeat itself?

3- If the "White
Noise Generator (FPGA Module)" is not a PRBS, do you know how to
generate a PRBS on board of the FPGA?


Thanks,
Asper
Ryan_82
17 years ago
Permalink
Hello Asper,
I don't think that the White Noise Generator is a PRBS sequence.
In the FPGA module there's not a function to generate that kind of sequence. In LabVIEW there's a function that creates a PRBS sequence, "MLS Sequence Waveform", as discussed in <a href="http://forums.ni.com/ni/board/message?board.id=170&amp;message.id=88729&amp;requireLogin=False" target="_blank">this</a> othe forum.
So my suggestion is to look at the block diagram of this function and program it yourself with the FPGA module. Since for now it's not supported you could write this question to the "<a href="http://digital.ni.com/public.nsf/allkb/EDA7C01C684ACB6286256FF0000238D5?OpenDocument" target="_blank">Product Suggestion Center</a>".
Regards,
Andrea N.
asper
17 years ago
Permalink
Dear Andrea,thank you for the advice.Before writing in the forum, I had
already opened the block diagram of "MLS Sequence Waveform"
and I had discovered that the approach implemented can not be
translated to the FPGA because the VI uses many features that are not
available on FPGA platform, for example the random number generator.



RegardsAsper
UliB
17 years ago
Permalink
Hello asper,I don't know if there is a PRBS-VI in LabVIEW already, but, according tohttp://www.fh-wolfsburg.de/cms/de/pws/meyer/lehrveranstaltungen/rtvertiefung/unterlagen/PRBS.pdf (german document)all you need is a shift register and a XOR.The attached VI will generate a PRBS with N=5.Hope this helps.UliMessage Edited by UliB on 07-11-2008 06:29 PM


PRBS.vi:
http://forums.ni.com/attachments/ni/170/340099/1/PRBS.vi
asper
17 years ago
Permalink
Dear Uli,

many thanks you for your idea, I think
that it's correct and I will work on it, I need a PRBS with N =
2^23-1.



Regards,Asper
UliB
17 years ago
Permalink
Hello asper,
take a look at
<a href="http://www.xilinx.com/support/documentation/application_notes/xapp052.pdf" target="_blank">http://www.xilinx.com/support/documentation/application_notes/xapp052.pdf</a>.
This document lists which stages of the shift register you have to use as input for a XNOR (not XOR !). The table for k goes from 3 to 168 (N=2^k-1).
Uli
asper
17 years ago
Permalink
Dear Uli,thanks you again for the
information.

By
using your suggestion and the description of the Linear Feedback Shift Register I have
been able to develop a PRBS with desired characteristic polynomial
and repetition period (2^32-1).
LFSR: http://en.wikipedia.org/wiki/Linear_feedback_shift_register


I have also found
that there is a good example of code in the IPNet



LV FPGA Pseudo Random Number Generator: http://decibel.ni.com/content/docs/DOC-1143


Regards,Asper

Loading...