Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PN9 and PN15

1,217 views
Skip to first unread message

Ajay Oka

unread,
Oct 24, 2001, 6:35:02 PM10/24/01
to
Folks,
Anyone have any idea as to where I can find algorithm for generating a PN9
pseudo-random binary sequence. I am trying to write a C-Program to generate
a PN9
(PN9 = (2^9 -1 = 511 bits) ) pseudo-random sequence.
Any information will be greatly appreciated.
thanks,


Roy Bamford

unread,
Oct 25, 2001, 4:16:25 PM10/25/01
to
Ajay,

I'm a hardware engineer and have done this with a shift register and
exclusive or tree for different length codes several times. The trick is to
find the feedback points and the number of them you require.

It is not a long process to establish by writing a program for an exhaustive
search.
Sorry I don't do pseudo code or C.

Clear a 512 address hash table to zero
Setup the pick off points (0x101) and mask
Initialise the 9 bit shift register to 1 (zero is not a good idea)
Initialise the state count

If the value in the shift register is in the hash table then exit
Add the value to the hash table
Increment the state count
Count the number of bits set in the shift reg anded with the mask
If odd feedback will be 1 if even feedback will be 0
Shift the shift register one place left
Add the feedback bit into bit 0

exit:
If you have counted 511 states you have found a maximal length feedback
setup
else
try the next one.

A few other hints:-
You will always feedback the top bit, so the feedback and mask will be
0x101, 0x102, 0x104, ... all the combinations of two bits then
0x103 .. all the combinations of 3 bits etc
You probably know why zero is not a good idea as a seed.
There are several maximal length codes.

Its only a few lines of assembler when you have selected your feedback mask

Regards,

Roy Bamford
--
There are two classes of computer users,
those who do backups and
those who have never had a hard drive fail.

"Ajay Oka" <aja...@optonline.net> wrote in message
news:qmHB7.2449$C7.9...@news02.optonline.net...

0 new messages