def __init__(self, vlen, frame_length ): gr.hier_block2.__init__( self, "channel_estimator_002", gr.io_signature( 1, 1, gr.sizeof_gr_complex * vlen ), gr.io_signature( 1, 1, gr.sizeof_gr_complex * vlen ) ) # disable phase tracking nondata_blocks = range(frame_length) pilot_tones = [] if channel_estimator_002.vlen != vlen or \ channel_estimator_002.td is None or \ channel_estimator_002.fd is None : td,fd = schmidl_ifo_designer.create(vlen, vlen) channel_estimator_002.td, channel_estimator_002.fd = td,fd channel_estimator_002.vlen = vlen else: td,fd = channel_estimator_002.td, channel_estimator_002.fd self.preamble_td = td self.preamble_fd = fd uut = ofdm.channel_estimator_02(vlen, pilot_tones, nondata_blocks) uut.set_known_block( 0, fd, True ) trigger = [0]*frame_length trigger[0] = 1 trigger = gr.vector_source_b( trigger, True ) self.trigger = trigger self.connect( self, uut, self ) self.connect( trigger, ( uut, 1 ) ) terminate_stream( self, ( uut, 1 ) )
def __init__( self, vlen ): gr.hier_block2.__init__( self, "channel_estimator_001", gr.io_signature( 1, 1, gr.sizeof_gr_complex * vlen ), gr.io_signature( 1, 1, gr.sizeof_gr_complex * vlen ) ) nondata_blocks = [1] pilot_tones = [0] if channel_estimator_001.vlen != vlen or \ channel_estimator_001.td is None or \ channel_estimator_001.fd is None : td,fd = schmidl_ifo_designer.create(vlen, vlen) channel_estimator_001.td, channel_estimator_001.fd = td,fd channel_estimator_001.vlen = vlen else: td,fd = channel_estimator_001.td, channel_estimator_001.fd self.preamble_td = td self.preamble_fd = fd uut = ofdm.channel_estimator_02(vlen, pilot_tones, nondata_blocks) uut.set_known_block( 0, self.preamble_fd, True ) trigger = gr.vector_source_b( [1], True ) self.connect( self, uut ) self.connect( trigger, ( uut, 1 ) ) self.connect( ( uut, 2 ), self ) terminate_stream( self, ( uut, 0 ) ) terminate_stream( self, ( uut, 1 ) )