discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] question about dvb_bch_bb_impl.cc


From: Ron Economos
Subject: Re: [Discuss-gnuradio] question about dvb_bch_bb_impl.cc
Date: Mon, 13 Jun 2016 15:17:05 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0

The gr-dtv BCH encoder has been heavily tested with both DVB-S2 and DVB-T2 receivers and is known to be correct. I did verify that your suggested change breaks the BCH encoder.

You can see a nice demo of the DVB-S2 transmitter here:

https://myriadrf.org/blog/digital-video-transmission-using-limesdr-gnu-radio/

Ron

On 06/13/2016 07:22 AM, Tiankun Hu wrote:
I found dvb_bch_bb_impl.cc use shift register to implement BCH encode, but it seems different with my knowledge. If I remember right, after shift the register, we should add the info bit to register's LSB

dvb_bch_bb_impl.cc:526~535
              b = (temp ^ (shift[5] & 1));
              reg_6_shift(shift);
              if (b) {
                shift[0] ^= m_poly_n_12[0];
                shift[1] ^= m_poly_n_12[1];
                shift[2] ^= m_poly_n_12[2];
                shift[3] ^= m_poly_n_12[3];
                shift[4] ^= m_poly_n_12[4];
                shift[5] ^= m_poly_n_12[5];
              }

should be like this ===========>
b = shift[5] & 1; // use register's MSB to decide whether need to XOR poly
              reg_6_shift(shift);
shift[0] = shift[0] ^ (temp<<31);// add the info bit to register's LSB
              if (b) {
                shift[0] ^= m_poly_n_12[0];
                shift[1] ^= m_poly_n_12[1];
                shift[2] ^= m_poly_n_12[2];
                shift[3] ^= m_poly_n_12[3];
                shift[4] ^= m_poly_n_12[4];
                shift[5] ^= m_poly_n_12[5];
              }





reply via email to

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