def __init__(self, fftl): """ This hierarchical block has a complex input and complex output stream. The actual data remains unchanged. The N_id_2 or cell ID number is calculated. Based on the position of the PSS the frame structure is calculated on a half frame basis and tagged to the output stream together with N_id_2 A tag with the slot number within a half frame is tagged at the beginning of every slot. (key = slot) A tag with the N_id_2 is tagged at the beginning of every half frame. (Corresponds to slot 0) (key = N_id_2) The input data must be tagged with information for symbols. (key = symbol) the tag propagation policy is set to TPP_DONT. """ gr.hier_block2.__init__(self, "hier_pss_sync_cc", gr.io_signature(1,1, gr.sizeof_gr_complex), # Input signature gr.io_signature(1,1, gr.sizeof_gr_complex)) # Output signature # This is a fixed value due to the fact that the PSS is always located at the 62 center carriers. N_rb_dl = 6; self.tag = lte.pss_tagging_cc(fftl) self.sel = lte.pss_selector_cvc(fftl) self.fft = gr.fft_vcc(fftl,True,window.rectangular(fftl),False,1) self.ext = lte.extract_occupied_tones_vcvc(N_rb_dl,fftl) self.calc = lte.pss_calc_vc(self.tag,self.sel,fftl) # Define blocks self.connect(self, self.tag, self) self.connect(self, self.sel, self.fft, self.ext, self.calc)
def __init__(self, fftl): """ This hierarchical block has a complex input and complex output stream. The actual data remains unchanged. The N_id_2 or cell ID number is calculated. Based on the position of the PSS the frame structure is calculated on a half frame basis and tagged to the output stream together with N_id_2 A tag with the slot number within a half frame is tagged at the beginning of every slot. (key = slot) A tag with the N_id_2 is tagged at the beginning of every half frame. (Corresponds to slot 0) (key = N_id_2) The input data must be tagged with information for symbols. (key = symbol) the tag propagation policy is set to TPP_DONT. """ gr.hier_block2.__init__( self, "hier_pss_sync_cc", gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature # This is a fixed value due to the fact that the PSS is always located at the 62 center carriers. N_rb_dl = 6 self.tag = lte.pss_tagging_cc(fftl) self.sel = lte.pss_selector_cvc(fftl) self.fft = gr.fft_vcc(fftl, True, window.rectangular(fftl), False, 1) self.ext = lte.extract_occupied_tones_vcvc(N_rb_dl, fftl) self.calc = lte.pss_calc_vc(self.tag, self.sel, fftl) # Define blocks self.connect(self, self.tag, self) self.connect(self, self.sel, self.fft, self.ext, self.calc)
def setUp (self): self.tb = gr.top_block () #print os.getpid() #raw_input("Press the ANY key!") offset = 582 #sample15 = 21839 #sample20 = 43223 fftl = 512 cpl = 144*fftl/2048 cpl0 = 160*fftl/2048 slotl = 7*fftl+6*cpl+cpl0 cell_id = 124 N_rb_dl = 6 intu = [1.0] * 100 * fftl self.src = gr.vector_source_c(intu,False,1) self.head = gr.head(gr.sizeof_gr_complex*fftl ,200) self.tag = lte_swig.tag_symbol_cc(offset,fftl) self.sel = lte_swig.pss_selector_cvc(fftl) self.snk = gr.vector_sink_c(fftl) self.tb.connect(self.src, self.tag, self.sel, self.head, self.snk)
def setUp (self): self.tb = gr.top_block () #print os.getpid() #raw_input("Press the ANY key!") offset = 43223 #sample15 = 21839 #sample20 = 43223 fftl = 512 cell_id = 124 N_rb_dl = 6 intu = [1.0] * 100 * fftl self.src = gr.vector_source_c(intu,False,1) self.tag = lte_swig.tag_symbol_cc(offset,fftl) self.sel = lte_swig.pss_selector_cvc(fftl) self.fft = gr.fft_vcc(fftl,True,window.rectangular(fftl),False,1) self.ext = lte_swig.extract_occupied_tones_vcvc(N_rb_dl,fftl) self.tagp = lte.pss_tagging_cc(fftl) # Dummy self.calc = lte.pss_calc_vc(self.tagp,self.sel,fftl) #self.snk = gr.vector_sink_c(fftl) self.tb.connect(self.src, self.tag, self.sel, self.fft, self.ext, self.calc)