|Subject:||Re: [Discuss-gnuradio] Scrambler Mask, Seed and Lenght|
|Date:||Fri, 15 May 2015 10:32:08 +0200|
|User-agent:||Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0|
first things first: That is gr::digital::scrambler_bb, which has doxygen documentation .
The length is really just the length of the underlying shift register -- which ought to be at least (order of generator poly)+1, ie. floor(log2(mask))+1
I recommend having a quick glance at its source code , revealing that it's actually but a block wrapper around gr::digital::lfsr.
If I read lfsr's code correctly, you're right, the highest bit of the mask will always be ignored, because it  will always be ANDed with a 0:
unsigned char newbit = (popCount( d_shift_register & d_mask )%2)^(input & 1);
since d_shift_register never sees the 8th bit being set:
d_shift_register = ((d_shift_register>>1) | (newbit<<d_shift_register_length));
So, yes, I think I agree, and length should at least be 8 here (your polynomial has degree 7), and it's a bit uncommon to see a LFSR being used without the x^0 coefficient.
On 05/15/2015 08:24 AM, Thanasis Balafoutis wrote:
|[Prev in Thread]||Current Thread||[Next in Thread]|