コード例 #1
0
    def __init__(self):
        gr.top_block.__init__(self, "MIMO TOP FLOW")

        ##################################################
        # Variables
        ##################################################
        self.fftl = fftl = 128
        self.samp_rate = samp_rate = fftl * 15e3
        self.rxant = rxant = 2
        self.resampler = resampler = 400
        self.frame_key = frame_key = "slot"
        self.N_rb_dl = N_rb_dl = 50

        ##################################################
        # Blocks
        ##################################################
        self.lte_mimo_sss_sync_0 = lte_mimo_sss_sync(
            N_rb_dl=N_rb_dl,
            rxant=rxant,
        )
        self.lte_mimo_pss_sync_0 = lte_mimo_pss_sync(
            rxant=rxant,
            synclen=5,
            fftlen=fftl,
        )
        self.lte_mimo_pss_based_frey_sync_0 = lte_mimo_pss_based_frey_sync(
            fftlen=fftl,
            rxant=rxant,
        )
        self.lte_mimo_ofdm_rx_0 = lte_mimo_ofdm_rx(
            N_rb_dl=N_rb_dl,
            ofdm_key=frame_key,
            fftlen=fftl,
            rxant=rxant,
        )
        self.lte_mimo_estimator_0 = lte_mimo_estimator(
            N_rb_dl=N_rb_dl,
            estimator_key=frame_key,
            initial_id=2,
            rxant=rxant,
        )
        self.lte_mimo_decode_pbch_0 = lte_mimo_decode_pbch(
            N_rb_dl=N_rb_dl,
            rxant=rxant,
        )
        self.blocks_vector_to_streams_0 = blocks.vector_to_streams(
            gr.sizeof_gr_complex * 1, 2)
        self.blocks_throttle_0 = blocks.throttle(gr.sizeof_gr_complex * 2,
                                                 samp_rate, True)
        self.blocks_streams_to_vector_0_0 = blocks.streams_to_vector(
            gr.sizeof_gr_complex * 12 * N_rb_dl, 2)
        self.blocks_file_source_0 = blocks.file_source(
            gr.sizeof_gr_complex * 2,
            "/home/johannes/src/gr-lte/tests/lte_test_data_RX2_NRBDL6.dat",
            True)
        self.bch_decode_bch_hier_gr37_0 = decode_bch_hier_gr37()
        self.MIB = lte.mib_unpack_vbm("MIB")

        ##################################################
        # Connections
        ##################################################
        self.connect((self.lte_mimo_pss_sync_0, 1),
                     (self.lte_mimo_pss_based_frey_sync_0, 1))
        self.connect((self.lte_mimo_pss_sync_0, 0),
                     (self.lte_mimo_pss_based_frey_sync_0, 0))
        self.connect((self.lte_mimo_pss_based_frey_sync_0, 0),
                     (self.lte_mimo_ofdm_rx_0, 0))
        self.connect((self.lte_mimo_pss_based_frey_sync_0, 1),
                     (self.lte_mimo_ofdm_rx_0, 1))
        self.connect((self.blocks_throttle_0, 0),
                     (self.blocks_vector_to_streams_0, 0))
        self.connect((self.blocks_file_source_0, 0),
                     (self.blocks_throttle_0, 0))
        self.connect((self.blocks_vector_to_streams_0, 0),
                     (self.lte_mimo_pss_sync_0, 0))
        self.connect((self.blocks_vector_to_streams_0, 1),
                     (self.lte_mimo_pss_sync_0, 1))
        self.connect((self.lte_mimo_ofdm_rx_0, 0),
                     (self.lte_mimo_sss_sync_0, 0))
        self.connect((self.lte_mimo_ofdm_rx_0, 1),
                     (self.lte_mimo_sss_sync_0, 1))
        self.connect((self.lte_mimo_decode_pbch_0, 0),
                     (self.bch_decode_bch_hier_gr37_0, 0))
        self.connect((self.lte_mimo_estimator_0, 0),
                     (self.lte_mimo_decode_pbch_0, 1))
        self.connect((self.lte_mimo_estimator_0, 1),
                     (self.lte_mimo_decode_pbch_0, 2))
        self.connect((self.bch_decode_bch_hier_gr37_0, 1), (self.MIB, 1))
        self.connect((self.bch_decode_bch_hier_gr37_0, 0), (self.MIB, 0))
        self.connect((self.lte_mimo_sss_sync_0, 1),
                     (self.blocks_streams_to_vector_0_0, 1))
        self.connect((self.lte_mimo_sss_sync_0, 0),
                     (self.blocks_streams_to_vector_0_0, 0))
        self.connect((self.blocks_streams_to_vector_0_0, 0),
                     (self.lte_mimo_estimator_0, 0))
        self.connect((self.blocks_streams_to_vector_0_0, 0),
                     (self.lte_mimo_decode_pbch_0, 0))

        ##################################################
        # Asynch Message Connections
        ##################################################
        self.msg_connect(self.lte_mimo_sss_sync_0, "cell_id",
                         self.lte_mimo_estimator_0, "cell_id")
        self.msg_connect(self.lte_mimo_pss_sync_0, "N_id_2",
                         self.lte_mimo_sss_sync_0, "N_id_2")
        self.msg_connect(self.lte_mimo_sss_sync_0, "cell_id",
                         self.lte_mimo_decode_pbch_0, "cell_id")
コード例 #2
0
    def __init__(self):
        gr.top_block.__init__(self, "LTE_test")

        ##################################################
        # Variables
        ##################################################
        self.samp_rate = samp_rate = 30.72e6
        self.pbch_descr_key = pbch_descr_key = "descr_part"
        self.interp_val = interp_val = int(samp_rate/1e4)
        self.frame_key = frame_key = "slot"
        self.fftlen = fftlen = 2048
        self.N_rb_dl = N_rb_dl = 50

        ##################################################
        # Blocks
        ##################################################
        self.sync_lte_sss_sync_hier_0 = lte_sss_sync_hier(
            fftlen=fftlen,
            N_rb_dl=N_rb_dl,
            group_key="N_id_2",
            offset_key="offset_marker",
        )
        self.sync_lte_rough_symbol_sync_cc_0 = lte.rough_symbol_sync_cc(fftlen, "sync_lte_rough_symbol_sync_cc_0")
        self.sync_lte_pss_sync_37_0 = lte_pss_sync_37(
            fftlen=fftlen,
        )
        self.sync_lte_cp_freq_sync_0 = lte_cp_freq_sync(
            fftlen=2048,
        )
        self.pre_rational_resampler_xxx_0 = filter.rational_resampler_ccc(
                interpolation=interp_val,
                decimation=1000,
                taps=None,
                fractional_bw=None,
        )
        self.pre_blocks_file_source_0 = blocks.file_source(gr.sizeof_gr_complex*1, "/home/johannes/recorded_data/Messung_LTE_2012-05-23_12:47:32.dat", True)
        self.pcfich_decode_pcfich_37_0 = decode_pcfich_37(
            N_rb_dl=N_rb_dl,
            key=frame_key,
        )
        self.pbch_decode_pbch_37_0 = decode_pbch_37(
            N_rb_dl=N_rb_dl,
        )
        self.ofdm_lte_ofdm_hier_0 = lte_ofdm_hier(
            N_rb_dl=50,
            fftlen=2048,
            ofdm_key=frame_key,
        )
        self.ofdm_estimator_lte_estimator_hier_0 = lte_estimator_hier(
            initial_id=387,
            estimator_key="slot",
            N_rb_dl=50,
        )
        self.blocks_throttle_0 = blocks.throttle(gr.sizeof_gr_complex*1, samp_rate)
        self.blocks_ctrlport_monitor_performance_0 = not True or monitor("gr-perf-monitorx")
        self.bch_decode_bch_hier_gr37_0 = decode_bch_hier_gr37()
        self.MIB = lte.mib_unpack_vbm("MIB")

        ##################################################
        # Connections
        ##################################################
        self.connect((self.bch_decode_bch_hier_gr37_0, 0), (self.MIB, 0))
        self.connect((self.bch_decode_bch_hier_gr37_0, 1), (self.MIB, 1))
        self.connect((self.pbch_decode_pbch_37_0, 0), (self.bch_decode_bch_hier_gr37_0, 0))
        self.connect((self.ofdm_estimator_lte_estimator_hier_0, 1), (self.pcfich_decode_pcfich_37_0, 2))
        self.connect((self.ofdm_estimator_lte_estimator_hier_0, 0), (self.pcfich_decode_pcfich_37_0, 1))
        self.connect((self.ofdm_estimator_lte_estimator_hier_0, 0), (self.pbch_decode_pbch_37_0, 1))
        self.connect((self.ofdm_lte_ofdm_hier_0, 0), (self.pcfich_decode_pcfich_37_0, 0))
        self.connect((self.ofdm_lte_ofdm_hier_0, 0), (self.pbch_decode_pbch_37_0, 0))
        self.connect((self.ofdm_estimator_lte_estimator_hier_0, 1), (self.pbch_decode_pbch_37_0, 2))
        self.connect((self.sync_lte_pss_sync_37_0, 0), (self.sync_lte_cp_freq_sync_0, 0))
        self.connect((self.sync_lte_rough_symbol_sync_cc_0, 0), (self.sync_lte_pss_sync_37_0, 0))
        self.connect((self.ofdm_lte_ofdm_hier_0, 0), (self.ofdm_estimator_lte_estimator_hier_0, 0))
        self.connect((self.sync_lte_cp_freq_sync_0, 0), (self.sync_lte_sss_sync_hier_0, 0))
        self.connect((self.sync_lte_sss_sync_hier_0, 0), (self.ofdm_lte_ofdm_hier_0, 0))
        self.connect((self.pre_blocks_file_source_0, 0), (self.blocks_throttle_0, 0))
        self.connect((self.blocks_throttle_0, 0), (self.pre_rational_resampler_xxx_0, 0))
        self.connect((self.pre_rational_resampler_xxx_0, 0), (self.sync_lte_rough_symbol_sync_cc_0, 0))

        ##################################################
        # Asynch Message Connections
        ##################################################
        self.msg_connect(self.MIB, "N_ant", self.pcfich_decode_pcfich_37_0, "N_ant")
        self.msg_connect(self.sync_lte_sss_sync_hier_0, "cell_id", self.ofdm_estimator_lte_estimator_hier_0, "cell_id")
        self.msg_connect(self.sync_lte_sss_sync_hier_0, "cell_id", self.pbch_decode_pbch_37_0, "cell_id")
        self.msg_connect(self.sync_lte_sss_sync_hier_0, "cell_id", self.pcfich_decode_pcfich_37_0, "cell_id")
コード例 #3
0
ファイル: lte_top_block.py プロジェクト: xuguangshen/gr-lte
    def __init__(self):
        gr.top_block.__init__(self, "LTE_test")

        ##################################################
        # Variables
        ##################################################
        self.fftlen = fftlen = 2048
        self.samp_rate = samp_rate = (7*fftlen + 160* fftlen/2048 + 6 * (144 * fftlen/2048)) / 0.0005
        self.pbch_descr_key = pbch_descr_key = "descr_part"
        self.frame_key = frame_key = "slot"
        self.N_rb_dl = N_rb_dl = 6

        ##################################################
        # Blocks
        ##################################################
        self.sync_lte_sss_sync_hier_0 = lte_sss_sync_hier(
            N_rb_dl=N_rb_dl,
            group_key="N_id_2",
            offset_key="offset_marker",
            fftlen=fftlen,
        )
        self.sync_lte_rough_symbol_sync_cc_0 = lte.rough_symbol_sync_cc(fftlen, "sync_lte_rough_symbol_sync_cc_0")
        self.sync_lte_pss_sync_37_0 = lte_pss_sync_37(
            fftlen=fftlen,
        )
        self.sync_lte_cp_freq_sync_0 = lte_cp_freq_sync(
            fftlen=2048,
        )
        self.pre_blocks_file_source_0 = blocks.file_source(gr.sizeof_gr_complex*1, "/home/johannes/src/gr-lte/tests/lte_test_data_RX1_NRBDL100.dat", True)
        self.pbch_decode_pbch_37_0 = decode_pbch_37(
            N_rb_dl=N_rb_dl,
        )
        self.ofdm_lte_ofdm_hier_0 = lte_ofdm_hier(
            N_rb_dl=N_rb_dl,
            fftlen=fftlen,
            ofdm_key=frame_key,
        )
        self.ofdm_estimator_lte_estimator_hier_0 = lte_estimator_hier(
            initial_id=387,
            estimator_key=frame_key,
            N_rb_dl=N_rb_dl,
        )
        self.blocks_head_0_0 = blocks.head(gr.sizeof_gr_complex*1, int(2e8))
        self.bch_decode_bch_hier_gr37_0 = decode_bch_hier_gr37()
        self.MIB = lte.mib_unpack_vbm("MIB")

        ##################################################
        # Connections
        ##################################################
        self.connect((self.sync_lte_pss_sync_37_0, 0), (self.sync_lte_cp_freq_sync_0, 0))
        self.connect((self.sync_lte_rough_symbol_sync_cc_0, 0), (self.sync_lte_pss_sync_37_0, 0))
        self.connect((self.sync_lte_cp_freq_sync_0, 0), (self.sync_lte_sss_sync_hier_0, 0))
        self.connect((self.sync_lte_sss_sync_hier_0, 0), (self.ofdm_lte_ofdm_hier_0, 0))
        self.connect((self.ofdm_lte_ofdm_hier_0, 0), (self.ofdm_estimator_lte_estimator_hier_0, 0))
        self.connect((self.pre_blocks_file_source_0, 0), (self.blocks_head_0_0, 0))
        self.connect((self.blocks_head_0_0, 0), (self.sync_lte_rough_symbol_sync_cc_0, 0))
        self.connect((self.bch_decode_bch_hier_gr37_0, 0), (self.MIB, 0))
        self.connect((self.ofdm_lte_ofdm_hier_0, 0), (self.pbch_decode_pbch_37_0, 0))
        self.connect((self.ofdm_estimator_lte_estimator_hier_0, 1), (self.pbch_decode_pbch_37_0, 2))
        self.connect((self.ofdm_estimator_lte_estimator_hier_0, 0), (self.pbch_decode_pbch_37_0, 1))
        self.connect((self.pbch_decode_pbch_37_0, 0), (self.bch_decode_bch_hier_gr37_0, 0))
        self.connect((self.bch_decode_bch_hier_gr37_0, 1), (self.MIB, 1))

        ##################################################
        # Asynch Message Connections
        ##################################################
        self.msg_connect(self.sync_lte_sss_sync_hier_0, "cell_id", self.ofdm_estimator_lte_estimator_hier_0, "cell_id")
        self.msg_connect(self.sync_lte_sss_sync_hier_0, "cell_id", self.pbch_decode_pbch_37_0, "cell_id")
コード例 #4
0
ファイル: MIMO_TOP_FLOW.py プロジェクト: heimao0130/gr-lte
    def __init__(self):
        gr.top_block.__init__(self, "MIMO TOP FLOW")

        ##################################################
        # Variables
        ##################################################
        self.fftl = fftl = 128
        self.samp_rate = samp_rate = fftl*15e3
        self.rxant = rxant = 2
        self.resampler = resampler = 400
        self.frame_key = frame_key = "slot"
        self.N_rb_dl = N_rb_dl = 50

        ##################################################
        # Blocks
        ##################################################
        self.lte_mimo_sss_sync_0 = lte_mimo_sss_sync(
            N_rb_dl=N_rb_dl,
            rxant=rxant,
        )
        self.lte_mimo_pss_sync_0 = lte_mimo_pss_sync(
            rxant=rxant,
            synclen=5,
            fftlen=fftl,
        )
        self.lte_mimo_pss_based_frey_sync_0 = lte_mimo_pss_based_frey_sync(
            fftlen=fftl,
            rxant=rxant,
        )
        self.lte_mimo_ofdm_rx_0 = lte_mimo_ofdm_rx(
            N_rb_dl=N_rb_dl,
            ofdm_key=frame_key,
            fftlen=fftl,
            rxant=rxant,
        )
        self.lte_mimo_estimator_0 = lte_mimo_estimator(
            N_rb_dl=N_rb_dl,
            estimator_key=frame_key,
            initial_id=2,
            rxant=rxant,
        )
        self.lte_mimo_decode_pbch_0 = lte_mimo_decode_pbch(
            N_rb_dl=N_rb_dl,
            rxant=rxant,
        )
        self.blocks_vector_to_streams_0 = blocks.vector_to_streams(gr.sizeof_gr_complex*1, 2)
        self.blocks_throttle_0 = blocks.throttle(gr.sizeof_gr_complex*2, samp_rate,True)
        self.blocks_streams_to_vector_0_0 = blocks.streams_to_vector(gr.sizeof_gr_complex*12 * N_rb_dl, 2)
        self.blocks_file_source_0 = blocks.file_source(gr.sizeof_gr_complex*2, "/home/johannes/src/gr-lte/tests/lte_test_data_RX2_NRBDL6.dat", True)
        self.bch_decode_bch_hier_gr37_0 = decode_bch_hier_gr37()
        self.MIB = lte.mib_unpack_vbm("MIB")

        ##################################################
        # Connections
        ##################################################
        self.connect((self.lte_mimo_pss_sync_0, 1), (self.lte_mimo_pss_based_frey_sync_0, 1))
        self.connect((self.lte_mimo_pss_sync_0, 0), (self.lte_mimo_pss_based_frey_sync_0, 0))
        self.connect((self.lte_mimo_pss_based_frey_sync_0, 0), (self.lte_mimo_ofdm_rx_0, 0))
        self.connect((self.lte_mimo_pss_based_frey_sync_0, 1), (self.lte_mimo_ofdm_rx_0, 1))
        self.connect((self.blocks_throttle_0, 0), (self.blocks_vector_to_streams_0, 0))
        self.connect((self.blocks_vector_to_streams_0, 0), (self.lte_mimo_pss_sync_0, 0))
        self.connect((self.blocks_vector_to_streams_0, 1), (self.lte_mimo_pss_sync_0, 1))
        self.connect((self.lte_mimo_ofdm_rx_0, 0), (self.lte_mimo_sss_sync_0, 0))
        self.connect((self.lte_mimo_ofdm_rx_0, 1), (self.lte_mimo_sss_sync_0, 1))
        self.connect((self.lte_mimo_decode_pbch_0, 0), (self.bch_decode_bch_hier_gr37_0, 0))
        self.connect((self.lte_mimo_estimator_0, 0), (self.lte_mimo_decode_pbch_0, 1))
        self.connect((self.lte_mimo_estimator_0, 1), (self.lte_mimo_decode_pbch_0, 2))
        self.connect((self.bch_decode_bch_hier_gr37_0, 1), (self.MIB, 1))
        self.connect((self.bch_decode_bch_hier_gr37_0, 0), (self.MIB, 0))
        self.connect((self.lte_mimo_sss_sync_0, 1), (self.blocks_streams_to_vector_0_0, 1))
        self.connect((self.lte_mimo_sss_sync_0, 0), (self.blocks_streams_to_vector_0_0, 0))
        self.connect((self.blocks_streams_to_vector_0_0, 0), (self.lte_mimo_estimator_0, 0))
        self.connect((self.blocks_streams_to_vector_0_0, 0), (self.lte_mimo_decode_pbch_0, 0))
        self.connect((self.blocks_file_source_0, 0), (self.blocks_throttle_0, 0))

        ##################################################
        # Asynch Message Connections
        ##################################################
        self.msg_connect(self.lte_mimo_sss_sync_0, "cell_id", self.lte_mimo_estimator_0, "cell_id")
        self.msg_connect(self.lte_mimo_pss_sync_0, "N_id_2", self.lte_mimo_sss_sync_0, "N_id_2")
        self.msg_connect(self.lte_mimo_sss_sync_0, "cell_id", self.lte_mimo_decode_pbch_0, "cell_id")
コード例 #5
0
ファイル: top_block.py プロジェクト: SPLURGE831/gr-lte
    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.fftl = fftl = 2048
        self.samp_rate = samp_rate = fftl * 15e3
        self.rxant = rxant = 2
        self.resampler = resampler = 400
        self.frame_key = frame_key = "slot"
        self.N_rb_dl = N_rb_dl = 50

        ##################################################
        # Blocks
        ##################################################
        self.rational_resampler_xxx_0_1 = filter.rational_resampler_ccc(
            interpolation=1536 * fftl / 1024,
            decimation=resampler,
            taps=None,
            fractional_bw=None,
        )
        self.rational_resampler_xxx_0_0 = filter.rational_resampler_ccc(
            interpolation=1536 * fftl / 1024,
            decimation=resampler,
            taps=None,
            fractional_bw=None,
        )
        self.lte_mimo_sss_sync_0 = lte_mimo_sss_sync(
            rxant=rxant,
            N_rb_dl=N_rb_dl,
        )
        self.lte_mimo_pss_sync_0 = lte_mimo_pss_sync(
            fftlen=fftl,
            rxant=rxant,
            synclen=5,
        )
        self.lte_mimo_pss_based_frey_sync_0 = lte_mimo_pss_based_frey_sync(
            fftlen=fftl,
            rxant=rxant,
        )
        self.lte_mimo_ofdm_rx_0 = lte_mimo_ofdm_rx(
            fftlen=fftl,
            ofdm_key=frame_key,
            N_rb_dl=N_rb_dl,
            rxant=rxant,
        )
        self.lte_mimo_estimator_0 = lte_mimo_estimator(
            estimator_key=frame_key,
            N_rb_dl=N_rb_dl,
            initial_id=2,
            rxant=rxant,
        )
        self.lte_mimo_decode_pbch_0 = lte_mimo_decode_pbch(
            N_rb_dl=N_rb_dl,
            rxant=rxant,
        )
        self.blocks_vector_to_streams_0 = blocks.vector_to_streams(
            gr.sizeof_gr_complex * 1, 2)
        self.blocks_throttle_0 = blocks.throttle(gr.sizeof_gr_complex * 2,
                                                 samp_rate, True)
        self.blocks_file_source_0 = blocks.file_source(
            gr.sizeof_gr_complex * 2,
            "/home/maier/LTE test files/live data/lte_capture_Wed_Aug_6_19:36:39_2014_RXant2_4MS_telekom_band1800_wg_karlruhe_hinten raus.dat",
            True)
        self.bch_decode_bch_hier_gr37_0 = decode_bch_hier_gr37()
        self.MIB = lte.mib_unpack_vbm("MIB")

        ##################################################
        # Connections
        ##################################################
        self.connect((self.rational_resampler_xxx_0_1, 0),
                     (self.lte_mimo_pss_sync_0, 0))
        self.connect((self.rational_resampler_xxx_0_0, 0),
                     (self.lte_mimo_pss_sync_0, 1))
        self.connect((self.blocks_vector_to_streams_0, 1),
                     (self.rational_resampler_xxx_0_0, 0))
        self.connect((self.blocks_vector_to_streams_0, 0),
                     (self.rational_resampler_xxx_0_1, 0))
        self.connect((self.blocks_file_source_0, 0),
                     (self.blocks_throttle_0, 0))
        self.connect((self.blocks_throttle_0, 0),
                     (self.blocks_vector_to_streams_0, 0))
        self.connect((self.lte_mimo_sss_sync_0, 0),
                     (self.lte_mimo_estimator_0, 0))
        self.connect((self.lte_mimo_sss_sync_0, 0),
                     (self.lte_mimo_decode_pbch_0, 0))
        self.connect((self.bch_decode_bch_hier_gr37_0, 1), (self.MIB, 1))
        self.connect((self.bch_decode_bch_hier_gr37_0, 0), (self.MIB, 0))
        self.connect((self.lte_mimo_estimator_0, 1),
                     (self.lte_mimo_decode_pbch_0, 2))
        self.connect((self.lte_mimo_estimator_0, 0),
                     (self.lte_mimo_decode_pbch_0, 1))
        self.connect((self.lte_mimo_decode_pbch_0, 0),
                     (self.bch_decode_bch_hier_gr37_0, 0))
        self.connect((self.lte_mimo_pss_sync_0, 1),
                     (self.lte_mimo_pss_based_frey_sync_0, 1))
        self.connect((self.lte_mimo_pss_sync_0, 0),
                     (self.lte_mimo_pss_based_frey_sync_0, 0))
        self.connect((self.lte_mimo_pss_based_frey_sync_0, 0),
                     (self.lte_mimo_ofdm_rx_0, 0))
        self.connect((self.lte_mimo_pss_based_frey_sync_0, 1),
                     (self.lte_mimo_ofdm_rx_0, 1))
        self.connect((self.lte_mimo_ofdm_rx_0, 0),
                     (self.lte_mimo_sss_sync_0, 0))

        ##################################################
        # Asynch Message Connections
        ##################################################
        self.msg_connect(self.lte_mimo_sss_sync_0, "cell_id",
                         self.lte_mimo_estimator_0, "cell_id")
        self.msg_connect(self.lte_mimo_sss_sync_0, "cell_id",
                         self.lte_mimo_decode_pbch_0, "cell_id")
        self.msg_connect(self.lte_mimo_pss_sync_0, "N_id_2",
                         self.lte_mimo_sss_sync_0, "N_id_2")
コード例 #6
0
    def __init__(self):
        gr.top_block.__init__(self, "MIMO TOP FLOW 4 Tx ant")
        Qt.QWidget.__init__(self)
        self.setWindowTitle("MIMO TOP FLOW 4 Tx ant")
        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", "MIMO_TOP_FLOW_4_TXant")
        self.restoreGeometry(self.settings.value("geometry").toByteArray())


        ##################################################
        # Variables
        ##################################################
        self.fftl = fftl = 1024
        self.samp_rate = samp_rate = fftl*15e3
        self.rxant = rxant = 2
        self.resampler = resampler = 400
        self.frame_key = frame_key = "slot"
        self.N_rb_dl = N_rb_dl = 50

        ##################################################
        # Blocks
        ##################################################
        self.rational_resampler_xxx_0_1 = filter.rational_resampler_ccc(
                interpolation=1536*fftl/1024,
                decimation=resampler,
                taps=None,
                fractional_bw=None,
        )
        self.rational_resampler_xxx_0_0 = filter.rational_resampler_ccc(
                interpolation=1536*fftl/1024,
                decimation=resampler,
                taps=None,
                fractional_bw=None,
        )
        self.lte_mimo_sss_sync_0 = lte_mimo_sss_sync(
            N_rb_dl=N_rb_dl,
            rxant=rxant,
        )
        self.lte_mimo_pss_sync_0 = lte_mimo_pss_sync(
            rxant=rxant,
            synclen=5,
            fftlen=fftl,
        )
        self.lte_mimo_pss_based_frey_sync_0 = lte_mimo_pss_based_frey_sync(
            fftlen=fftl,
            rxant=rxant,
        )
        self.lte_mimo_ofdm_rx_0 = lte_mimo_ofdm_rx(
            N_rb_dl=N_rb_dl,
            ofdm_key=frame_key,
            fftlen=fftl,
            rxant=rxant,
        )
        self.lte_mimo_estimator_4_txant_0 = lte_mimo_estimator_4_txant(
            N_rb_dl=N_rb_dl,
            estimator_key=frame_key,
            initial_id=333,
            rxant=rxant,
        )
        self.lte_mimo_decode_pbch_4_txant_0 = lte_mimo_decode_pbch_4_txant(
            N_rb_dl=N_rb_dl,
            rxant=rxant,
        )
        self.blocks_vector_to_streams_0 = blocks.vector_to_streams(gr.sizeof_gr_complex*1, 2)
        self.blocks_throttle_0 = blocks.throttle(gr.sizeof_gr_complex*2, samp_rate,True)
        self.blocks_file_source_0 = blocks.file_source(gr.sizeof_gr_complex*2, "/home/maier/LTE test files/live data/lte_capture_Wed_Aug_6_19:36:39_2014_RXant2_4MS_telekom_band1800_wg_karlruhe_hinten raus_messung1.dat", True)
        self.bch_decode_bch_hier_gr37_0 = decode_bch_hier_gr37()
        self.MIB = lte.mib_unpack_vbm("MIB")

        ##################################################
        # Connections
        ##################################################
        self.connect((self.lte_mimo_sss_sync_0, 0), (self.lte_mimo_estimator_4_txant_0, 0))
        self.connect((self.lte_mimo_sss_sync_0, 0), (self.lte_mimo_decode_pbch_4_txant_0, 0))
        self.connect((self.lte_mimo_estimator_4_txant_0, 0), (self.lte_mimo_decode_pbch_4_txant_0, 1))
        self.connect((self.lte_mimo_estimator_4_txant_0, 1), (self.lte_mimo_decode_pbch_4_txant_0, 2))
        self.connect((self.blocks_file_source_0, 0), (self.blocks_throttle_0, 0))
        self.connect((self.lte_mimo_decode_pbch_4_txant_0, 0), (self.bch_decode_bch_hier_gr37_0, 0))
        self.connect((self.bch_decode_bch_hier_gr37_0, 0), (self.MIB, 0))
        self.connect((self.bch_decode_bch_hier_gr37_0, 1), (self.MIB, 1))
        self.connect((self.lte_mimo_estimator_4_txant_0, 2), (self.lte_mimo_decode_pbch_4_txant_0, 3))
        self.connect((self.lte_mimo_estimator_4_txant_0, 3), (self.lte_mimo_decode_pbch_4_txant_0, 4))
        self.connect((self.blocks_vector_to_streams_0, 0), (self.rational_resampler_xxx_0_1, 0))
        self.connect((self.blocks_vector_to_streams_0, 1), (self.rational_resampler_xxx_0_0, 0))
        self.connect((self.lte_mimo_pss_sync_0, 0), (self.lte_mimo_pss_based_frey_sync_0, 0))
        self.connect((self.lte_mimo_ofdm_rx_0, 0), (self.lte_mimo_sss_sync_0, 0))
        self.connect((self.lte_mimo_pss_based_frey_sync_0, 0), (self.lte_mimo_ofdm_rx_0, 0))
        self.connect((self.lte_mimo_pss_based_frey_sync_0, 1), (self.lte_mimo_ofdm_rx_0, 1))
        self.connect((self.lte_mimo_pss_sync_0, 1), (self.lte_mimo_pss_based_frey_sync_0, 1))
        self.connect((self.blocks_throttle_0, 0), (self.blocks_vector_to_streams_0, 0))
        self.connect((self.rational_resampler_xxx_0_0, 0), (self.lte_mimo_pss_sync_0, 1))
        self.connect((self.rational_resampler_xxx_0_1, 0), (self.lte_mimo_pss_sync_0, 0))

        ##################################################
        # Asynch Message Connections
        ##################################################
        self.msg_connect(self.lte_mimo_sss_sync_0, "cell_id", self.lte_mimo_estimator_4_txant_0, "cell_id")
        self.msg_connect(self.lte_mimo_sss_sync_0, "cell_id", self.lte_mimo_decode_pbch_4_txant_0, "cell_id")
        self.msg_connect(self.lte_mimo_pss_sync_0, "N_id_2", self.lte_mimo_sss_sync_0, "N_id_2")
コード例 #7
0
    def __init__(self):
        gr.top_block.__init__(self, "LTE_test")

        ##################################################
        # Variables
        ##################################################
        self.fftlen = fftlen = 2048
        self.samp_rate = samp_rate = (7 * fftlen + 160 * fftlen / 2048 + 6 *
                                      (144 * fftlen / 2048)) / 0.0005
        self.pbch_descr_key = pbch_descr_key = "descr_part"
        self.frame_key = frame_key = "slot"
        self.N_rb_dl = N_rb_dl = 6

        ##################################################
        # Blocks
        ##################################################
        self.sync_lte_sss_sync_hier_0 = lte_sss_sync_hier(
            N_rb_dl=N_rb_dl,
            group_key="N_id_2",
            offset_key="offset_marker",
            fftlen=fftlen,
        )
        self.sync_lte_rough_symbol_sync_cc_0 = lte.rough_symbol_sync_cc(
            fftlen, "sync_lte_rough_symbol_sync_cc_0")
        self.sync_lte_pss_sync_37_0 = lte_pss_sync_37(fftlen=fftlen, )
        self.sync_lte_cp_freq_sync_0 = lte_cp_freq_sync(fftlen=max(
            256, fftlen), )
        self.pre_blocks_file_source_0 = blocks.file_source(
            gr.sizeof_gr_complex * 1,
            "/home/johannes/src/gr-lte/tests/lte_test_data_RX1_NRBDL100.dat",
            True)
        self.pbch_decode_pbch_37_0 = decode_pbch_37(N_rb_dl=N_rb_dl, )
        self.ofdm_lte_ofdm_hier_0 = lte_ofdm_hier(
            N_rb_dl=N_rb_dl,
            fftlen=fftlen,
            ofdm_key=frame_key,
        )
        self.ofdm_estimator_lte_estimator_hier_0 = lte_estimator_hier(
            initial_id=124,
            estimator_key=frame_key,
            N_rb_dl=N_rb_dl,
        )
        self.blocks_head_0_0 = blocks.head(gr.sizeof_gr_complex * 1,
                                           int(samp_rate * 2))
        self.bch_decode_bch_hier_gr37_0 = decode_bch_hier_gr37()
        self.MIB = lte.mib_unpack_vbm("MIB")

        ##################################################
        # Connections
        ##################################################
        self.connect((self.sync_lte_pss_sync_37_0, 0),
                     (self.sync_lte_cp_freq_sync_0, 0))
        self.connect((self.sync_lte_rough_symbol_sync_cc_0, 0),
                     (self.sync_lte_pss_sync_37_0, 0))
        self.connect((self.sync_lte_cp_freq_sync_0, 0),
                     (self.sync_lte_sss_sync_hier_0, 0))
        self.connect((self.sync_lte_sss_sync_hier_0, 0),
                     (self.ofdm_lte_ofdm_hier_0, 0))
        self.connect((self.ofdm_lte_ofdm_hier_0, 0),
                     (self.ofdm_estimator_lte_estimator_hier_0, 0))
        self.connect((self.blocks_head_0_0, 0),
                     (self.sync_lte_rough_symbol_sync_cc_0, 0))
        self.connect((self.pre_blocks_file_source_0, 0),
                     (self.blocks_head_0_0, 0))
        self.connect((self.ofdm_estimator_lte_estimator_hier_0, 0),
                     (self.pbch_decode_pbch_37_0, 1))
        self.connect((self.ofdm_estimator_lte_estimator_hier_0, 1),
                     (self.pbch_decode_pbch_37_0, 2))
        self.connect((self.ofdm_lte_ofdm_hier_0, 0),
                     (self.pbch_decode_pbch_37_0, 0))
        self.connect((self.pbch_decode_pbch_37_0, 0),
                     (self.bch_decode_bch_hier_gr37_0, 0))
        self.connect((self.bch_decode_bch_hier_gr37_0, 1), (self.MIB, 1))
        self.connect((self.bch_decode_bch_hier_gr37_0, 0), (self.MIB, 0))

        ##################################################
        # Asynch Message Connections
        ##################################################
        self.msg_connect(self.sync_lte_sss_sync_hier_0, "cell_id",
                         self.ofdm_estimator_lte_estimator_hier_0, "cell_id")
        self.msg_connect(self.sync_lte_sss_sync_hier_0, "cell_id",
                         self.pbch_decode_pbch_37_0, "cell_id")
コード例 #8
0
ファイル: lte_top_block.py プロジェクト: hotelzululima/gr-lte
    def __init__(self):
        gr.top_block.__init__(self, "LTE_test")
        Qt.QWidget.__init__(self)
        self.setWindowTitle("LTE_test")
        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", "lte_top_block")
        self.restoreGeometry(self.settings.value("geometry").toByteArray())


        ##################################################
        # Variables
        ##################################################
        self.fftlen = fftlen = 2048
        self.samp_rate = samp_rate = (7*fftlen + 160* fftlen/2048 + 6 * (144 * fftlen/2048)) / 0.0005
        self.pbch_descr_key = pbch_descr_key = "descr_part"
        self.frame_key = frame_key = "slot"
        self.N_rb_dl = N_rb_dl = 6

        ##################################################
        # Blocks
        ##################################################
        self.sync_lte_sss_sync_hier_0 = lte_sss_sync_hier(
            N_rb_dl=N_rb_dl,
            group_key="N_id_2",
            offset_key="offset_marker",
            fftlen=fftlen,
        )
        self.sync_lte_rough_symbol_sync_cc_0 = lte.rough_symbol_sync_cc(fftlen, 1, "sync_lte_rough_symbol_sync_cc_0")
        self.sync_lte_pss_sync_37_0 = lte_pss_sync_37(
            fftlen=fftlen,
        )
        self.sync_lte_cp_freq_sync_0 = lte_cp_freq_sync(
            fftlen=max(256,fftlen),
        )
        self.pre_blocks_file_source_0 = blocks.file_source(gr.sizeof_gr_complex*1, "/home/johannes/src/gr-lte/tests/lte_test_data_RX1_NRBDL100.dat", True)
        self.pbch_decode_pbch_37_0 = decode_pbch_37(
            N_rb_dl=N_rb_dl,
        )
        self.ofdm_lte_ofdm_hier_0 = lte_ofdm_hier(
            fftlen=fftlen,
            ofdm_key=frame_key,
            N_rb_dl=N_rb_dl,
        )
        self.ofdm_estimator_lte_estimator_hier_0 = lte_estimator_hier(
            initial_id=124,
            estimator_key=frame_key,
            N_rb_dl=N_rb_dl,
        )
        self.bch_decode_bch_hier_gr37_0 = decode_bch_hier_gr37()
        self.MIB = lte.mib_unpack_vbm("MIB")

        ##################################################
        # Connections
        ##################################################
        self.msg_connect((self.sync_lte_sss_sync_hier_0, 'cell_id'), (self.ofdm_estimator_lte_estimator_hier_0, 'cell_id'))    
        self.msg_connect((self.sync_lte_sss_sync_hier_0, 'cell_id'), (self.pbch_decode_pbch_37_0, 'cell_id'))    
        self.connect((self.bch_decode_bch_hier_gr37_0, 1), (self.MIB, 1))    
        self.connect((self.bch_decode_bch_hier_gr37_0, 0), (self.MIB, 0))    
        self.connect((self.ofdm_estimator_lte_estimator_hier_0, 0), (self.pbch_decode_pbch_37_0, 1))    
        self.connect((self.ofdm_estimator_lte_estimator_hier_0, 1), (self.pbch_decode_pbch_37_0, 2))    
        self.connect((self.ofdm_lte_ofdm_hier_0, 0), (self.ofdm_estimator_lte_estimator_hier_0, 0))    
        self.connect((self.ofdm_lte_ofdm_hier_0, 0), (self.pbch_decode_pbch_37_0, 0))    
        self.connect((self.pbch_decode_pbch_37_0, 0), (self.bch_decode_bch_hier_gr37_0, 0))    
        self.connect((self.pre_blocks_file_source_0, 0), (self.sync_lte_rough_symbol_sync_cc_0, 0))    
        self.connect((self.sync_lte_cp_freq_sync_0, 0), (self.sync_lte_sss_sync_hier_0, 0))    
        self.connect((self.sync_lte_pss_sync_37_0, 0), (self.sync_lte_cp_freq_sync_0, 0))    
        self.connect((self.sync_lte_rough_symbol_sync_cc_0, 0), (self.sync_lte_pss_sync_37_0, 0))    
        self.connect((self.sync_lte_sss_sync_hier_0, 0), (self.ofdm_lte_ofdm_hier_0, 0))