test_decim_gdescrambler_cc.py


※上記の広告は60日以上更新のないWIKIに表示されています。更新することで広告が下部へ移動します。

from gnuradio import gr, howto

class my_top_block(gr.top_block):
    def __init__(self):
        gr.top_block.__init__(self)
        #interpolation = 31
        #mask = 0   
        #seed = 1;
        #reg_len = 4 #x^5 + x^3 + x^0 = 41 ,ntaps = 31
        
        interpolation = 15
        mask = 0   
        seed = 2
        degree = 4 #2^4 + 2^3 + 2^0 = 25 ,ntaps = 15 

        scrambler = howto.interp_gscrambler_cc(interpolation, degree, mask, seed)
        src_data = (3.0+1.0j, -1.0+1.0j, 1.0+3.0j)
        
        src = gr.vector_source_c (src_data)
        out_prt = howto.print_cc ()
        descrambler = howto.decim_gdescrambler_cc(degree, mask, seed)
        dst = gr.vector_sink_c ()
        self.connect (src, scrambler)
        self.connect (scrambler, descrambler)
        self.connect (descrambler, out_prt)
        self.connect (out_prt, dst)

def main():
    tb = my_top_block()
    my_top_block().run()
      
if __name__=='__main__':
    try:
        main()
    except KeyboardInterrupt:
        pass