コード例 #1
0
 def setUp (self):
 
     #print os.getpid()
     #raw_input("press the any key")
     
     self.tb = gr.top_block ()
     
     offset = 43223  #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
     
     mod=scipy.io.loadmat('/home/demel/exchange/matlab_test_first_freq.mat') 
     mat_u1=tuple(mod['test'].flatten())
     mat_d=range(len(mat_u1))
     for idx, val in enumerate(mat_u1):
         mat_d[idx]=val
     intu=tuple(mat_d[0:slotl*60])
     
     self.src  = gr.vector_source_c(intu,False,1)
     self.tag  = lte.tag_symbol_cc(offset,fftl)
     #self.head = gr.head(gr.sizeof_gr_complex,70000)
     self.sel = lte.sss_selector_cvc(fftl)
     self.vtos = gr.vector_to_stream(gr.sizeof_gr_complex,512)
     self.snk = gr.vector_sink_c(1)
     
     self.tb.connect(self.src,self.tag,self.sel,self.vtos,self.snk)#,self.head
コード例 #2
0
 def setUp (self):
     
     self.tb = gr.top_block ()
     
     offset = 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.tag  = lte.tag_symbol_cc(offset,fftl)
     self.sel = lte.sss_selector_cvc(fftl)
     self.vtos = gr.vector_to_stream(gr.sizeof_gr_complex,512)
     self.snk = gr.vector_sink_c(1)
     
     self.tb.connect(self.src,self.tag,self.sel,self.vtos,self.snk)