Monday, August 31, 2015

[Discuss-gnuradio] ofdm plateau_detector_fb_impl//ofdm_sync_sc_cfb_impl

Hi all,
           I have a question on the synchronization of ofdm example,namely the sch&cox source code.
   
           The plateau_detector_fb_impl.cc can find the plateau,and then header_payload_demux_impl can find the head data.
            STEP 1: plateau_detector_fb_impl find the plateau.
            flank_start = i;
          while(i < noutput_items && in[i] >= d_threshold)
            i++;
          if((i - flank_start) > 1) { // 1 Sample is not a plateau
            out[flank_start + (i-flank_start)/2] = 1;
            i = std::min(i+d_max_len, noutput_items-1);
          }
            STEP 2:header_payload_demux_impl can find the head data
            case STATE_HEADER:
              if (check_items_available(d_header_len, ninput_items, noutput_items, nread)) {
                copy_n_symbols(in, out_header, PORT_HEADER, d_header_len);
              STEP  3:
             memcpy((void *) out, (void *) (in + d_gi * d_itemsize), d_items_per_symbol * d_itemsize);


            I think may be the code have some errors.For example,the data is    cdef+abcdef,the cyclic prefix is cdef,and the data is abcdef.
According step1,the output will ouput 0010000000.Because the sch&cox will output a plateau in the cyclic prefix,namely the index corresponding to the cdefa will be the plateau.The source code output 1 in the middle.Namely the index corresponding to the middle "e" output 1.
           According to the step 2 and step3, we copy the d_items_per_symbol * d_itemsize bytes after (in + d_gi * d_itemsize) to the output.In the example, cdef+abcdef,the d_gi is 4. (in + d_gi * d_itemsize) will correspond to the c.Then output d_items_per_symbol is 6,then output cdef..But the true head data is abcdef,so I think maybe the source code have some problems.Is my understanding right?
            Thank you.
Best regards,
zswx
         


夏日畅销榜大牌美妆只要1元

No comments:

Post a Comment