def __init__(self): gr.top_block.__init__(self, "Top Block") Qt.QWidget.__init__(self) self.setWindowTitle("Top Block") try: self.setWindowIcon(Qt.QIcon.fromTheme('gnuradio-grc')) except: pass self.top_scroll_layout = Qt.QVBoxLayout() self.setLayout(self.top_scroll_layout) self.top_scroll = Qt.QScrollArea() self.top_scroll.setFrameStyle(Qt.QFrame.NoFrame) self.top_scroll_layout.addWidget(self.top_scroll) self.top_scroll.setWidgetResizable(True) self.top_widget = Qt.QWidget() self.top_scroll.setWidget(self.top_widget) self.top_layout = Qt.QVBoxLayout(self.top_widget) self.top_grid_layout = Qt.QGridLayout() self.top_layout.addLayout(self.top_grid_layout) self.settings = Qt.QSettings("GNU Radio", "top_block") self.restoreGeometry(self.settings.value("geometry").toByteArray()) ################################################## # Variables ################################################## self.Nt = Nt = 2 self.dft_coef = dft_coef = np.exp(-2*np.pi*1j/Nt) self.A = A = np.arange(Nt)[np.newaxis] self.tlen = tlen = 4000 self.samp_rate = samp_rate = 100000 self.dft_matrix = dft_matrix = np.power(dft_coef, np.dot(A.transpose(),A)) self.scramble_2 = scramble_2 = 2*np.random.random_integers(0,1,size=(tlen,Nt))-1 self.scramble_1 = scramble_1 = 2*np.random.random_integers(0,1,size=(tlen,Nt))-1 self.prefix = prefix = '/home/zhe/gr-PWF/examples' self.noise = noise = [np.identity(Nt), np.identity(Nt)] self.max_iteration = max_iteration = 20 self.interpo = interpo = samp_rate/1000 self.dft_pilot_seq = dft_pilot_seq = np.tile(dft_matrix,(tlen/Nt,1)) self.Q = Q = 4 self.L = L = 2 self.sigmagenfile = sigmagenfile = prefix+'/sigmagens/sigmagen_10.bin' self.pulse = pulse = filter.firdes.root_raised_cosine(Q,Q,1,0.35,11*Q) self.prewhiten1 = prewhiten1 = np.linalg.pinv(noise[1]) self.prewhiten0 = prewhiten0 = np.linalg.pinv(noise[0]) self.pilot_seq_2 = pilot_seq_2 = np.multiply(dft_pilot_seq,scramble_2) self.pilot_seq_1 = pilot_seq_1 = np.multiply(dft_pilot_seq,scramble_1) self.pilot2file = pilot2file = prefix+'/pilots/pilot2_4000.bin' self.pilot1file = pilot1file = prefix+'/pilots/pilot1_4000.bin' self.payload_size = payload_size = 0 self.npoints = npoints = max_iteration*interpo self.noise_hat = noise_hat = [np.identity(Nt), np.identity(Nt)] self.ichn_gain_dB = ichn_gain_dB = 10 self.channelfile = channelfile = prefix+'/channels/2x2channel_10dB_3.bin' self.channel = channel = np.true_divide(np.random.standard_normal(size=(L,L,Nt,Nt))+np.random.standard_normal(size=(L,L,Nt,Nt))*1j,np.sqrt(2)) self.Pt = Pt = 100 ################################################## # Blocks ################################################## self.qtgui_time_sink_x_0 = qtgui.time_sink_f( npoints, #size samp_rate, #samp_rate "Strong Interference (ichn_gain = 10dB)", #name 2 #number of inputs ) self.qtgui_time_sink_x_0.set_update_time(0.1) self.qtgui_time_sink_x_0.set_y_axis(0, 20) self.qtgui_time_sink_x_0.set_y_label("Weighted Sum-Rate (bits/s/Hz)", "") self.qtgui_time_sink_x_0.enable_tags(-1, True) self.qtgui_time_sink_x_0.set_trigger_mode(qtgui.TRIG_MODE_AUTO, qtgui.TRIG_SLOPE_POS, 0.0, 0, 0, "") self.qtgui_time_sink_x_0.enable_autoscale(True) self.qtgui_time_sink_x_0.enable_grid(True) self.qtgui_time_sink_x_0.enable_control_panel(False) if not True: self.qtgui_time_sink_x_0.disable_legend() labels = ["Dual Link", "Identity Sigma", "", "", "", "", "", "", "", ""] widths = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] colors = ["blue", "red", "green", "black", "cyan", "magenta", "yellow", "dark red", "dark green", "blue"] styles = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] markers = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1] alphas = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] for i in xrange(2): if len(labels[i]) == 0: self.qtgui_time_sink_x_0.set_line_label(i, "Data {0}".format(i)) else: self.qtgui_time_sink_x_0.set_line_label(i, labels[i]) self.qtgui_time_sink_x_0.set_line_width(i, widths[i]) self.qtgui_time_sink_x_0.set_line_color(i, colors[i]) self.qtgui_time_sink_x_0.set_line_style(i, styles[i]) self.qtgui_time_sink_x_0.set_line_marker(i, markers[i]) self.qtgui_time_sink_x_0.set_line_alpha(i, alphas[i]) self._qtgui_time_sink_x_0_win = sip.wrapinstance(self.qtgui_time_sink_x_0.pyqwidget(), Qt.QWidget) self.top_layout.addWidget(self._qtgui_time_sink_x_0_win) self.phase_corrector_0_2 = phase_corrector( loop_bandwidth=2*np.pi*0.005, max_freq=2*np.pi*0.01, training_sequence=pilot_seq_1[:,0], ) self.phase_corrector_0_1_0 = phase_corrector( loop_bandwidth=2*np.pi*0.005, max_freq=2*np.pi*0.01, training_sequence=pilot_seq_2[:,0], ) self.phase_corrector_0_1 = phase_corrector( loop_bandwidth=2*np.pi*0.005, max_freq=2*np.pi*0.01, training_sequence=pilot_seq_2[:,0], ) self.phase_corrector_0_0_1 = phase_corrector( loop_bandwidth=2*np.pi*0.005, max_freq=2*np.pi*0.01, training_sequence=pilot_seq_1[:,1], ) self.phase_corrector_0_0_0_0 = phase_corrector( loop_bandwidth=2*np.pi*0.005, max_freq=2*np.pi*0.01, training_sequence=pilot_seq_2[:,1], ) self.phase_corrector_0_0_0 = phase_corrector( loop_bandwidth=2*np.pi*0.005, max_freq=2*np.pi*0.01, training_sequence=pilot_seq_2[:,1], ) self.phase_corrector_0_0 = phase_corrector( loop_bandwidth=2*np.pi*0.005, max_freq=2*np.pi*0.01, training_sequence=pilot_seq_1[:,1], ) self.phase_corrector_0 = phase_corrector( loop_bandwidth=2*np.pi*0.005, max_freq=2*np.pi*0.01, training_sequence=pilot_seq_1[:,0], ) self.interp_fir_filter_xxx_0_1_0 = filter.interp_fir_filter_ccc(Q, (pulse)) self.interp_fir_filter_xxx_0_1_0.declare_sample_delay(0) self.interp_fir_filter_xxx_0_1 = filter.interp_fir_filter_ccc(Q, (pulse)) self.interp_fir_filter_xxx_0_1.declare_sample_delay(0) self.interp_fir_filter_xxx_0_0 = filter.interp_fir_filter_ccc(Q, (pulse)) self.interp_fir_filter_xxx_0_0.declare_sample_delay(0) self.interp_fir_filter_xxx_0 = filter.interp_fir_filter_ccc(Q, (pulse)) self.interp_fir_filter_xxx_0.declare_sample_delay(0) self.fir_filter_xxx_0_1 = filter.fir_filter_ccc(Q, (pulse)) self.fir_filter_xxx_0_1.declare_sample_delay(0) self.fir_filter_xxx_0_0_0 = filter.fir_filter_ccc(Q, (pulse)) self.fir_filter_xxx_0_0_0.declare_sample_delay(0) self.fir_filter_xxx_0_0 = filter.fir_filter_ccc(Q, (pulse)) self.fir_filter_xxx_0_0.declare_sample_delay(0) self.fir_filter_xxx_0 = filter.fir_filter_ccc(Q, (pulse)) self.fir_filter_xxx_0.declare_sample_delay(0) self.blocks_vector_to_streams_1_2 = blocks.vector_to_streams(gr.sizeof_gr_complex*1, 2) self.blocks_vector_to_streams_1_1_1 = blocks.vector_to_streams(gr.sizeof_gr_complex*1, 2) self.blocks_vector_to_streams_1_1_0_0 = blocks.vector_to_streams(gr.sizeof_gr_complex*1, 2) self.blocks_vector_to_streams_1_1_0 = blocks.vector_to_streams(gr.sizeof_gr_complex*1, 2) self.blocks_vector_to_streams_1_1 = blocks.vector_to_streams(gr.sizeof_gr_complex*1, 2) self.blocks_vector_to_streams_1_0_0 = blocks.vector_to_streams(gr.sizeof_gr_complex*1, 2) self.blocks_vector_to_streams_1_0 = blocks.vector_to_streams(gr.sizeof_gr_complex*1, 2) self.blocks_vector_to_streams_1 = blocks.vector_to_streams(gr.sizeof_gr_complex*1, 2) self.blocks_vector_to_streams_0 = blocks.vector_to_streams(gr.sizeof_gr_complex*4, 2) self.blocks_udp_source_1 = blocks.udp_source(gr.sizeof_gr_complex*8, "127.0.0.1", 1234, 1472, True) self.blocks_udp_sink_1_0 = blocks.udp_sink(gr.sizeof_gr_complex*8, "127.0.0.1", 1234, 1472, True) self.blocks_udp_sink_1 = blocks.udp_sink(gr.sizeof_gr_complex*8, "127.0.0.1", 1234, 1472, True) self.blocks_streams_to_vector_1_2 = blocks.streams_to_vector(gr.sizeof_gr_complex*1, 2) self.blocks_streams_to_vector_1_1_1 = blocks.streams_to_vector(gr.sizeof_gr_complex*1, 2) self.blocks_streams_to_vector_1_1_0_0 = blocks.streams_to_vector(gr.sizeof_gr_complex*1, 2) self.blocks_streams_to_vector_1_1_0 = blocks.streams_to_vector(gr.sizeof_gr_complex*1, 2) self.blocks_streams_to_vector_1_1 = blocks.streams_to_vector(gr.sizeof_gr_complex*1, 2) self.blocks_streams_to_vector_1_0_0 = blocks.streams_to_vector(gr.sizeof_gr_complex*1, 2) self.blocks_streams_to_vector_1_0 = blocks.streams_to_vector(gr.sizeof_gr_complex*1, 2) self.blocks_streams_to_vector_1 = blocks.streams_to_vector(gr.sizeof_gr_complex*1, 2) self.blocks_streams_to_vector_0_0 = blocks.streams_to_vector(gr.sizeof_gr_complex*4, 2) self.blocks_streams_to_vector_0 = blocks.streams_to_vector(gr.sizeof_gr_complex*4, 2) self.blocks_repeat_0_0 = blocks.repeat(gr.sizeof_float*1, interpo) self.blocks_repeat_0 = blocks.repeat(gr.sizeof_float*1, interpo) self.blocks_file_sink_0 = blocks.file_sink(gr.sizeof_gr_complex*8, "/home/zhe/Dropbox/gnuradio_trunk/gnufiles/udp", False) self.blocks_file_sink_0.set_unbuffered(True) self.PWF_weighted_sum_rate_0 = PWF.weighted_sum_rate(L, Nt, Pt, channel, ichn_gain_dB, [1,1],[prewhiten0 ,prewhiten1], False, channelfile) self.PWF_sigmagen_0 = PWF.sigmagen(L, Nt, Pt, True, sigmagenfile) self.PWF_power_adjust_1_0 = PWF.power_adjust(Nt, Pt, L) self.PWF_power_adjust_1 = PWF.power_adjust(Nt, Pt, L) self.PWF_pilot_receive_tx_0_0 = PWF.pilot_receive_tx(True, pilot1file, pilot_seq_1, Nt, tlen,noise_hat[0], tlen, 1) self.PWF_pilot_receive_tx_0 = PWF.pilot_receive_tx(True, pilot2file, pilot_seq_2, Nt, tlen,noise_hat[1], tlen, 1) self.PWF_pilot_receive_rx_0_0 = PWF.pilot_receive_rx(True, pilot2file, pilot_seq_2, prewhiten1, Nt, tlen, tlen+payload_size, 1) self.PWF_pilot_receive_rx_0 = PWF.pilot_receive_rx(True, pilot1file, pilot_seq_1, prewhiten0, Nt, tlen, tlen+payload_size, 1) self.PWF_pilot_gen_tx_0_0 = PWF.pilot_gen_tx(Nt, tlen, pilot_seq_2, True, pilot2file) self.PWF_pilot_gen_tx_0 = PWF.pilot_gen_tx(Nt, tlen, pilot_seq_1, True, pilot1file) self.PWF_pilot_gen_rx_0_0 = PWF.pilot_gen_rx(Nt, tlen, prewhiten0, pilot_seq_1, True, pilot1file) self.PWF_pilot_gen_rx_0 = PWF.pilot_gen_rx(Nt, tlen, prewhiten1, pilot_seq_2, True, pilot2file) self.PWF_debug_printmsg_0 = PWF.debug_printmsg(L, Nt, False, 20) self.PWF_channel_1 = PWF.channel(L, Nt, ichn_gain_dB, channel, False,noise_hat, False, channelfile) self.PWF_channel_0 = PWF.channel(L, Nt, ichn_gain_dB, channel, True,noise, True, channelfile) ################################################## # Connections ################################################## self.connect((self.PWF_channel_0, 0), (self.blocks_vector_to_streams_1_1, 0)) self.connect((self.PWF_channel_0, 1), (self.blocks_vector_to_streams_1_1_0, 0)) self.connect((self.PWF_channel_1, 1), (self.blocks_vector_to_streams_1_1_0_0, 0)) self.connect((self.PWF_channel_1, 0), (self.blocks_vector_to_streams_1_1_1, 0)) self.connect((self.PWF_debug_printmsg_0, 0), (self.PWF_pilot_gen_tx_0, 0)) self.connect((self.PWF_debug_printmsg_0, 1), (self.PWF_pilot_gen_tx_0_0, 0)) self.connect((self.PWF_pilot_gen_rx_0, 0), (self.blocks_vector_to_streams_1_0_0, 0)) self.connect((self.PWF_pilot_gen_rx_0_0, 0), (self.blocks_vector_to_streams_1_2, 0)) self.connect((self.PWF_pilot_gen_tx_0, 0), (self.blocks_vector_to_streams_1, 0)) self.connect((self.PWF_pilot_gen_tx_0_0, 0), (self.blocks_vector_to_streams_1_0, 0)) self.connect((self.PWF_pilot_receive_rx_0, 0), (self.PWF_power_adjust_1, 0)) self.connect((self.PWF_pilot_receive_rx_0_0, 0), (self.PWF_power_adjust_1, 1)) self.connect((self.PWF_pilot_receive_tx_0, 0), (self.PWF_power_adjust_1_0, 1)) self.connect((self.PWF_pilot_receive_tx_0_0, 0), (self.PWF_power_adjust_1_0, 0)) self.connect((self.PWF_power_adjust_1, 1), (self.PWF_pilot_gen_rx_0, 0)) self.connect((self.PWF_power_adjust_1, 0), (self.PWF_pilot_gen_rx_0_0, 0)) self.connect((self.PWF_power_adjust_1_0, 0), (self.blocks_streams_to_vector_0_0, 0)) self.connect((self.PWF_power_adjust_1_0, 1), (self.blocks_streams_to_vector_0_0, 1)) self.connect((self.PWF_sigmagen_0, 0), (self.blocks_streams_to_vector_0, 0)) self.connect((self.PWF_sigmagen_0, 1), (self.blocks_streams_to_vector_0, 1)) self.connect((self.PWF_weighted_sum_rate_0, 0), (self.blocks_repeat_0, 0)) self.connect((self.PWF_weighted_sum_rate_0, 1), (self.blocks_repeat_0_0, 0)) self.connect((self.blocks_repeat_0, 0), (self.qtgui_time_sink_x_0, 0)) self.connect((self.blocks_repeat_0_0, 0), (self.qtgui_time_sink_x_0, 1)) self.connect((self.blocks_streams_to_vector_0, 0), (self.blocks_udp_sink_1, 0)) self.connect((self.blocks_streams_to_vector_0_0, 0), (self.blocks_udp_sink_1_0, 0)) self.connect((self.blocks_streams_to_vector_1, 0), (self.PWF_channel_0, 0)) self.connect((self.blocks_streams_to_vector_1_0, 0), (self.PWF_channel_0, 1)) self.connect((self.blocks_streams_to_vector_1_0_0, 0), (self.PWF_channel_1, 1)) self.connect((self.blocks_streams_to_vector_1_1, 0), (self.PWF_pilot_receive_rx_0, 0)) self.connect((self.blocks_streams_to_vector_1_1_0, 0), (self.PWF_pilot_receive_rx_0_0, 0)) self.connect((self.blocks_streams_to_vector_1_1_0_0, 0), (self.PWF_pilot_receive_tx_0, 0)) self.connect((self.blocks_streams_to_vector_1_1_1, 0), (self.PWF_pilot_receive_tx_0_0, 0)) self.connect((self.blocks_streams_to_vector_1_2, 0), (self.PWF_channel_1, 0)) self.connect((self.blocks_udp_source_1, 0), (self.blocks_file_sink_0, 0)) self.connect((self.blocks_udp_source_1, 0), (self.blocks_vector_to_streams_0, 0)) self.connect((self.blocks_vector_to_streams_0, 0), (self.PWF_debug_printmsg_0, 0)) self.connect((self.blocks_vector_to_streams_0, 1), (self.PWF_debug_printmsg_0, 1)) self.connect((self.blocks_vector_to_streams_0, 0), (self.PWF_weighted_sum_rate_0, 0)) self.connect((self.blocks_vector_to_streams_0, 1), (self.PWF_weighted_sum_rate_0, 1)) self.connect((self.blocks_vector_to_streams_1, 0), (self.interp_fir_filter_xxx_0, 0)) self.connect((self.blocks_vector_to_streams_1, 1), (self.interp_fir_filter_xxx_0_1, 0)) self.connect((self.blocks_vector_to_streams_1_0, 0), (self.interp_fir_filter_xxx_0_0, 0)) self.connect((self.blocks_vector_to_streams_1_0, 1), (self.interp_fir_filter_xxx_0_1_0, 0)) self.connect((self.blocks_vector_to_streams_1_0_0, 0), (self.blocks_streams_to_vector_1_0_0, 0)) self.connect((self.blocks_vector_to_streams_1_0_0, 1), (self.blocks_streams_to_vector_1_0_0, 1)) self.connect((self.blocks_vector_to_streams_1_1, 0), (self.fir_filter_xxx_0, 0)) self.connect((self.blocks_vector_to_streams_1_1, 1), (self.fir_filter_xxx_0_0, 0)) self.connect((self.blocks_vector_to_streams_1_1_0, 1), (self.fir_filter_xxx_0_0_0, 0)) self.connect((self.blocks_vector_to_streams_1_1_0, 0), (self.fir_filter_xxx_0_1, 0)) self.connect((self.blocks_vector_to_streams_1_1_0_0, 1), (self.phase_corrector_0_0_0_0, 0)) self.connect((self.blocks_vector_to_streams_1_1_0_0, 0), (self.phase_corrector_0_1_0, 0)) self.connect((self.blocks_vector_to_streams_1_1_1, 1), (self.phase_corrector_0_0_1, 0)) self.connect((self.blocks_vector_to_streams_1_1_1, 0), (self.phase_corrector_0_2, 0)) self.connect((self.blocks_vector_to_streams_1_2, 1), (self.blocks_streams_to_vector_1_2, 1)) self.connect((self.blocks_vector_to_streams_1_2, 0), (self.blocks_streams_to_vector_1_2, 0)) self.connect((self.fir_filter_xxx_0, 0), (self.phase_corrector_0, 0)) self.connect((self.fir_filter_xxx_0_0, 0), (self.phase_corrector_0_0, 0)) self.connect((self.fir_filter_xxx_0_0_0, 0), (self.phase_corrector_0_0_0, 0)) self.connect((self.fir_filter_xxx_0_1, 0), (self.phase_corrector_0_1, 0)) self.connect((self.interp_fir_filter_xxx_0, 0), (self.blocks_streams_to_vector_1, 0)) self.connect((self.interp_fir_filter_xxx_0_0, 0), (self.blocks_streams_to_vector_1_0, 0)) self.connect((self.interp_fir_filter_xxx_0_1, 0), (self.blocks_streams_to_vector_1, 1)) self.connect((self.interp_fir_filter_xxx_0_1_0, 0), (self.blocks_streams_to_vector_1_0, 1)) self.connect((self.phase_corrector_0, 0), (self.blocks_streams_to_vector_1_1, 0)) self.connect((self.phase_corrector_0_0, 0), (self.blocks_streams_to_vector_1_1, 1)) self.connect((self.phase_corrector_0_0_0, 0), (self.blocks_streams_to_vector_1_1_0, 1)) self.connect((self.phase_corrector_0_0_0_0, 0), (self.blocks_streams_to_vector_1_1_0_0, 1)) self.connect((self.phase_corrector_0_0_1, 0), (self.blocks_streams_to_vector_1_1_1, 1)) self.connect((self.phase_corrector_0_1, 0), (self.blocks_streams_to_vector_1_1_0, 0)) self.connect((self.phase_corrector_0_1_0, 0), (self.blocks_streams_to_vector_1_1_0_0, 0)) self.connect((self.phase_corrector_0_2, 0), (self.blocks_streams_to_vector_1_1_1, 0))
def __init__(self): gr.top_block.__init__(self, "Calibration Example") Qt.QWidget.__init__(self) self.setWindowTitle("Calibration Example") try: self.setWindowIcon(Qt.QIcon.fromTheme('gnuradio-grc')) except: pass self.top_scroll_layout = Qt.QVBoxLayout() self.setLayout(self.top_scroll_layout) self.top_scroll = Qt.QScrollArea() self.top_scroll.setFrameStyle(Qt.QFrame.NoFrame) self.top_scroll_layout.addWidget(self.top_scroll) self.top_scroll.setWidgetResizable(True) self.top_widget = Qt.QWidget() self.top_scroll.setWidget(self.top_widget) self.top_layout = Qt.QVBoxLayout(self.top_widget) self.top_grid_layout = Qt.QGridLayout() self.top_layout.addLayout(self.top_grid_layout) self.settings = Qt.QSettings("GNU Radio", "calibration_example_gui_2x_view") self.restoreGeometry(self.settings.value("geometry").toByteArray()) ################################################## # Variables ################################################## self.speed_of_light = speed_of_light = 299792458 self.antenna_spacing = antenna_spacing = 0.061 self.sync = sync = pmt.PMT_F self.samp_rate = samp_rate = 100000000/64 self.gain_rx = gain_rx = 0 self.center_freq = center_freq = speed_of_light/(2*antenna_spacing) self.cal_freq = cal_freq = 1024 self.Shift = Shift = -4 ################################################## # Blocks ################################################## self._sync_options = (pmt.PMT_F, pmt.PMT_T, ) self._sync_labels = ("Stop", "Running", ) self._sync_group_box = Qt.QGroupBox("Sync System") self._sync_box = Qt.QHBoxLayout() class variable_chooser_button_group(Qt.QButtonGroup): def __init__(self, parent=None): Qt.QButtonGroup.__init__(self, parent) @pyqtSlot(int) def updateButtonChecked(self, button_id): self.button(button_id).setChecked(True) self._sync_button_group = variable_chooser_button_group() self._sync_group_box.setLayout(self._sync_box) for i, label in enumerate(self._sync_labels): radio_button = Qt.QRadioButton(label) self._sync_box.addWidget(radio_button) self._sync_button_group.addButton(radio_button, i) self._sync_callback = lambda i: Qt.QMetaObject.invokeMethod(self._sync_button_group, "updateButtonChecked", Qt.Q_ARG("int", self._sync_options.index(i))) self._sync_callback(self.sync) self._sync_button_group.buttonClicked[int].connect( lambda i: self.set_sync(self._sync_options[i])) self.top_layout.addWidget(self._sync_group_box) self.uhd_usrp_source_0_0_0 = uhd.usrp_source( ",".join(("addr0=192.168.70.2,addr1=192.168.20.2", "")), uhd.stream_args( cpu_format="fc32", channels=range(2), ), ) self.uhd_usrp_source_0_0_0.set_clock_source("external", 0) self.uhd_usrp_source_0_0_0.set_time_source("external", 0) self.uhd_usrp_source_0_0_0.set_clock_source("external", 1) self.uhd_usrp_source_0_0_0.set_time_source("external", 1) self.uhd_usrp_source_0_0_0.set_time_unknown_pps(uhd.time_spec()) self.uhd_usrp_source_0_0_0.set_samp_rate(samp_rate) self.uhd_usrp_source_0_0_0.set_center_freq(center_freq, 0) self.uhd_usrp_source_0_0_0.set_gain(gain_rx, 0) self.uhd_usrp_source_0_0_0.set_center_freq(center_freq, 1) self.uhd_usrp_source_0_0_0.set_gain(gain_rx, 1) self.uhd_usrp_sink_0_0 = uhd.usrp_sink( ",".join(("addr=192.168.80.2", "")), uhd.stream_args( cpu_format="fc32", channels=range(1), ), ) self.uhd_usrp_sink_0_0.set_clock_source("mimo", 0) self.uhd_usrp_sink_0_0.set_time_source("mimo", 0) self.uhd_usrp_sink_0_0.set_samp_rate(samp_rate) self.uhd_usrp_sink_0_0.set_center_freq(center_freq, 0) self.uhd_usrp_sink_0_0.set_gain(10, 0) self.qtgui_time_sink_x_0_0 = qtgui.time_sink_f( 1526*2, #size samp_rate, #samp_rate "", #name 2 #number of inputs ) self.qtgui_time_sink_x_0_0.set_update_time(0.10) self.qtgui_time_sink_x_0_0.set_y_axis(-1, 1) self.qtgui_time_sink_x_0_0.set_y_label("Amplitude", "") self.qtgui_time_sink_x_0_0.enable_tags(-1, True) self.qtgui_time_sink_x_0_0.set_trigger_mode(qtgui.TRIG_MODE_AUTO, qtgui.TRIG_SLOPE_POS, 0.0, 0, 0, "") self.qtgui_time_sink_x_0_0.enable_autoscale(True) self.qtgui_time_sink_x_0_0.enable_grid(False) self.qtgui_time_sink_x_0_0.enable_control_panel(True) if not True: self.qtgui_time_sink_x_0_0.disable_legend() labels = ["", "", "", "", "", "", "", "", "", ""] widths = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] colors = ["blue", "red", "green", "black", "cyan", "magenta", "yellow", "dark red", "dark green", "blue"] styles = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] markers = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1] alphas = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] for i in xrange(2): if len(labels[i]) == 0: self.qtgui_time_sink_x_0_0.set_line_label(i, "Data {0}".format(i)) else: self.qtgui_time_sink_x_0_0.set_line_label(i, labels[i]) self.qtgui_time_sink_x_0_0.set_line_width(i, widths[i]) self.qtgui_time_sink_x_0_0.set_line_color(i, colors[i]) self.qtgui_time_sink_x_0_0.set_line_style(i, styles[i]) self.qtgui_time_sink_x_0_0.set_line_marker(i, markers[i]) self.qtgui_time_sink_x_0_0.set_line_alpha(i, alphas[i]) self._qtgui_time_sink_x_0_0_win = sip.wrapinstance(self.qtgui_time_sink_x_0_0.pyqwidget(), Qt.QWidget) self.top_layout.addWidget(self._qtgui_time_sink_x_0_0_win) self.phase_corrector_0 = phase_corrector( window=1024, ) self.blocks_message_strobe_0 = blocks.message_strobe(sync, 1000) self.blocks_delay_0 = blocks.delay(gr.sizeof_gr_complex*1, 0) self.blocks_complex_to_real_1 = blocks.complex_to_real(1) self.blocks_complex_to_real_0 = blocks.complex_to_real(1) self.analog_sig_source_x_0 = analog.sig_source_c(samp_rate, analog.GR_COS_WAVE, cal_freq, 1, 0) self._Shift_range = Range(-4, 4, 0.01, -4, 200) self._Shift_win = RangeWidget(self._Shift_range, self.set_Shift, "Shift", "counter_slider", float) self.top_layout.addWidget(self._Shift_win) ################################################## # Connections ################################################## self.msg_connect((self.blocks_message_strobe_0, 'strobe'), (self.phase_corrector_0, 'in')) self.connect((self.analog_sig_source_x_0, 0), (self.uhd_usrp_sink_0_0, 0)) self.connect((self.blocks_complex_to_real_0, 0), (self.qtgui_time_sink_x_0_0, 0)) self.connect((self.blocks_complex_to_real_1, 0), (self.qtgui_time_sink_x_0_0, 1)) self.connect((self.blocks_delay_0, 0), (self.blocks_complex_to_real_0, 0)) self.connect((self.phase_corrector_0, 0), (self.blocks_complex_to_real_1, 0)) self.connect((self.uhd_usrp_source_0_0_0, 0), (self.blocks_delay_0, 0)) self.connect((self.uhd_usrp_source_0_0_0, 0), (self.phase_corrector_0, 0)) self.connect((self.uhd_usrp_source_0_0_0, 1), (self.phase_corrector_0, 1))
def __init__(self): gr.top_block.__init__(self, "Top Block") Qt.QWidget.__init__(self) self.setWindowTitle("Top Block") try: self.setWindowIcon(Qt.QIcon.fromTheme('gnuradio-grc')) except: pass self.top_scroll_layout = Qt.QVBoxLayout() self.setLayout(self.top_scroll_layout) self.top_scroll = Qt.QScrollArea() self.top_scroll.setFrameStyle(Qt.QFrame.NoFrame) self.top_scroll_layout.addWidget(self.top_scroll) self.top_scroll.setWidgetResizable(True) self.top_widget = Qt.QWidget() self.top_scroll.setWidget(self.top_widget) self.top_layout = Qt.QVBoxLayout(self.top_widget) self.top_grid_layout = Qt.QGridLayout() self.top_layout.addLayout(self.top_grid_layout) self.settings = Qt.QSettings("GNU Radio", "top_block") self.restoreGeometry(self.settings.value("geometry").toByteArray()) ################################################## # Variables ################################################## self.Nt = Nt = 2 self.dft_coef = dft_coef = np.exp(-2 * np.pi * 1j / Nt) self.A = A = np.arange(Nt)[np.newaxis] self.tlen = tlen = 4000 self.samp_rate = samp_rate = 100000 self.dft_matrix = dft_matrix = np.power(dft_coef, np.dot(A.transpose(), A)) self.scramble_2 = scramble_2 = 2 * np.random.random_integers( 0, 1, size=(tlen, Nt)) - 1 self.scramble_1 = scramble_1 = 2 * np.random.random_integers( 0, 1, size=(tlen, Nt)) - 1 self.prefix = prefix = '/home/zhe/gr-PWF/examples' self.noise = noise = [np.identity(Nt), np.identity(Nt)] self.max_iteration = max_iteration = 20 self.interpo = interpo = samp_rate / 1000 self.dft_pilot_seq = dft_pilot_seq = np.tile(dft_matrix, (tlen / Nt, 1)) self.Q = Q = 4 self.L = L = 2 self.sigmagenfile = sigmagenfile = prefix + '/sigmagens/sigmagen_10.bin' self.pulse = pulse = filter.firdes.root_raised_cosine( Q, Q, 1, 0.35, 11 * Q) self.prewhiten1 = prewhiten1 = np.linalg.pinv(noise[1]) self.prewhiten0 = prewhiten0 = np.linalg.pinv(noise[0]) self.pilot_seq_2 = pilot_seq_2 = np.multiply(dft_pilot_seq, scramble_2) self.pilot_seq_1 = pilot_seq_1 = np.multiply(dft_pilot_seq, scramble_1) self.pilot2file = pilot2file = prefix + '/pilots/pilot2_4000.bin' self.pilot1file = pilot1file = prefix + '/pilots/pilot1_4000.bin' self.payload_size = payload_size = 0 self.npoints = npoints = max_iteration * interpo self.noise_hat = noise_hat = [np.identity(Nt), np.identity(Nt)] self.ichn_gain_dB = ichn_gain_dB = 10 self.channelfile = channelfile = prefix + '/channels/2x2channel_10dB_3.bin' self.channel = channel = np.true_divide( np.random.standard_normal(size=(L, L, Nt, Nt)) + np.random.standard_normal(size=(L, L, Nt, Nt)) * 1j, np.sqrt(2)) self.Pt = Pt = 100 ################################################## # Blocks ################################################## self.qtgui_time_sink_x_0 = qtgui.time_sink_f( npoints, #size samp_rate, #samp_rate "Strong Interference (ichn_gain = 10dB)", #name 2 #number of inputs ) self.qtgui_time_sink_x_0.set_update_time(0.1) self.qtgui_time_sink_x_0.set_y_axis(0, 20) self.qtgui_time_sink_x_0.set_y_label("Weighted Sum-Rate (bits/s/Hz)", "") self.qtgui_time_sink_x_0.enable_tags(-1, True) self.qtgui_time_sink_x_0.set_trigger_mode(qtgui.TRIG_MODE_AUTO, qtgui.TRIG_SLOPE_POS, 0.0, 0, 0, "") self.qtgui_time_sink_x_0.enable_autoscale(True) self.qtgui_time_sink_x_0.enable_grid(True) self.qtgui_time_sink_x_0.enable_control_panel(False) if not True: self.qtgui_time_sink_x_0.disable_legend() labels = [ "Dual Link", "Identity Sigma", "", "", "", "", "", "", "", "" ] widths = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] colors = [ "blue", "red", "green", "black", "cyan", "magenta", "yellow", "dark red", "dark green", "blue" ] styles = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] markers = [-1, -1, -1, -1, -1, -1, -1, -1, -1, -1] alphas = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] for i in xrange(2): if len(labels[i]) == 0: self.qtgui_time_sink_x_0.set_line_label( i, "Data {0}".format(i)) else: self.qtgui_time_sink_x_0.set_line_label(i, labels[i]) self.qtgui_time_sink_x_0.set_line_width(i, widths[i]) self.qtgui_time_sink_x_0.set_line_color(i, colors[i]) self.qtgui_time_sink_x_0.set_line_style(i, styles[i]) self.qtgui_time_sink_x_0.set_line_marker(i, markers[i]) self.qtgui_time_sink_x_0.set_line_alpha(i, alphas[i]) self._qtgui_time_sink_x_0_win = sip.wrapinstance( self.qtgui_time_sink_x_0.pyqwidget(), Qt.QWidget) self.top_layout.addWidget(self._qtgui_time_sink_x_0_win) self.phase_corrector_0_2 = phase_corrector( loop_bandwidth=2 * np.pi * 0.005, max_freq=2 * np.pi * 0.01, training_sequence=pilot_seq_1[:, 0], ) self.phase_corrector_0_1_0 = phase_corrector( loop_bandwidth=2 * np.pi * 0.005, max_freq=2 * np.pi * 0.01, training_sequence=pilot_seq_2[:, 0], ) self.phase_corrector_0_1 = phase_corrector( loop_bandwidth=2 * np.pi * 0.005, max_freq=2 * np.pi * 0.01, training_sequence=pilot_seq_2[:, 0], ) self.phase_corrector_0_0_1 = phase_corrector( loop_bandwidth=2 * np.pi * 0.005, max_freq=2 * np.pi * 0.01, training_sequence=pilot_seq_1[:, 1], ) self.phase_corrector_0_0_0_0 = phase_corrector( loop_bandwidth=2 * np.pi * 0.005, max_freq=2 * np.pi * 0.01, training_sequence=pilot_seq_2[:, 1], ) self.phase_corrector_0_0_0 = phase_corrector( loop_bandwidth=2 * np.pi * 0.005, max_freq=2 * np.pi * 0.01, training_sequence=pilot_seq_2[:, 1], ) self.phase_corrector_0_0 = phase_corrector( loop_bandwidth=2 * np.pi * 0.005, max_freq=2 * np.pi * 0.01, training_sequence=pilot_seq_1[:, 1], ) self.phase_corrector_0 = phase_corrector( loop_bandwidth=2 * np.pi * 0.005, max_freq=2 * np.pi * 0.01, training_sequence=pilot_seq_1[:, 0], ) self.interp_fir_filter_xxx_0_1_0 = filter.interp_fir_filter_ccc( Q, (pulse)) self.interp_fir_filter_xxx_0_1_0.declare_sample_delay(0) self.interp_fir_filter_xxx_0_1 = filter.interp_fir_filter_ccc( Q, (pulse)) self.interp_fir_filter_xxx_0_1.declare_sample_delay(0) self.interp_fir_filter_xxx_0_0 = filter.interp_fir_filter_ccc( Q, (pulse)) self.interp_fir_filter_xxx_0_0.declare_sample_delay(0) self.interp_fir_filter_xxx_0 = filter.interp_fir_filter_ccc(Q, (pulse)) self.interp_fir_filter_xxx_0.declare_sample_delay(0) self.fir_filter_xxx_0_1 = filter.fir_filter_ccc(Q, (pulse)) self.fir_filter_xxx_0_1.declare_sample_delay(0) self.fir_filter_xxx_0_0_0 = filter.fir_filter_ccc(Q, (pulse)) self.fir_filter_xxx_0_0_0.declare_sample_delay(0) self.fir_filter_xxx_0_0 = filter.fir_filter_ccc(Q, (pulse)) self.fir_filter_xxx_0_0.declare_sample_delay(0) self.fir_filter_xxx_0 = filter.fir_filter_ccc(Q, (pulse)) self.fir_filter_xxx_0.declare_sample_delay(0) self.blocks_vector_to_streams_1_2 = blocks.vector_to_streams( gr.sizeof_gr_complex * 1, 2) self.blocks_vector_to_streams_1_1_1 = blocks.vector_to_streams( gr.sizeof_gr_complex * 1, 2) self.blocks_vector_to_streams_1_1_0_0 = blocks.vector_to_streams( gr.sizeof_gr_complex * 1, 2) self.blocks_vector_to_streams_1_1_0 = blocks.vector_to_streams( gr.sizeof_gr_complex * 1, 2) self.blocks_vector_to_streams_1_1 = blocks.vector_to_streams( gr.sizeof_gr_complex * 1, 2) self.blocks_vector_to_streams_1_0_0 = blocks.vector_to_streams( gr.sizeof_gr_complex * 1, 2) self.blocks_vector_to_streams_1_0 = blocks.vector_to_streams( gr.sizeof_gr_complex * 1, 2) self.blocks_vector_to_streams_1 = blocks.vector_to_streams( gr.sizeof_gr_complex * 1, 2) self.blocks_vector_to_streams_0 = blocks.vector_to_streams( gr.sizeof_gr_complex * 4, 2) self.blocks_udp_source_1 = blocks.udp_source(gr.sizeof_gr_complex * 8, "127.0.0.1", 1234, 1472, True) self.blocks_udp_sink_1_0 = blocks.udp_sink(gr.sizeof_gr_complex * 8, "127.0.0.1", 1234, 1472, True) self.blocks_udp_sink_1 = blocks.udp_sink(gr.sizeof_gr_complex * 8, "127.0.0.1", 1234, 1472, True) self.blocks_streams_to_vector_1_2 = blocks.streams_to_vector( gr.sizeof_gr_complex * 1, 2) self.blocks_streams_to_vector_1_1_1 = blocks.streams_to_vector( gr.sizeof_gr_complex * 1, 2) self.blocks_streams_to_vector_1_1_0_0 = blocks.streams_to_vector( gr.sizeof_gr_complex * 1, 2) self.blocks_streams_to_vector_1_1_0 = blocks.streams_to_vector( gr.sizeof_gr_complex * 1, 2) self.blocks_streams_to_vector_1_1 = blocks.streams_to_vector( gr.sizeof_gr_complex * 1, 2) self.blocks_streams_to_vector_1_0_0 = blocks.streams_to_vector( gr.sizeof_gr_complex * 1, 2) self.blocks_streams_to_vector_1_0 = blocks.streams_to_vector( gr.sizeof_gr_complex * 1, 2) self.blocks_streams_to_vector_1 = blocks.streams_to_vector( gr.sizeof_gr_complex * 1, 2) self.blocks_streams_to_vector_0_0 = blocks.streams_to_vector( gr.sizeof_gr_complex * 4, 2) self.blocks_streams_to_vector_0 = blocks.streams_to_vector( gr.sizeof_gr_complex * 4, 2) self.blocks_repeat_0_0 = blocks.repeat(gr.sizeof_float * 1, interpo) self.blocks_repeat_0 = blocks.repeat(gr.sizeof_float * 1, interpo) self.blocks_file_sink_0 = blocks.file_sink( gr.sizeof_gr_complex * 8, "/home/zhe/Dropbox/gnuradio_trunk/gnufiles/udp", False) self.blocks_file_sink_0.set_unbuffered(True) self.PWF_weighted_sum_rate_0 = PWF.weighted_sum_rate( L, Nt, Pt, channel, ichn_gain_dB, [1, 1], [prewhiten0, prewhiten1], False, channelfile) self.PWF_sigmagen_0 = PWF.sigmagen(L, Nt, Pt, True, sigmagenfile) self.PWF_power_adjust_1_0 = PWF.power_adjust(Nt, Pt, L) self.PWF_power_adjust_1 = PWF.power_adjust(Nt, Pt, L) self.PWF_pilot_receive_tx_0_0 = PWF.pilot_receive_tx( True, pilot1file, pilot_seq_1, Nt, tlen, noise_hat[0], tlen, 1) self.PWF_pilot_receive_tx_0 = PWF.pilot_receive_tx( True, pilot2file, pilot_seq_2, Nt, tlen, noise_hat[1], tlen, 1) self.PWF_pilot_receive_rx_0_0 = PWF.pilot_receive_rx( True, pilot2file, pilot_seq_2, prewhiten1, Nt, tlen, tlen + payload_size, 1) self.PWF_pilot_receive_rx_0 = PWF.pilot_receive_rx( True, pilot1file, pilot_seq_1, prewhiten0, Nt, tlen, tlen + payload_size, 1) self.PWF_pilot_gen_tx_0_0 = PWF.pilot_gen_tx(Nt, tlen, pilot_seq_2, True, pilot2file) self.PWF_pilot_gen_tx_0 = PWF.pilot_gen_tx(Nt, tlen, pilot_seq_1, True, pilot1file) self.PWF_pilot_gen_rx_0_0 = PWF.pilot_gen_rx(Nt, tlen, prewhiten0, pilot_seq_1, True, pilot1file) self.PWF_pilot_gen_rx_0 = PWF.pilot_gen_rx(Nt, tlen, prewhiten1, pilot_seq_2, True, pilot2file) self.PWF_debug_printmsg_0 = PWF.debug_printmsg(L, Nt, False, 20) self.PWF_channel_1 = PWF.channel(L, Nt, ichn_gain_dB, channel, False, noise_hat, False, channelfile) self.PWF_channel_0 = PWF.channel(L, Nt, ichn_gain_dB, channel, True, noise, True, channelfile) ################################################## # Connections ################################################## self.connect((self.PWF_channel_0, 0), (self.blocks_vector_to_streams_1_1, 0)) self.connect((self.PWF_channel_0, 1), (self.blocks_vector_to_streams_1_1_0, 0)) self.connect((self.PWF_channel_1, 1), (self.blocks_vector_to_streams_1_1_0_0, 0)) self.connect((self.PWF_channel_1, 0), (self.blocks_vector_to_streams_1_1_1, 0)) self.connect((self.PWF_debug_printmsg_0, 0), (self.PWF_pilot_gen_tx_0, 0)) self.connect((self.PWF_debug_printmsg_0, 1), (self.PWF_pilot_gen_tx_0_0, 0)) self.connect((self.PWF_pilot_gen_rx_0, 0), (self.blocks_vector_to_streams_1_0_0, 0)) self.connect((self.PWF_pilot_gen_rx_0_0, 0), (self.blocks_vector_to_streams_1_2, 0)) self.connect((self.PWF_pilot_gen_tx_0, 0), (self.blocks_vector_to_streams_1, 0)) self.connect((self.PWF_pilot_gen_tx_0_0, 0), (self.blocks_vector_to_streams_1_0, 0)) self.connect((self.PWF_pilot_receive_rx_0, 0), (self.PWF_power_adjust_1, 0)) self.connect((self.PWF_pilot_receive_rx_0_0, 0), (self.PWF_power_adjust_1, 1)) self.connect((self.PWF_pilot_receive_tx_0, 0), (self.PWF_power_adjust_1_0, 1)) self.connect((self.PWF_pilot_receive_tx_0_0, 0), (self.PWF_power_adjust_1_0, 0)) self.connect((self.PWF_power_adjust_1, 1), (self.PWF_pilot_gen_rx_0, 0)) self.connect((self.PWF_power_adjust_1, 0), (self.PWF_pilot_gen_rx_0_0, 0)) self.connect((self.PWF_power_adjust_1_0, 0), (self.blocks_streams_to_vector_0_0, 0)) self.connect((self.PWF_power_adjust_1_0, 1), (self.blocks_streams_to_vector_0_0, 1)) self.connect((self.PWF_sigmagen_0, 0), (self.blocks_streams_to_vector_0, 0)) self.connect((self.PWF_sigmagen_0, 1), (self.blocks_streams_to_vector_0, 1)) self.connect((self.PWF_weighted_sum_rate_0, 0), (self.blocks_repeat_0, 0)) self.connect((self.PWF_weighted_sum_rate_0, 1), (self.blocks_repeat_0_0, 0)) self.connect((self.blocks_repeat_0, 0), (self.qtgui_time_sink_x_0, 0)) self.connect((self.blocks_repeat_0_0, 0), (self.qtgui_time_sink_x_0, 1)) self.connect((self.blocks_streams_to_vector_0, 0), (self.blocks_udp_sink_1, 0)) self.connect((self.blocks_streams_to_vector_0_0, 0), (self.blocks_udp_sink_1_0, 0)) self.connect((self.blocks_streams_to_vector_1, 0), (self.PWF_channel_0, 0)) self.connect((self.blocks_streams_to_vector_1_0, 0), (self.PWF_channel_0, 1)) self.connect((self.blocks_streams_to_vector_1_0_0, 0), (self.PWF_channel_1, 1)) self.connect((self.blocks_streams_to_vector_1_1, 0), (self.PWF_pilot_receive_rx_0, 0)) self.connect((self.blocks_streams_to_vector_1_1_0, 0), (self.PWF_pilot_receive_rx_0_0, 0)) self.connect((self.blocks_streams_to_vector_1_1_0_0, 0), (self.PWF_pilot_receive_tx_0, 0)) self.connect((self.blocks_streams_to_vector_1_1_1, 0), (self.PWF_pilot_receive_tx_0_0, 0)) self.connect((self.blocks_streams_to_vector_1_2, 0), (self.PWF_channel_1, 0)) self.connect((self.blocks_udp_source_1, 0), (self.blocks_file_sink_0, 0)) self.connect((self.blocks_udp_source_1, 0), (self.blocks_vector_to_streams_0, 0)) self.connect((self.blocks_vector_to_streams_0, 0), (self.PWF_debug_printmsg_0, 0)) self.connect((self.blocks_vector_to_streams_0, 1), (self.PWF_debug_printmsg_0, 1)) self.connect((self.blocks_vector_to_streams_0, 0), (self.PWF_weighted_sum_rate_0, 0)) self.connect((self.blocks_vector_to_streams_0, 1), (self.PWF_weighted_sum_rate_0, 1)) self.connect((self.blocks_vector_to_streams_1, 0), (self.interp_fir_filter_xxx_0, 0)) self.connect((self.blocks_vector_to_streams_1, 1), (self.interp_fir_filter_xxx_0_1, 0)) self.connect((self.blocks_vector_to_streams_1_0, 0), (self.interp_fir_filter_xxx_0_0, 0)) self.connect((self.blocks_vector_to_streams_1_0, 1), (self.interp_fir_filter_xxx_0_1_0, 0)) self.connect((self.blocks_vector_to_streams_1_0_0, 0), (self.blocks_streams_to_vector_1_0_0, 0)) self.connect((self.blocks_vector_to_streams_1_0_0, 1), (self.blocks_streams_to_vector_1_0_0, 1)) self.connect((self.blocks_vector_to_streams_1_1, 0), (self.fir_filter_xxx_0, 0)) self.connect((self.blocks_vector_to_streams_1_1, 1), (self.fir_filter_xxx_0_0, 0)) self.connect((self.blocks_vector_to_streams_1_1_0, 1), (self.fir_filter_xxx_0_0_0, 0)) self.connect((self.blocks_vector_to_streams_1_1_0, 0), (self.fir_filter_xxx_0_1, 0)) self.connect((self.blocks_vector_to_streams_1_1_0_0, 1), (self.phase_corrector_0_0_0_0, 0)) self.connect((self.blocks_vector_to_streams_1_1_0_0, 0), (self.phase_corrector_0_1_0, 0)) self.connect((self.blocks_vector_to_streams_1_1_1, 1), (self.phase_corrector_0_0_1, 0)) self.connect((self.blocks_vector_to_streams_1_1_1, 0), (self.phase_corrector_0_2, 0)) self.connect((self.blocks_vector_to_streams_1_2, 1), (self.blocks_streams_to_vector_1_2, 1)) self.connect((self.blocks_vector_to_streams_1_2, 0), (self.blocks_streams_to_vector_1_2, 0)) self.connect((self.fir_filter_xxx_0, 0), (self.phase_corrector_0, 0)) self.connect((self.fir_filter_xxx_0_0, 0), (self.phase_corrector_0_0, 0)) self.connect((self.fir_filter_xxx_0_0_0, 0), (self.phase_corrector_0_0_0, 0)) self.connect((self.fir_filter_xxx_0_1, 0), (self.phase_corrector_0_1, 0)) self.connect((self.interp_fir_filter_xxx_0, 0), (self.blocks_streams_to_vector_1, 0)) self.connect((self.interp_fir_filter_xxx_0_0, 0), (self.blocks_streams_to_vector_1_0, 0)) self.connect((self.interp_fir_filter_xxx_0_1, 0), (self.blocks_streams_to_vector_1, 1)) self.connect((self.interp_fir_filter_xxx_0_1_0, 0), (self.blocks_streams_to_vector_1_0, 1)) self.connect((self.phase_corrector_0, 0), (self.blocks_streams_to_vector_1_1, 0)) self.connect((self.phase_corrector_0_0, 0), (self.blocks_streams_to_vector_1_1, 1)) self.connect((self.phase_corrector_0_0_0, 0), (self.blocks_streams_to_vector_1_1_0, 1)) self.connect((self.phase_corrector_0_0_0_0, 0), (self.blocks_streams_to_vector_1_1_0_0, 1)) self.connect((self.phase_corrector_0_0_1, 0), (self.blocks_streams_to_vector_1_1_1, 1)) self.connect((self.phase_corrector_0_1, 0), (self.blocks_streams_to_vector_1_1_0, 0)) self.connect((self.phase_corrector_0_1_0, 0), (self.blocks_streams_to_vector_1_1_0_0, 0)) self.connect((self.phase_corrector_0_2, 0), (self.blocks_streams_to_vector_1_1_1, 0))