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...