示例#1
0
    def setUp (self):
        self.tb = gr.top_block ()
        
        mod=scipy.io.loadmat('/home/demel/exchange/matlab_sss.mat') 
        mat_u1=tuple(mod['sss'].flatten())
        mat_d=range(len(mat_u1))
        for idx, val in enumerate(mat_u1):
            mat_d[idx]=val
        intu=tuple(mat_d)
        
        fftl = 512
        
        self.daemon = lte_swig.cell_id_daemon()
        
        # This is not yet a complete test! It's just for the purpose of testing the decoding and correlating.
        # Tag handling is not tested.
        self.src  = gr.vector_source_c(intu,False,72)
        
        self.tag = lte_swig.sss_tagging_cc(fftl)
        # calc sink block, which sets some attributes of other blocks.
        self.calc = lte_swig.sss_calc_vc(self.tag, fftl)
        

        
        self.tb.connect(self.src,self.calc)
示例#2
0
    def setUp (self):
        self.tb = gr.top_block ()
        
        mod=scipy.io.loadmat('/home/demel/exchange/matlab_sss.mat') 
        mat_u1=tuple(mod['sss'].flatten())
        mat_d=range(len(mat_u1))
        for idx, val in enumerate(mat_u1):
            mat_d[idx]=val
        intu=tuple(mat_d)
        
        fftl = 512
        
        self.daemon = lte_swig.cell_id_daemon()
        
        # This is not yet a complete test! It's just for the purpose of testing the decoding and correlating.
        # Tag handling is not tested.
        self.src  = gr.vector_source_c(intu,False,72)
        
        self.tag = lte_swig.sss_tagging_cc(fftl)
        # calc sink block, which sets some attributes of other blocks.
        self.calc = lte_swig.sss_calc_vc(self.tag, fftl)
        

        
        self.tb.connect(self.src,self.calc)
示例#3
0
    def __init__(self, fftl):
        """
        docstring
        """
        gr.hier_block2.__init__(
            self,
            "hier_sss_sync_cc",
            gr.io_signature(1, 1, gr.sizeof_gr_complex),  # Input signature
            gr.io_signature(1, 1, gr.sizeof_gr_complex),
        )  # Output signature

        self.message_port_register_hier_in("cell_id")
        # input goes into 2 blocks: selector and tagging
        # 2 parallel streams: main (all data) right into tagging, sss symbol -> fft -> extract -> calc sss
        # required blocks:
        # selector
        # fft
        # resize (extract)
        # calc sss
        # tagging

        # SSS selector block
        self.sel = lte_swig.sss_selector_cvc(fftl)

        # in this block N_rb_dl is fixed. SSS is always mapped to those carriers.
        N_rb_dl = 6

        # fft block and matching extract block
        # input : vector with size: gr_complex * fftl
        # output: vector with size: gr_complex * 12 * N_rb_dl
        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.tag = lte_swig.sss_tagging_cc(fftl)
        # calc sink block, which sets some attributes of other blocks.
        # self.calc = lte_swig.sss_calc_vc(self.tag, daemon, fftl)
        self.calc = lte_swig.sss_calc_vc(self.tag, fftl)

        # Connect blocks
        self.connect(self, self.tag, self)
        self.connect(self, self.sel, self.fft, self.ext, self.calc)

        self.msg_connect(self.calc, "cell_id", self, "cell_id")
示例#4
0
    def __init__(self, daemon, fftl):
        """
        docstring
        """
        gr.hier_block2.__init__(
            self,
            "hier_sss_sync_cc",
            gr.io_signature(1, 1, gr.sizeof_gr_complex),  # Input signature
            gr.io_signature(1, 1, gr.sizeof_gr_complex))  # Output signature

        # input goes into 2 blocks: selector and tagging
        # 2 parallel streams: main (all data) right into tagging, sss symbol -> fft -> extract -> calc sss
        # required blocks:
        # selector
        # fft
        # resize (extract)
        # calc sss
        # tagging

        # SSS selector block
        self.sel = lte_swig.sss_selector_cvc(fftl)

        # in this block N_rb_dl is fixed. SSS is always mapped to those carriers.
        N_rb_dl = 6

        # fft block and matching extract block
        # input : vector with size: gr_complex * fftl
        # output: vector with size: gr_complex * 12 * N_rb_dl
        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.tag = lte_swig.sss_tagging_cc(fftl)
        # calc sink block, which sets some attributes of other blocks.
        self.calc = lte_swig.sss_calc_vc(self.tag, daemon, fftl)

        # Connect blocks
        self.connect(self, self.tag, self)
        self.connect(self, self.sel, self.fft, self.ext, self.calc)