mirror of https://github.com/pvnis/srsRAN_4G.git
Merge branch 'next' into agpl_next
# Conflicts: # cmake/modules/CheckFunctionExists.c # cmake/modules/SRSLTEVersion.cmake # lib/examples/cell_search.c # lib/examples/cell_search_nbiot.c # lib/examples/npdsch_enodeb.c # lib/examples/npdsch_ue.c # lib/examples/npdsch_ue_helper.cc # lib/examples/npdsch_ue_helper.h # lib/examples/pdsch_enodeb.c # lib/examples/pdsch_ue.c # lib/examples/pssch_ue.c # lib/examples/synch_file.c # lib/examples/usrp_capture.c # lib/examples/usrp_capture_sync.c # lib/examples/usrp_capture_sync_nbiot.c # lib/examples/usrp_txrx.c # lib/examples/zmq_remote_rx.c # lib/include/srslte/asn1/rrc_nr_utils.h # lib/include/srslte/config.h # lib/include/srslte/phy/ch_estimation/chest_dl.h # lib/include/srslte/phy/ch_estimation/chest_dl_nbiot.h # lib/include/srslte/phy/ch_estimation/chest_sl.h # lib/include/srslte/phy/ch_estimation/chest_ul.h # lib/include/srslte/phy/ch_estimation/csi_rs.h # lib/include/srslte/phy/ch_estimation/refsignal_dl.h # lib/include/srslte/phy/ch_estimation/refsignal_dl_nbiot.h # lib/include/srslte/phy/ch_estimation/refsignal_ul.h # lib/include/srslte/phy/common/phy_common.h # lib/include/srslte/phy/common/phy_common_sl.h # lib/include/srslte/phy/enb/enb_dl.h # lib/include/srslte/phy/enb/enb_dl_nr.h # lib/include/srslte/phy/enb/enb_ul.h # lib/include/srslte/phy/fec/turbo/turbodecoder.h # lib/include/srslte/phy/io/format.h # lib/include/srslte/phy/phch/dci.h # lib/include/srslte/phy/phch/dci_nbiot.h # lib/include/srslte/phy/phch/npbch.h # lib/include/srslte/phy/phch/npdcch.h # lib/include/srslte/phy/phch/npdsch.h # lib/include/srslte/phy/phch/pbch.h # lib/include/srslte/phy/phch/pcfich.h # lib/include/srslte/phy/phch/pdcch.h # lib/include/srslte/phy/phch/pdsch.h # lib/include/srslte/phy/phch/pdsch_nr.h # lib/include/srslte/phy/phch/phich.h # lib/include/srslte/phy/phch/pmch.h # lib/include/srslte/phy/phch/pscch.h # lib/include/srslte/phy/phch/pucch.h # lib/include/srslte/phy/phch/pusch.h # lib/include/srslte/phy/phch/ra.h # lib/include/srslte/phy/phch/ra_dl.h # lib/include/srslte/phy/phch/ra_ul.h # lib/include/srslte/phy/phch/sch.h # lib/include/srslte/phy/phch/uci_cfg.h # lib/include/srslte/phy/scrambling/scrambling.h # lib/include/srslte/phy/sync/cfo.h # lib/include/srslte/phy/sync/cp.h # lib/include/srslte/phy/sync/pss.h # lib/include/srslte/phy/sync/sss.h # lib/include/srslte/phy/sync/ssss.h # lib/include/srslte/phy/ue/ue_cell_search.h # lib/include/srslte/phy/ue/ue_cell_search_nbiot.h # lib/include/srslte/phy/ue/ue_dl.h # lib/include/srslte/phy/ue/ue_dl_nbiot.h # lib/include/srslte/phy/ue/ue_dl_nr.h # lib/include/srslte/phy/ue/ue_mib.h # lib/include/srslte/phy/ue/ue_sync.h # lib/include/srslte/phy/ue/ue_sync_nbiot.h # lib/include/srslte/phy/ue/ue_ul.h # lib/include/srslte/phy/ue/ue_ul_nr.h # lib/include/srslte/phy/utils/random.h # lib/include/srslte/phy/utils/vector_simd.h # lib/include/srslte/srslog/log_channel.h # lib/include/srslte/srslte.h # lib/include/srslte/version.h.in # lib/include/srsran/adt/accumulators.h # lib/include/srsran/adt/adt_utils.h # lib/include/srsran/adt/bounded_bitset.h # lib/include/srsran/adt/bounded_vector.h # lib/include/srsran/adt/choice_type.h # lib/include/srsran/adt/circular_array.h # lib/include/srsran/adt/circular_buffer.h # lib/include/srsran/adt/detail/index_sequence.h # lib/include/srsran/adt/detail/type_utils.h # lib/include/srsran/adt/expected.h # lib/include/srsran/adt/interval.h # lib/include/srsran/adt/mem_pool.h # lib/include/srsran/adt/move_callback.h # lib/include/srsran/adt/observer.h # lib/include/srsran/adt/scope_exit.h # lib/include/srsran/adt/span.h # lib/include/srsran/asn1/asn1_utils.h # lib/include/srsran/asn1/gtpc.h # lib/include/srsran/asn1/gtpc_ies.h # lib/include/srsran/asn1/gtpc_msg.h # lib/include/srsran/asn1/ngap.h # lib/include/srsran/asn1/rrc.h # lib/include/srsran/asn1/rrc/bcch_msg.h # lib/include/srsran/asn1/rrc/common.h # lib/include/srsran/asn1/rrc/common_ext.h # lib/include/srsran/asn1/rrc/dl_ccch_msg.h # lib/include/srsran/asn1/rrc/dl_dcch_msg.h # lib/include/srsran/asn1/rrc/ho_cmd.h # lib/include/srsran/asn1/rrc/meascfg.h # lib/include/srsran/asn1/rrc/paging.h # lib/include/srsran/asn1/rrc/phy_ded.h # lib/include/srsran/asn1/rrc/rr_common.h # lib/include/srsran/asn1/rrc/rr_ded.h # lib/include/srsran/asn1/rrc/rrc_asn1.h # lib/include/srsran/asn1/rrc/security.h # lib/include/srsran/asn1/rrc/si.h # lib/include/srsran/asn1/rrc/uecap.h # lib/include/srsran/asn1/rrc/ul_ccch_msg.h # lib/include/srsran/asn1/rrc/ul_dcch_msg.h # lib/include/srsran/asn1/rrc_nbiot.h # lib/include/srsran/asn1/rrc_nr.h # lib/include/srsran/asn1/rrc_utils.h # lib/include/srsran/asn1/s1ap.h # lib/include/srsran/asn1/s1ap_utils.h # lib/include/srsran/build_info.h.in # lib/include/srsran/common/backtrace.h # lib/include/srsran/common/band_helper.h # lib/include/srsran/common/basic_pnf.h # lib/include/srsran/common/basic_vnf.h # lib/include/srsran/common/basic_vnf_api.h # lib/include/srsran/common/bcd_helpers.h # lib/include/srsran/common/block_queue.h # lib/include/srsran/common/buffer_pool.h # lib/include/srsran/common/byte_buffer.h # lib/include/srsran/common/common.h # lib/include/srsran/common/common_helper.h # lib/include/srsran/common/config_file.h # lib/include/srsran/common/crash_handler.h # lib/include/srsran/common/enb_events.h # lib/include/srsran/common/epoll_helper.h # lib/include/srsran/common/fsm.h # lib/include/srsran/common/gen_mch_tables.h # lib/include/srsran/common/int_helpers.h # lib/include/srsran/common/interfaces_common.h # lib/include/srsran/common/log_helper.h # lib/include/srsran/common/mac_pcap.h # lib/include/srsran/common/mac_pcap_base.h # lib/include/srsran/common/mac_pcap_net.h # lib/include/srsran/common/metrics_hub.h # lib/include/srsran/common/multiqueue.h # lib/include/srsran/common/nas_pcap.h # lib/include/srsran/common/netsource_handler.h # lib/include/srsran/common/network_utils.h # lib/include/srsran/common/pcap.h # lib/include/srsran/common/rlc_pcap.h # lib/include/srsran/common/rwlock_guard.h # lib/include/srsran/common/s1ap_pcap.h # lib/include/srsran/common/s3g.h # lib/include/srsran/common/security.h # lib/include/srsran/common/signal_handler.h # lib/include/srsran/common/singleton.h # lib/include/srsran/common/ssl.h # lib/include/srsran/common/stack_procedure.h # lib/include/srsran/common/standard_streams.h # lib/include/srsran/common/string_helpers.h # lib/include/srsran/common/task_scheduler.h # lib/include/srsran/common/test_common.h # lib/include/srsran/common/thread_pool.h # lib/include/srsran/common/threads.h # lib/include/srsran/common/time_prof.h # lib/include/srsran/common/timeout.h # lib/include/srsran/common/timers.h # lib/include/srsran/common/trace.h # lib/include/srsran/common/tti_point.h # lib/include/srsran/common/tti_sempahore.h # lib/include/srsran/common/tti_sync.h # lib/include/srsran/common/tti_sync_cv.h # lib/include/srsran/common/zuc.h # lib/include/srsran/interfaces/enb_command_interface.h # lib/include/srsran/interfaces/enb_gtpu_interfaces.h # lib/include/srsran/interfaces/enb_interfaces.h # lib/include/srsran/interfaces/enb_mac_interfaces.h # lib/include/srsran/interfaces/enb_metrics_interface.h # lib/include/srsran/interfaces/enb_pdcp_interfaces.h # lib/include/srsran/interfaces/enb_phy_interfaces.h # lib/include/srsran/interfaces/enb_rlc_interfaces.h # lib/include/srsran/interfaces/enb_rrc_interface_types.h # lib/include/srsran/interfaces/enb_rrc_interfaces.h # lib/include/srsran/interfaces/enb_s1ap_interfaces.h # lib/include/srsran/interfaces/epc_interfaces.h # lib/include/srsran/interfaces/gnb_interfaces.h # lib/include/srsran/interfaces/mac_interface_types.h # lib/include/srsran/interfaces/nr_common_interface_types.h # lib/include/srsran/interfaces/pdcp_interface_types.h # lib/include/srsran/interfaces/phy_interface_types.h # lib/include/srsran/interfaces/radio_interfaces.h # lib/include/srsran/interfaces/rlc_interface_types.h # lib/include/srsran/interfaces/rrc_interface_types.h # lib/include/srsran/interfaces/rrc_nr_interface_types.h # lib/include/srsran/interfaces/sched_interface.h # lib/include/srsran/interfaces/ue_gw_interfaces.h # lib/include/srsran/interfaces/ue_interfaces.h # lib/include/srsran/interfaces/ue_mac_interfaces.h # lib/include/srsran/interfaces/ue_nas_interfaces.h # lib/include/srsran/interfaces/ue_nr_interfaces.h # lib/include/srsran/interfaces/ue_pdcp_interfaces.h # lib/include/srsran/interfaces/ue_phy_interfaces.h # lib/include/srsran/interfaces/ue_rlc_interfaces.h # lib/include/srsran/interfaces/ue_rrc_interfaces.h # lib/include/srsran/interfaces/ue_usim_interfaces.h # lib/include/srsran/mac/mac_rar_pdu_nr.h # lib/include/srsran/mac/mac_sch_pdu_nr.h # lib/include/srsran/mac/pdu.h # lib/include/srsran/mac/pdu_queue.h # lib/include/srsran/phy/agc/agc.h # lib/include/srsran/phy/ch_estimation/chest_common.h # lib/include/srsran/phy/ch_estimation/dmrs_pdcch.h # lib/include/srsran/phy/ch_estimation/dmrs_pucch.h # lib/include/srsran/phy/ch_estimation/dmrs_sch.h # lib/include/srsran/phy/ch_estimation/wiener_dl.h # lib/include/srsran/phy/channel/ch_awgn.h # lib/include/srsran/phy/channel/channel.h # lib/include/srsran/phy/channel/delay.h # lib/include/srsran/phy/channel/fading.h # lib/include/srsran/phy/channel/hst.h # lib/include/srsran/phy/channel/rlf.h # lib/include/srsran/phy/common/phy_common_nr.h # lib/include/srsran/phy/common/sequence.h # lib/include/srsran/phy/common/timestamp.h # lib/include/srsran/phy/common/zc_sequence.h # lib/include/srsran/phy/dft/dft.h # lib/include/srsran/phy/dft/dft_precoding.h # lib/include/srsran/phy/dft/ofdm.h # lib/include/srsran/phy/fec/block/block.h # lib/include/srsran/phy/fec/cbsegm.h # lib/include/srsran/phy/fec/convolutional/convcoder.h # lib/include/srsran/phy/fec/convolutional/rm_conv.h # lib/include/srsran/phy/fec/convolutional/viterbi.h # lib/include/srsran/phy/fec/crc.h # lib/include/srsran/phy/fec/ldpc/base_graph.h # lib/include/srsran/phy/fec/ldpc/ldpc_common.h # lib/include/srsran/phy/fec/ldpc/ldpc_decoder.h # lib/include/srsran/phy/fec/ldpc/ldpc_encoder.h # lib/include/srsran/phy/fec/ldpc/ldpc_rm.h # lib/include/srsran/phy/fec/polar/polar_chanalloc.h # lib/include/srsran/phy/fec/polar/polar_code.h # lib/include/srsran/phy/fec/polar/polar_decoder.h # lib/include/srsran/phy/fec/polar/polar_encoder.h # lib/include/srsran/phy/fec/polar/polar_interleaver.h # lib/include/srsran/phy/fec/polar/polar_rm.h # lib/include/srsran/phy/fec/polar/test/polar_sets.h # lib/include/srsran/phy/fec/polar/test/subchannel_allocation.h # lib/include/srsran/phy/fec/softbuffer.h # lib/include/srsran/phy/fec/turbo/rm_turbo.h # lib/include/srsran/phy/fec/turbo/tc_interl.h # lib/include/srsran/phy/fec/turbo/turbocoder.h # lib/include/srsran/phy/fec/turbo/turbodecoder_gen.h # lib/include/srsran/phy/fec/turbo/turbodecoder_impl.h # lib/include/srsran/phy/fec/turbo/turbodecoder_iter.h # lib/include/srsran/phy/fec/turbo/turbodecoder_sse.h # lib/include/srsran/phy/fec/turbo/turbodecoder_win.h # lib/include/srsran/phy/io/binsource.h # lib/include/srsran/phy/io/filesink.h # lib/include/srsran/phy/io/filesource.h # lib/include/srsran/phy/io/netsink.h # lib/include/srsran/phy/io/netsource.h # lib/include/srsran/phy/mimo/layermap.h # lib/include/srsran/phy/mimo/precoding.h # lib/include/srsran/phy/modem/demod_hard.h # lib/include/srsran/phy/modem/demod_soft.h # lib/include/srsran/phy/modem/evm.h # lib/include/srsran/phy/modem/mod.h # lib/include/srsran/phy/modem/modem_table.h # lib/include/srsran/phy/phch/cqi.h # lib/include/srsran/phy/phch/csi.h # lib/include/srsran/phy/phch/csi_cfg.h # lib/include/srsran/phy/phch/dci_nr.h # lib/include/srsran/phy/phch/mib_sl.h # lib/include/srsran/phy/phch/npdsch_cfg.h # lib/include/srsran/phy/phch/pdcch_nr.h # lib/include/srsran/phy/phch/pdsch_cfg.h # lib/include/srsran/phy/phch/phch_cfg_nr.h # lib/include/srsran/phy/phch/prach.h # lib/include/srsran/phy/phch/psbch.h # lib/include/srsran/phy/phch/pssch.h # lib/include/srsran/phy/phch/pucch_cfg.h # lib/include/srsran/phy/phch/pucch_cfg_nr.h # lib/include/srsran/phy/phch/pucch_nr.h # lib/include/srsran/phy/phch/pucch_proc.h # lib/include/srsran/phy/phch/pusch_cfg.h # lib/include/srsran/phy/phch/pusch_nr.h # lib/include/srsran/phy/phch/ra_dl_nr.h # lib/include/srsran/phy/phch/ra_nbiot.h # lib/include/srsran/phy/phch/ra_nr.h # lib/include/srsran/phy/phch/ra_sl.h # lib/include/srsran/phy/phch/ra_ul_nr.h # lib/include/srsran/phy/phch/regs.h # lib/include/srsran/phy/phch/sch_cfg_nr.h # lib/include/srsran/phy/phch/sch_nr.h # lib/include/srsran/phy/phch/sci.h # lib/include/srsran/phy/phch/uci.h # lib/include/srsran/phy/phch/uci_cfg_nr.h # lib/include/srsran/phy/phch/uci_nr.h # lib/include/srsran/phy/resampling/decim.h # lib/include/srsran/phy/resampling/interp.h # lib/include/srsran/phy/resampling/resample_arb.h # lib/include/srsran/phy/resampling/resampler.h # lib/include/srsran/phy/rf/rf.h # lib/include/srsran/phy/rf/rf_utils.h # lib/include/srsran/phy/sync/npss.h # lib/include/srsran/phy/sync/nsss.h # lib/include/srsran/phy/sync/psss.h # lib/include/srsran/phy/sync/refsignal_dl_sync.h # lib/include/srsran/phy/sync/sfo.h # lib/include/srsran/phy/sync/sync.h # lib/include/srsran/phy/sync/sync_nbiot.h # lib/include/srsran/phy/ue/ue_mib_nbiot.h # lib/include/srsran/phy/ue/ue_mib_sl.h # lib/include/srsran/phy/ue/ue_phy.h # lib/include/srsran/phy/utils/bit.h # lib/include/srsran/phy/utils/cexptab.h # lib/include/srsran/phy/utils/convolution.h # lib/include/srsran/phy/utils/debug.h # lib/include/srsran/phy/utils/filter.h # lib/include/srsran/phy/utils/mat.h # lib/include/srsran/phy/utils/phy_logger.h # lib/include/srsran/phy/utils/primes.h # lib/include/srsran/phy/utils/ringbuffer.h # lib/include/srsran/phy/utils/simd.h # lib/include/srsran/phy/utils/vector.h # lib/include/srsran/radio/channel_mapping.h # lib/include/srsran/radio/radio.h # lib/include/srsran/radio/radio_base.h # lib/include/srsran/radio/radio_metrics.h # lib/include/srsran/radio/radio_null.h # lib/include/srsran/radio/rf_buffer.h # lib/include/srsran/radio/rf_timestamp.h # lib/include/srsran/rrc/rrc_cfg_utils.h # lib/include/srsran/srslog/context.h # lib/include/srsran/srslog/detail/log_backend.h # lib/include/srsran/srslog/detail/log_entry.h # lib/include/srsran/srslog/detail/log_entry_metadata.h # lib/include/srsran/srslog/detail/support/any.h # lib/include/srsran/srslog/detail/support/error_string.h # lib/include/srsran/srslog/detail/support/memory_buffer.h # lib/include/srsran/srslog/detail/support/thread_utils.h # lib/include/srsran/srslog/detail/support/tmp_utils.h # lib/include/srsran/srslog/detail/support/work_queue.h # lib/include/srsran/srslog/event_trace.h # lib/include/srsran/srslog/formatter.h # lib/include/srsran/srslog/logger.h # lib/include/srsran/srslog/shared_types.h # lib/include/srsran/srslog/sink.h # lib/include/srsran/srslog/srslog.h # lib/include/srsran/srslog/srslog_c.h # lib/include/srsran/system/sys_metrics.h # lib/include/srsran/system/sys_metrics_processor.h # lib/include/srsran/test/ue_test_interfaces.h # lib/include/srsran/upper/byte_buffer_queue.h # lib/include/srsran/upper/gtpu.h # lib/include/srsran/upper/ipv6.h # lib/include/srsran/upper/pdcp.h # lib/include/srsran/upper/pdcp_entity_base.h # lib/include/srsran/upper/pdcp_entity_lte.h # lib/include/srsran/upper/pdcp_entity_nr.h # lib/include/srsran/upper/pdcp_metrics.h # lib/include/srsran/upper/rlc.h # lib/include/srsran/upper/rlc_am_base.h # lib/include/srsran/upper/rlc_am_lte.h # lib/include/srsran/upper/rlc_am_nr.h # lib/include/srsran/upper/rlc_common.h # lib/include/srsran/upper/rlc_metrics.h # lib/include/srsran/upper/rlc_tm.h # lib/include/srsran/upper/rlc_um_base.h # lib/include/srsran/upper/rlc_um_lte.h # lib/include/srsran/upper/rlc_um_nr.h # lib/src/asn1/asn1_utils.cc # lib/src/asn1/gtpc.cc # lib/src/asn1/ngap.cc # lib/src/asn1/rrc.cc # lib/src/asn1/rrc/bcch_msg.cc # lib/src/asn1/rrc/common.cc # lib/src/asn1/rrc/common_ext.cc # lib/src/asn1/rrc/dl_ccch_msg.cc # lib/src/asn1/rrc/dl_dcch_msg.cc # lib/src/asn1/rrc/ho_cmd.cc # lib/src/asn1/rrc/meascfg.cc # lib/src/asn1/rrc/paging.cc # lib/src/asn1/rrc/phy_ded.cc # lib/src/asn1/rrc/rr_common.cc # lib/src/asn1/rrc/rr_ded.cc # lib/src/asn1/rrc/security.cc # lib/src/asn1/rrc/si.cc # lib/src/asn1/rrc/uecap.cc # lib/src/asn1/rrc/ul_ccch_msg.cc # lib/src/asn1/rrc/ul_dcch_msg.cc # lib/src/asn1/rrc_nbiot.cc # lib/src/asn1/rrc_nr.cc # lib/src/asn1/rrc_nr_utils.cc # lib/src/asn1/rrc_utils.cc # lib/src/asn1/s1ap.cc # lib/src/common/arch_select.cc # lib/src/common/backtrace.c # lib/src/common/band_helper.cc # lib/src/common/basic_vnf.cc # lib/src/common/buffer_pool.cc # lib/src/common/byte_buffer.cc # lib/src/common/crash_handler.cc # lib/src/common/enb_events.cc # lib/src/common/gen_mch_tables.c # lib/src/common/mac_pcap.cc # lib/src/common/mac_pcap_base.cc # lib/src/common/mac_pcap_net.cc # lib/src/common/nas_pcap.cc # lib/src/common/network_utils.cc # lib/src/common/pcap.c # lib/src/common/rlc_pcap.cc # lib/src/common/s1ap_pcap.cc # lib/src/common/s3g.cc # lib/src/common/security.cc # lib/src/common/standard_streams.cc # lib/src/common/test/band_helper_test.cc # lib/src/common/test/thread_pool_test.cc # lib/src/common/test/thread_test.cc # lib/src/common/thread_pool.cc # lib/src/common/threads.c # lib/src/common/time_prof.cc # lib/src/common/tti_sync_cv.cc # lib/src/common/version.c # lib/src/common/zuc.cc # lib/src/mac/mac_rar_pdu_nr.cc # lib/src/mac/mac_sch_pdu_nr.cc # lib/src/mac/pdu.cc # lib/src/mac/pdu_queue.cc # lib/src/phy/agc/agc.c # lib/src/phy/ch_estimation/chest_common.c # lib/src/phy/ch_estimation/chest_dl.c # lib/src/phy/ch_estimation/chest_dl_nbiot.c # lib/src/phy/ch_estimation/chest_sl.c # lib/src/phy/ch_estimation/chest_ul.c # lib/src/phy/ch_estimation/csi_rs.c # lib/src/phy/ch_estimation/dmrs_pdcch.c # lib/src/phy/ch_estimation/dmrs_pucch.c # lib/src/phy/ch_estimation/dmrs_sch.c # lib/src/phy/ch_estimation/refsignal_dl.c # lib/src/phy/ch_estimation/refsignal_dl_nbiot.c # lib/src/phy/ch_estimation/refsignal_ul.c # lib/src/phy/ch_estimation/test/chest_nbiot_test_dl.c # lib/src/phy/ch_estimation/test/chest_test_dl.c # lib/src/phy/ch_estimation/test/chest_test_sl.c # lib/src/phy/ch_estimation/test/chest_test_srs.c # lib/src/phy/ch_estimation/test/chest_test_ul.c # lib/src/phy/ch_estimation/test/csi_rs_test.c # lib/src/phy/ch_estimation/test/dmrs_pdcch_test.c # lib/src/phy/ch_estimation/test/dmrs_pdsch_test.c # lib/src/phy/ch_estimation/test/refsignal_ul_test.c # lib/src/phy/ch_estimation/wiener_dl.c # lib/src/phy/channel/ch_awgn.c # lib/src/phy/channel/channel.cc # lib/src/phy/channel/delay.c # lib/src/phy/channel/fading.c # lib/src/phy/channel/gauss.c # lib/src/phy/channel/gauss.h # lib/src/phy/channel/hst.c # lib/src/phy/channel/rlf.c # lib/src/phy/channel/test/awgn_channel_test.c # lib/src/phy/channel/test/delay_channel_test.c # lib/src/phy/channel/test/fading_channel_test.c # lib/src/phy/channel/test/hst_channel_test.c # lib/src/phy/common/phy_common.c # lib/src/phy/common/phy_common_nr.c # lib/src/phy/common/phy_common_sl.c # lib/src/phy/common/sequence.c # lib/src/phy/common/test/sequence_test.c # lib/src/phy/common/timestamp.c # lib/src/phy/common/zc_sequence.c # lib/src/phy/dft/dft_fftw.c # lib/src/phy/dft/dft_precoding.c # lib/src/phy/dft/ofdm.c # lib/src/phy/dft/test/ofdm_test.c # lib/src/phy/enb/enb_dl.c # lib/src/phy/enb/enb_dl_nr.c # lib/src/phy/enb/enb_ul.c # lib/src/phy/fec/block/block.c # lib/src/phy/fec/block/test/block_test.c # lib/src/phy/fec/cbsegm.c # lib/src/phy/fec/convolutional/convcoder.c # lib/src/phy/fec/convolutional/parity.c # lib/src/phy/fec/convolutional/parity.h # lib/src/phy/fec/convolutional/test/viterbi_test.c # lib/src/phy/fec/convolutional/test/viterbi_test.h # lib/src/phy/fec/convolutional/viterbi.c # lib/src/phy/fec/convolutional/viterbi37.h # lib/src/phy/fec/crc.c # lib/src/phy/fec/ldpc/base_graph.c # lib/src/phy/fec/ldpc/ldpc_avx2_consts.h # lib/src/phy/fec/ldpc/ldpc_avx512_consts.h # lib/src/phy/fec/ldpc/ldpc_dec_all.h # lib/src/phy/fec/ldpc/ldpc_dec_c.c # lib/src/phy/fec/ldpc/ldpc_dec_c_avx2.c # lib/src/phy/fec/ldpc/ldpc_dec_c_avx2_flood.c # lib/src/phy/fec/ldpc/ldpc_dec_c_avx2long.c # lib/src/phy/fec/ldpc/ldpc_dec_c_avx2long_flood.c # lib/src/phy/fec/ldpc/ldpc_dec_c_avx512.c # lib/src/phy/fec/ldpc/ldpc_dec_c_avx512long.c # lib/src/phy/fec/ldpc/ldpc_dec_c_avx512long_flood.c # lib/src/phy/fec/ldpc/ldpc_dec_c_flood.c # lib/src/phy/fec/ldpc/ldpc_dec_f.c # lib/src/phy/fec/ldpc/ldpc_dec_s.c # lib/src/phy/fec/ldpc/ldpc_decoder.c # lib/src/phy/fec/ldpc/ldpc_enc_all.h # lib/src/phy/fec/ldpc/ldpc_enc_avx2.c # lib/src/phy/fec/ldpc/ldpc_enc_avx2long.c # lib/src/phy/fec/ldpc/ldpc_enc_avx512.c # lib/src/phy/fec/ldpc/ldpc_enc_avx512long.c # lib/src/phy/fec/ldpc/ldpc_enc_c.c # lib/src/phy/fec/ldpc/ldpc_encoder.c # lib/src/phy/fec/ldpc/ldpc_rm.c # lib/src/phy/fec/ldpc/test/ldpc_chain_test.c # lib/src/phy/fec/ldpc/test/ldpc_dec_avx2_test.c # lib/src/phy/fec/ldpc/test/ldpc_dec_avx512_test.c # lib/src/phy/fec/ldpc/test/ldpc_dec_c_test.c # lib/src/phy/fec/ldpc/test/ldpc_dec_s_test.c # lib/src/phy/fec/ldpc/test/ldpc_dec_test.c # lib/src/phy/fec/ldpc/test/ldpc_enc_avx2_test.c # lib/src/phy/fec/ldpc/test/ldpc_enc_avx512_test.c # lib/src/phy/fec/ldpc/test/ldpc_enc_test.c # lib/src/phy/fec/ldpc/test/ldpc_rm_chain_test.c # lib/src/phy/fec/ldpc/test/ldpc_rm_test.c # lib/src/phy/fec/polar/polar_chanalloc.c # lib/src/phy/fec/polar/polar_code.c # lib/src/phy/fec/polar/polar_decoder.c # lib/src/phy/fec/polar/polar_decoder_ssc_all.c # lib/src/phy/fec/polar/polar_decoder_ssc_all.h # lib/src/phy/fec/polar/polar_decoder_ssc_c.c # lib/src/phy/fec/polar/polar_decoder_ssc_c.h # lib/src/phy/fec/polar/polar_decoder_ssc_c_avx2.c # lib/src/phy/fec/polar/polar_decoder_ssc_c_avx2.h # lib/src/phy/fec/polar/polar_decoder_ssc_f.c # lib/src/phy/fec/polar/polar_decoder_ssc_f.h # lib/src/phy/fec/polar/polar_decoder_ssc_s.c # lib/src/phy/fec/polar/polar_decoder_ssc_s.h # lib/src/phy/fec/polar/polar_decoder_vector.c # lib/src/phy/fec/polar/polar_decoder_vector.h # lib/src/phy/fec/polar/polar_decoder_vector_avx2.c # lib/src/phy/fec/polar/polar_decoder_vector_avx2.h # lib/src/phy/fec/polar/polar_encoder.c # lib/src/phy/fec/polar/polar_encoder_avx2.c # lib/src/phy/fec/polar/polar_encoder_avx2.h # lib/src/phy/fec/polar/polar_encoder_pipelined.c # lib/src/phy/fec/polar/polar_encoder_pipelined.h # lib/src/phy/fec/polar/polar_interleaver.c # lib/src/phy/fec/polar/polar_rm.c # lib/src/phy/fec/polar/test/polar_chain_test.c # lib/src/phy/fec/polar/test/polar_interleaver_gold.h # lib/src/phy/fec/polar/test/polar_interleaver_test.c # lib/src/phy/fec/polar/test/polar_sets.c # lib/src/phy/fec/polar/test/polar_sets.h # lib/src/phy/fec/polar/test/subchannel_allocation.c # lib/src/phy/fec/polar/test/subchannel_allocation.h # lib/src/phy/fec/softbuffer.c # lib/src/phy/fec/test/crc_test.c # lib/src/phy/fec/test/crc_test.h # lib/src/phy/fec/turbo/rm_conv.c # lib/src/phy/fec/turbo/rm_turbo.c # lib/src/phy/fec/turbo/tc_interl_lte.c # lib/src/phy/fec/turbo/tc_interl_umts.c # lib/src/phy/fec/turbo/test/rm_conv_test.c # lib/src/phy/fec/turbo/test/rm_turbo_test.c # lib/src/phy/fec/turbo/test/turbocoder_test.c # lib/src/phy/fec/turbo/test/turbodecoder_test.c # lib/src/phy/fec/turbo/test/turbodecoder_test.h # lib/src/phy/fec/turbo/turbocoder.c # lib/src/phy/fec/turbo/turbodecoder.c # lib/src/phy/fec/turbo/turbodecoder_gen.c # lib/src/phy/fec/turbo/turbodecoder_sse.c # lib/src/phy/fec/utils_avx2.h # lib/src/phy/fec/utils_avx512.h # lib/src/phy/io/binsource.c # lib/src/phy/io/filesink.c # lib/src/phy/io/filesource.c # lib/src/phy/io/netsink.c # lib/src/phy/io/netsource.c # lib/src/phy/mimo/layermap.c # lib/src/phy/mimo/precoding.c # lib/src/phy/mimo/test/layermap_test.c # lib/src/phy/mimo/test/pmi_select_test.c # lib/src/phy/mimo/test/pmi_select_test.h # lib/src/phy/mimo/test/precoder_test.c # lib/src/phy/modem/demod_hard.c # lib/src/phy/modem/demod_soft.c # lib/src/phy/modem/hard_demod_lte.c # lib/src/phy/modem/hard_demod_lte.h # lib/src/phy/modem/lte_tables.c # lib/src/phy/modem/lte_tables.h # lib/src/phy/modem/mod.c # lib/src/phy/modem/modem_table.c # lib/src/phy/modem/test/modem_test.c # lib/src/phy/modem/test/soft_demod_test.c # lib/src/phy/phch/cqi.c # lib/src/phy/phch/csi.c # lib/src/phy/phch/dci.c # lib/src/phy/phch/dci_nbiot.c # lib/src/phy/phch/dci_nr.c # lib/src/phy/phch/mib_sl.c # lib/src/phy/phch/npbch.c # lib/src/phy/phch/npdcch.c # lib/src/phy/phch/npdsch.c # lib/src/phy/phch/pbch.c # lib/src/phy/phch/pcfich.c # lib/src/phy/phch/pdcch.c # lib/src/phy/phch/pdcch_nr.c # lib/src/phy/phch/pdsch.c # lib/src/phy/phch/pdsch_nr.c # lib/src/phy/phch/phich.c # lib/src/phy/phch/pmch.c # lib/src/phy/phch/prach.c # lib/src/phy/phch/prach_tables.h # lib/src/phy/phch/prb_dl.c # lib/src/phy/phch/prb_dl.h # lib/src/phy/phch/psbch.c # lib/src/phy/phch/pscch.c # lib/src/phy/phch/pssch.c # lib/src/phy/phch/pucch.c # lib/src/phy/phch/pucch_cfg_nr.c # lib/src/phy/phch/pucch_nr.c # lib/src/phy/phch/pucch_proc.c # lib/src/phy/phch/pusch.c # lib/src/phy/phch/pusch_nr.c # lib/src/phy/phch/ra.c # lib/src/phy/phch/ra_dl.c # lib/src/phy/phch/ra_dl_nr.c # lib/src/phy/phch/ra_helper.h # lib/src/phy/phch/ra_nbiot.c # lib/src/phy/phch/ra_nr.c # lib/src/phy/phch/ra_sl.c # lib/src/phy/phch/ra_ul.c # lib/src/phy/phch/ra_ul_nr.c # lib/src/phy/phch/regs.c # lib/src/phy/phch/sch.c # lib/src/phy/phch/sch_nr.c # lib/src/phy/phch/sci.c # lib/src/phy/phch/sequences.c # lib/src/phy/phch/tbs_tables.h # lib/src/phy/phch/tbs_tables_nbiot.h # lib/src/phy/phch/test/dci_nbiot_test.c # lib/src/phy/phch/test/npbch_file_test.c # lib/src/phy/phch/test/npbch_test.c # lib/src/phy/phch/test/npdcch_file_test.c # lib/src/phy/phch/test/npdcch_test.c # lib/src/phy/phch/test/npdsch_npdcch_file_test.c # lib/src/phy/phch/test/npdsch_test.c # lib/src/phy/phch/test/pbch_file_test.c # lib/src/phy/phch/test/pbch_test.c # lib/src/phy/phch/test/pcfich_file_test.c # lib/src/phy/phch/test/pcfich_test.c # lib/src/phy/phch/test/pdcch_file_test.c # lib/src/phy/phch/test/pdcch_nr_test.c # lib/src/phy/phch/test/pdcch_test.c # lib/src/phy/phch/test/pdsch_nr_test.c # lib/src/phy/phch/test/pdsch_pdcch_file_test.c # lib/src/phy/phch/test/pdsch_test.c # lib/src/phy/phch/test/phich_file_test.c # lib/src/phy/phch/test/phich_test.c # lib/src/phy/phch/test/pmch_file_test.c # lib/src/phy/phch/test/pmch_test.c # lib/src/phy/phch/test/prach_test.c # lib/src/phy/phch/test/prach_test_multi.c # lib/src/phy/phch/test/prach_test_usrp.c # lib/src/phy/phch/test/psbch_file_test.c # lib/src/phy/phch/test/psbch_test.c # lib/src/phy/phch/test/pscch_test.c # lib/src/phy/phch/test/pssch_pscch_file_test.c # lib/src/phy/phch/test/pssch_test.c # lib/src/phy/phch/test/pucch_nr_test.c # lib/src/phy/phch/test/pucch_test.c # lib/src/phy/phch/test/pusch_nr_test.c # lib/src/phy/phch/test/pusch_test.c # lib/src/phy/phch/test/ra_nr_test.c # lib/src/phy/phch/test/sch_nr_test.c # lib/src/phy/phch/uci.c # lib/src/phy/phch/uci_nr.c # lib/src/phy/resampling/decim.c # lib/src/phy/resampling/interp.c # lib/src/phy/resampling/resample_arb.c # lib/src/phy/resampling/resampler.c # lib/src/phy/resampling/test/resample_arb_bench.c # lib/src/phy/resampling/test/resample_arb_test.c # lib/src/phy/resampling/test/resampler_test.c # lib/src/phy/rf/rf_blade_imp.c # lib/src/phy/rf/rf_blade_imp.h # lib/src/phy/rf/rf_dev.h # lib/src/phy/rf/rf_helper.h # lib/src/phy/rf/rf_imp.c # lib/src/phy/rf/rf_soapy_imp.c # lib/src/phy/rf/rf_soapy_imp.h # lib/src/phy/rf/rf_uhd_generic.h # lib/src/phy/rf/rf_uhd_imp.cc # lib/src/phy/rf/rf_uhd_imp.h # lib/src/phy/rf/rf_uhd_rfnoc.h # lib/src/phy/rf/rf_uhd_safe.h # lib/src/phy/rf/rf_utils.c # lib/src/phy/rf/rf_zmq_imp.c # lib/src/phy/rf/rf_zmq_imp.h # lib/src/phy/rf/rf_zmq_imp_rx.c # lib/src/phy/rf/rf_zmq_imp_trx.h # lib/src/phy/rf/rf_zmq_imp_tx.c # lib/src/phy/rf/rf_zmq_test.c # lib/src/phy/scrambling/scrambling.c # lib/src/phy/scrambling/test/scrambling_test.c # lib/src/phy/sync/cfo.c # lib/src/phy/sync/cp.c # lib/src/phy/sync/find_sss.c # lib/src/phy/sync/gen_sss.c # lib/src/phy/sync/npss.c # lib/src/phy/sync/nsss.c # lib/src/phy/sync/pss.c # lib/src/phy/sync/psss.c # lib/src/phy/sync/refsignal_dl_sync.c # lib/src/phy/sync/sfo.c # lib/src/phy/sync/sss.c # lib/src/phy/sync/ssss.c # lib/src/phy/sync/sync.c # lib/src/phy/sync/sync_nbiot.c # lib/src/phy/sync/test/cfo_test.c # lib/src/phy/sync/test/npss_file.c # lib/src/phy/sync/test/npss_test.c # lib/src/phy/sync/test/npss_usrp.c # lib/src/phy/sync/test/nsss_test.c # lib/src/phy/sync/test/nsss_usrp.c # lib/src/phy/sync/test/pss_file.c # lib/src/phy/sync/test/pss_usrp.c # lib/src/phy/sync/test/psss_file_test.c # lib/src/phy/sync/test/sync_nbiot_test.c # lib/src/phy/sync/test/sync_sl_test.c # lib/src/phy/sync/test/sync_test.c # lib/src/phy/ue/test/gen_ack_test.c # lib/src/phy/ue/test/pucch_resource_test.c # lib/src/phy/ue/test/ue_dl_nbiot_test.c # lib/src/phy/ue/test/ue_mib_sync_test_nbiot_usrp.c # lib/src/phy/ue/test/ue_sync_test_nbiot_usrp.c # lib/src/phy/ue/ue_cell_search.c # lib/src/phy/ue/ue_cell_search_nbiot.c # lib/src/phy/ue/ue_dl.c # lib/src/phy/ue/ue_dl_nbiot.c # lib/src/phy/ue/ue_dl_nr.c # lib/src/phy/ue/ue_mib.c # lib/src/phy/ue/ue_mib_nbiot.c # lib/src/phy/ue/ue_mib_sl.c # lib/src/phy/ue/ue_sync.c # lib/src/phy/ue/ue_sync_nbiot.c # lib/src/phy/ue/ue_ul.c # lib/src/phy/ue/ue_ul_nr.c # lib/src/phy/utils/bit.c # lib/src/phy/utils/cexptab.c # lib/src/phy/utils/convolution.c # lib/src/phy/utils/debug.c # lib/src/phy/utils/filter.c # lib/src/phy/utils/mat.c # lib/src/phy/utils/phy_logger.c # lib/src/phy/utils/primes.c # lib/src/phy/utils/random.cpp # lib/src/phy/utils/ringbuffer.c # lib/src/phy/utils/test/dft_test.c # lib/src/phy/utils/test/mat_test.c # lib/src/phy/utils/test/ring_buffer_test.c # lib/src/phy/utils/test/vector_test.c # lib/src/phy/utils/vector.c # lib/src/phy/utils/vector_simd.c # lib/src/radio/channel_mapping.cc # lib/src/radio/radio.cc # lib/src/radio/test/benchmark_radio.cc # lib/src/srslog/backend_worker.cpp # lib/src/srslog/backend_worker.h # lib/src/srslog/bundled/fmt/CMakeLists.txt # lib/src/srslog/event_trace.cpp # lib/src/srslog/formatters/CMakeLists.txt # lib/src/srslog/formatters/json_formatter.cpp # lib/src/srslog/formatters/json_formatter.h # lib/src/srslog/formatters/text_formatter.cpp # lib/src/srslog/formatters/text_formatter.h # lib/src/srslog/log_backend_impl.h # lib/src/srslog/object_repository.h # lib/src/srslog/sinks/buffered_file_sink.h # lib/src/srslog/sinks/file_sink.h # lib/src/srslog/sinks/file_utils.h # lib/src/srslog/sinks/stream_sink.h # lib/src/srslog/srslog.cpp # lib/src/srslog/srslog_c.cpp # lib/src/srslog/srslog_instance.h # lib/src/system/sys_metrics_processor.cc # lib/src/upper/gtpu.cc # lib/src/upper/pdcp.cc # lib/src/upper/pdcp_entity_base.cc # lib/src/upper/pdcp_entity_lte.cc # lib/src/upper/pdcp_entity_nr.cc # lib/src/upper/rlc.cc # lib/src/upper/rlc_am_base.cc # lib/src/upper/rlc_am_lte.cc # lib/src/upper/rlc_am_nr.cc # lib/src/upper/rlc_tm.cc # lib/src/upper/rlc_um_base.cc # lib/src/upper/rlc_um_lte.cc # lib/src/upper/rlc_um_nr.cc # lib/test/adt/bounded_bitset_test.cc # lib/test/adt/bounded_vector_test.cc # lib/test/adt/circular_buffer_test.cc # lib/test/adt/expected_test.cc # lib/test/adt/interval_test.cc # lib/test/adt/mem_pool_test.cc # lib/test/adt/observer_test.cc # lib/test/adt/scope_exit_test.cc # lib/test/adt/span_test.cc # lib/test/asn1/asn1_utils_test.cc # lib/test/asn1/nas_decoder.cc # lib/test/asn1/ngap_test.cc # lib/test/asn1/rrc_asn1_decoder.cc # lib/test/asn1/rrc_test.cc # lib/test/asn1/s1ap_test.cc # lib/test/asn1/srsran_asn1_nas_test.cc # lib/test/asn1/srsran_asn1_rrc_dl_ccch_test.cc # lib/test/asn1/srsran_asn1_rrc_dl_dcch_test.cc # lib/test/asn1/srsran_asn1_rrc_mcch_test.cc # lib/test/asn1/srsran_asn1_rrc_meas_test.cc # lib/test/asn1/srsran_asn1_rrc_nr_test.cc # lib/test/asn1/srsran_asn1_rrc_ul_dcch_test.cc # lib/test/common/bcd_helpers_test.cc # lib/test/common/byte_buffer_queue_test.cc # lib/test/common/choice_type_test.cc # lib/test/common/fsm_test.cc # lib/test/common/mac_pcap_net_test.cc # lib/test/common/multiqueue_test.cc # lib/test/common/network_utils_test.cc # lib/test/common/pnf_bridge.cc # lib/test/common/pnf_dummy.cc # lib/test/common/stack_procedure_test.cc # lib/test/common/task_scheduler_test.cc # lib/test/common/test_eea1.cc # lib/test/common/test_eea2.cc # lib/test/common/test_eea3.cc # lib/test/common/test_eia1.cc # lib/test/common/test_eia3.cc # lib/test/common/test_f12345.cc # lib/test/common/timeout_test.cc # lib/test/common/timer_test.cc # lib/test/common/tti_point_test.cc # lib/test/mac/mac_pcap_test.cc # lib/test/mac/mac_pdu_nr_test.cc # lib/test/mac/pdu_test.cc # lib/test/phy/phy_dl_nr_test.c # lib/test/phy/phy_dl_test.c # lib/test/phy/pucch_ca_test.c # lib/test/srslog/any_test.cpp # lib/test/srslog/context_test.cpp # lib/test/srslog/event_trace_test.cpp # lib/test/srslog/file_sink_test.cpp # lib/test/srslog/file_test_utils.h # lib/test/srslog/file_utils_test.cpp # lib/test/srslog/json_formatter_test.cpp # lib/test/srslog/log_backend_test.cpp # lib/test/srslog/log_channel_test.cpp # lib/test/srslog/logger_test.cpp # lib/test/srslog/srslog_test.cpp # lib/test/srslog/test_dummies.h # lib/test/srslog/testing_helpers.h # lib/test/srslog/text_formatter_test.cpp # lib/test/upper/pdcp_base_test.h # lib/test/upper/pdcp_lte_test.h # lib/test/upper/pdcp_lte_test_rx.cc # lib/test/upper/pdcp_nr_test.h # lib/test/upper/pdcp_nr_test_discard_sdu.cc # lib/test/upper/pdcp_nr_test_rx.cc # lib/test/upper/pdcp_nr_test_tx.cc # lib/test/upper/rlc_am_control_test.cc # lib/test/upper/rlc_am_data_test.cc # lib/test/upper/rlc_am_nr_pdu_test.cc # lib/test/upper/rlc_am_test.cc # lib/test/upper/rlc_common_test.cc # lib/test/upper/rlc_stress_test.cc # lib/test/upper/rlc_test_common.h # lib/test/upper/rlc_um_data_test.cc # lib/test/upper/rlc_um_nr_pdu_test.cc # lib/test/upper/rlc_um_nr_test.cc # lib/test/upper/rlc_um_test.cc # srsenb/hdr/cfg_parser.h # srsenb/hdr/enb.h # srsenb/hdr/metrics_csv.h # srsenb/hdr/metrics_json.h # srsenb/hdr/metrics_stdout.h # srsenb/hdr/parser.h # srsenb/hdr/phy/enb_phy_base.h # srsenb/hdr/phy/lte/cc_worker.h # srsenb/hdr/phy/lte/sf_worker.h # srsenb/hdr/phy/lte/worker_pool.h # srsenb/hdr/phy/nr/cc_worker.h # srsenb/hdr/phy/nr/sf_worker.h # srsenb/hdr/phy/nr/worker_pool.h # srsenb/hdr/phy/phy.h # srsenb/hdr/phy/phy_common.h # srsenb/hdr/phy/phy_interfaces.h # srsenb/hdr/phy/phy_metrics.h # srsenb/hdr/phy/prach_worker.h # srsenb/hdr/phy/txrx.h # srsenb/hdr/phy/vnf_phy_nr.h # srsenb/hdr/stack/enb_stack_base.h # srsenb/hdr/stack/enb_stack_lte.h # srsenb/hdr/stack/gnb_stack_nr.h # srsenb/hdr/stack/mac/mac.h # srsenb/hdr/stack/mac/mac_metrics.h # srsenb/hdr/stack/mac/mac_nr.h # srsenb/hdr/stack/mac/sched.h # srsenb/hdr/stack/mac/sched_carrier.h # srsenb/hdr/stack/mac/sched_common.h # srsenb/hdr/stack/mac/sched_grid.h # srsenb/hdr/stack/mac/sched_helpers.h # srsenb/hdr/stack/mac/sched_phy_ch/sched_dci.h # srsenb/hdr/stack/mac/sched_phy_ch/sched_result.h # srsenb/hdr/stack/mac/sched_phy_ch/sf_cch_allocator.h # srsenb/hdr/stack/mac/sched_ue.h # srsenb/hdr/stack/mac/sched_ue_ctrl/sched_harq.h # srsenb/hdr/stack/mac/sched_ue_ctrl/sched_lch.h # srsenb/hdr/stack/mac/sched_ue_ctrl/sched_ue_cell.h # srsenb/hdr/stack/mac/sched_ue_ctrl/tpc.h # srsenb/hdr/stack/mac/schedulers/sched_base.h # srsenb/hdr/stack/mac/schedulers/sched_time_pf.h # srsenb/hdr/stack/mac/schedulers/sched_time_rr.h # srsenb/hdr/stack/mac/ta.h # srsenb/hdr/stack/mac/ue.h # srsenb/hdr/stack/rrc/mac_controller.h # srsenb/hdr/stack/rrc/rrc.h # srsenb/hdr/stack/rrc/rrc_bearer_cfg.h # srsenb/hdr/stack/rrc/rrc_cell_cfg.h # srsenb/hdr/stack/rrc/rrc_config.h # srsenb/hdr/stack/rrc/rrc_config_common.h # srsenb/hdr/stack/rrc/rrc_metrics.h # srsenb/hdr/stack/rrc/rrc_mobility.h # srsenb/hdr/stack/rrc/rrc_nr.h # srsenb/hdr/stack/rrc/rrc_ue.h # srsenb/hdr/stack/rrc/ue_meas_cfg.h # srsenb/hdr/stack/rrc/ue_rr_cfg.h # srsenb/hdr/stack/upper/common_enb.h # srsenb/hdr/stack/upper/gtpu.h # srsenb/hdr/stack/upper/pdcp.h # srsenb/hdr/stack/upper/pdcp_nr.h # srsenb/hdr/stack/upper/rlc.h # srsenb/hdr/stack/upper/rlc_nr.h # srsenb/hdr/stack/upper/s1ap.h # srsenb/hdr/stack/upper/s1ap_metrics.h # srsenb/hdr/stack/upper/sdap.h # srsenb/src/enb.cc # srsenb/src/enb_cfg_parser.cc # srsenb/src/enb_cfg_parser.h # srsenb/src/main.cc # srsenb/src/metrics_csv.cc # srsenb/src/metrics_json.cc # srsenb/src/metrics_stdout.cc # srsenb/src/parser.cc # srsenb/src/phy/lte/sf_worker.cc # srsenb/src/phy/lte/worker_pool.cc # srsenb/src/phy/nr/cc_worker.cc # srsenb/src/phy/nr/sf_worker.cc # srsenb/src/phy/nr/worker_pool.cc # srsenb/src/phy/phy.cc # srsenb/src/phy/phy_common.cc # srsenb/src/phy/prach_worker.cc # srsenb/src/phy/txrx.cc # srsenb/src/phy/vnf_phy_nr.cc # srsenb/src/stack/enb_stack_lte.cc # srsenb/src/stack/gnb_stack_nr.cc # srsenb/src/stack/mac/mac.cc # srsenb/src/stack/mac/mac_nr.cc # srsenb/src/stack/mac/sched.cc # srsenb/src/stack/mac/sched_carrier.cc # srsenb/src/stack/mac/sched_grid.cc # srsenb/src/stack/mac/sched_helpers.cc # srsenb/src/stack/mac/sched_phy_ch/sched_dci.cc # srsenb/src/stack/mac/sched_phy_ch/sf_cch_allocator.cc # srsenb/src/stack/mac/sched_ue.cc # srsenb/src/stack/mac/sched_ue_ctrl/sched_harq.cc # srsenb/src/stack/mac/sched_ue_ctrl/sched_lch.cc # srsenb/src/stack/mac/sched_ue_ctrl/sched_ue_cell.cc # srsenb/src/stack/mac/schedulers/sched_base.cc # srsenb/src/stack/mac/schedulers/sched_time_pf.cc # srsenb/src/stack/mac/schedulers/sched_time_rr.cc # srsenb/src/stack/mac/ue.cc # srsenb/src/stack/rrc/mac_controller.cc # srsenb/src/stack/rrc/rrc.cc # srsenb/src/stack/rrc/rrc_bearer_cfg.cc # srsenb/src/stack/rrc/rrc_cell_cfg.cc # srsenb/src/stack/rrc/rrc_mobility.cc # srsenb/src/stack/rrc/rrc_nr.cc # srsenb/src/stack/rrc/rrc_ue.cc # srsenb/src/stack/rrc/ue_meas_cfg.cc # srsenb/src/stack/rrc/ue_rr_cfg.cc # srsenb/src/stack/upper/gtpu.cc # srsenb/src/stack/upper/pdcp.cc # srsenb/src/stack/upper/pdcp_nr.cc # srsenb/src/stack/upper/rlc.cc # srsenb/src/stack/upper/rlc_nr.cc # srsenb/src/stack/upper/s1ap.cc # srsenb/src/stack/upper/sdap.cc # srsenb/test/common/dummy_classes.h # srsenb/test/common/dummy_nr_classes.h # srsenb/test/enb_metrics_test.cc # srsenb/test/mac/sched_benchmark.cc # srsenb/test/mac/sched_ca_test.cc # srsenb/test/mac/sched_common_test_suite.cc # srsenb/test/mac/sched_common_test_suite.h # srsenb/test/mac/sched_dci_test.cc # srsenb/test/mac/sched_grid_test.cc # srsenb/test/mac/sched_lc_ch_test.cc # srsenb/test/mac/sched_sim_ue.cc # srsenb/test/mac/sched_sim_ue.h # srsenb/test/mac/sched_test_common.cc # srsenb/test/mac/sched_test_common.h # srsenb/test/mac/sched_test_rand.cc # srsenb/test/mac/sched_test_utils.h # srsenb/test/mac/sched_tpc_test.cc # srsenb/test/mac/sched_ue_ded_test_suite.cc # srsenb/test/mac/sched_ue_ded_test_suite.h # srsenb/test/phy/enb_phy_test.cc # srsenb/test/rrc/rrc_nr_test.cc # srsenb/test/upper/erab_setup_test.cc # srsenb/test/upper/gtpu_test.cc # srsenb/test/upper/plmn_test.cc # srsenb/test/upper/rrc_meascfg_test.cc # srsenb/test/upper/rrc_mobility_test.cc # srsenb/test/upper/test_helpers.cc # srsenb/test/upper/test_helpers.h # srsepc/hdr/hss/hss.h # srsepc/hdr/mbms-gw/mbms-gw.h # srsepc/hdr/mme/mme.h # srsepc/hdr/mme/mme_gtpc.h # srsepc/hdr/mme/nas.h # srsepc/hdr/mme/s1ap.h # srsepc/hdr/mme/s1ap_common.h # srsepc/hdr/mme/s1ap_ctx_mngmt_proc.h # srsepc/hdr/mme/s1ap_erab_mngmt_proc.h # srsepc/hdr/mme/s1ap_mngmt_proc.h # srsepc/hdr/mme/s1ap_nas_transport.h # srsepc/hdr/mme/s1ap_paging.h # srsepc/hdr/spgw/gtpc.h # srsepc/hdr/spgw/gtpu.h # srsepc/hdr/spgw/spgw.h # srsepc/src/hss/hss.cc # srsepc/src/main.cc # srsepc/src/mbms-gw/main.cc # srsepc/src/mbms-gw/mbms-gw.cc # srsepc/src/mme/mme.cc # srsepc/src/mme/mme_gtpc.cc # srsepc/src/mme/nas.cc # srsepc/src/mme/s1ap.cc # srsepc/src/mme/s1ap_ctx_mngmt_proc.cc # srsepc/src/mme/s1ap_erab_mngmt_proc.cc # srsepc/src/mme/s1ap_mngmt_proc.cc # srsepc/src/mme/s1ap_nas_transport.cc # srsepc/src/mme/s1ap_paging.cc # srsepc/src/spgw/gtpc.cc # srsepc/src/spgw/gtpu.cc # srsepc/src/spgw/spgw.cc # srsue/hdr/metrics_csv.h # srsue/hdr/metrics_stdout.h # srsue/hdr/phy/lte/cc_worker.h # srsue/hdr/phy/lte/sf_worker.h # srsue/hdr/phy/lte/worker_pool.h # srsue/hdr/phy/nr/cc_worker.h # srsue/hdr/phy/nr/sf_worker.h # srsue/hdr/phy/nr/state.h # srsue/hdr/phy/nr/worker_pool.h # srsue/hdr/phy/phy.h # srsue/hdr/phy/phy_common.h # srsue/hdr/phy/phy_metrics.h # srsue/hdr/phy/prach.h # srsue/hdr/phy/scell/intra_measure.h # srsue/hdr/phy/scell/scell_recv.h # srsue/hdr/phy/scell/scell_state.h # srsue/hdr/phy/scell/scell_sync.h # srsue/hdr/phy/search.h # srsue/hdr/phy/sfn_sync.h # srsue/hdr/phy/sync.h # srsue/hdr/phy/sync_state.h # srsue/hdr/phy/ta_control.h # srsue/hdr/phy/ue_lte_phy_base.h # srsue/hdr/phy/ue_nr_phy_base.h # srsue/hdr/phy/ue_phy_base.h # srsue/hdr/phy/vnf_phy_nr.h # srsue/hdr/stack/mac/demux.h # srsue/hdr/stack/mac/dl_harq.h # srsue/hdr/stack/mac/dl_sps.h # srsue/hdr/stack/mac/mac.h # srsue/hdr/stack/mac/mac_metrics.h # srsue/hdr/stack/mac/mux.h # srsue/hdr/stack/mac/proc.h # srsue/hdr/stack/mac/proc_bsr.h # srsue/hdr/stack/mac/proc_phr.h # srsue/hdr/stack/mac/proc_ra.h # srsue/hdr/stack/mac/proc_sr.h # srsue/hdr/stack/mac/ul_harq.h # srsue/hdr/stack/mac/ul_sps.h # srsue/hdr/stack/mac_nr/mac_nr.h # srsue/hdr/stack/mac_nr/mux_nr.h # srsue/hdr/stack/rrc/phy_controller.h # srsue/hdr/stack/rrc/rrc.h # srsue/hdr/stack/rrc/rrc_cell.h # srsue/hdr/stack/rrc/rrc_common.h # srsue/hdr/stack/rrc/rrc_meas.h # srsue/hdr/stack/rrc/rrc_metrics.h # srsue/hdr/stack/rrc/rrc_nr.h # srsue/hdr/stack/rrc/rrc_procedures.h # srsue/hdr/stack/ue_stack_base.h # srsue/hdr/stack/ue_stack_lte.h # srsue/hdr/stack/ue_stack_nr.h # srsue/hdr/stack/upper/gw.h # srsue/hdr/stack/upper/gw_metrics.h # srsue/hdr/stack/upper/nas.h # srsue/hdr/stack/upper/nas_config.h # srsue/hdr/stack/upper/nas_emm_state.h # srsue/hdr/stack/upper/nas_idle_procedures.h # srsue/hdr/stack/upper/nas_metrics.h # srsue/hdr/stack/upper/pcsc_usim.h # srsue/hdr/stack/upper/tft_packet_filter.h # srsue/hdr/stack/upper/usim.h # srsue/hdr/stack/upper/usim_base.h # srsue/hdr/ue.h # srsue/hdr/ue_metrics_interface.h # srsue/src/main.cc # srsue/src/metrics_csv.cc # srsue/src/metrics_stdout.cc # srsue/src/phy/lte/cc_worker.cc # srsue/src/phy/lte/sf_worker.cc # srsue/src/phy/lte/worker_pool.cc # srsue/src/phy/nr/cc_worker.cc # srsue/src/phy/nr/sf_worker.cc # srsue/src/phy/nr/worker_pool.cc # srsue/src/phy/phy.cc # srsue/src/phy/phy_common.cc # srsue/src/phy/prach.cc # srsue/src/phy/scell/intra_measure.cc # srsue/src/phy/scell/scell_recv.cc # srsue/src/phy/search.cc # srsue/src/phy/sfn_sync.cc # srsue/src/phy/sync.cc # srsue/src/phy/vnf_phy_nr.cc # srsue/src/set_net_admin_caps.cc # srsue/src/stack/mac/demux.cc # srsue/src/stack/mac/dl_harq.cc # srsue/src/stack/mac/mac.cc # srsue/src/stack/mac/mux.cc # srsue/src/stack/mac/proc_bsr.cc # srsue/src/stack/mac/proc_phr.cc # srsue/src/stack/mac/proc_ra.cc # srsue/src/stack/mac/proc_sr.cc # srsue/src/stack/mac/ul_harq.cc # srsue/src/stack/mac_nr/mac_nr.cc # srsue/src/stack/mac_nr/mux_nr.cc # srsue/src/stack/rrc/phy_controller.cc # srsue/src/stack/rrc/rrc.cc # srsue/src/stack/rrc/rrc_cell.cc # srsue/src/stack/rrc/rrc_meas.cc # srsue/src/stack/rrc/rrc_nr.cc # srsue/src/stack/rrc/rrc_procedures.cc # srsue/src/stack/ue_stack_lte.cc # srsue/src/stack/ue_stack_nr.cc # srsue/src/stack/upper/gw.cc # srsue/src/stack/upper/nas.cc # srsue/src/stack/upper/nas_emm_state.cc # srsue/src/stack/upper/nas_idle_procedures.cc # srsue/src/stack/upper/pcsc_usim.cc # srsue/src/stack/upper/tft_packet_filter.cc # srsue/src/stack/upper/usim.cc # srsue/src/stack/upper/usim_base.cc # srsue/src/ue.cc # srsue/test/mac_nr/proc_ra_nr_test.cc # srsue/test/mac_test.cc # srsue/test/metrics_test.cc # srsue/test/phy/scell_search_test.cc # srsue/test/phy/ue_phy_test.cc # srsue/test/ttcn3/hdr/dut_utils.h # srsue/test/ttcn3/hdr/lte_ttcn3_phy.h # srsue/test/ttcn3/hdr/swappable_sink.h # srsue/test/ttcn3/hdr/ttcn3_common.h # srsue/test/ttcn3/hdr/ttcn3_drb_interface.h # srsue/test/ttcn3/hdr/ttcn3_helpers.h # srsue/test/ttcn3/hdr/ttcn3_interfaces.h # srsue/test/ttcn3/hdr/ttcn3_ip_ctrl_interface.h # srsue/test/ttcn3/hdr/ttcn3_ip_sock_interface.h # srsue/test/ttcn3/hdr/ttcn3_port_handler.h # srsue/test/ttcn3/hdr/ttcn3_srb_interface.h # srsue/test/ttcn3/hdr/ttcn3_sys_interface.h # srsue/test/ttcn3/hdr/ttcn3_syssim.h # srsue/test/ttcn3/hdr/ttcn3_ue.h # srsue/test/ttcn3/hdr/ttcn3_ut_interface.h # srsue/test/ttcn3/src/lte_ttcn3_phy.cc # srsue/test/ttcn3/src/ttcn3_dut.cc # srsue/test/ttcn3/src/ttcn3_syssim.cc # srsue/test/ttcn3/src/ttcn3_ue.cc # srsue/test/ttcn3/test/rapidjson_test.cc # srsue/test/ttcn3/test/ttcn3_if_handler_test.cc # srsue/test/upper/nas_test.cc # srsue/test/upper/pcsc_usim_test.cc # srsue/test/upper/rrc_cell_test.cc # srsue/test/upper/rrc_meas_test.cc # srsue/test/upper/rrc_phy_ctrl_test.cc # srsue/test/upper/rrc_reconfig_test.cc # srsue/test/upper/tft_test.cc # srsue/test/upper/ue_rrc_nr_test.cc # srsue/test/upper/usim_test.ccmaster
commit
3fdcd5fe03
@ -1,25 +0,0 @@
|
||||
#
|
||||
# Copyright 2013-2021 Software Radio Systems Limited
|
||||
#
|
||||
# This file is part of srsLTE
|
||||
#
|
||||
# srsLTE is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# srsLTE is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# A copy of the GNU Affero General Public License can be found in
|
||||
# the LICENSE file in the top-level directory of this distribution
|
||||
# and at http://www.gnu.org/licenses/.
|
||||
#
|
||||
|
||||
SET(SRSLTE_VERSION_MAJOR 20)
|
||||
SET(SRSLTE_VERSION_MINOR 10)
|
||||
SET(SRSLTE_VERSION_PATCH 1)
|
||||
SET(SRSLTE_VERSION_STRING "${SRSLTE_VERSION_MAJOR}.${SRSLTE_VERSION_MINOR}.${SRSLTE_VERSION_PATCH}")
|
||||
SET(SRSLTE_SOVERSION 0)
|
@ -0,0 +1,13 @@
|
||||
#
|
||||
# Copyright 2013-2021 Software Radio Systems Limited
|
||||
#
|
||||
# By using this file, you agree to the terms and conditions set
|
||||
# forth in the LICENSE file which can be found at the top level of
|
||||
# the distribution.
|
||||
#
|
||||
|
||||
SET(SRSRAN_VERSION_MAJOR 20)
|
||||
SET(SRSRAN_VERSION_MINOR 10)
|
||||
SET(SRSRAN_VERSION_PATCH 1)
|
||||
SET(SRSRAN_VERSION_STRING "${SRSRAN_VERSION_MAJOR}.${SRSRAN_VERSION_MINOR}.${SRSRAN_VERSION_PATCH}")
|
||||
SET(SRSRAN_SOVERSION 0)
|
@ -1,3 +1,3 @@
|
||||
usr/lib/*/libsrslte_rf.so*
|
||||
usr/share/srslte
|
||||
usr/bin/srslte_install_configs.sh
|
||||
usr/lib/*/libsrsran_rf.so*
|
||||
usr/share/srsran
|
||||
usr/bin/srsran_install_configs.sh
|
||||
|
@ -1,6 +1,6 @@
|
||||
Template: srslte/install_configs_question
|
||||
Template: srsran/install_configs_question
|
||||
Type: boolean
|
||||
Default: true
|
||||
Description: Install configs?
|
||||
This installs the default srsLTE configuration files to the user's
|
||||
home directory (~/.config/srslte) but keeps any existing config files.
|
||||
This installs the default srsRAN configuration files to the user's
|
||||
home directory (~/.config/srsran) but keeps any existing config files.
|
||||
|
@ -1,2 +1,2 @@
|
||||
usr/lib/*/*.a
|
||||
usr/include/srslte
|
||||
usr/include/srsran
|
||||
|
@ -1,61 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SRSLTE_ADT_UTILS_H
|
||||
#define SRSLTE_ADT_UTILS_H
|
||||
|
||||
#ifdef __EXCEPTIONS
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
#define EXCEPTIONS_ENABLED 1
|
||||
|
||||
namespace srslte {
|
||||
|
||||
class bad_type_access : public std::runtime_error
|
||||
{
|
||||
public:
|
||||
explicit bad_type_access(const std::string& what_arg) : runtime_error(what_arg) {}
|
||||
explicit bad_type_access(const char* what_arg) : runtime_error(what_arg) {}
|
||||
};
|
||||
|
||||
#define THROW_BAD_ACCESS(msg) throw bad_type_access(msg)
|
||||
|
||||
} // namespace srslte
|
||||
|
||||
#else
|
||||
|
||||
#define EXCEPTIONS_ENABLED 0
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
namespace srslte {
|
||||
|
||||
#define THROW_BAD_ACCESS(msg) \
|
||||
std::fprintf(stderr, "ERROR: exception thrown with %s", msg); \
|
||||
std::abort()
|
||||
|
||||
} // namespace srslte
|
||||
|
||||
#endif
|
||||
|
||||
#endif // SRSLTE_ADT_UTILS_H
|
@ -1,43 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef CPP_TESTS_INDEX_SEQUENCE_H
|
||||
#define CPP_TESTS_INDEX_SEQUENCE_H
|
||||
|
||||
namespace srslte {
|
||||
|
||||
template <std::size_t...>
|
||||
struct index_sequence {};
|
||||
|
||||
template <std::size_t N, std::size_t... Next>
|
||||
struct index_sequence_helper : public index_sequence_helper<N - 1U, N - 1U, Next...> {};
|
||||
|
||||
template <std::size_t... Next>
|
||||
struct index_sequence_helper<0U, Next...> {
|
||||
using type = index_sequence<Next...>;
|
||||
};
|
||||
|
||||
template <std::size_t N>
|
||||
using make_index_sequence = typename index_sequence_helper<N>::type;
|
||||
|
||||
} // namespace srslte
|
||||
|
||||
#endif // CPP_TESTS_INDEX_SEQUENCE_H
|
@ -1,77 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SRSLTE_RRC_NR_UTILS_H
|
||||
#define SRSLTE_RRC_NR_UTILS_H
|
||||
|
||||
#include "srslte/interfaces/mac_interface_types.h"
|
||||
#include "srslte/interfaces/pdcp_interface_types.h"
|
||||
#include "srslte/interfaces/rlc_interface_types.h"
|
||||
#include "srslte/interfaces/rrc_interface_types.h"
|
||||
#include "srslte/interfaces/sched_interface.h"
|
||||
|
||||
/************************
|
||||
* Forward declarations
|
||||
***********************/
|
||||
namespace asn1 {
|
||||
namespace rrc_nr {
|
||||
|
||||
struct plmn_id_s;
|
||||
struct sib1_s;
|
||||
struct rlc_cfg_c;
|
||||
struct pdcp_cfg_s;
|
||||
struct lc_ch_cfg_s;
|
||||
struct rach_cfg_common_s;
|
||||
|
||||
} // namespace rrc_nr
|
||||
} // namespace asn1
|
||||
|
||||
/************************
|
||||
* Conversion Helpers
|
||||
***********************/
|
||||
namespace srslte {
|
||||
|
||||
plmn_id_t make_plmn_id_t(const asn1::rrc_nr::plmn_id_s& asn1_type);
|
||||
void to_asn1(asn1::rrc_nr::plmn_id_s* asn1_type, const plmn_id_t& cfg);
|
||||
|
||||
/***************************
|
||||
* MAC Config
|
||||
**************************/
|
||||
logical_channel_config_t make_mac_logical_channel_cfg_t(uint8_t lcid, const asn1::rrc_nr::lc_ch_cfg_s& asn1_type);
|
||||
rach_nr_cfg_t make_mac_rach_cfg(const asn1::rrc_nr::rach_cfg_common_s& asn1_type);
|
||||
/***************************
|
||||
* RLC Config
|
||||
**************************/
|
||||
rlc_config_t make_rlc_config_t(const asn1::rrc_nr::rlc_cfg_c& asn1_type);
|
||||
|
||||
/***************************
|
||||
* PDCP Config
|
||||
**************************/
|
||||
pdcp_config_t make_drb_pdcp_config_t(const uint8_t bearer_id, bool is_ue, const asn1::rrc_nr::pdcp_cfg_s& pdcp_cfg);
|
||||
|
||||
} // namespace srslte
|
||||
|
||||
namespace srsenb {
|
||||
|
||||
int set_sched_cell_cfg_sib1(srsenb::sched_interface::cell_cfg_t* sched_cfg, const asn1::rrc_nr::sib1_s& sib1);
|
||||
}
|
||||
|
||||
#endif // SRSLTE_RRC_NR_UTILS_H
|
@ -1,60 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SRSLTE_BUILD_INFO_H_IN
|
||||
#define SRSLTE_BUILD_INFO_H_IN
|
||||
|
||||
#include "srslte/config.h"
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
|
||||
#ifdef BUILD_TYPE_RELEASE
|
||||
static char build_mode[] = "Release";
|
||||
#else
|
||||
#ifdef BUILD_TYPE_DEBUG
|
||||
static char build_mode[] = "Debug";
|
||||
#else
|
||||
#ifdef BUILD_TYPE_RELWITHDEBINFO
|
||||
static char build_mode[] = "RelWithDebInfo";
|
||||
#else
|
||||
static char build_mode[] = "unknown";
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// the configured build options for srsLTE
|
||||
static char build_info[] = "commit @GIT_COMMIT_HASH@ on branch @GIT_BRANCH@";
|
||||
|
||||
SRSLTE_API char* srslte_get_build_info() {
|
||||
return build_info;
|
||||
};
|
||||
|
||||
SRSLTE_API char* srslte_get_build_mode() {
|
||||
return build_mode;
|
||||
}
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
|
||||
#endif // BUILD_INFO_
|
@ -1,45 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
/******************************************************************************
|
||||
* File: backtrace.h
|
||||
*
|
||||
* Description: print backtrace in runtime.
|
||||
*
|
||||
* Reference:
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef SRSLTE_BACKTRACE_H
|
||||
#define SRSLTE_BACKTRACE_H
|
||||
|
||||
#include "srslte/config.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
SRSLTE_API void srslte_backtrace_print(FILE* f);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif // __cplusplus
|
||||
#endif // SRSLTE_BACKTRACE_H
|
@ -1,67 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SRSLTE_CONFIG_FILE_H
|
||||
#define SRSLTE_CONFIG_FILE_H
|
||||
|
||||
#include "common.h"
|
||||
#include "srslte/phy/common/phy_common.h"
|
||||
#include <fstream>
|
||||
#include <pwd.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
bool config_exists(std::string& filename, std::string default_name)
|
||||
{
|
||||
std::ifstream conf(filename.c_str(), std::ios::in);
|
||||
if (conf.fail()) {
|
||||
// try config folder instead
|
||||
const char* homedir = NULL;
|
||||
char full_path[256];
|
||||
ZERO_OBJECT(full_path);
|
||||
if ((homedir = getenv("HOME")) == NULL) {
|
||||
homedir = getpwuid(getuid())->pw_dir;
|
||||
}
|
||||
if (!homedir) {
|
||||
homedir = ".";
|
||||
}
|
||||
snprintf(full_path, sizeof(full_path), "%s/.config/srslte/%s", homedir, default_name.c_str());
|
||||
filename = std::string(full_path);
|
||||
|
||||
// try to open again
|
||||
conf.open(filename.c_str());
|
||||
if (conf.fail()) {
|
||||
// Last chance, try to find file in /etc/srslte
|
||||
ZERO_OBJECT(full_path);
|
||||
snprintf(full_path, sizeof(full_path), "/etc/srslte/%s", default_name.c_str());
|
||||
filename = std::string(full_path);
|
||||
|
||||
// try to open again
|
||||
conf.open(filename.c_str());
|
||||
if (conf.fail()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // SRSLTE_CONFIG_FILE_H
|
@ -1,42 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file crash_handler.h
|
||||
* @brief Common handler to catch segfaults and write backtrace to file.
|
||||
*/
|
||||
|
||||
#ifndef SRSLTE_CRASH_HANDLER_H
|
||||
#define SRSLTE_CRASH_HANDLER_H
|
||||
|
||||
#include "srslte/config.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
void srslte_debug_handle_crash(int argc, char** argv);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif // __cplusplus
|
||||
#endif // SRSLTE_CRASH_HANDLER_H
|
@ -1,97 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SRSLTE_INTERFACES_COMMON_H
|
||||
#define SRSLTE_INTERFACES_COMMON_H
|
||||
|
||||
#include "srslte/common/byte_buffer.h"
|
||||
#include "srslte/common/security.h"
|
||||
#include "srslte/phy/common/phy_common.h"
|
||||
#include <string>
|
||||
|
||||
namespace srslte {
|
||||
|
||||
typedef struct {
|
||||
std::string phy_level = "none";
|
||||
std::string phy_lib_level = "none";
|
||||
int phy_hex_limit = -1;
|
||||
} phy_log_args_t;
|
||||
|
||||
typedef struct {
|
||||
float min;
|
||||
float max;
|
||||
} rf_args_band_t;
|
||||
|
||||
// RF/radio args
|
||||
typedef struct {
|
||||
std::string type;
|
||||
std::string log_level;
|
||||
double srate_hz;
|
||||
float dl_freq;
|
||||
float ul_freq;
|
||||
float freq_offset;
|
||||
float rx_gain;
|
||||
float rx_gain_ch[SRSLTE_MAX_CARRIERS];
|
||||
float tx_gain;
|
||||
float tx_gain_ch[SRSLTE_MAX_CARRIERS];
|
||||
float tx_max_power;
|
||||
float tx_gain_offset;
|
||||
float rx_gain_offset;
|
||||
uint32_t nof_carriers; // Number of RF channels
|
||||
uint32_t nof_antennas; // Number of antennas per RF channel
|
||||
std::string device_name;
|
||||
std::string device_args;
|
||||
std::string time_adv_nsamples;
|
||||
std::string continuous_tx;
|
||||
|
||||
std::array<rf_args_band_t, SRSLTE_MAX_CARRIERS> ch_rx_bands;
|
||||
std::array<rf_args_band_t, SRSLTE_MAX_CARRIERS> ch_tx_bands;
|
||||
|
||||
} rf_args_t;
|
||||
|
||||
struct vnf_args_t {
|
||||
std::string type;
|
||||
std::string bind_addr;
|
||||
uint16_t bind_port;
|
||||
std::string log_level;
|
||||
int log_hex_limit;
|
||||
};
|
||||
|
||||
class srslte_gw_config_t
|
||||
{
|
||||
public:
|
||||
explicit srslte_gw_config_t(uint32_t lcid_ = 0) : lcid(lcid_) {}
|
||||
|
||||
uint32_t lcid;
|
||||
};
|
||||
|
||||
class read_pdu_interface
|
||||
{
|
||||
public:
|
||||
virtual int read_pdu(uint32_t lcid, uint8_t* payload, uint32_t requested_bytes) = 0;
|
||||
};
|
||||
|
||||
class stack_interface_phy_nr
|
||||
{};
|
||||
|
||||
} // namespace srslte
|
||||
|
||||
#endif // SRSLTE_INTERFACES_COMMON_H
|
@ -1,41 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SRSLTE_LOG_HELPER_H
|
||||
#define SRSLTE_LOG_HELPER_H
|
||||
|
||||
/**
|
||||
* @file log_helper.h
|
||||
*
|
||||
* Convenience macro to log formatted messages. It is checked if the log pointer is still valid before accessing it.
|
||||
*/
|
||||
|
||||
namespace srslte {
|
||||
|
||||
#define Error(fmt, ...) logger.error(fmt, ##__VA_ARGS__)
|
||||
#define Warning(fmt, ...) logger.warning(fmt, ##__VA_ARGS__)
|
||||
#define Info(fmt, ...) logger.info(fmt, ##__VA_ARGS__)
|
||||
#define Debug(fmt, ...) logger.debug(fmt, ##__VA_ARGS__)
|
||||
#define Console(fmt, ...) srslte::console(fmt, ##__VA_ARGS__)
|
||||
|
||||
} // namespace srslte
|
||||
|
||||
#endif // SRSLTE_LOG_HELPER_H
|
@ -1,47 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SRSLTE_MAC_PCAP_H
|
||||
#define SRSLTE_MAC_PCAP_H
|
||||
|
||||
#include "srslte/common/common.h"
|
||||
#include "srslte/common/mac_pcap_base.h"
|
||||
#include "srslte/srslte.h"
|
||||
|
||||
namespace srslte {
|
||||
class mac_pcap : public mac_pcap_base
|
||||
{
|
||||
public:
|
||||
mac_pcap();
|
||||
~mac_pcap();
|
||||
uint32_t open(std::string filename, uint32_t ue_id = 0);
|
||||
uint32_t close();
|
||||
|
||||
private:
|
||||
void write_pdu(srslte::mac_pcap_base::pcap_pdu_t& pdu);
|
||||
|
||||
FILE* pcap_file = nullptr;
|
||||
uint32_t dlt = 0; // The DLT used for the PCAP file
|
||||
std::string filename;
|
||||
};
|
||||
} // namespace srslte
|
||||
|
||||
#endif // SRSLTE_MAC_PCAP_H
|
@ -1,53 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SRSLTE_MAC_PCAP_NET_H
|
||||
#define SRSLTE_MAC_PCAP_NET_H
|
||||
|
||||
#include "srslte/common/common.h"
|
||||
#include "srslte/common/mac_pcap_base.h"
|
||||
#include "srslte/common/network_utils.h"
|
||||
#include "srslte/srslte.h"
|
||||
|
||||
namespace srslte {
|
||||
class mac_pcap_net : public mac_pcap_base
|
||||
{
|
||||
public:
|
||||
mac_pcap_net();
|
||||
~mac_pcap_net();
|
||||
uint32_t open(std::string client_ip_addr_,
|
||||
std::string bind_addr_str = "0.0.0.0",
|
||||
uint16_t client_udp_port_ = 5847,
|
||||
uint16_t bind_udp_port_ = 5687,
|
||||
uint32_t ue_id_ = 0);
|
||||
uint32_t close();
|
||||
|
||||
private:
|
||||
void write_pdu(srslte::mac_pcap_base::pcap_pdu_t& pdu);
|
||||
void write_mac_lte_pdu_to_net(srslte::mac_pcap_base::pcap_pdu_t& pdu);
|
||||
void write_mac_nr_pdu_to_net(srslte::mac_pcap_base::pcap_pdu_t& pdu);
|
||||
|
||||
srslte::socket_handler_t socket;
|
||||
struct sockaddr_in client_addr;
|
||||
};
|
||||
} // namespace srslte
|
||||
|
||||
#endif // SRSLTE_MAC_PCAP_NET_H
|
@ -1,54 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SRSLTE_NAS_PCAP_H
|
||||
#define SRSLTE_NAS_PCAP_H
|
||||
|
||||
#include "srslte/common/pcap.h"
|
||||
#include <string>
|
||||
|
||||
namespace srslte {
|
||||
|
||||
class nas_pcap
|
||||
{
|
||||
public:
|
||||
nas_pcap()
|
||||
{
|
||||
enable_write = false;
|
||||
ue_id = 0;
|
||||
pcap_file = NULL;
|
||||
}
|
||||
void enable();
|
||||
uint32_t open(std::string filename_, uint32_t ue_id = 0);
|
||||
void close();
|
||||
void write_nas(uint8_t* pdu, uint32_t pdu_len_bytes);
|
||||
|
||||
private:
|
||||
bool enable_write;
|
||||
std::string filename;
|
||||
FILE* pcap_file;
|
||||
uint32_t ue_id;
|
||||
void pack_and_write(uint8_t* pdu, uint32_t pdu_len_bytes);
|
||||
};
|
||||
|
||||
} // namespace srslte
|
||||
|
||||
#endif // SRSLTE_NAS_PCAP_H
|
@ -1,49 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SRSLTE_S1AP_PCAP_H
|
||||
#define SRSLTE_S1AP_PCAP_H
|
||||
|
||||
#include "srslte/common/pcap.h"
|
||||
|
||||
namespace srslte {
|
||||
|
||||
class s1ap_pcap
|
||||
{
|
||||
public:
|
||||
s1ap_pcap()
|
||||
{
|
||||
enable_write = false;
|
||||
pcap_file = NULL;
|
||||
}
|
||||
void enable();
|
||||
void open(const char* filename);
|
||||
void close();
|
||||
void write_s1ap(uint8_t* pdu, uint32_t pdu_len_bytes);
|
||||
|
||||
private:
|
||||
bool enable_write;
|
||||
FILE* pcap_file;
|
||||
};
|
||||
|
||||
} // namespace srslte
|
||||
|
||||
#endif // SRSLTE_NAS_PCAP_H
|
@ -1,80 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file signal_handler.h
|
||||
* @brief Common signal handling methods for all srsLTE applications.
|
||||
*/
|
||||
|
||||
#ifndef SRSLTE_SIGNAL_HANDLER_H
|
||||
#define SRSLTE_SIGNAL_HANDLER_H
|
||||
|
||||
#include "srslte/srslog/sink.h"
|
||||
#include "srslte/srslog/srslog.h"
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
#define SRSLTE_TERM_TIMEOUT_S (5)
|
||||
|
||||
// static vars required by signal handling
|
||||
static srslog::sink* log_sink = nullptr;
|
||||
static bool running = true;
|
||||
|
||||
static void srslte_signal_handler(int signal)
|
||||
{
|
||||
switch (signal) {
|
||||
case SIGALRM:
|
||||
fprintf(stderr, "Couldn't stop after %ds. Forcing exit.\n", SRSLTE_TERM_TIMEOUT_S);
|
||||
srslog::flush();
|
||||
//:TODO: refactor the sighandler, should not depend on log utilities
|
||||
if (log_sink) {
|
||||
log_sink->flush();
|
||||
}
|
||||
raise(SIGKILL);
|
||||
default:
|
||||
// all other registered signals try to stop the app gracefully
|
||||
if (running) {
|
||||
running = false;
|
||||
fprintf(stdout, "Stopping ..\n");
|
||||
alarm(SRSLTE_TERM_TIMEOUT_S);
|
||||
} else {
|
||||
// already waiting for alarm to go off ..
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void srslte_register_signal_handler()
|
||||
{
|
||||
signal(SIGINT, srslte_signal_handler);
|
||||
signal(SIGTERM, srslte_signal_handler);
|
||||
signal(SIGHUP, srslte_signal_handler);
|
||||
signal(SIGALRM, srslte_signal_handler);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif // __cplusplus
|
||||
#endif // SRSLTE_SIGNAL_HANDLER_H
|
@ -1,35 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SRSLTE_STANDARD_STREAMS_H
|
||||
#define SRSLTE_STANDARD_STREAMS_H
|
||||
|
||||
namespace srslte {
|
||||
|
||||
/// Writes the formatted string to the standard output stream.
|
||||
void console(const char* str, ...);
|
||||
|
||||
/// Writes the formatted string to the standard error stream.
|
||||
void console_stderr(const char* str, ...);
|
||||
|
||||
} // namespace srslte
|
||||
|
||||
#endif // SRSLTE_STANDARD_STREAMS_H
|
@ -1,54 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
/******************************************************************************
|
||||
* File: tti_synch_cv.h
|
||||
* Description: Implements tti_sync interface with condition variables.
|
||||
* Reference:
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef SRSLTE_TTI_SYNC_CV_H
|
||||
#define SRSLTE_TTI_SYNC_CV_H
|
||||
|
||||
#include "srslte/common/tti_sync.h"
|
||||
#include <pthread.h>
|
||||
|
||||
namespace srslte {
|
||||
|
||||
class tti_sync_cv : public tti_sync
|
||||
{
|
||||
public:
|
||||
tti_sync_cv(uint32_t modulus = 10240);
|
||||
~tti_sync_cv();
|
||||
void increase();
|
||||
void increase(uint32_t cnt);
|
||||
uint32_t wait();
|
||||
void resync();
|
||||
void set_producer_cntr(uint32_t producer_cntr);
|
||||
|
||||
private:
|
||||
pthread_cond_t cond;
|
||||
pthread_mutex_t mutex;
|
||||
};
|
||||
|
||||
} // namespace srslte
|
||||
|
||||
#endif // SRSLTE_TTI_SYNC_CV_H
|
@ -1,59 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SRSLTE_ZUC_H
|
||||
#define SRSLTE_ZUC_H
|
||||
|
||||
typedef unsigned char u8;
|
||||
typedef unsigned int u32;
|
||||
|
||||
/* the state registers of LFSR */
|
||||
typedef struct {
|
||||
u32 LFSR_S0;
|
||||
u32 LFSR_S1;
|
||||
u32 LFSR_S2;
|
||||
u32 LFSR_S3;
|
||||
u32 LFSR_S4;
|
||||
u32 LFSR_S5;
|
||||
u32 LFSR_S6;
|
||||
u32 LFSR_S7;
|
||||
u32 LFSR_S8;
|
||||
u32 LFSR_S9;
|
||||
u32 LFSR_S10;
|
||||
u32 LFSR_S11;
|
||||
u32 LFSR_S12;
|
||||
u32 LFSR_S13;
|
||||
u32 LFSR_S14;
|
||||
u32 LFSR_S15;
|
||||
/* the registers of F */
|
||||
u32 F_R1;
|
||||
u32 F_R2;
|
||||
/* the outputs of BitReorganization */
|
||||
u32 BRC_X0;
|
||||
u32 BRC_X1;
|
||||
u32 BRC_X2;
|
||||
u32 BRC_X3;
|
||||
} zuc_state_t;
|
||||
|
||||
void zuc_initialize(zuc_state_t* state, const u8* k, u8* iv);
|
||||
void zuc_generate_keystream(zuc_state_t* state, int key_stream_len, u32* p_keystream);
|
||||
|
||||
#endif // SRSLTE_ZUC_H
|
@ -1,73 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SRSLTE_CONFIG_H
|
||||
#define SRSLTE_CONFIG_H
|
||||
|
||||
// Generic helper definitions for shared library support
|
||||
#if defined _WIN32 || defined __CYGWIN__
|
||||
#define SRSLTE_IMPORT __declspec(dllimport)
|
||||
#define SRSLTE_EXPORT __declspec(dllexport)
|
||||
#define SRSLTE_LOCAL
|
||||
#else
|
||||
#if __GNUC__ >= 4
|
||||
#define SRSLTE_IMPORT __attribute__((visibility("default")))
|
||||
#define SRSLTE_EXPORT __attribute__((visibility("default")))
|
||||
#else
|
||||
#define SRSLTE_IMPORT
|
||||
#define SRSLTE_EXPORT
|
||||
#define SRSLTE_LOCAL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Define SRSLTE_API
|
||||
// SRSLTE_API is used for the public API symbols.
|
||||
#ifdef SRSLTE_DLL_EXPORTS // defined if we are building the SRSLTE DLL (instead of using it)
|
||||
#define SRSLTE_API SRSLTE_EXPORT
|
||||
#else
|
||||
#define SRSLTE_API SRSLTE_IMPORT
|
||||
#endif
|
||||
|
||||
// Useful macros for templates
|
||||
#define CONCAT(a, b) a##b
|
||||
#define CONCAT2(a, b) CONCAT(a, b)
|
||||
|
||||
#define STRING2(x) #x
|
||||
#define STRING(x) STRING2(x)
|
||||
|
||||
// Common error codes
|
||||
#define SRSLTE_SUCCESS 0
|
||||
#define SRSLTE_ERROR -1
|
||||
#define SRSLTE_ERROR_INVALID_INPUTS -2
|
||||
#define SRSLTE_ERROR_TIMEOUT -3
|
||||
#define SRSLTE_ERROR_INVALID_COMMAND -4
|
||||
#define SRSLTE_ERROR_OUT_OF_BOUNDS -5
|
||||
#define SRSLTE_ERROR_CANT_START -6
|
||||
#define SRSLTE_ERROR_ALREADY_STARTED -7
|
||||
|
||||
// cf_t definition
|
||||
typedef _Complex float cf_t;
|
||||
|
||||
#ifdef ENABLE_C16
|
||||
typedef _Complex short int c16_t;
|
||||
#endif /* ENABLE_C16 */
|
||||
|
||||
#endif // SRSLTE_CONFIG_H
|
@ -1,40 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SRSLTE_ENB_COMMAND_INTERFACE_H
|
||||
#define SRSLTE_ENB_COMMAND_INTERFACE_H
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace srsenb {
|
||||
class enb_command_interface
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Sets the relative gain of a cell from it's index (following rr.conf) order.
|
||||
* @param cell_id Provides a cell identifier
|
||||
* @param gain Relative gain
|
||||
*/
|
||||
virtual void cmd_cell_gain(uint32_t cell_id, float gain) = 0;
|
||||
};
|
||||
} // namespace srsenb
|
||||
|
||||
#endif // SRSLTE_ENB_COMMAND_INTERFACE_H
|
@ -1,48 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "srslte/common/common.h"
|
||||
#include "srslte/common/interfaces_common.h"
|
||||
#include "srslte/srslte.h"
|
||||
|
||||
#ifndef SRSLTE_ENB_INTERFACES_H
|
||||
#define SRSLTE_ENB_INTERFACES_H
|
||||
|
||||
namespace srsenb {
|
||||
|
||||
class stack_interface_phy_lte;
|
||||
class stack_interface_s1ap_lte
|
||||
{
|
||||
public:
|
||||
virtual void add_mme_socket(int fd) = 0;
|
||||
virtual void remove_mme_socket(int fd) = 0;
|
||||
};
|
||||
|
||||
class stack_interface_gtpu_lte
|
||||
{
|
||||
public:
|
||||
virtual void add_gtpu_s1u_socket_handler(int fd) = 0;
|
||||
virtual void add_gtpu_m1u_socket_handler(int fd) = 0;
|
||||
};
|
||||
|
||||
} // namespace srsenb
|
||||
|
||||
#endif // SRSLTE_ENB_INTERFACES_H
|
@ -1,74 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SRSLTE_ENB_METRICS_INTERFACE_H
|
||||
#define SRSLTE_ENB_METRICS_INTERFACE_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "srsenb/hdr/phy/phy_metrics.h"
|
||||
#include "srsenb/hdr/stack/mac/mac_metrics.h"
|
||||
#include "srsenb/hdr/stack/rrc/rrc_metrics.h"
|
||||
#include "srsenb/hdr/stack/upper/common_enb.h"
|
||||
#include "srsenb/hdr/stack/upper/s1ap_metrics.h"
|
||||
#include "srslte/system/sys_metrics.h"
|
||||
#include "srslte/common/metrics_hub.h"
|
||||
#include "srslte/radio/radio_metrics.h"
|
||||
#include "srslte/upper/pdcp_metrics.h"
|
||||
#include "srslte/upper/rlc_metrics.h"
|
||||
#include "srsue/hdr/stack/upper/gw_metrics.h"
|
||||
|
||||
namespace srsenb {
|
||||
|
||||
struct rlc_metrics_t {
|
||||
std::vector<srslte::rlc_metrics_t> ues;
|
||||
};
|
||||
|
||||
struct pdcp_metrics_t {
|
||||
std::vector<srslte::pdcp_metrics_t> ues;
|
||||
};
|
||||
|
||||
struct stack_metrics_t {
|
||||
mac_metrics_t mac;
|
||||
rrc_metrics_t rrc;
|
||||
rlc_metrics_t rlc;
|
||||
pdcp_metrics_t pdcp;
|
||||
s1ap_metrics_t s1ap;
|
||||
};
|
||||
|
||||
struct enb_metrics_t {
|
||||
srslte::rf_metrics_t rf;
|
||||
std::vector<phy_metrics_t> phy;
|
||||
stack_metrics_t stack;
|
||||
srslte::sys_metrics_t sys;
|
||||
bool running;
|
||||
};
|
||||
|
||||
// ENB interface
|
||||
class enb_metrics_interface : public srslte::metrics_interface<enb_metrics_t>
|
||||
{
|
||||
public:
|
||||
virtual bool get_metrics(enb_metrics_t* m) = 0;
|
||||
};
|
||||
|
||||
} // namespace srsenb
|
||||
|
||||
#endif // SRSLTE_ENB_METRICS_INTERFACE_H
|
@ -1,50 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SRSLTE_COMMON_NR_H
|
||||
#define SRSLTE_COMMON_NR_H
|
||||
|
||||
namespace srslte {
|
||||
|
||||
// NR Radio Bearer Id
|
||||
|
||||
enum rb_id_nr_t { NR_SRB0, NR_SRB1, NR_SRB2, NR_SRB3, NR_DRB1, RB_ID_NR_N_ITEMS };
|
||||
inline const char* to_string(rb_id_nr_t rb_id)
|
||||
{
|
||||
const static char* names[] = {"SRB0", "SRB1", "SRB2", "SRB3", "DRB1"};
|
||||
return (rb_id < rb_id_nr_t::RB_ID_NR_N_ITEMS) ? names[rb_id] : "invalid bearer id";
|
||||
}
|
||||
inline bool is_srb(rb_id_nr_t lcid)
|
||||
{
|
||||
return lcid <= rb_id_nr_t::NR_SRB3;
|
||||
}
|
||||
inline bool is_drb(rb_id_nr_t lcid)
|
||||
{
|
||||
return not is_srb(lcid) and lcid <= rb_id_nr_t::RB_ID_NR_N_ITEMS;
|
||||
}
|
||||
inline int get_drb_id(rb_id_nr_t rb_id)
|
||||
{
|
||||
return is_drb(rb_id) ? (rb_id - 3) : -1;
|
||||
}
|
||||
|
||||
} // namespace srslte
|
||||
|
||||
#endif // SRSLTE_NR_COMMON_INTERFACE_TYPES_H
|
@ -1,79 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SRSLTE_PHY_INTERFACE_TYPES_H
|
||||
#define SRSLTE_PHY_INTERFACE_TYPES_H
|
||||
|
||||
#include "srslte/srslte.h"
|
||||
|
||||
/// Common types defined by the PHY layer.
|
||||
|
||||
inline bool operator==(const srslte_tdd_config_t& a, const srslte_tdd_config_t& b)
|
||||
{
|
||||
return (a.sf_config == b.sf_config && a.ss_config == b.ss_config && a.configured == b.configured);
|
||||
}
|
||||
|
||||
inline bool operator!=(const srslte_tdd_config_t& a, const srslte_tdd_config_t& b)
|
||||
{
|
||||
return !(a == b);
|
||||
}
|
||||
|
||||
inline bool operator==(const srslte_prach_cfg_t& a, const srslte_prach_cfg_t& b)
|
||||
{
|
||||
return (a.config_idx == b.config_idx && a.root_seq_idx == b.root_seq_idx && a.zero_corr_zone == b.zero_corr_zone &&
|
||||
a.freq_offset == b.freq_offset && a.num_ra_preambles == b.num_ra_preambles && a.hs_flag == b.hs_flag &&
|
||||
a.tdd_config == b.tdd_config && a.enable_successive_cancellation == b.enable_successive_cancellation &&
|
||||
a.enable_freq_domain_offset_calc == b.enable_freq_domain_offset_calc);
|
||||
}
|
||||
|
||||
inline bool operator!=(const srslte_prach_cfg_t& a, const srslte_prach_cfg_t& b)
|
||||
{
|
||||
return !(a == b);
|
||||
}
|
||||
|
||||
namespace srsue {
|
||||
|
||||
struct phy_meas_nr_t {
|
||||
float rsrp;
|
||||
float rsrq;
|
||||
float sinr;
|
||||
float cfo_hz;
|
||||
uint32_t arfcn_nr;
|
||||
uint32_t pci_nr;
|
||||
};
|
||||
|
||||
struct phy_meas_t {
|
||||
float rsrp;
|
||||
float rsrq;
|
||||
float cfo_hz;
|
||||
uint32_t earfcn;
|
||||
uint32_t pci;
|
||||
};
|
||||
|
||||
struct phy_cell_t {
|
||||
uint32_t pci;
|
||||
uint32_t earfcn;
|
||||
float cfo_hz;
|
||||
};
|
||||
|
||||
} // namespace srsue
|
||||
|
||||
#endif // SRSLTE_PHY_INTERFACE_TYPES_H
|
@ -1,53 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
/******************************************************************************
|
||||
* File: interfaces.h
|
||||
* Description: Abstract base class interfaces provided by layers
|
||||
* to other layers.
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef SRSLTE_UE_INTERFACES_H
|
||||
#define SRSLTE_UE_INTERFACES_H
|
||||
|
||||
#include "ue_mac_interfaces.h"
|
||||
#include "ue_rrc_interfaces.h"
|
||||
|
||||
namespace srsue {
|
||||
|
||||
// STACK interface for RRC
|
||||
class stack_interface_rrc
|
||||
{
|
||||
public:
|
||||
virtual srslte::tti_point get_current_tti() = 0;
|
||||
};
|
||||
|
||||
// Combined interface for PHY to access stack (MAC and RRC)
|
||||
class stack_interface_phy_lte : public mac_interface_phy_lte, public rrc_interface_phy_lte
|
||||
{
|
||||
public:
|
||||
/* Indicate new TTI */
|
||||
virtual void run_tti(const uint32_t tti, const uint32_t tti_jump) = 0;
|
||||
};
|
||||
|
||||
} // namespace srsue
|
||||
|
||||
#endif // SRSLTE_UE_INTERFACES_H
|
@ -1,108 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
/**********************************************************************************************
|
||||
* File: agc.h
|
||||
*
|
||||
* Description: Automatic gain control
|
||||
* This module is not currently used
|
||||
*
|
||||
* Reference:
|
||||
*********************************************************************************************/
|
||||
|
||||
#ifndef SRSLTE_AGC_H
|
||||
#define SRSLTE_AGC_H
|
||||
|
||||
#include <complex.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "srslte/config.h"
|
||||
|
||||
#define SRSLTE_AGC_CALLBACK(NAME) void(NAME)(void* h, float gain_db)
|
||||
#define SRSLTE_AGC_DEFAULT_TARGET (0.3f) /* Average RMS target or maximum peak target*/
|
||||
#define SRSLTE_AGC_DEFAULT_BW (0.3f) /* Moving average coefficient */
|
||||
#define SRSLTE_AGC_HOLD_COUNT (20) /* Number of frames to wait after setting the gain before start measuring */
|
||||
#define SRSLTE_AGC_MIN_MEASUREMENTS (10) /* Minimum number of measurements */
|
||||
#define SRSLTE_AGC_MIN_GAIN_OFFSET (2.0f) /* Mimum of gain offset to set the radio gain */
|
||||
|
||||
typedef enum SRSLTE_API { SRSLTE_AGC_MODE_ENERGY = 0, SRSLTE_AGC_MODE_PEAK_AMPLITUDE } srslte_agc_mode_t;
|
||||
|
||||
/*
|
||||
* The AGC has been implemented using 3 states:
|
||||
* - init: it simply starts the process of measuring
|
||||
* - measure: performs a minimum of SRSLTE_AGC_MIN_MEASUREMENTS and does not set the gain until it needs
|
||||
* SRSLTE_AGC_MIN_GAIN_OFFSET dB more of gain. The gain is set in the enter hold transition.
|
||||
* - hold: waits for SRSLTE_AGC_HOLD_COUNT frames as a Rx gain transition period. After this period, it enters measure
|
||||
* state.
|
||||
*
|
||||
* FSM abstraction:
|
||||
*
|
||||
* +------+ Enter measure +---------+ Enter hold +------+
|
||||
* | init | ---------------->| Measure |--------------->| Hold |
|
||||
* +------+ +---------+ +------+
|
||||
* ^ Enter measure |
|
||||
* +-------------------------+
|
||||
*/
|
||||
|
||||
typedef enum { SRSLTE_AGC_STATE_INIT = 0, SRSLTE_AGC_STATE_MEASURE, SRSLTE_AGC_STATE_HOLD } srslte_agc_state_t;
|
||||
|
||||
typedef struct SRSLTE_API {
|
||||
float bandwidth;
|
||||
float gain_db;
|
||||
float gain_offset_db;
|
||||
float min_gain_db;
|
||||
float max_gain_db;
|
||||
float default_gain_db;
|
||||
float y_out;
|
||||
bool isfirst;
|
||||
void* uhd_handler;
|
||||
SRSLTE_AGC_CALLBACK(*set_gain_callback);
|
||||
srslte_agc_mode_t mode;
|
||||
float target;
|
||||
uint32_t nof_frames;
|
||||
uint32_t frame_cnt;
|
||||
uint32_t hold_cnt;
|
||||
float* y_tmp;
|
||||
srslte_agc_state_t state;
|
||||
} srslte_agc_t;
|
||||
|
||||
SRSLTE_API int srslte_agc_init_acc(srslte_agc_t* q, srslte_agc_mode_t mode, uint32_t nof_frames);
|
||||
|
||||
SRSLTE_API int srslte_agc_init_uhd(srslte_agc_t* q,
|
||||
srslte_agc_mode_t mode,
|
||||
uint32_t nof_frames,
|
||||
SRSLTE_AGC_CALLBACK(set_gain_callback),
|
||||
void* uhd_handler);
|
||||
|
||||
SRSLTE_API void srslte_agc_free(srslte_agc_t* q);
|
||||
|
||||
SRSLTE_API void srslte_agc_reset(srslte_agc_t* q);
|
||||
|
||||
SRSLTE_API void srslte_agc_set_gain_range(srslte_agc_t* q, float min_gain_db, float max_gain_db);
|
||||
|
||||
SRSLTE_API float srslte_agc_get_gain(srslte_agc_t* q);
|
||||
|
||||
SRSLTE_API void srslte_agc_set_gain(srslte_agc_t* q, float init_gain_value_db);
|
||||
|
||||
SRSLTE_API void srslte_agc_process(srslte_agc_t* q, cf_t* signal, uint32_t len);
|
||||
|
||||
#endif // SRSLTE_AGC_H
|
@ -1,51 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SRSLTE_CHEST_COMMON_H
|
||||
#define SRSLTE_CHEST_COMMON_H
|
||||
|
||||
#include "srslte/config.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#define SRSLTE_CHEST_MAX_SMOOTH_FIL_LEN 64
|
||||
|
||||
typedef enum SRSLTE_API {
|
||||
SRSLTE_CHEST_FILTER_GAUSS = 0,
|
||||
SRSLTE_CHEST_FILTER_TRIANGLE,
|
||||
SRSLTE_CHEST_FILTER_NONE
|
||||
} srslte_chest_filter_t;
|
||||
|
||||
SRSLTE_API void srslte_chest_average_pilots(cf_t* input,
|
||||
cf_t* output,
|
||||
float* filter,
|
||||
uint32_t nof_ref,
|
||||
uint32_t nof_symbols,
|
||||
uint32_t filter_len);
|
||||
|
||||
SRSLTE_API uint32_t srslte_chest_set_smooth_filter3_coeff(float* smooth_filter, float w);
|
||||
|
||||
SRSLTE_API float srslte_chest_estimate_noise_pilots(cf_t* noisy, cf_t* noiseless, cf_t* noise_vec, uint32_t nof_pilots);
|
||||
|
||||
SRSLTE_API uint32_t srslte_chest_set_triangle_filter(float* fil, int filter_len);
|
||||
|
||||
SRSLTE_API uint32_t srslte_chest_set_smooth_filter_gauss(float* filter, uint32_t order, float std_dev);
|
||||
|
||||
#endif // SRSLTE_CHEST_COMMON_H
|
@ -1,173 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
/**********************************************************************************************
|
||||
* File: chest_dl.h
|
||||
*
|
||||
* Description: 3GPP LTE Downlink channel estimator and equalizer.
|
||||
* Estimates the channel in the resource elements transmitting references and
|
||||
* interpolates for the rest of the resource grid.
|
||||
* The equalizer uses the channel estimates to produce an estimation of the
|
||||
* transmitted symbol.
|
||||
* This object depends on the srslte_refsignal_t object for creating the LTE
|
||||
* CSR signal.
|
||||
*
|
||||
* Reference:
|
||||
*********************************************************************************************/
|
||||
|
||||
#ifndef SRSLTE_CHEST_DL_H
|
||||
#define SRSLTE_CHEST_DL_H
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "srslte/config.h"
|
||||
|
||||
#include "srslte/phy/ch_estimation/chest_common.h"
|
||||
#include "srslte/phy/ch_estimation/refsignal_dl.h"
|
||||
#include "srslte/phy/common/phy_common.h"
|
||||
#include "srslte/phy/resampling/interp.h"
|
||||
#include "srslte/phy/sync/pss.h"
|
||||
#include "wiener_dl.h"
|
||||
|
||||
typedef struct SRSLTE_API {
|
||||
cf_t* ce[SRSLTE_MAX_PORTS][SRSLTE_MAX_PORTS];
|
||||
uint32_t nof_re;
|
||||
float noise_estimate;
|
||||
float noise_estimate_dbm;
|
||||
float snr_db;
|
||||
float snr_ant_port_db[SRSLTE_MAX_PORTS][SRSLTE_MAX_PORTS];
|
||||
float rsrp;
|
||||
float rsrp_dbm;
|
||||
float rsrp_neigh;
|
||||
float rsrp_port_dbm[SRSLTE_MAX_PORTS];
|
||||
float rsrp_ant_port_dbm[SRSLTE_MAX_PORTS][SRSLTE_MAX_PORTS];
|
||||
float rsrq;
|
||||
float rsrq_db;
|
||||
float rsrq_ant_port_db[SRSLTE_MAX_PORTS][SRSLTE_MAX_PORTS];
|
||||
float rssi_dbm;
|
||||
float cfo;
|
||||
float sync_error;
|
||||
} srslte_chest_dl_res_t;
|
||||
|
||||
// Noise estimation algorithm
|
||||
typedef enum SRSLTE_API {
|
||||
SRSLTE_NOISE_ALG_REFS = 0,
|
||||
SRSLTE_NOISE_ALG_PSS,
|
||||
SRSLTE_NOISE_ALG_EMPTY,
|
||||
} srslte_chest_dl_noise_alg_t;
|
||||
|
||||
// Channel estimator algorithm
|
||||
typedef enum SRSLTE_API {
|
||||
SRSLTE_ESTIMATOR_ALG_AVERAGE = 0,
|
||||
SRSLTE_ESTIMATOR_ALG_INTERPOLATE,
|
||||
SRSLTE_ESTIMATOR_ALG_WIENER,
|
||||
} srslte_chest_dl_estimator_alg_t;
|
||||
|
||||
typedef struct SRSLTE_API {
|
||||
srslte_cell_t cell;
|
||||
uint32_t nof_rx_antennas;
|
||||
|
||||
srslte_refsignal_t csr_refs;
|
||||
srslte_refsignal_t** mbsfn_refs;
|
||||
|
||||
srslte_wiener_dl_t* wiener_dl;
|
||||
|
||||
cf_t* pilot_estimates;
|
||||
cf_t* pilot_estimates_average;
|
||||
cf_t* pilot_recv_signal;
|
||||
cf_t* tmp_noise;
|
||||
cf_t* tmp_cfo_estimate;
|
||||
|
||||
#ifdef FREQ_SEL_SNR
|
||||
float snr_vector[12000];
|
||||
float pilot_power[12000];
|
||||
#endif
|
||||
|
||||
srslte_interp_linsrslte_vec_t srslte_interp_linvec;
|
||||
srslte_interp_lin_t srslte_interp_lin;
|
||||
srslte_interp_lin_t srslte_interp_lin_3;
|
||||
srslte_interp_lin_t srslte_interp_lin_mbsfn;
|
||||
|
||||
float rssi[SRSLTE_MAX_PORTS][SRSLTE_MAX_PORTS];
|
||||
float rsrp[SRSLTE_MAX_PORTS][SRSLTE_MAX_PORTS];
|
||||
float rsrp_corr[SRSLTE_MAX_PORTS][SRSLTE_MAX_PORTS];
|
||||
float noise_estimate[SRSLTE_MAX_PORTS][SRSLTE_MAX_PORTS];
|
||||
float sync_err[SRSLTE_MAX_PORTS][SRSLTE_MAX_PORTS];
|
||||
float cfo;
|
||||
|
||||
/* Use PSS for noise estimation in LS linear interpolation mode */
|
||||
cf_t pss_signal[SRSLTE_PSS_LEN];
|
||||
cf_t tmp_pss[SRSLTE_PSS_LEN];
|
||||
cf_t tmp_pss_noisy[SRSLTE_PSS_LEN];
|
||||
|
||||
} srslte_chest_dl_t;
|
||||
|
||||
typedef struct SRSLTE_API {
|
||||
|
||||
srslte_chest_dl_estimator_alg_t estimator_alg;
|
||||
srslte_chest_dl_noise_alg_t noise_alg;
|
||||
|
||||
srslte_chest_filter_t filter_type;
|
||||
float filter_coef[2];
|
||||
|
||||
uint16_t mbsfn_area_id;
|
||||
bool rsrp_neighbour;
|
||||
bool cfo_estimate_enable;
|
||||
uint32_t cfo_estimate_sf_mask;
|
||||
bool sync_error_enable;
|
||||
|
||||
} srslte_chest_dl_cfg_t;
|
||||
|
||||
SRSLTE_API int srslte_chest_dl_init(srslte_chest_dl_t* q, uint32_t max_prb, uint32_t nof_rx_antennas);
|
||||
|
||||
SRSLTE_API void srslte_chest_dl_free(srslte_chest_dl_t* q);
|
||||
|
||||
SRSLTE_API int srslte_chest_dl_res_init(srslte_chest_dl_res_t* q, uint32_t max_prb);
|
||||
SRSLTE_API int srslte_chest_dl_res_init_re(srslte_chest_dl_res_t* q, uint32_t nof_re);
|
||||
|
||||
SRSLTE_API void srslte_chest_dl_res_set_identity(srslte_chest_dl_res_t* q);
|
||||
|
||||
SRSLTE_API void srslte_chest_dl_res_set_ones(srslte_chest_dl_res_t* q);
|
||||
|
||||
SRSLTE_API void srslte_chest_dl_res_free(srslte_chest_dl_res_t* q);
|
||||
|
||||
/* These functions change the internal object state */
|
||||
|
||||
SRSLTE_API int srslte_chest_dl_set_mbsfn_area_id(srslte_chest_dl_t* q, uint16_t mbsfn_area_id);
|
||||
|
||||
SRSLTE_API int srslte_chest_dl_set_cell(srslte_chest_dl_t* q, srslte_cell_t cell);
|
||||
|
||||
/* These functions do not change the internal state */
|
||||
|
||||
SRSLTE_API int srslte_chest_dl_estimate(srslte_chest_dl_t* q,
|
||||
srslte_dl_sf_cfg_t* sf,
|
||||
cf_t* input[SRSLTE_MAX_PORTS],
|
||||
srslte_chest_dl_res_t* res);
|
||||
|
||||
SRSLTE_API int srslte_chest_dl_estimate_cfg(srslte_chest_dl_t* q,
|
||||
srslte_dl_sf_cfg_t* sf,
|
||||
srslte_chest_dl_cfg_t* cfg,
|
||||
cf_t* input[SRSLTE_MAX_PORTS],
|
||||
srslte_chest_dl_res_t* res);
|
||||
|
||||
SRSLTE_API srslte_chest_dl_estimator_alg_t srslte_chest_dl_str2estimator_alg(const char* str);
|
||||
|
||||
#endif // SRSLTE_CHEST_DL_H
|
@ -1,97 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SRSLTE_CHEST_DL_NBIOT_H
|
||||
#define SRSLTE_CHEST_DL_NBIOT_H
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "srslte/config.h"
|
||||
|
||||
#include "srslte/phy/ch_estimation/chest_common.h"
|
||||
#include "srslte/phy/ch_estimation/chest_dl.h"
|
||||
#include "srslte/phy/ch_estimation/refsignal_dl_nbiot.h"
|
||||
#include "srslte/phy/common/phy_common.h"
|
||||
#include "srslte/phy/resampling/interp.h"
|
||||
|
||||
/*! \brief Downlink channel estimation for NB-IoT
|
||||
*
|
||||
* Estimates the channel in the resource elements transmitting references and
|
||||
* interpolates for the rest of the resource grid.
|
||||
* The equalizer uses the channel estimates to produce an estimation of the
|
||||
* transmitted symbol.
|
||||
* This object depends on the srslte_refsignal_t object for creating the LTE CSR signal.
|
||||
*/
|
||||
typedef struct {
|
||||
srslte_nbiot_cell_t cell;
|
||||
srslte_refsignal_dl_nbiot_t nrs_signal;
|
||||
|
||||
cf_t* pilot_estimates;
|
||||
cf_t* pilot_estimates_average;
|
||||
cf_t* pilot_recv_signal;
|
||||
cf_t* tmp_noise;
|
||||
|
||||
uint32_t smooth_filter_len;
|
||||
float smooth_filter[SRSLTE_CHEST_MAX_SMOOTH_FIL_LEN];
|
||||
|
||||
srslte_interp_linsrslte_vec_t srslte_interp_linvec;
|
||||
srslte_interp_lin_t srslte_interp_lin;
|
||||
|
||||
float rssi[SRSLTE_MAX_PORTS];
|
||||
float rsrp[SRSLTE_MAX_PORTS];
|
||||
float noise_estimate[SRSLTE_MAX_PORTS];
|
||||
|
||||
srslte_chest_dl_noise_alg_t noise_alg;
|
||||
|
||||
} srslte_chest_dl_nbiot_t;
|
||||
|
||||
SRSLTE_API int srslte_chest_dl_nbiot_init(srslte_chest_dl_nbiot_t* q, uint32_t max_prb);
|
||||
|
||||
SRSLTE_API void srslte_chest_dl_nbiot_free(srslte_chest_dl_nbiot_t* q);
|
||||
|
||||
SRSLTE_API int srslte_chest_dl_nbiot_set_cell(srslte_chest_dl_nbiot_t* q, srslte_nbiot_cell_t cell);
|
||||
|
||||
SRSLTE_API void srslte_chest_dl_nbiot_set_smooth_filter(srslte_chest_dl_nbiot_t* q, float* filter, uint32_t filter_len);
|
||||
|
||||
SRSLTE_API void srslte_chest_dl_nbiot_set_smooth_filter3_coeff(srslte_chest_dl_nbiot_t* q, float w);
|
||||
|
||||
SRSLTE_API void srslte_chest_dl_nbiot_set_noise_alg(srslte_chest_dl_nbiot_t* q,
|
||||
srslte_chest_dl_noise_alg_t noise_estimation_alg);
|
||||
|
||||
SRSLTE_API int srslte_chest_dl_nbiot_estimate(srslte_chest_dl_nbiot_t* q, cf_t* input, cf_t** ce, uint32_t sf_idx);
|
||||
|
||||
SRSLTE_API int srslte_chest_dl_nbiot_estimate_port(srslte_chest_dl_nbiot_t* q,
|
||||
cf_t* input,
|
||||
cf_t* ce,
|
||||
uint32_t sf_idx,
|
||||
uint32_t port_id);
|
||||
|
||||
SRSLTE_API float srslte_chest_dl_nbiot_get_noise_estimate(srslte_chest_dl_nbiot_t* q);
|
||||
|
||||
SRSLTE_API float srslte_chest_dl_nbiot_get_snr(srslte_chest_dl_nbiot_t* q);
|
||||
|
||||
SRSLTE_API float srslte_chest_dl_nbiot_get_rssi(srslte_chest_dl_nbiot_t* q);
|
||||
|
||||
SRSLTE_API float srslte_chest_dl_nbiot_get_rsrq(srslte_chest_dl_nbiot_t* q);
|
||||
|
||||
SRSLTE_API float srslte_chest_dl_nbiot_get_rsrp(srslte_chest_dl_nbiot_t* q);
|
||||
|
||||
#endif // SRSLTE_CHEST_DL_NBIOT_H
|
@ -1,116 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SRSLTE_CHEST_SL_H
|
||||
#define SRSLTE_CHEST_SL_H
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "srslte/phy/common/phy_common_sl.h"
|
||||
#include "srslte/phy/resampling/interp.h"
|
||||
|
||||
#define SRSLTE_SL_N_RU_SEQ (30)
|
||||
#define SRSLTE_SL_MAX_DMRS_SYMB (4)
|
||||
#define SRSLTE_SL_DEFAULT_NOF_DMRS_CYCLIC_SHIFTS (1)
|
||||
#define SRSLTE_SL_MAX_PSCCH_NOF_DMRS_CYCLIC_SHIFTS (4)
|
||||
|
||||
// Base Sequence Number - always 0 for sidelink: 3GPP TS 36.211 version 15.6.0 Release 15 Sec. 5.5.1.4
|
||||
#define SRSLTE_SL_BASE_SEQUENCE_NUMBER 0
|
||||
#define SRSLTE_SL_MAX_DMRS_PERIOD_LENGTH 320
|
||||
|
||||
typedef struct SRSLTE_API {
|
||||
uint32_t prb_start_idx; // PRB start idx to map RE from RIV
|
||||
uint32_t nof_prb; // PSSCH nof_prb, Length of continuous PRB to map RE (in the pool) from RIV
|
||||
uint32_t N_x_id;
|
||||
uint32_t sf_idx; // PSSCH sf_idx
|
||||
uint32_t cyclic_shift;
|
||||
} srslte_chest_sl_cfg_t;
|
||||
|
||||
typedef struct SRSLTE_API {
|
||||
|
||||
srslte_sl_channels_t channel;
|
||||
srslte_cell_sl_t cell;
|
||||
srslte_sl_comm_resource_pool_t sl_comm_resource_pool;
|
||||
srslte_chest_sl_cfg_t chest_sl_cfg;
|
||||
|
||||
uint32_t sf_n_re;
|
||||
|
||||
uint32_t M_sc_rs;
|
||||
int8_t nof_dmrs_symbols;
|
||||
|
||||
// Orthogonal Sequence (W) Transmission Mode 1, 2 and PSBCH
|
||||
int8_t w[SRSLTE_SL_MAX_DMRS_SYMB];
|
||||
|
||||
// Cyclic Shift Values
|
||||
int8_t n_CS[SRSLTE_SL_MAX_DMRS_SYMB];
|
||||
|
||||
// Reference Signal Cyclic Shift
|
||||
float alpha[SRSLTE_SL_MAX_DMRS_SYMB];
|
||||
|
||||
// Group Hopping Flag
|
||||
uint32_t* f_gh_pattern;
|
||||
|
||||
cf_t* r_sequence[SRSLTE_SL_MAX_DMRS_SYMB][SRSLTE_SL_MAX_PSCCH_NOF_DMRS_CYCLIC_SHIFTS];
|
||||
|
||||
cf_t* r_sequence_rx[SRSLTE_SL_MAX_DMRS_SYMB];
|
||||
|
||||
cf_t* ce;
|
||||
cf_t* ce_average;
|
||||
cf_t* noise_tmp;
|
||||
float noise_estimated;
|
||||
|
||||
srslte_interp_linsrslte_vec_t lin_vec_sl;
|
||||
|
||||
bool sync_error_enable;
|
||||
bool rsrp_enable;
|
||||
float sync_err;
|
||||
float rsrp_corr;
|
||||
|
||||
} srslte_chest_sl_t;
|
||||
|
||||
SRSLTE_API int srslte_chest_sl_init(srslte_chest_sl_t* q,
|
||||
srslte_sl_channels_t channel,
|
||||
srslte_cell_sl_t cell,
|
||||
srslte_sl_comm_resource_pool_t sl_comm_resource_pool);
|
||||
|
||||
SRSLTE_API int srslte_chest_sl_set_cell(srslte_chest_sl_t* q, srslte_cell_sl_t cell);
|
||||
|
||||
SRSLTE_API int srslte_chest_sl_set_cfg(srslte_chest_sl_t* q, srslte_chest_sl_cfg_t chest_sl_cfg);
|
||||
|
||||
SRSLTE_API float srslte_chest_sl_get_sync_error(srslte_chest_sl_t* q);
|
||||
|
||||
SRSLTE_API float srslte_chest_sl_estimate_noise(srslte_chest_sl_t* q);
|
||||
|
||||
SRSLTE_API float srslte_chest_sl_get_rsrp(srslte_chest_sl_t* q);
|
||||
|
||||
SRSLTE_API int srslte_chest_sl_put_dmrs(srslte_chest_sl_t* q, cf_t* sf_buffer);
|
||||
|
||||
SRSLTE_API int srslte_chest_sl_get_dmrs(srslte_chest_sl_t* q, cf_t* sf_buffer, cf_t** dmrs_received);
|
||||
|
||||
SRSLTE_API void srslte_chest_sl_ls_estimate(srslte_chest_sl_t* q, cf_t* sf_buffer);
|
||||
|
||||
SRSLTE_API void srslte_chest_sl_ls_equalize(srslte_chest_sl_t* q, cf_t* sf_buffer, cf_t* equalized_sf_buffer);
|
||||
|
||||
SRSLTE_API void srslte_chest_sl_ls_estimate_equalize(srslte_chest_sl_t* q, cf_t* sf_buffer, cf_t* equalized_sf_buffer);
|
||||
|
||||
SRSLTE_API void srslte_chest_sl_free(srslte_chest_sl_t* q);
|
||||
|
||||
#endif
|
@ -1,125 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
/**********************************************************************************************
|
||||
* File: chest_ul.h
|
||||
*
|
||||
* Description: 3GPP LTE Uplink channel estimator and equalizer.
|
||||
* Estimates the channel in the resource elements transmitting references and
|
||||
* interpolates for the rest of the resource grid.
|
||||
* The equalizer uses the channel estimates to produce an estimation of the
|
||||
* transmitted symbol.
|
||||
*
|
||||
* Reference:
|
||||
*********************************************************************************************/
|
||||
|
||||
#ifndef SRSLTE_CHEST_UL_H
|
||||
#define SRSLTE_CHEST_UL_H
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "srslte/config.h"
|
||||
|
||||
#include "srslte/phy/ch_estimation/chest_common.h"
|
||||
#include "srslte/phy/ch_estimation/refsignal_ul.h"
|
||||
#include "srslte/phy/common/phy_common.h"
|
||||
#include "srslte/phy/phch/pucch_cfg.h"
|
||||
#include "srslte/phy/phch/pusch_cfg.h"
|
||||
#include "srslte/phy/resampling/interp.h"
|
||||
|
||||
typedef struct SRSLTE_API {
|
||||
cf_t* ce;
|
||||
uint32_t nof_re;
|
||||
float noise_estimate;
|
||||
float noise_estimate_dbm;
|
||||
float rsrp;
|
||||
float rsrp_dBfs;
|
||||
float epre;
|
||||
float epre_dBfs;
|
||||
float snr;
|
||||
float snr_db;
|
||||
float cfo_hz;
|
||||
float ta_us;
|
||||
} srslte_chest_ul_res_t;
|
||||
|
||||
typedef struct {
|
||||
srslte_cell_t cell;
|
||||
|
||||
srslte_refsignal_ul_t dmrs_signal;
|
||||
srslte_refsignal_ul_dmrs_pregen_t dmrs_pregen;
|
||||
bool dmrs_signal_configured;
|
||||
|
||||
srslte_refsignal_srs_pregen_t srs_pregen;
|
||||
bool srs_signal_configured;
|
||||
|
||||
cf_t* pilot_estimates;
|
||||
cf_t* pilot_estimates_tmp[4];
|
||||
cf_t* pilot_recv_signal;
|
||||
cf_t* pilot_known_signal;
|
||||
cf_t* tmp_noise;
|
||||
|
||||
#ifdef FREQ_SEL_SNR
|
||||
float snr_vector[12000];
|
||||
float pilot_power[12000];
|
||||
#endif
|
||||
uint32_t smooth_filter_len;
|
||||
float smooth_filter[SRSLTE_CHEST_MAX_SMOOTH_FIL_LEN];
|
||||
|
||||
srslte_interp_linsrslte_vec_t srslte_interp_linvec;
|
||||
|
||||
} srslte_chest_ul_t;
|
||||
|
||||
SRSLTE_API int srslte_chest_ul_init(srslte_chest_ul_t* q, uint32_t max_prb);
|
||||
|
||||
SRSLTE_API void srslte_chest_ul_free(srslte_chest_ul_t* q);
|
||||
|
||||
SRSLTE_API int srslte_chest_ul_res_init(srslte_chest_ul_res_t* q, uint32_t max_prb);
|
||||
|
||||
SRSLTE_API void srslte_chest_ul_res_set_identity(srslte_chest_ul_res_t* q);
|
||||
|
||||
SRSLTE_API void srslte_chest_ul_res_free(srslte_chest_ul_res_t* q);
|
||||
|
||||
SRSLTE_API int srslte_chest_ul_set_cell(srslte_chest_ul_t* q, srslte_cell_t cell);
|
||||
|
||||
SRSLTE_API void srslte_chest_ul_pregen(srslte_chest_ul_t* q,
|
||||
srslte_refsignal_dmrs_pusch_cfg_t* cfg,
|
||||
srslte_refsignal_srs_cfg_t* srs_cfg);
|
||||
|
||||
SRSLTE_API int srslte_chest_ul_estimate_pusch(srslte_chest_ul_t* q,
|
||||
srslte_ul_sf_cfg_t* sf,
|
||||
srslte_pusch_cfg_t* cfg,
|
||||
cf_t* input,
|
||||
srslte_chest_ul_res_t* res);
|
||||
|
||||
SRSLTE_API int srslte_chest_ul_estimate_pucch(srslte_chest_ul_t* q,
|
||||
srslte_ul_sf_cfg_t* sf,
|
||||
srslte_pucch_cfg_t* cfg,
|
||||
cf_t* input,
|
||||
srslte_chest_ul_res_t* res);
|
||||
|
||||
SRSLTE_API int srslte_chest_ul_estimate_srs(srslte_chest_ul_t* q,
|
||||
srslte_ul_sf_cfg_t* sf,
|
||||
srslte_refsignal_srs_cfg_t* cfg,
|
||||
srslte_refsignal_dmrs_pusch_cfg_t* pusch_cfg,
|
||||
cf_t* input,
|
||||
srslte_chest_ul_res_t* res);
|
||||
|
||||
#endif // SRSLTE_CHEST_UL_H
|
@ -1,133 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SRSLTE_CSI_RS_H_
|
||||
#define SRSLTE_CSI_RS_H_
|
||||
|
||||
#include "srslte/config.h"
|
||||
#include "srslte/phy/common/phy_common_nr.h"
|
||||
#include <complex.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define SRSLTE_CSI_RS_NOF_FREQ_DOMAIN_ALLOC_ROW1 4
|
||||
#define SRSLTE_CSI_RS_NOF_FREQ_DOMAIN_ALLOC_ROW2 12
|
||||
#define SRSLTE_CSI_RS_NOF_FREQ_DOMAIN_ALLOC_ROW4 3
|
||||
#define SRSLTE_CSI_RS_NOF_FREQ_DOMAIN_ALLOC_OTHER 6
|
||||
#define SRSLTE_CSI_RS_NOF_FREQ_DOMAIN_ALLOC_MAX 12
|
||||
|
||||
typedef enum SRSLTE_API {
|
||||
srslte_csi_rs_resource_mapping_row_1 = 0,
|
||||
srslte_csi_rs_resource_mapping_row_2,
|
||||
srslte_csi_rs_resource_mapping_row_4,
|
||||
srslte_csi_rs_resource_mapping_row_other,
|
||||
} srslte_csi_rs_resource_mapping_row_t;
|
||||
|
||||
typedef enum SRSLTE_API {
|
||||
srslte_csi_rs_resource_mapping_density_three = 0,
|
||||
srslte_csi_rs_resource_mapping_density_dot5_even,
|
||||
srslte_csi_rs_resource_mapping_density_dot5_odd,
|
||||
srslte_csi_rs_resource_mapping_density_one,
|
||||
srslte_csi_rs_resource_mapping_density_spare
|
||||
} srslte_csi_rs_density_t;
|
||||
|
||||
typedef enum SRSLTE_API {
|
||||
srslte_csi_rs_cdm_nocdm = 0,
|
||||
srslte_csi_rs_cdm_fd_cdm2,
|
||||
srslte_csi_rs_cdm_cdm4_fd2_td2,
|
||||
srslte_csi_rs_cdm_cdm8_fd2_td4
|
||||
} srslte_csi_rs_cdm_t;
|
||||
|
||||
/**
|
||||
* @brief Contains CSI-FrequencyOccupation flattened configuration
|
||||
*/
|
||||
typedef struct SRSLTE_API {
|
||||
uint32_t start_rb; ///< PRB where this CSI resource starts in relation to common resource block #0 (CRB#0) on the
|
||||
///< common resource block grid. Only multiples of 4 are allowed (0, 4, ..., 274)
|
||||
|
||||
uint32_t nof_rb; ///< Number of PRBs across which this CSI resource spans. Only multiples of 4 are allowed. The
|
||||
///< smallest configurable number is the minimum of 24 and the width of the associated BWP. If the
|
||||
///< configured value is larger than the width of the corresponding BWP, the UE shall assume that the
|
||||
///< actual CSI-RS bandwidth is equal to the width of the BWP.
|
||||
} srslte_csi_rs_freq_occupation_t;
|
||||
|
||||
/**
|
||||
* @brief Contains CSI-ResourcePeriodicityAndOffset flattened configuration
|
||||
*/
|
||||
typedef struct SRSLTE_API {
|
||||
uint32_t period; // 4,5,8,10,16,20,32,40,64,80,160,320,640
|
||||
uint32_t offset; // 0..period-1
|
||||
} srslte_csi_rs_period_and_offset_t;
|
||||
|
||||
/**
|
||||
* @brief Contains CSI-RS-ResourceMapping flattened configuration
|
||||
*/
|
||||
typedef struct SRSLTE_API {
|
||||
srslte_csi_rs_resource_mapping_row_t row;
|
||||
bool frequency_domain_alloc[SRSLTE_CSI_RS_NOF_FREQ_DOMAIN_ALLOC_MAX];
|
||||
uint32_t ports; // 1, 2, 4, 8, 12, 16, 24, 32
|
||||
uint32_t first_symbol_idx; // 0..13
|
||||
uint32_t first_symbol_idx2; // 2..12 (set to 0 for disabled)
|
||||
srslte_csi_rs_cdm_t cdm;
|
||||
srslte_csi_rs_density_t density;
|
||||
srslte_csi_rs_freq_occupation_t freq_band;
|
||||
} srslte_csi_rs_resource_mapping_t;
|
||||
|
||||
/**
|
||||
* @brief Contains NZP-CSI-RS-Resource flattened configuration
|
||||
*/
|
||||
typedef struct SRSLTE_API {
|
||||
srslte_csi_rs_resource_mapping_t resource_mapping;
|
||||
|
||||
float power_control_offset; // -8..15 dB
|
||||
float power_control_offset_ss; // -3, 0, 3, 6 dB
|
||||
|
||||
uint32_t scrambling_id; // 0..1023
|
||||
|
||||
srslte_csi_rs_period_and_offset_t periodicity;
|
||||
|
||||
} srslte_csi_rs_nzp_resource_t;
|
||||
|
||||
SRSLTE_API int srslte_csi_rs_nzp_put(const srslte_carrier_nr_t* carrier,
|
||||
const srslte_slot_cfg_t* slot_cfg,
|
||||
const srslte_csi_rs_nzp_resource_t* resource,
|
||||
cf_t* grid);
|
||||
|
||||
typedef struct SRSLTE_API {
|
||||
float rsrp;
|
||||
float rsrp_dB;
|
||||
float epre;
|
||||
float epre_dB;
|
||||
float n0;
|
||||
float n0_dB;
|
||||
float snr_dB;
|
||||
uint32_t nof_re;
|
||||
} srslte_csi_rs_measure_t;
|
||||
|
||||
SRSLTE_API int srslte_csi_rs_nzp_measure(const srslte_carrier_nr_t* carrier,
|
||||
const srslte_slot_cfg_t* slot_cfg,
|
||||
const srslte_csi_rs_nzp_resource_t* resource,
|
||||
const cf_t* grid,
|
||||
srslte_csi_rs_measure_t* measure);
|
||||
|
||||
SRSLTE_API uint32_t srslte_csi_rs_measure_info(const srslte_csi_rs_measure_t* measure, char* str, uint32_t str_len);
|
||||
|
||||
#endif // SRSLTE_CSI_RS_H_
|
@ -1,170 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SRSLTE_DMRS_SCH_H
|
||||
#define SRSLTE_DMRS_SCH_H
|
||||
|
||||
#include "srslte/phy/ch_estimation/chest_dl.h"
|
||||
#include "srslte/phy/common/phy_common_nr.h"
|
||||
#include "srslte/phy/phch/phch_cfg_nr.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#define SRSLTE_DMRS_SCH_MAX_SYMBOLS 4
|
||||
|
||||
/**
|
||||
* @brief Helper macro for counting the number of subcarriers taken by DMRS in a PRB.
|
||||
*/
|
||||
#define SRSLTE_DMRS_SCH_SC(CDM_GROUPS, DMRS_TYPE) \
|
||||
(SRSLTE_MIN(SRSLTE_NRE, (CDM_GROUPS) * ((DMRS_TYPE) == srslte_dmrs_sch_type_1 ? 6 : 4)))
|
||||
|
||||
/**
|
||||
* @brief PDSCH DMRS estimator object
|
||||
*
|
||||
* @note The DMRS PDSCH object has to be initialised and the carrier parameters needs to be set.
|
||||
*
|
||||
* @see srslte_dmrs_sch_init
|
||||
* @see srslte_dmrs_sch_set_carrier
|
||||
* @see srslte_dmrs_sch_free
|
||||
* @see srslte_dmrs_sch_put_sf
|
||||
* @see srslte_dmrs_sch_estimate
|
||||
*/
|
||||
typedef struct {
|
||||
bool is_rx;
|
||||
|
||||
srslte_carrier_nr_t carrier;
|
||||
|
||||
srslte_interp_lin_t interpolator_type1; /// Type 1 DMRS: 1 pilot every 2 RE
|
||||
srslte_interp_lin_t interpolator_type2; /// Type 2 DMRS: 2 consecutive pilots every 6 RE
|
||||
|
||||
uint32_t max_nof_prb;
|
||||
cf_t* pilot_estimates; /// Pilots least squares estimates
|
||||
cf_t* temp; /// Temporal data vector of size SRSLTE_NRE * carrier.nof_prb
|
||||
|
||||
} srslte_dmrs_sch_t;
|
||||
|
||||
/**
|
||||
* @brief Computes the symbol indexes carrying DMRS and stores them in symbols_idx
|
||||
* @param dmrs_cfg DMRS configuration
|
||||
* @param grant PDSCH information provided by a DCI
|
||||
* @param symbols_idx is the destination pointer where the symbols indexes are stored
|
||||
* @return It returns the number of symbols if inputs are valid, otherwise, it returns SRSLTE_ERROR code.
|
||||
*/
|
||||
SRSLTE_API int srslte_dmrs_sch_get_symbols_idx(const srslte_dmrs_sch_cfg_t* dmrs_cfg,
|
||||
const srslte_sch_grant_nr_t* grant,
|
||||
uint32_t symbols_idx[SRSLTE_DMRS_SCH_MAX_SYMBOLS]);
|
||||
|
||||
/**
|
||||
* @brief Computes the sub-carrier indexes carrying DMRS
|
||||
*
|
||||
* @param cfg PDSCH DMRS configuration provided by upper layers
|
||||
* @param max_count is the number of sub-carriers to generate
|
||||
* @param sc_idx is the destination pointer where the sub-carrier indexes are stored
|
||||
*
|
||||
* @return It returns the number of sub-carriers if inputs are valid, otherwise, it returns SRSLTE_ERROR code.
|
||||
*/
|
||||
SRSLTE_API int srslte_dmrs_sch_get_sc_idx(const srslte_dmrs_sch_cfg_t* cfg, uint32_t max_count, uint32_t* sc_idx);
|
||||
|
||||
/**
|
||||
* @brief Calculates the number of resource elements taken by a PDSCH-DMRS for a given PDSCH transmission
|
||||
* @param dmrs_cfg PDSCH-DMRS configuration
|
||||
* @param grant PDSCH information provided by a DCI
|
||||
* @return it returns the number of resource elements if the configuration is valid, otherwise it returns SRSLTE_ERROR
|
||||
*/
|
||||
SRSLTE_API int srslte_dmrs_sch_get_N_prb(const srslte_dmrs_sch_cfg_t* dmrs_cfg, const srslte_sch_grant_nr_t* grant);
|
||||
|
||||
/**
|
||||
* @brief Stringifies the PDSCH DMRS configuration
|
||||
*
|
||||
* @param cfg PDSCH DMRS configuration
|
||||
* @param msg Pointer to the destination array
|
||||
* @param max_len Maximum number of characters to write
|
||||
*
|
||||
* @return It returns the number of characters written in the vector if no error occurs, otherwise it returns
|
||||
* SRSLTE_ERROR code
|
||||
*/
|
||||
SRSLTE_API int srslte_dmrs_sch_cfg_to_str(const srslte_dmrs_sch_cfg_t* cfg, char* msg, uint32_t max_len);
|
||||
|
||||
/**
|
||||
* @brief Initialises DMRS PDSCH object
|
||||
*
|
||||
* @param q DMRS PDSCH object
|
||||
* @param is_rx indicates whether the object is used as receiver (in this case, it shall initialise as an estimator)
|
||||
* @return it returns SRSLTE_ERROR code if an error occurs, otherwise it returns SRSLTE_SUCCESS
|
||||
*/
|
||||
SRSLTE_API int srslte_dmrs_sch_init(srslte_dmrs_sch_t* q, bool is_rx);
|
||||
|
||||
/**
|
||||
* @brief Frees DMRS PDSCH object
|
||||
*
|
||||
* @param q DMRS PDSCH object
|
||||
*/
|
||||
SRSLTE_API void srslte_dmrs_sch_free(srslte_dmrs_sch_t* q);
|
||||
|
||||
/**
|
||||
* @brief Sets the carrier configuration. if the PDSCH DMRS object is configured as UE, it will resize internal buffers
|
||||
* and objects.
|
||||
*
|
||||
* @param q DMRS PDSCH object
|
||||
* @param carrier Carrier configuration
|
||||
*
|
||||
* @return it returns SRSLTE_ERROR code if an error occurs, otherwise it returns SRSLTE_SUCCESS
|
||||
*/
|
||||
SRSLTE_API int srslte_dmrs_sch_set_carrier(srslte_dmrs_sch_t* q, const srslte_carrier_nr_t* carrier);
|
||||
|
||||
/**
|
||||
* @brief Puts PDSCH DMRS into a given resource grid
|
||||
*
|
||||
* @param q DMRS PDSCH object
|
||||
* @param slot_cfg Slot configuration
|
||||
* @param pdsch_cfg PDSCH configuration provided by upper layers
|
||||
* @param grant PDSCH information provided by a DCI
|
||||
* @param sf_symbols Resource grid
|
||||
*
|
||||
* @return it returns SRSLTE_ERROR code if an error occurs, otherwise it returns SRSLTE_SUCCESS
|
||||
*/
|
||||
SRSLTE_API int srslte_dmrs_sch_put_sf(srslte_dmrs_sch_t* q,
|
||||
const srslte_slot_cfg_t* slot_cfg,
|
||||
const srslte_sch_cfg_nr_t* pdsch_cfg,
|
||||
const srslte_sch_grant_nr_t* grant,
|
||||
cf_t* sf_symbols);
|
||||
|
||||
/**
|
||||
* @brief Estimates the channel for PDSCH from the DMRS
|
||||
*
|
||||
* @attention Current implementation supports only type1 PDSCH DMRS (1 pilot every 2 RE)
|
||||
*
|
||||
* @param q DMRS-PDSCH object
|
||||
* @param slot_cfg Slot configuration
|
||||
* @param pdsch_cfg PDSCH configuration provided by upper layers
|
||||
* @param grant PDSCH information provided by a DCI
|
||||
* @param sf_symbols Received resource grid
|
||||
* @param[out] ce Channel estimates
|
||||
*
|
||||
* @return it returns SRSLTE_ERROR code if an error occurs, otherwise it returns SRSLTE_SUCCESS
|
||||
*/
|
||||
SRSLTE_API int srslte_dmrs_sch_estimate(srslte_dmrs_sch_t* q,
|
||||
const srslte_slot_cfg_t* slot_cfg,
|
||||
const srslte_sch_cfg_nr_t* pdsch_cfg,
|
||||
const srslte_sch_grant_nr_t* grant,
|
||||
const cf_t* sf_symbols,
|
||||
srslte_chest_dl_res_t* chest_res);
|
||||
|
||||
#endif // SRSLTE_DMRS_SCH_H
|
@ -1,101 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
/**********************************************************************************************
|
||||
* File: refsignal_dl.h
|
||||
*
|
||||
* Description: Object to manage downlink reference signals for channel estimation.
|
||||
*
|
||||
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10 Sec. 6.10
|
||||
*********************************************************************************************/
|
||||
|
||||
#ifndef SRSLTE_REFSIGNAL_DL_H
|
||||
#define SRSLTE_REFSIGNAL_DL_H
|
||||
|
||||
#include "srslte/config.h"
|
||||
#include "srslte/phy/common/phy_common.h"
|
||||
|
||||
// Number of references in a subframe: there are 2 symbols for port_id=0,1 x 2 slots x 2 refs per prb
|
||||
#define SRSLTE_REFSIGNAL_NUM_SF_MBSFN(nof_prb, port_id) ((2 + 18) * (nof_prb))
|
||||
|
||||
#define SRSLTE_REFSIGNAL_MAX_NUM_SF(nof_prb) (8 * nof_prb)
|
||||
#define SRSLTE_REFSIGNAL_MAX_NUM_SF_MBSFN(nof_prb) SRSLTE_REFSIGNAL_NUM_SF_MBSFN(nof_prb, 0)
|
||||
|
||||
#define SRSLTE_REFSIGNAL_PILOT_IDX(i, l, cell) (2 * cell.nof_prb * (l) + (i))
|
||||
|
||||
#define SRSLTE_REFSIGNAL_PILOT_IDX_MBSFN(i, l, cell) ((6 * cell.nof_prb * (l) + (i)))
|
||||
|
||||
/** Cell-Specific Reference Signal */
|
||||
typedef struct SRSLTE_API {
|
||||
srslte_cell_t cell;
|
||||
cf_t* pilots[2][SRSLTE_NOF_SF_X_FRAME]; // Saves the reference signal per subframe for ports 0,1 and ports 2,3
|
||||
srslte_sf_t type;
|
||||
uint16_t mbsfn_area_id;
|
||||
} srslte_refsignal_t;
|
||||
|
||||
SRSLTE_API int srslte_refsignal_cs_init(srslte_refsignal_t* q, uint32_t max_prb);
|
||||
|
||||
SRSLTE_API int srslte_refsignal_cs_set_cell(srslte_refsignal_t* q, srslte_cell_t cell);
|
||||
|
||||
SRSLTE_API void srslte_refsignal_free(srslte_refsignal_t* q);
|
||||
|
||||
SRSLTE_API int
|
||||
srslte_refsignal_cs_put_sf(srslte_refsignal_t* q, srslte_dl_sf_cfg_t* sf, uint32_t port_id, cf_t* sf_symbols);
|
||||
|
||||
SRSLTE_API int srslte_refsignal_cs_get_sf(srslte_refsignal_t* q,
|
||||
srslte_dl_sf_cfg_t* sf,
|
||||
uint32_t port_id,
|
||||
cf_t* sf_symbols,
|
||||
cf_t* pilots);
|
||||
|
||||
SRSLTE_API uint32_t srslte_refsignal_cs_fidx(srslte_cell_t cell, uint32_t l, uint32_t port_id, uint32_t m);
|
||||
|
||||
SRSLTE_API uint32_t srslte_refsignal_cs_nsymbol(uint32_t l, srslte_cp_t cp, uint32_t port_id);
|
||||
|
||||
SRSLTE_API uint32_t srslte_refsignal_cs_v(uint32_t port_id, uint32_t ref_symbol_idx);
|
||||
|
||||
SRSLTE_API uint32_t srslte_refsignal_cs_nof_symbols(srslte_refsignal_t* q, srslte_dl_sf_cfg_t* sf, uint32_t port_id);
|
||||
|
||||
SRSLTE_API uint32_t srslte_refsignal_cs_nof_pilots_x_slot(uint32_t nof_ports);
|
||||
|
||||
SRSLTE_API uint32_t srslte_refsignal_cs_nof_re(srslte_refsignal_t* q, srslte_dl_sf_cfg_t* sf, uint32_t port_id);
|
||||
|
||||
SRSLTE_API int srslte_refsignal_mbsfn_init(srslte_refsignal_t* q, uint32_t max_prb);
|
||||
|
||||
SRSLTE_API int srslte_refsignal_mbsfn_set_cell(srslte_refsignal_t* q, srslte_cell_t cell, uint16_t mbsfn_area_id);
|
||||
|
||||
SRSLTE_API int srslte_refsignal_mbsfn_get_sf(srslte_cell_t cell, uint32_t port_id, cf_t* sf_symbols, cf_t* pilots);
|
||||
|
||||
SRSLTE_API uint32_t srslte_refsignal_mbsfn_nsymbol(uint32_t l);
|
||||
|
||||
SRSLTE_API uint32_t srslte_refsignal_mbsfn_fidx(uint32_t l);
|
||||
|
||||
SRSLTE_API uint32_t srslte_refsignal_mbsfn_nof_symbols();
|
||||
|
||||
SRSLTE_API int srslte_refsignal_mbsfn_put_sf(srslte_cell_t cell,
|
||||
uint32_t port_id,
|
||||
cf_t* cs_pilots,
|
||||
cf_t* mbsfn_pilots,
|
||||
cf_t* sf_symbols);
|
||||
|
||||
SRSLTE_API int srslte_refsignal_mbsfn_gen_seq(srslte_refsignal_t* q, srslte_cell_t cell, uint32_t N_mbsfn_id);
|
||||
|
||||
#endif // SRSLTE_REFSIGNAL_DL_H
|
@ -1,64 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SRSLTE_REFSIGNAL_DL_NBIOT_H
|
||||
#define SRSLTE_REFSIGNAL_DL_NBIOT_H
|
||||
|
||||
#include "srslte/config.h"
|
||||
#include "srslte/phy/common/phy_common.h"
|
||||
|
||||
// Number of references in a subframe: there are 2 symbols for port_id=0,1 x 2 slots x 2 refs per prb
|
||||
#define SRSLTE_NBIOT_NUM_NRS_X_SYM_X_PORT 2
|
||||
|
||||
// Max number of symbols with RE in one PRB (4 ports LTE plus 2 port NB-IoT)
|
||||
#define SRSLTE_NBIOT_MAX_NUM_RE_WITH_REFS 40
|
||||
|
||||
#define SRSLTE_NBIOT_REFSIGNAL_NUM_SF(nof_prb, port_id) (((port_id) < 2 ? 8 : 4) * (nof_prb))
|
||||
#define SRSLTE_NBIOT_REFSIGNAL_PILOT_IDX(i, l, nof_prb) (2 * nof_prb * (l) + (i))
|
||||
|
||||
/** Brief: Narrowband Reference Signal (NRS)
|
||||
*
|
||||
* Object to manage downlink reference signals for channel estimation. (3GPP TS 36.211 version 13.3 Sec. 10.2.6)
|
||||
*/
|
||||
typedef struct SRSLTE_API {
|
||||
srslte_nbiot_cell_t cell;
|
||||
cf_t* pilots[2][SRSLTE_NOF_SF_X_FRAME]; // Saves the reference signal per subframe for ports 0 and 1
|
||||
} srslte_refsignal_dl_nbiot_t;
|
||||
|
||||
SRSLTE_API int srslte_refsignal_dl_nbiot_init(srslte_refsignal_dl_nbiot_t* q);
|
||||
|
||||
SRSLTE_API void srslte_refsignal_dl_nbiot_free(srslte_refsignal_dl_nbiot_t* q);
|
||||
|
||||
SRSLTE_API uint32_t srslte_refsignal_dl_nbiot_nof_symbols(uint32_t port_id);
|
||||
|
||||
SRSLTE_API int srslte_refsignal_dl_nbiot_set_cell(srslte_refsignal_dl_nbiot_t* q, srslte_nbiot_cell_t cell);
|
||||
|
||||
SRSLTE_API uint32_t srslte_refsignal_dl_nbiot_fidx(srslte_nbiot_cell_t cell, uint32_t l, uint32_t port_id, uint32_t m);
|
||||
|
||||
SRSLTE_API uint32_t srslte_refsignal_nrs_nsymbol(uint32_t l);
|
||||
|
||||
SRSLTE_API uint32_t srslte_refsignal_nbiot_cs_nof_re(srslte_nbiot_cell_t* cell, uint32_t port_id);
|
||||
|
||||
SRSLTE_API int srslte_refsignal_nrs_put_sf(srslte_nbiot_cell_t cell, uint32_t port_id, cf_t* pilots, cf_t* sf_symbols);
|
||||
|
||||
SRSLTE_API int srslte_refsignal_nrs_get_sf(srslte_nbiot_cell_t cell, uint32_t port_id, cf_t* sf_symbols, cf_t* pilots);
|
||||
|
||||
#endif // SRSLTE_REFSIGNAL_DL_NBIOT_H
|
@ -1,193 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
/**********************************************************************************************
|
||||
* File: refsignal_ul.h
|
||||
*
|
||||
* Description: Object to manage uplink reference signals for channel estimation.
|
||||
*
|
||||
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10 Sec. 5.5
|
||||
*********************************************************************************************/
|
||||
|
||||
#ifndef SRSLTE_REFSIGNAL_UL_H
|
||||
#define SRSLTE_REFSIGNAL_UL_H
|
||||
|
||||
#include "srslte/config.h"
|
||||
#include "srslte/phy/common/phy_common.h"
|
||||
#include "srslte/phy/phch/pucch_cfg.h"
|
||||
#include "srslte/phy/phch/pusch_cfg.h"
|
||||
|
||||
#define SRSLTE_NOF_GROUPS_U 30
|
||||
#define SRSLTE_NOF_SEQUENCES_U 2
|
||||
#define SRSLTE_NOF_DELTA_SS 30
|
||||
#define SRSLTE_NOF_CSHIFT 8
|
||||
|
||||
#define SRSLTE_REFSIGNAL_UL_L(ns_idx, cp) ((ns_idx + 1) * SRSLTE_CP_NSYMB(cp) - 4)
|
||||
|
||||
/* PUSCH DMRS common configuration (received in SIB2) */
|
||||
typedef struct SRSLTE_API {
|
||||
uint32_t cyclic_shift;
|
||||
uint32_t delta_ss;
|
||||
bool group_hopping_en;
|
||||
bool sequence_hopping_en;
|
||||
} srslte_refsignal_dmrs_pusch_cfg_t;
|
||||
|
||||
typedef struct SRSLTE_API {
|
||||
|
||||
// Common Configuration
|
||||
uint32_t subframe_config;
|
||||
uint32_t bw_cfg;
|
||||
bool simul_ack;
|
||||
|
||||
// Dedicated configuration
|
||||
uint32_t B;
|
||||
uint32_t b_hop;
|
||||
uint32_t n_srs;
|
||||
uint32_t I_srs;
|
||||
uint32_t k_tc;
|
||||
uint32_t n_rrc;
|
||||
bool dedicated_enabled;
|
||||
bool common_enabled;
|
||||
bool configured;
|
||||
} srslte_refsignal_srs_cfg_t;
|
||||
|
||||
/** Uplink DeModulation Reference Signal (DMRS) */
|
||||
typedef struct SRSLTE_API {
|
||||
srslte_cell_t cell;
|
||||
|
||||
uint32_t n_cs_cell[SRSLTE_NSLOTS_X_FRAME][SRSLTE_CP_NORM_NSYMB];
|
||||
uint32_t n_prs_pusch[SRSLTE_NOF_DELTA_SS][SRSLTE_NSLOTS_X_FRAME]; // We precompute n_prs needed for cyclic shift alpha
|
||||
// at srslte_refsignal_dl_init()
|
||||
uint32_t f_gh[SRSLTE_NSLOTS_X_FRAME];
|
||||
uint32_t u_pucch[SRSLTE_NSLOTS_X_FRAME];
|
||||
uint32_t v_pusch[SRSLTE_NSLOTS_X_FRAME][SRSLTE_NOF_DELTA_SS];
|
||||
} srslte_refsignal_ul_t;
|
||||
|
||||
typedef struct {
|
||||
uint32_t max_prb;
|
||||
cf_t** r[SRSLTE_NOF_CSHIFT][SRSLTE_NOF_SF_X_FRAME];
|
||||
} srslte_refsignal_ul_dmrs_pregen_t;
|
||||
|
||||
typedef struct {
|
||||
cf_t* r[SRSLTE_NOF_SF_X_FRAME];
|
||||
} srslte_refsignal_srs_pregen_t;
|
||||
|
||||
SRSLTE_API int srslte_refsignal_ul_set_cell(srslte_refsignal_ul_t* q, srslte_cell_t cell);
|
||||
|
||||
SRSLTE_API uint32_t srslte_refsignal_dmrs_N_rs(srslte_pucch_format_t format, srslte_cp_t cp);
|
||||
|
||||
SRSLTE_API uint32_t srslte_refsignal_dmrs_pucch_symbol(uint32_t m, srslte_pucch_format_t format, srslte_cp_t cp);
|
||||
|
||||
SRSLTE_API int srslte_refsignal_dmrs_pusch_pregen_init(srslte_refsignal_ul_dmrs_pregen_t* pregen, uint32_t max_prb);
|
||||
|
||||
SRSLTE_API int srslte_refsignal_dmrs_pusch_pregen(srslte_refsignal_ul_t* q,
|
||||
srslte_refsignal_ul_dmrs_pregen_t* pregen,
|
||||
srslte_refsignal_dmrs_pusch_cfg_t* cfg);
|
||||
|
||||
SRSLTE_API void srslte_refsignal_dmrs_pusch_pregen_free(srslte_refsignal_ul_t* q,
|
||||
srslte_refsignal_ul_dmrs_pregen_t* pregen);
|
||||
|
||||
SRSLTE_API int srslte_refsignal_dmrs_pusch_pregen_put(srslte_refsignal_ul_t* q,
|
||||
srslte_ul_sf_cfg_t* sf_cfg,
|
||||
srslte_refsignal_ul_dmrs_pregen_t* pregen,
|
||||
srslte_pusch_cfg_t* pusch_cfg,
|
||||
cf_t* sf_symbols);
|
||||
|
||||
SRSLTE_API int srslte_refsignal_dmrs_pusch_gen(srslte_refsignal_ul_t* q,
|
||||
srslte_refsignal_dmrs_pusch_cfg_t* cfg,
|
||||
uint32_t nof_prb,
|
||||
uint32_t sf_idx,
|
||||
uint32_t cyclic_shift_for_dmrs,
|
||||
cf_t* r_pusch);
|
||||
|
||||
SRSLTE_API void srslte_refsignal_dmrs_pusch_put(srslte_refsignal_ul_t* q,
|
||||
srslte_pusch_cfg_t* pusch_cfg,
|
||||
cf_t* r_pusch,
|
||||
cf_t* sf_symbols);
|
||||
|
||||
SRSLTE_API void srslte_refsignal_dmrs_pusch_get(srslte_refsignal_ul_t* q,
|
||||
srslte_pusch_cfg_t* pusch_cfg,
|
||||
cf_t* sf_symbols,
|
||||
cf_t* r_pusch);
|
||||
|
||||
SRSLTE_API int srslte_refsignal_dmrs_pucch_gen(srslte_refsignal_ul_t* q,
|
||||
srslte_ul_sf_cfg_t* sf,
|
||||
srslte_pucch_cfg_t* cfg,
|
||||
cf_t* r_pucch);
|
||||
|
||||
SRSLTE_API int
|
||||
srslte_refsignal_dmrs_pucch_put(srslte_refsignal_ul_t* q, srslte_pucch_cfg_t* cfg, cf_t* r_pucch, cf_t* output);
|
||||
|
||||
SRSLTE_API int
|
||||
srslte_refsignal_dmrs_pucch_get(srslte_refsignal_ul_t* q, srslte_pucch_cfg_t* cfg, cf_t* input, cf_t* r_pucch);
|
||||
|
||||
SRSLTE_API int srslte_refsignal_srs_pregen(srslte_refsignal_ul_t* q,
|
||||
srslte_refsignal_srs_pregen_t* pregen,
|
||||
srslte_refsignal_srs_cfg_t* cfg,
|
||||
srslte_refsignal_dmrs_pusch_cfg_t* dmrs);
|
||||
|
||||
SRSLTE_API int srslte_refsignal_srs_pregen_put(srslte_refsignal_ul_t* q,
|
||||
srslte_refsignal_srs_pregen_t* pregen,
|
||||
srslte_refsignal_srs_cfg_t* cfg,
|
||||
uint32_t tti,
|
||||
cf_t* sf_symbols);
|
||||
|
||||
SRSLTE_API void srslte_refsignal_srs_pregen_free(srslte_refsignal_ul_t* q, srslte_refsignal_srs_pregen_t* pregen);
|
||||
|
||||
SRSLTE_API int srslte_refsignal_srs_gen(srslte_refsignal_ul_t* q,
|
||||
srslte_refsignal_srs_cfg_t* cfg,
|
||||
srslte_refsignal_dmrs_pusch_cfg_t* pusch_cfg,
|
||||
uint32_t sf_idx,
|
||||
cf_t* r_srs);
|
||||
|
||||
SRSLTE_API int srslte_refsignal_srs_put(srslte_refsignal_ul_t* q,
|
||||
srslte_refsignal_srs_cfg_t* cfg,
|
||||
uint32_t tti,
|
||||
cf_t* r_srs,
|
||||
cf_t* sf_symbols);
|
||||
|
||||
SRSLTE_API int srslte_refsignal_srs_get(srslte_refsignal_ul_t* q,
|
||||
srslte_refsignal_srs_cfg_t* cfg,
|
||||
uint32_t tti,
|
||||
cf_t* r_srs,
|
||||
cf_t* sf_symbols);
|
||||
|
||||
SRSLTE_API void srslte_refsignal_srs_pusch_shortened(srslte_refsignal_ul_t* q,
|
||||
srslte_ul_sf_cfg_t* sf,
|
||||
srslte_refsignal_srs_cfg_t* srs_cfg,
|
||||
srslte_pusch_cfg_t* pusch_cfg);
|
||||
|
||||
SRSLTE_API void srslte_refsignal_srs_pucch_shortened(srslte_refsignal_ul_t* q,
|
||||
srslte_ul_sf_cfg_t* sf,
|
||||
srslte_refsignal_srs_cfg_t* srs_cfg,
|
||||
srslte_pucch_cfg_t* pucch_cfg);
|
||||
|
||||
SRSLTE_API int srslte_refsignal_srs_send_cs(uint32_t subframe_config, uint32_t sf_idx);
|
||||
|
||||
SRSLTE_API int srslte_refsignal_srs_send_ue(uint32_t I_srs, uint32_t tti);
|
||||
|
||||
SRSLTE_API uint32_t srslte_refsignal_srs_rb_start_cs(uint32_t bw_cfg, uint32_t nof_prb);
|
||||
|
||||
SRSLTE_API uint32_t srslte_refsignal_srs_rb_L_cs(uint32_t bw_cfg, uint32_t nof_prb);
|
||||
|
||||
SRSLTE_API uint32_t srslte_refsignal_srs_M_sc(srslte_refsignal_ul_t* q, srslte_refsignal_srs_cfg_t* cfg);
|
||||
|
||||
#endif // SRSLTE_REFSIGNAL_UL_H
|
@ -1,129 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SRSLTE_WIENER_DL_H_
|
||||
#define SRSLTE_WIENER_DL_H_
|
||||
|
||||
#include <srslte/config.h>
|
||||
#include <srslte/phy/common/phy_common.h>
|
||||
#include <srslte/phy/dft/dft.h>
|
||||
#include <srslte/phy/utils/random.h>
|
||||
|
||||
// Constant static parameters
|
||||
#define SRSLTE_WIENER_DL_HLS_FIFO_SIZE (8U)
|
||||
#define SRSLTE_WIENER_DL_MIN_PRB (4U)
|
||||
#define SRSLTE_WIENER_DL_MIN_RE (SRSLTE_WIENER_DL_MIN_PRB * SRSLTE_NRE)
|
||||
#define SRSLTE_WIENER_DL_MIN_REF (SRSLTE_WIENER_DL_MIN_PRB * 2U)
|
||||
#define SRSLTE_WIENER_DL_TFIFO_SIZE (2U)
|
||||
#define SRSLTE_WIENER_DL_XFIFO_SIZE (400U)
|
||||
#define SRSLTE_WIENER_DL_TIMEFIFO_SIZE (32U)
|
||||
#define SRSLTE_WIENER_DL_CXFIFO_SIZE (400U)
|
||||
|
||||
typedef struct {
|
||||
cf_t* hls_fifo_1[SRSLTE_WIENER_DL_HLS_FIFO_SIZE]; // Least square channel estimates on odd pilots
|
||||
cf_t* hls_fifo_2[SRSLTE_WIENER_DL_HLS_FIFO_SIZE]; // Least square channel estimates on even pilots
|
||||
cf_t* tfifo[SRSLTE_WIENER_DL_TFIFO_SIZE]; // memory for time domain channel linear interpolation
|
||||
cf_t* xfifo[SRSLTE_WIENER_DL_XFIFO_SIZE]; // fifo for averaging the frequency correlation vectors
|
||||
cf_t cV[SRSLTE_WIENER_DL_MIN_RE]; // frequency correlation vector among all subcarriers
|
||||
float deltan; // step within time domain linear interpolation
|
||||
uint32_t nfifosamps; // number of samples inside the fifo for averaging the correlation vectors
|
||||
float invtpilotoff; // step for time domain linear interpolation
|
||||
cf_t* timefifo; // fifo for storing single frequency channel time domain evolution
|
||||
cf_t* cxfifo[SRSLTE_WIENER_DL_CXFIFO_SIZE]; // fifo for averaging time domain channel correlation vector
|
||||
uint32_t sumlen; // length of dynamic average window for time domain channel correlation vector
|
||||
uint32_t skip; // pilot OFDM symbols to skip when training Wiener matrices (skip = 1,..,4)
|
||||
uint32_t cnt; // counter for skipping pilot OFDM symbols
|
||||
} srslte_wiener_dl_state_t;
|
||||
|
||||
typedef struct {
|
||||
// Maximum allocated number of...
|
||||
uint32_t max_prb; // Resource Blocks
|
||||
uint32_t max_ref; // Reference signals
|
||||
uint32_t max_re; // Resource Elements (equivalent to sub-carriers)
|
||||
uint32_t max_tx_ports; // Tx Ports
|
||||
uint32_t max_rx_ant; // Rx Antennas
|
||||
|
||||
// Configured number of...
|
||||
uint32_t nof_prb; // Resource Blocks
|
||||
uint32_t nof_ref; // Reference signals
|
||||
uint32_t nof_re; // Resource Elements (equivalent to sub-carriers)
|
||||
uint32_t nof_tx_ports; // Tx Ports
|
||||
uint32_t nof_rx_ant; // Rx Antennas
|
||||
|
||||
// One state per possible channel (allocated in init)
|
||||
srslte_wiener_dl_state_t* state[SRSLTE_MAX_PORTS][SRSLTE_MAX_PORTS];
|
||||
|
||||
// Wiener matrices
|
||||
cf_t wm1[SRSLTE_WIENER_DL_MIN_RE][SRSLTE_WIENER_DL_MIN_REF];
|
||||
cf_t wm2[SRSLTE_WIENER_DL_MIN_RE][SRSLTE_WIENER_DL_MIN_REF];
|
||||
bool wm_computed;
|
||||
bool ready;
|
||||
|
||||
// Calculation support
|
||||
cf_t hlsv[SRSLTE_WIENER_DL_MIN_RE];
|
||||
cf_t hlsv_sum[SRSLTE_WIENER_DL_MIN_RE];
|
||||
cf_t acV[SRSLTE_WIENER_DL_MIN_RE];
|
||||
|
||||
union {
|
||||
cf_t m[SRSLTE_WIENER_DL_MIN_REF][SRSLTE_WIENER_DL_MIN_REF];
|
||||
cf_t v[SRSLTE_WIENER_DL_MIN_REF * SRSLTE_WIENER_DL_MIN_REF];
|
||||
} RH;
|
||||
union {
|
||||
cf_t m[SRSLTE_WIENER_DL_MIN_REF][SRSLTE_WIENER_DL_MIN_REF];
|
||||
cf_t v[SRSLTE_WIENER_DL_MIN_REF * SRSLTE_WIENER_DL_MIN_REF];
|
||||
} invRH;
|
||||
cf_t hH1[SRSLTE_WIENER_DL_MIN_RE][SRSLTE_WIENER_DL_MIN_REF];
|
||||
cf_t hH2[SRSLTE_WIENER_DL_MIN_RE][SRSLTE_WIENER_DL_MIN_REF];
|
||||
|
||||
// Temporal vector
|
||||
cf_t* tmp;
|
||||
|
||||
// Random generator
|
||||
srslte_random_t random;
|
||||
|
||||
// FFT/iFFT
|
||||
srslte_dft_plan_t fft;
|
||||
srslte_dft_plan_t ifft;
|
||||
cf_t filter[SRSLTE_WIENER_DL_MIN_RE];
|
||||
|
||||
// Matrix inverter
|
||||
void* matrix_inverter;
|
||||
} srslte_wiener_dl_t;
|
||||
|
||||
SRSLTE_API int
|
||||
srslte_wiener_dl_init(srslte_wiener_dl_t* q, uint32_t max_prb, uint32_t max_tx_ports, uint32_t max_rx_ant);
|
||||
|
||||
SRSLTE_API int srslte_wiener_dl_set_cell(srslte_wiener_dl_t* q, srslte_cell_t cell);
|
||||
|
||||
SRSLTE_API void srslte_wiener_dl_reset(srslte_wiener_dl_t* q);
|
||||
|
||||
SRSLTE_API int srslte_wiener_dl_run(srslte_wiener_dl_t* q,
|
||||
uint32_t tx,
|
||||
uint32_t rx,
|
||||
uint32_t m,
|
||||
uint32_t shift,
|
||||
cf_t* pilots,
|
||||
cf_t* estimated,
|
||||
float snr_lin);
|
||||
|
||||
SRSLTE_API void srslte_wiener_dl_free(srslte_wiener_dl_t* q);
|
||||
|
||||
#endif // SRSLTE_WIENER_DL_H_
|
@ -1,69 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SRSLTE_DELAY_H
|
||||
#define SRSLTE_DELAY_H
|
||||
|
||||
#include "srslte/config.h"
|
||||
#include "srslte/phy/common/timestamp.h"
|
||||
#include "srslte/phy/utils/ringbuffer.h"
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct {
|
||||
float delay_min_us;
|
||||
float delay_max_us;
|
||||
float period_s;
|
||||
float init_time_s;
|
||||
uint32_t srate_max_hz;
|
||||
uint32_t srate_hz;
|
||||
float delay_us;
|
||||
uint32_t delay_nsamples;
|
||||
|
||||
srslte_ringbuffer_t rb;
|
||||
cf_t* zero_buffer;
|
||||
} srslte_channel_delay_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
SRSLTE_API int srslte_channel_delay_init(srslte_channel_delay_t* q,
|
||||
float delay_min_us,
|
||||
float delay_max_us,
|
||||
float period_s,
|
||||
float init_time_s,
|
||||
uint32_t srate_max_hz);
|
||||
|
||||
SRSLTE_API void srslte_channel_delay_update_srate(srslte_channel_delay_t* q, uint32_t srate_hz);
|
||||
|
||||
SRSLTE_API void srslte_channel_delay_free(srslte_channel_delay_t* q);
|
||||
|
||||
SRSLTE_API void srslte_channel_delay_execute(srslte_channel_delay_t* q,
|
||||
const cf_t* in,
|
||||
cf_t* out,
|
||||
uint32_t len,
|
||||
const srslte_timestamp_t* ts);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // SRSLTE_DELAY_H
|
@ -1,87 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SRSLTE_FADING_H
|
||||
#define SRSLTE_FADING_H
|
||||
|
||||
#include "srslte/config.h"
|
||||
#include "srslte/phy/common/timestamp.h"
|
||||
#include "srslte/phy/dft/dft.h"
|
||||
#include <inttypes.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#define SRSLTE_CHANNEL_FADING_MAXTAPS 9
|
||||
#define SRSLTE_CHANNEL_FADING_NTERMS 16
|
||||
|
||||
typedef enum {
|
||||
srslte_channel_fading_model_none = 0,
|
||||
srslte_channel_fading_model_epa,
|
||||
srslte_channel_fading_model_eva,
|
||||
srslte_channel_fading_model_etu,
|
||||
} srslte_channel_fading_model_t;
|
||||
|
||||
typedef struct {
|
||||
// Configuration parameters
|
||||
float srate; // Sampling rate: 1.92e6, 3.84e6, ..., 23.04e6, 30.72e6
|
||||
srslte_channel_fading_model_t model; // None, EPA, EVA, ETU
|
||||
float doppler; // Maximum doppler: 5, 70, 300
|
||||
|
||||
// Internal tap parametrisation
|
||||
uint32_t N; // FFT size
|
||||
uint32_t path_delay; // Path delay
|
||||
uint32_t state_len; // Length of the impulse response saved in the state
|
||||
|
||||
float coeff_alpha[SRSLTE_CHANNEL_FADING_MAXTAPS][SRSLTE_CHANNEL_FADING_NTERMS]; // Angle of arrival
|
||||
float coeff_a[SRSLTE_CHANNEL_FADING_MAXTAPS][SRSLTE_CHANNEL_FADING_NTERMS]; // Random phase
|
||||
float coeff_b[SRSLTE_CHANNEL_FADING_MAXTAPS][SRSLTE_CHANNEL_FADING_NTERMS]; // Random phase
|
||||
cf_t* h_tap[SRSLTE_CHANNEL_FADING_MAXTAPS]; // Static tap signal in frequency domain
|
||||
|
||||
// Utils
|
||||
srslte_dft_plan_t fft; // DFT to frequency domain
|
||||
srslte_dft_plan_t ifft; // DFT to time domain
|
||||
cf_t* temp; // Temporal buffer, length fft_size
|
||||
cf_t* h_freq; // Channel frequency response, length fft_size
|
||||
cf_t* y_freq; // Intermediate frequency domain buffer
|
||||
float sin_table[1024]; // Table of sinus values
|
||||
|
||||
// State variables
|
||||
cf_t* state; // To save impulse response of the filter
|
||||
} srslte_channel_fading_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
SRSLTE_API int srslte_channel_fading_init(srslte_channel_fading_t* q, double srate, const char* model, uint32_t seed);
|
||||
|
||||
SRSLTE_API void srslte_channel_fading_free(srslte_channel_fading_t* q);
|
||||
|
||||
SRSLTE_API double srslte_channel_fading_execute(srslte_channel_fading_t* q,
|
||||
const cf_t* in,
|
||||
cf_t* out,
|
||||
uint32_t nof_samples,
|
||||
double init_time);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // SRSLTE_FADING_H
|
@ -1,61 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SRSLTE_HST_H_
|
||||
#define SRSLTE_HST_H_
|
||||
|
||||
#include "srslte/config.h"
|
||||
#include "srslte/phy/common/timestamp.h"
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct {
|
||||
// System parameters
|
||||
uint32_t srate_hz; // Sampling rate
|
||||
|
||||
// Model Parameters
|
||||
float fd_hz; // Maximum Doppler Frequency
|
||||
float ds_m; // eNb distance [m]
|
||||
float dmin_m; // eNb Rail-track distance [m]
|
||||
float period_s; // 2 * Ds / speed [s]
|
||||
float init_time_s; // Time offset [s]
|
||||
|
||||
// State
|
||||
float fs_hz; // Last doppler dispersion [Hz]
|
||||
} srslte_channel_hst_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
SRSLTE_API int srslte_channel_hst_init(srslte_channel_hst_t* q, float fd_hz, float period_d, float init_time_s);
|
||||
|
||||
SRSLTE_API void srslte_channel_hst_update_srate(srslte_channel_hst_t* q, uint32_t srate);
|
||||
|
||||
SRSLTE_API void
|
||||
srslte_channel_hst_execute(srslte_channel_hst_t* q, cf_t* in, cf_t* out, uint32_t len, const srslte_timestamp_t* ts);
|
||||
|
||||
SRSLTE_API void srslte_channel_hst_free(srslte_channel_hst_t* q);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // SRSLTE_HST_H_
|
@ -1,52 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SRSLTE_RLF_H
|
||||
#define SRSLTE_RLF_H
|
||||
|
||||
#include "srslte/config.h"
|
||||
#include "srslte/phy/common/timestamp.h"
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct {
|
||||
uint32_t t_on_ms;
|
||||
uint32_t t_off_ms;
|
||||
} srslte_channel_rlf_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
SRSLTE_API void srslte_channel_rlf_init(srslte_channel_rlf_t* q, uint32_t t_on_ms, uint32_t t_off_ms);
|
||||
|
||||
SRSLTE_API void srslte_channel_rlf_execute(srslte_channel_rlf_t* q,
|
||||
const cf_t* in,
|
||||
cf_t* out,
|
||||
uint32_t nsamples,
|
||||
const srslte_timestamp_t* ts);
|
||||
|
||||
SRSLTE_API void srslte_channel_rlf_free(srslte_channel_rlf_t* q);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // SRSLTE_RLF_H
|
@ -1,533 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
/**********************************************************************************************
|
||||
* File: phy_common.h
|
||||
*
|
||||
* Description: Common parameters and lookup functions for PHY
|
||||
*
|
||||
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10
|
||||
*********************************************************************************************/
|
||||
|
||||
#ifndef SRSLTE_PHY_COMMON_H
|
||||
#define SRSLTE_PHY_COMMON_H
|
||||
|
||||
#include <math.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "srslte/config.h"
|
||||
|
||||
#define SRSLTE_NOF_SF_X_FRAME 10
|
||||
#define SRSLTE_NOF_SLOTS_PER_SF 2
|
||||
#define SRSLTE_NSLOTS_X_FRAME (SRSLTE_NOF_SLOTS_PER_SF * SRSLTE_NOF_SF_X_FRAME)
|
||||
|
||||
#define SRSLTE_NSOFT_BITS 250368 // Soft buffer size for Category 1 UE
|
||||
|
||||
#define SRSLTE_PC_MAX 23 // Maximum TX power for Category 1 UE (in dBm)
|
||||
|
||||
#define SRSLTE_NOF_NID_1 (168)
|
||||
#define SRSLTE_NOF_NID_2 (3)
|
||||
#define SRSLTE_NUM_PCI (SRSLTE_NOF_NID_1 * SRSLTE_NOF_NID_2)
|
||||
|
||||
#define SRSLTE_MAX_CARRIERS 5 // Maximum number of supported simultaneous carriers
|
||||
#define SRSLTE_MAX_PORTS 4
|
||||
#define SRSLTE_MAX_CHANNELS (SRSLTE_MAX_CARRIERS * SRSLTE_MAX_PORTS)
|
||||
#define SRSLTE_MAX_LAYERS 4
|
||||
#define SRSLTE_MAX_CODEWORDS 2
|
||||
#define SRSLTE_MAX_TB SRSLTE_MAX_CODEWORDS
|
||||
#define SRSLTE_MAX_QM 8
|
||||
|
||||
#define SRSLTE_MAX_CODEBLOCKS 32
|
||||
|
||||
#define SRSLTE_MAX_CODEBOOKS 4
|
||||
|
||||
#define SRSLTE_NOF_CFI 3
|
||||
#define SRSLTE_CFI_ISVALID(x) ((x >= 1 && x <= 3))
|
||||
#define SRSLTE_CFI_IDX(x) ((x - 1) % SRSLTE_NOF_CFI)
|
||||
|
||||
#define SRSLTE_LTE_CRC24A 0x1864CFB
|
||||
#define SRSLTE_LTE_CRC24B 0X1800063
|
||||
#define SRSLTE_LTE_CRC24C 0X1B2B117
|
||||
#define SRSLTE_LTE_CRC16 0x11021
|
||||
#define SRSLTE_LTE_CRC11 0xE21
|
||||
#define SRSLTE_LTE_CRC8 0x19B
|
||||
#define SRSLTE_LTE_CRC6 0x61
|
||||
|
||||
#define SRSLTE_MAX_MBSFN_AREA_IDS 256
|
||||
#define SRSLTE_PMCH_RV 0
|
||||
|
||||
typedef enum { SRSLTE_CP_NORM = 0, SRSLTE_CP_EXT } srslte_cp_t;
|
||||
typedef enum { SRSLTE_SF_NORM = 0, SRSLTE_SF_MBSFN } srslte_sf_t;
|
||||
|
||||
#define SRSLTE_INVALID_RNTI 0x0 // TS 36.321 - Table 7.1-1 RNTI 0x0 isn't a valid DL RNTI
|
||||
#define SRSLTE_CRNTI_START 0x000B
|
||||
#define SRSLTE_CRNTI_END 0xFFF3
|
||||
#define SRSLTE_RARNTI_START 0x0001
|
||||
#define SRSLTE_RARNTI_END 0x000A
|
||||
#define SRSLTE_SIRNTI 0xFFFF
|
||||
#define SRSLTE_PRNTI 0xFFFE
|
||||
#define SRSLTE_MRNTI 0xFFFD
|
||||
|
||||
#define SRSLTE_RNTI_ISRAR(rnti) (rnti >= SRSLTE_RARNTI_START && rnti <= SRSLTE_RARNTI_END)
|
||||
#define SRSLTE_RNTI_ISUSER(rnti) (rnti >= SRSLTE_CRNTI_START && rnti <= SRSLTE_CRNTI_END)
|
||||
#define SRSLTE_RNTI_ISSI(rnti) (rnti == SRSLTE_SIRNTI)
|
||||
#define SRSLTE_RNTI_ISPA(rnti) (rnti == SRSLTE_PRNTI)
|
||||
#define SRSLTE_RNTI_ISMBSFN(rnti) (rnti == SRSLTE_MRNTI)
|
||||
#define SRSLTE_RNTI_ISSIRAPA(rnti) (SRSLTE_RNTI_ISSI(rnti) || SRSLTE_RNTI_ISRAR(rnti) || SRSLTE_RNTI_ISPA(rnti))
|
||||
|
||||
#define SRSLTE_CELL_ID_UNKNOWN 1000
|
||||
|
||||
#define SRSLTE_MAX_NSYMB 7
|
||||
|
||||
#define SRSLTE_MAX_PRB 110
|
||||
#define SRSLTE_NRE 12
|
||||
|
||||
#define SRSLTE_SYMBOL_SZ_MAX 2048
|
||||
|
||||
#define SRSLTE_CP_NORM_NSYMB 7
|
||||
#define SRSLTE_CP_NORM_SF_NSYMB (2 * SRSLTE_CP_NORM_NSYMB)
|
||||
#define SRSLTE_CP_NORM_0_LEN 160
|
||||
#define SRSLTE_CP_NORM_LEN 144
|
||||
|
||||
#define SRSLTE_CP_EXT_NSYMB 6
|
||||
#define SRSLTE_CP_EXT_SF_NSYMB (2 * SRSLTE_CP_EXT_NSYMB)
|
||||
#define SRSLTE_CP_EXT_LEN 512
|
||||
#define SRSLTE_CP_EXT_7_5_LEN 1024
|
||||
|
||||
#define SRSLTE_CP_ISNORM(cp) (cp == SRSLTE_CP_NORM)
|
||||
#define SRSLTE_CP_ISEXT(cp) (cp == SRSLTE_CP_EXT)
|
||||
#define SRSLTE_CP_NSYMB(cp) (SRSLTE_CP_ISNORM(cp) ? SRSLTE_CP_NORM_NSYMB : SRSLTE_CP_EXT_NSYMB)
|
||||
|
||||
#define SRSLTE_CP_LEN(symbol_sz, c) ((int)ceilf((((float)(c) * (symbol_sz)) / 2048.0f)))
|
||||
#define SRSLTE_CP_LEN_NORM(symbol, symbol_sz) \
|
||||
(((symbol) == 0) ? SRSLTE_CP_LEN((symbol_sz), SRSLTE_CP_NORM_0_LEN) : SRSLTE_CP_LEN((symbol_sz), SRSLTE_CP_NORM_LEN))
|
||||
#define SRSLTE_CP_LEN_EXT(symbol_sz) (SRSLTE_CP_LEN((symbol_sz), SRSLTE_CP_EXT_LEN))
|
||||
|
||||
#define SRSLTE_CP_SZ(symbol_sz, cp) \
|
||||
(SRSLTE_CP_LEN(symbol_sz, (SRSLTE_CP_ISNORM(cp) ? SRSLTE_CP_NORM_LEN : SRSLTE_CP_EXT_LEN)))
|
||||
#define SRSLTE_SYMBOL_SZ(symbol_sz, cp) (symbol_sz + SRSLTE_CP_SZ(symbol_sz, cp))
|
||||
#define SRSLTE_SLOT_LEN(symbol_sz) (symbol_sz * 15 / 2)
|
||||
#define SRSLTE_SF_LEN(symbol_sz) (symbol_sz * 15)
|
||||
#define SRSLTE_SF_LEN_MAX (SRSLTE_SF_LEN(SRSLTE_SYMBOL_SZ_MAX))
|
||||
|
||||
#define SRSLTE_SLOT_LEN_PRB(nof_prb) (SRSLTE_SLOT_LEN(srslte_symbol_sz(nof_prb)))
|
||||
#define SRSLTE_SF_LEN_PRB(nof_prb) ((uint32_t)SRSLTE_SF_LEN(srslte_symbol_sz(nof_prb)))
|
||||
|
||||
#define SRSLTE_SLOT_LEN_RE(nof_prb, cp) (nof_prb * SRSLTE_NRE * SRSLTE_CP_NSYMB(cp))
|
||||
#define SRSLTE_SF_LEN_RE(nof_prb, cp) (2 * SRSLTE_SLOT_LEN_RE(nof_prb, cp))
|
||||
#define SRSLTE_NOF_RE(cell) (2 * SRSLTE_SLOT_LEN_RE(cell.nof_prb, cell.cp))
|
||||
|
||||
#define SRSLTE_TA_OFFSET (10e-6)
|
||||
|
||||
#define SRSLTE_LTE_TS (1.0f / (15000.0f * 2048.0f))
|
||||
|
||||
#define SRSLTE_SLOT_IDX_CPNORM(symbol_idx, symbol_sz) \
|
||||
(symbol_idx == 0 ? 0 \
|
||||
: (symbol_sz + SRSLTE_CP_LEN(symbol_sz, SRSLTE_CP_NORM_0_LEN) + \
|
||||
(symbol_idx - 1) * (symbol_sz + SRSLTE_CP_LEN(symbol_sz, SRSLTE_CP_NORM_LEN))))
|
||||
#define SRSLTE_SLOT_IDX_CPEXT(idx, symbol_sz) (idx * (symbol_sz + SRSLTE_CP(symbol_sz, SRSLTE_CP_EXT_LEN)))
|
||||
|
||||
#define SRSLTE_RE_IDX(nof_prb, symbol_idx, sample_idx) ((symbol_idx) * (nof_prb) * (SRSLTE_NRE) + sample_idx)
|
||||
|
||||
#define SRSLTE_RS_VSHIFT(cell_id) (cell_id % 6)
|
||||
|
||||
#define SRSLTE_GUARD_RE(nof_prb) ((srslte_symbol_sz(nof_prb) - nof_prb * SRSLTE_NRE) / 2)
|
||||
|
||||
#define SRSLTE_SYMBOL_HAS_REF(l, cp, nof_ports) ((l == 1 && nof_ports == 4) || l == 0 || l == SRSLTE_CP_NSYMB(cp) - 3)
|
||||
|
||||
#define SRSLTE_NOF_CTRL_SYMBOLS(cell, cfi) (cfi + (cell.nof_prb < 10 ? 1 : 0))
|
||||
|
||||
#define SRSLTE_SYMBOL_HAS_REF_MBSFN(l, s) ((l == 2 && s == 0) || (l == 0 && s == 1) || (l == 4 && s == 1))
|
||||
|
||||
#define SRSLTE_NON_MBSFN_REGION_GUARD_LENGTH(non_mbsfn_region, symbol_sz) \
|
||||
((non_mbsfn_region == 1) \
|
||||
? (SRSLTE_CP_LEN_EXT(symbol_sz) - SRSLTE_CP_LEN_NORM(0, symbol_sz)) \
|
||||
: (2 * SRSLTE_CP_LEN_EXT(symbol_sz) - SRSLTE_CP_LEN_NORM(0, symbol_sz) - SRSLTE_CP_LEN_NORM(1, symbol_sz)))
|
||||
|
||||
#define SRSLTE_FDD_NOF_HARQ (FDD_HARQ_DELAY_DL_MS + FDD_HARQ_DELAY_UL_MS)
|
||||
#define SRSLTE_MAX_HARQ_PROC 15
|
||||
|
||||
#define SRSLTE_NOF_LTE_BANDS 58
|
||||
|
||||
#define SRSLTE_DEFAULT_MAX_FRAMES_PBCH 500
|
||||
#define SRSLTE_DEFAULT_MAX_FRAMES_PSS 10
|
||||
#define SRSLTE_DEFAULT_NOF_VALID_PSS_FRAMES 10
|
||||
|
||||
#define ZERO_OBJECT(x) memset(&(x), 0x0, sizeof((x)))
|
||||
|
||||
typedef enum SRSLTE_API { SRSLTE_PHICH_NORM = 0, SRSLTE_PHICH_EXT } srslte_phich_length_t;
|
||||
|
||||
typedef enum SRSLTE_API {
|
||||
SRSLTE_PHICH_R_1_6 = 0,
|
||||
SRSLTE_PHICH_R_1_2,
|
||||
SRSLTE_PHICH_R_1,
|
||||
SRSLTE_PHICH_R_2
|
||||
} srslte_phich_r_t;
|
||||
|
||||
/// LTE duplex modes.
|
||||
typedef enum SRSLTE_API {
|
||||
/// FDD uses frame structure type 1.
|
||||
SRSLTE_FDD = 0,
|
||||
/// TDD uses frame structure type 2.
|
||||
SRSLTE_TDD = 1
|
||||
} srslte_frame_type_t;
|
||||
|
||||
/// Maximum number of TDD special subframe configurations.
|
||||
#define SRSLTE_MAX_TDD_SS_CONFIGS (10u)
|
||||
|
||||
/// Maximum number of TDD uplink-downlink subframe configurations.
|
||||
#define SRSLTE_MAX_TDD_SF_CONFIGS (7u)
|
||||
|
||||
/// Configuration fields for operating in TDD mode.
|
||||
typedef struct SRSLTE_API {
|
||||
/// Uplink-downlink configuration, valid range is [0,SRSLTE_MAX_TDD_SF_CONFIGS[.
|
||||
/// TS 36.211 v8.9.0 Table 4.2-2.
|
||||
uint32_t sf_config;
|
||||
/// Special subframe symbol length configuration, valid range is [0,SRSLTE_MAX_TDD_SS_CONFIGS[.
|
||||
/// TS 36.211 v13.13.0 Table 4.2-1.
|
||||
uint32_t ss_config;
|
||||
/// Set to true when the fields have been configured, otherwise false.
|
||||
bool configured;
|
||||
} srslte_tdd_config_t;
|
||||
|
||||
/// TDD uplink-downlink subframe types.
|
||||
typedef enum SRSLTE_API {
|
||||
/// Subframe is reserved for downlink transmissions.
|
||||
SRSLTE_TDD_SF_D = 0,
|
||||
/// Subframe is reserved for uplink transmissions.
|
||||
SRSLTE_TDD_SF_U = 1,
|
||||
/// Special subframe.
|
||||
SRSLTE_TDD_SF_S = 2,
|
||||
} srslte_tdd_sf_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t mbsfn_area_id;
|
||||
uint8_t non_mbsfn_region_length;
|
||||
uint8_t mbsfn_mcs;
|
||||
bool enable;
|
||||
bool is_mcch;
|
||||
} srslte_mbsfn_cfg_t;
|
||||
|
||||
// Common cell constant properties that require object reconfiguration
|
||||
typedef struct SRSLTE_API {
|
||||
uint32_t nof_prb;
|
||||
uint32_t nof_ports;
|
||||
uint32_t id;
|
||||
srslte_cp_t cp;
|
||||
srslte_phich_length_t phich_length;
|
||||
srslte_phich_r_t phich_resources;
|
||||
srslte_frame_type_t frame_type;
|
||||
} srslte_cell_t;
|
||||
|
||||
// Common downlink properties that may change every subframe
|
||||
typedef struct SRSLTE_API {
|
||||
srslte_tdd_config_t tdd_config;
|
||||
uint32_t tti;
|
||||
uint32_t cfi;
|
||||
srslte_sf_t sf_type;
|
||||
uint32_t non_mbsfn_region;
|
||||
} srslte_dl_sf_cfg_t;
|
||||
|
||||
typedef struct SRSLTE_API {
|
||||
srslte_tdd_config_t tdd_config;
|
||||
uint32_t tti;
|
||||
bool shortened;
|
||||
} srslte_ul_sf_cfg_t;
|
||||
|
||||
typedef enum SRSLTE_API {
|
||||
SRSLTE_TM1 = 0,
|
||||
SRSLTE_TM2,
|
||||
SRSLTE_TM3,
|
||||
SRSLTE_TM4,
|
||||
SRSLTE_TM5,
|
||||
SRSLTE_TM6,
|
||||
SRSLTE_TM7,
|
||||
SRSLTE_TM8,
|
||||
SRSLTE_TMINV // Invalid Transmission Mode
|
||||
} srslte_tm_t;
|
||||
|
||||
typedef enum SRSLTE_API {
|
||||
SRSLTE_TXSCHEME_PORT0,
|
||||
SRSLTE_TXSCHEME_DIVERSITY,
|
||||
SRSLTE_TXSCHEME_SPATIALMUX,
|
||||
SRSLTE_TXSCHEME_CDD
|
||||
} srslte_tx_scheme_t;
|
||||
|
||||
typedef enum SRSLTE_API { SRSLTE_MIMO_DECODER_ZF, SRSLTE_MIMO_DECODER_MMSE } srslte_mimo_decoder_t;
|
||||
|
||||
/*!
|
||||
* \brief Types of modulations and associated modulation order.
|
||||
*/
|
||||
typedef enum SRSLTE_API {
|
||||
SRSLTE_MOD_BPSK = 0, /*!< \brief BPSK. */
|
||||
SRSLTE_MOD_QPSK, /*!< \brief QPSK. */
|
||||
SRSLTE_MOD_16QAM, /*!< \brief QAM16. */
|
||||
SRSLTE_MOD_64QAM, /*!< \brief QAM64. */
|
||||
SRSLTE_MOD_256QAM, /*!< \brief QAM256. */
|
||||
SRSLTE_MOD_NITEMS
|
||||
} srslte_mod_t;
|
||||
|
||||
typedef enum {
|
||||
SRSLTE_DCI_FORMAT0 = 0,
|
||||
SRSLTE_DCI_FORMAT1,
|
||||
SRSLTE_DCI_FORMAT1A,
|
||||
SRSLTE_DCI_FORMAT1B,
|
||||
SRSLTE_DCI_FORMAT1C,
|
||||
SRSLTE_DCI_FORMAT1D,
|
||||
SRSLTE_DCI_FORMAT2,
|
||||
SRSLTE_DCI_FORMAT2A,
|
||||
SRSLTE_DCI_FORMAT2B,
|
||||
// SRSLTE_DCI_FORMAT3,
|
||||
// SRSLTE_DCI_FORMAT3A,
|
||||
SRSLTE_DCI_FORMATN0,
|
||||
SRSLTE_DCI_FORMATN1,
|
||||
SRSLTE_DCI_FORMATN2,
|
||||
SRSLTE_DCI_FORMAT_RAR, // Not a real LTE format. Used internally to indicate RAR grant
|
||||
SRSLTE_DCI_NOF_FORMATS
|
||||
} srslte_dci_format_t;
|
||||
|
||||
typedef enum {
|
||||
SRSLTE_PUCCH_ACK_NACK_FEEDBACK_MODE_NORMAL = 0, /* No cell selection no pucch3 */
|
||||
SRSLTE_PUCCH_ACK_NACK_FEEDBACK_MODE_CS,
|
||||
SRSLTE_PUCCH_ACK_NACK_FEEDBACK_MODE_PUCCH3,
|
||||
SRSLTE_PUCCH_ACK_NACK_FEEDBACK_MODE_ERROR,
|
||||
} srslte_ack_nack_feedback_mode_t;
|
||||
|
||||
typedef struct SRSLTE_API {
|
||||
int id;
|
||||
float fd;
|
||||
} srslte_earfcn_t;
|
||||
|
||||
enum band_geographical_area {
|
||||
SRSLTE_BAND_GEO_AREA_ALL,
|
||||
SRSLTE_BAND_GEO_AREA_NAR,
|
||||
SRSLTE_BAND_GEO_AREA_APAC,
|
||||
SRSLTE_BAND_GEO_AREA_EMEA,
|
||||
SRSLTE_BAND_GEO_AREA_JAPAN,
|
||||
SRSLTE_BAND_GEO_AREA_CALA,
|
||||
SRSLTE_BAND_GEO_AREA_NA
|
||||
};
|
||||
|
||||
///< NB-IoT specific structs
|
||||
typedef enum {
|
||||
SRSLTE_NBIOT_MODE_INBAND_SAME_PCI = 0,
|
||||
SRSLTE_NBIOT_MODE_INBAND_DIFFERENT_PCI,
|
||||
SRSLTE_NBIOT_MODE_GUARDBAND,
|
||||
SRSLTE_NBIOT_MODE_STANDALONE,
|
||||
SRSLTE_NBIOT_MODE_N_ITEMS,
|
||||
} srslte_nbiot_mode_t;
|
||||
|
||||
typedef struct SRSLTE_API {
|
||||
srslte_cell_t base; // the umbrella or super cell
|
||||
uint32_t nbiot_prb; // the index of the NB-IoT PRB within the cell
|
||||
uint32_t n_id_ncell;
|
||||
uint32_t nof_ports; // The number of antenna ports for NB-IoT
|
||||
bool is_r14; // Whether the cell is a R14 cell
|
||||
srslte_nbiot_mode_t mode;
|
||||
} srslte_nbiot_cell_t;
|
||||
|
||||
#define SRSLTE_NBIOT_MAX_PORTS 2
|
||||
#define SRSLTE_NBIOT_MAX_CODEWORDS SRSLTE_MAX_CODEWORDS
|
||||
|
||||
#define SRSLTE_SF_LEN_PRB_NBIOT (SRSLTE_SF_LEN_PRB(1))
|
||||
|
||||
#define SRSLTE_SF_LEN_RE_NBIOT (SRSLTE_SF_LEN_RE(1, SRSLTE_CP_NORM))
|
||||
|
||||
#define SRSLTE_NBIOT_FFT_SIZE 128
|
||||
#define SRSLTE_NBIOT_FREQ_SHIFT_FACTOR ((float)-0.5)
|
||||
#define SRSLTE_NBIOT_NUM_RX_ANTENNAS 1
|
||||
#define SRSLTE_NBIOT_MAX_PRB 1
|
||||
|
||||
#define SRSLTE_NBIOT_DEFAULT_NUM_PRB_BASECELL 1
|
||||
#define SRSLTE_NBIOT_DEFAULT_PRB_OFFSET 0
|
||||
|
||||
#define SRSLTE_DEFAULT_MAX_FRAMES_NPBCH 500
|
||||
#define SRSLTE_DEFAULT_MAX_FRAMES_NPSS 20
|
||||
#define SRSLTE_DEFAULT_NOF_VALID_NPSS_FRAMES 20
|
||||
|
||||
#define SRSLTE_NBIOT_NPBCH_NOF_TOTAL_BITS (1600) ///< Number of bits for the entire NPBCH (See 36.211 Sec 10.2.4.1)
|
||||
#define SRSLTE_NBIOT_NPBCH_NOF_BITS_SF \
|
||||
(SRSLTE_NBIOT_NPBCH_NOF_TOTAL_BITS / 8) ///< The NPBCH is transmitted in 8 blocks (See 36.211 Sec 10.2.4.4)
|
||||
|
||||
#define SRSLTE_MAX_DL_BITS_CAT_NB1 (680) ///< TS 36.306 v15.4.0 Table 4.1C-1
|
||||
|
||||
///< PHY common function declarations
|
||||
|
||||
SRSLTE_API bool srslte_cell_isvalid(srslte_cell_t* cell);
|
||||
|
||||
SRSLTE_API void srslte_cell_fprint(FILE* stream, srslte_cell_t* cell, uint32_t sfn);
|
||||
|
||||
SRSLTE_API bool srslte_cellid_isvalid(uint32_t cell_id);
|
||||
|
||||
SRSLTE_API bool srslte_nofprb_isvalid(uint32_t nof_prb);
|
||||
|
||||
/**
|
||||
* Returns the subframe type for a given subframe number and a TDD configuration.
|
||||
* Check TS 36.211 v8.9.0 Table 4.2-2.
|
||||
*
|
||||
* @param tdd_config TDD configuration.
|
||||
* @param sf_idx Subframe number, must be in range [0,SRSLTE_NOF_SF_X_FRAME[.
|
||||
* @return Returns the subframe type.
|
||||
*/
|
||||
SRSLTE_API srslte_tdd_sf_t srslte_sfidx_tdd_type(srslte_tdd_config_t tdd_config, uint32_t sf_idx);
|
||||
|
||||
/**
|
||||
* Returns the number of UpPTS symbols in a subframe.
|
||||
* Check TS 36.211 v13.13.0 Table 4.2-1.
|
||||
*
|
||||
* @param tdd_config TDD configuration.
|
||||
* @return Returns the number of UpPTS symbols.
|
||||
*/
|
||||
SRSLTE_API uint32_t srslte_sfidx_tdd_nof_up(srslte_tdd_config_t tdd_config);
|
||||
|
||||
/**
|
||||
* Returns the number of GP symbols in a subframe.
|
||||
* Check TS 36.211 v13.13.0 Table 4.2-1.
|
||||
*
|
||||
* @param tdd_config TDD configuration.
|
||||
* @return Returns the number of GP symbols.
|
||||
*/
|
||||
SRSLTE_API uint32_t srslte_sfidx_tdd_nof_gp(srslte_tdd_config_t tdd_config);
|
||||
|
||||
/**
|
||||
* Returns the number of DwPTS symbols in a subframe.
|
||||
* Check TS 36.211 v13.13.0 Table 4.2-1.
|
||||
*
|
||||
* @param tdd_config TDD configuration.
|
||||
* @return Returns the number of DwPTS symbols.
|
||||
*/
|
||||
SRSLTE_API uint32_t srslte_sfidx_tdd_nof_dw(srslte_tdd_config_t tdd_config);
|
||||
|
||||
SRSLTE_API uint32_t srslte_tdd_nof_harq(srslte_tdd_config_t tdd_config);
|
||||
|
||||
SRSLTE_API uint32_t srslte_sfidx_tdd_nof_dw_slot(srslte_tdd_config_t tdd_config, uint32_t slot, srslte_cp_t cp);
|
||||
|
||||
SRSLTE_API bool srslte_sfidx_isvalid(uint32_t sf_idx);
|
||||
|
||||
SRSLTE_API bool srslte_portid_isvalid(uint32_t port_id);
|
||||
|
||||
SRSLTE_API bool srslte_N_id_2_isvalid(uint32_t N_id_2);
|
||||
|
||||
SRSLTE_API bool srslte_N_id_1_isvalid(uint32_t N_id_1);
|
||||
|
||||
SRSLTE_API bool srslte_symbol_sz_isvalid(uint32_t symbol_sz);
|
||||
|
||||
SRSLTE_API int srslte_symbol_sz(uint32_t nof_prb);
|
||||
|
||||
SRSLTE_API int srslte_symbol_sz_power2(uint32_t nof_prb);
|
||||
|
||||
SRSLTE_API int srslte_nof_prb(uint32_t symbol_sz);
|
||||
|
||||
SRSLTE_API uint32_t srslte_max_cce(uint32_t nof_prb);
|
||||
|
||||
SRSLTE_API int srslte_sampling_freq_hz(uint32_t nof_prb);
|
||||
|
||||
SRSLTE_API void srslte_use_standard_symbol_size(bool enabled);
|
||||
|
||||
SRSLTE_API bool srslte_symbol_size_is_standard();
|
||||
|
||||
SRSLTE_API uint32_t srslte_re_x_prb(uint32_t ns, uint32_t symbol, uint32_t nof_ports, uint32_t nof_symbols);
|
||||
|
||||
SRSLTE_API uint32_t srslte_voffset(uint32_t symbol_id, uint32_t cell_id, uint32_t nof_ports);
|
||||
|
||||
SRSLTE_API int srslte_group_hopping_f_gh(uint32_t f_gh[SRSLTE_NSLOTS_X_FRAME], uint32_t cell_id);
|
||||
|
||||
SRSLTE_API uint32_t srslte_N_ta_new_rar(uint32_t ta);
|
||||
|
||||
SRSLTE_API uint32_t srslte_N_ta_new(uint32_t N_ta_old, uint32_t ta);
|
||||
|
||||
SRSLTE_API float srslte_coderate(uint32_t tbs, uint32_t nof_re);
|
||||
|
||||
SRSLTE_API char* srslte_cp_string(srslte_cp_t cp);
|
||||
|
||||
SRSLTE_API srslte_mod_t srslte_str2mod(const char* mod_str);
|
||||
|
||||
SRSLTE_API char* srslte_mod_string(srslte_mod_t mod);
|
||||
|
||||
SRSLTE_API uint32_t srslte_mod_bits_x_symbol(srslte_mod_t mod);
|
||||
|
||||
SRSLTE_API uint8_t srslte_band_get_band(uint32_t dl_earfcn);
|
||||
|
||||
SRSLTE_API bool srslte_band_is_tdd(uint32_t band);
|
||||
|
||||
SRSLTE_API double srslte_band_fd(uint32_t dl_earfcn);
|
||||
|
||||
SRSLTE_API double srslte_band_fu(uint32_t ul_earfcn);
|
||||
|
||||
SRSLTE_API uint32_t srslte_band_ul_earfcn(uint32_t dl_earfcn);
|
||||
|
||||
SRSLTE_API int
|
||||
srslte_band_get_fd_band(uint32_t band, srslte_earfcn_t* earfcn, int earfcn_start, int earfcn_end, uint32_t max_elems);
|
||||
|
||||
SRSLTE_API int srslte_band_get_fd_band_all(uint32_t band, srslte_earfcn_t* earfcn, uint32_t max_nelems);
|
||||
|
||||
SRSLTE_API int
|
||||
srslte_band_get_fd_region(enum band_geographical_area region, srslte_earfcn_t* earfcn, uint32_t max_elems);
|
||||
|
||||
SRSLTE_API int srslte_str2mimotype(char* mimo_type_str, srslte_tx_scheme_t* type);
|
||||
|
||||
SRSLTE_API char* srslte_mimotype2str(srslte_tx_scheme_t mimo_type);
|
||||
|
||||
/* Returns the interval tti1-tti2 mod 10240 */
|
||||
SRSLTE_API uint32_t srslte_tti_interval(uint32_t tti1, uint32_t tti2);
|
||||
|
||||
SRSLTE_API uint32_t srslte_print_check(char* s, size_t max_len, uint32_t cur_len, const char* format, ...);
|
||||
|
||||
SRSLTE_API bool srslte_nbiot_cell_isvalid(srslte_nbiot_cell_t* cell);
|
||||
SRSLTE_API bool srslte_nbiot_portid_isvalid(uint32_t port_id);
|
||||
SRSLTE_API float srslte_band_fu_nbiot(uint32_t ul_earfcn, const float m_ul);
|
||||
|
||||
SRSLTE_API char* srslte_nbiot_mode_string(srslte_nbiot_mode_t mode);
|
||||
|
||||
/**
|
||||
* Returns a constant string pointer with the ACK/NACK feedback mode
|
||||
*
|
||||
* @param ack_nack_feedback_mode Mode
|
||||
* @return Returns constant pointer with the text of the mode if succesful, `error` otherwise
|
||||
*/
|
||||
SRSLTE_API const char* srslte_ack_nack_feedback_mode_string(srslte_ack_nack_feedback_mode_t ack_nack_feedback_mode);
|
||||
|
||||
/**
|
||||
* Returns a constant string pointer with the ACK/NACK feedback mode
|
||||
*
|
||||
* @param ack_nack_feedback_mode Mode
|
||||
* @return Returns constant pointer with the text of the mode if succesful, `error` otherwise
|
||||
*/
|
||||
SRSLTE_API srslte_ack_nack_feedback_mode_t srslte_string_ack_nack_feedback_mode(const char* str);
|
||||
|
||||
/**
|
||||
* Returns the number of bits for Rank Indicador reporting depending on the cell
|
||||
*
|
||||
* @param cell
|
||||
*/
|
||||
SRSLTE_API uint32_t srslte_ri_nof_bits(const srslte_cell_t* cell);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // SRSLTE_PHY_COMMON_H
|
@ -1,176 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
/**********************************************************************************************
|
||||
* File: phy_common_sl.h
|
||||
*
|
||||
* Description: Common parameters and lookup functions for Sidelink PHY
|
||||
*
|
||||
* Reference: 3GPP TS 36.211 version 15.3.0 Release 15
|
||||
*********************************************************************************************/
|
||||
|
||||
#ifndef SRSLTE_PHY_COMMON_SL_H
|
||||
#define SRSLTE_PHY_COMMON_SL_H
|
||||
|
||||
/**
|
||||
* \brief Common parameters and lookup functions for Sidelink PHY
|
||||
*/
|
||||
|
||||
#include "srslte/phy/common/phy_common.h"
|
||||
|
||||
typedef enum SRSLTE_API {
|
||||
SRSLTE_SIDELINK_TM1 = 0,
|
||||
SRSLTE_SIDELINK_TM2,
|
||||
SRSLTE_SIDELINK_TM3,
|
||||
SRSLTE_SIDELINK_TM4
|
||||
} srslte_sl_tm_t;
|
||||
|
||||
typedef enum SRSLTE_API {
|
||||
SRSLTE_SIDELINK_PSBCH = 0, // Physical Sidelink Broadcast Channel
|
||||
SRSLTE_SIDELINK_PSCCH, // Physical Sidelink Control Channel
|
||||
SRSLTE_SIDELINK_PSSCH, // Physical Sidelink Shared Channel
|
||||
SRSLTE_SIDELINK_PSDCH // Physical Sidelink Discovery Channel
|
||||
} srslte_sl_channels_t;
|
||||
|
||||
typedef struct SRSLTE_API {
|
||||
srslte_sl_tm_t tm;
|
||||
uint32_t N_sl_id;
|
||||
uint32_t nof_prb;
|
||||
srslte_cp_t cp;
|
||||
} srslte_cell_sl_t;
|
||||
|
||||
#define SRSLTE_SL_MAX_PERIOD_LENGTH 320 // SL-PeriodComm-r12 3GPP TS 36.331 Section 6.3.8
|
||||
// SL-CommResourcePool: 3GPP TS 36.331 version 15.6.0 Release 15 Section 6.3.8
|
||||
typedef struct SRSLTE_API {
|
||||
uint32_t period_length;
|
||||
|
||||
uint32_t prb_num;
|
||||
uint32_t prb_start;
|
||||
uint32_t prb_end;
|
||||
|
||||
uint8_t pscch_sf_bitmap[SRSLTE_SL_MAX_PERIOD_LENGTH];
|
||||
uint8_t pssch_sf_bitmap[SRSLTE_SL_MAX_PERIOD_LENGTH];
|
||||
|
||||
uint32_t size_sub_channel; // sizeSubchannel-r14
|
||||
uint32_t num_sub_channel; // numSubchannel-r14
|
||||
uint32_t start_prb_sub_channel; // startRB-Subchannel-r14 offset
|
||||
bool adjacency_pscch_pssch; // adjacencyPSCCH-PSSCH-r14
|
||||
|
||||
uint32_t sf_bitmap_tm34_len;
|
||||
uint8_t sf_bitmap_tm34[SRSLTE_SL_MAX_PERIOD_LENGTH]; // sl_Subframe_r14: 3GPP 36.331 Section 6.3.8
|
||||
} srslte_sl_comm_resource_pool_t;
|
||||
|
||||
typedef enum SRSLTE_API {
|
||||
SRSLTE_SIDELINK_DATA_SYMBOL = 0,
|
||||
SRSLTE_SIDELINK_SYNC_SYMBOL,
|
||||
SRSLTE_SIDELINK_DMRS_SYMBOL,
|
||||
SRSLTE_SIDELINK_GUARD_SYMBOL
|
||||
} srslte_sl_symbol_t;
|
||||
|
||||
#define SRSLTE_SL_DUPLEX_MODE_FDD (1)
|
||||
#define SRSLTE_SL_DUPLEX_MODE_TDD (2)
|
||||
|
||||
#define SRSLTE_SLSS_SIDE_PEAK_OFFSET (0.005f)
|
||||
#define SRSLTE_SLSS_SIDE_PEAK_THRESHOLD_HIGH (0.49f) // square(0.7), max 70% of main peak
|
||||
#define SRSLTE_SLSS_SIDE_PEAK_THRESHOLD_LOW (0.09f) // square(0.3), min 30% of main peak
|
||||
|
||||
#define SRSLTE_PSBCH_NOF_PRB (6)
|
||||
#define SRSLTE_PSCCH_TM34_NOF_PRB (2)
|
||||
|
||||
#define SRSLTE_MIB_SL_LEN (40) // TM1/2: 40 bits
|
||||
#define SRSLTE_MIB_SL_V2X_LEN (48) // TM3/4: 48 bits
|
||||
#define SRSLTE_MIB_SL_MAX_LEN (SRSLTE_MIB_SL_V2X_LEN)
|
||||
|
||||
#define SRSLTE_SL_TM12_DEFAULT_NUM_DMRS_SYMBOLS (2)
|
||||
#define SRSLTE_SL_TM34_DEFAULT_NUM_DMRS_SYMBOLS (4) ///< In TM3/4, all channels have 4 DMRS by default
|
||||
|
||||
#define SRSLTE_PSBCH_TM12_NUM_DATA_SYMBOLS (8) // PSBCH is in 8 OFDM symbols (but only 7 are tx'ed)
|
||||
#define SRSLTE_PSBCH_TM12_NUM_DATA_SYMBOLS_EXT \
|
||||
(6) // PSBCH is in 7 OFDM symbols for extended cyclic prefix (but only 6 are tx'ed)
|
||||
#define SRSLTE_PSBCH_TM12_NUM_DMRS_SYMBOLS (2) ///< PSBCH has 2 DMRS symbols
|
||||
#define SRSLTE_PSBCH_TM12_NUM_SYNC_SYMBOLS (4) ///< Two symbols PSSS and two SSSS
|
||||
|
||||
#define SRSLTE_PSBCH_TM34_NUM_DATA_SYMBOLS (7) ///< SL-BCH is in 7 OFDM symbols (but only 6 are tx'ed)
|
||||
#define SRSLTE_PSBCH_TM34_NUM_DMRS_SYMBOLS (3) ///< PSBCH has 3 DMRS symbols in TM3 and TM4
|
||||
#define SRSLTE_PSBCH_TM34_NUM_SYNC_SYMBOLS (4) ///< Two symbols PSSS and two SSSS
|
||||
|
||||
#define SRSLTE_SCI_CRC_LEN (16)
|
||||
#define SRSLTE_SCI_MAX_LEN (45)
|
||||
#define SRSLTE_SCI_TM34_LEN (32)
|
||||
|
||||
#define SRSLTE_PSCCH_QM 2
|
||||
#define SRSLTE_PSCCH_TM12_NOF_PRB (1)
|
||||
#define SRSLTE_PSCCH_TM34_NOF_PRB (2)
|
||||
#define SRSLTE_PSCCH_MAX_NOF_PRB (SRSLTE_PSCCH_TM34_NOF_PRB)
|
||||
#define SRSLTE_PSCCH_SCRAMBLING_SEED (510) ///< Scrambling seed for PSCCH is 510
|
||||
|
||||
#define SRSLTE_PSCCH_TM12_NUM_DATA_SYMBOLS (12)
|
||||
#define SRSLTE_PSCCH_TM12_NUM_DMRS_SYMBOLS (2)
|
||||
#define SRSLTE_PSCCH_TM12_NUM_DATA_SYMBOLS_EXT (10)
|
||||
|
||||
#define SRSLTE_PSCCH_TM34_NUM_DATA_SYMBOLS (10)
|
||||
#define SRSLTE_PSCCH_TM34_NUM_DMRS_SYMBOLS (4)
|
||||
|
||||
#define SRSLTE_PSCCH_TM12_NOF_CODED_BITS \
|
||||
(SRSLTE_NRE * SRSLTE_PSCCH_TM12_NUM_DATA_SYMBOLS * SRSLTE_PSCCH_TM12_NOF_PRB * SRSLTE_PSCCH_QM)
|
||||
#define SRSLTE_PSCCH_TM34_NOF_CODED_BITS \
|
||||
(SRSLTE_NRE * SRSLTE_PSCCH_TM34_NUM_DATA_SYMBOLS * SRSLTE_PSCCH_TM34_NOF_PRB * SRSLTE_PSCCH_QM)
|
||||
#define SRSLTE_PSCCH_MAX_CODED_BITS SRSLTE_MAX(SRSLTE_PSCCH_TM12_NOF_CODED_BITS, SRSLTE_PSCCH_TM34_NOF_CODED_BITS)
|
||||
|
||||
#define SRSLTE_PSSCH_MAX_QM 6
|
||||
#define SRSLTE_PSSCH_CRC_LEN 24
|
||||
#define SRSLTE_MAX_CODEWORD_LEN 168000 // 12 subcarriers * 100 PRB * 14 symbols * 10 bits, assuming 1024QAM
|
||||
#define SRSLTE_SL_SCH_MAX_TB_LEN (48936) // 3GPP 36.306 v15.4.0 Table 4.1B-1
|
||||
#define SRSLTE_PSSCH_MAX_CODED_BITS (3 * SRSLTE_TCOD_MAX_LEN_CB + SRSLTE_TCOD_TOTALTAIL)
|
||||
|
||||
#define SRSLTE_PSSCH_TM12_NUM_DATA_SYMBOLS (12) // PSSCH is in 12 OFDM symbols (but only 11 are tx'ed)
|
||||
#define SRSLTE_PSSCH_TM12_NUM_DMRS_SYMBOLS (2) // PSSCH has 2 DMRS symbols in TM1 and TM2
|
||||
|
||||
#define SRSLTE_PSSCH_TM12_NUM_DATA_SYMBOLS_CP_EXT \
|
||||
(10) // PSSCH is in 10 OFDM symbols for extended cyclic prefix (but only 9 are tx'ed)
|
||||
#define SRSLTE_PSSCH_TM12_NUM_DMRS_SYMBOLS_CP_EXT \
|
||||
(2) // PSSCH has 2 DMRS symbols for extended cyclic prefix in TM1 and TM2
|
||||
|
||||
#define SRSLTE_PSSCH_TM34_NUM_DATA_SYMBOLS (10) // PSSCH is in 10 OFDM symbols (but only 9 are tx'ed)
|
||||
#define SRSLTE_PSSCH_TM34_NUM_DMRS_SYMBOLS (4) // PSSCH has 4 DMRS symbols in TM3 and TM4
|
||||
|
||||
SRSLTE_API int srslte_sl_group_hopping_f_gh(uint32_t f_gh[SRSLTE_NSLOTS_X_FRAME * 2], uint32_t N_x_id);
|
||||
#define SRSLTE_PSCCH_MAX_NUM_DATA_SYMBOLS (SRSLTE_PSCCH_TM12_NUM_DATA_SYMBOLS)
|
||||
|
||||
SRSLTE_API bool srslte_slss_side_peak_pos_is_valid(uint32_t side_peak_pos,
|
||||
uint32_t main_peak_pos,
|
||||
uint32_t side_peak_delta_a,
|
||||
uint32_t side_peak_delta_b);
|
||||
SRSLTE_API bool srslte_slss_side_peak_value_is_valid(float side_peak_value, float threshold_low, float threshold_high);
|
||||
|
||||
SRSLTE_API int srslte_sl_tm_to_cell_sl_tm_t(srslte_cell_sl_t* q, uint32_t tm);
|
||||
|
||||
SRSLTE_API uint32_t srslte_sl_get_num_symbols(srslte_sl_tm_t tm, srslte_cp_t cp);
|
||||
SRSLTE_API bool srslte_psbch_is_symbol(srslte_sl_symbol_t type, srslte_sl_tm_t tm, uint32_t i, srslte_cp_t cp);
|
||||
SRSLTE_API bool srslte_pscch_is_symbol(srslte_sl_symbol_t type, srslte_sl_tm_t tm, uint32_t i, srslte_cp_t cp);
|
||||
SRSLTE_API bool srslte_pssch_is_symbol(srslte_sl_symbol_t type, srslte_sl_tm_t tm, uint32_t i, srslte_cp_t cp);
|
||||
|
||||
SRSLTE_API uint32_t srslte_sci_format0_sizeof(uint32_t nof_prb);
|
||||
|
||||
SRSLTE_API int srslte_sl_comm_resource_pool_get_default_config(srslte_sl_comm_resource_pool_t* q,
|
||||
srslte_cell_sl_t cell);
|
||||
|
||||
#endif // SRSLTE_PHY_COMMON_SL_H
|
@ -1,73 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
/**********************************************************************************************
|
||||
* File: timestamp.h
|
||||
*
|
||||
* Description: A simple timestamp struct with separate variables for full and frac seconds.
|
||||
* Separate variables are used to avoid loss of precision in our frac seconds.
|
||||
* Only positive timestamps are supported.
|
||||
*
|
||||
* Reference:
|
||||
*********************************************************************************************/
|
||||
|
||||
#ifndef SRSLTE_TIMESTAMP_H
|
||||
#define SRSLTE_TIMESTAMP_H
|
||||
|
||||
#include "srslte/config.h"
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
|
||||
typedef struct SRSLTE_API {
|
||||
time_t full_secs;
|
||||
double frac_secs;
|
||||
} srslte_timestamp_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
SRSLTE_API int srslte_timestamp_init(srslte_timestamp_t* t, time_t full_secs, double frac_secs);
|
||||
|
||||
SRSLTE_API void srslte_timestamp_init_uint64(srslte_timestamp_t* ts_time, uint64_t ts_count, double base_srate);
|
||||
|
||||
SRSLTE_API int srslte_timestamp_copy(srslte_timestamp_t* dest, srslte_timestamp_t* src);
|
||||
|
||||
SRSLTE_API int srslte_timestamp_compare(const srslte_timestamp_t* a, const srslte_timestamp_t* b);
|
||||
|
||||
SRSLTE_API int srslte_timestamp_add(srslte_timestamp_t* t, time_t full_secs, double frac_secs);
|
||||
|
||||
SRSLTE_API int srslte_timestamp_sub(srslte_timestamp_t* t, time_t full_secs, double frac_secs);
|
||||
|
||||
SRSLTE_API double srslte_timestamp_real(const srslte_timestamp_t* t);
|
||||
|
||||
SRSLTE_API bool srslte_timestamp_iszero(const srslte_timestamp_t* t);
|
||||
|
||||
SRSLTE_API uint32_t srslte_timestamp_uint32(srslte_timestamp_t* t);
|
||||
|
||||
SRSLTE_API uint64_t srslte_timestamp_uint64(const srslte_timestamp_t* t, double srate);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // SRSLTE_TIMESTAMP_H
|
@ -1,61 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
/**********************************************************************************************
|
||||
* File: dft_precoding.h
|
||||
*
|
||||
* Description: DFT-based transform precoding object.
|
||||
* Used in generation of uplink SCFDMA signals.
|
||||
*
|
||||
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10 Sec. 5.3.3
|
||||
*********************************************************************************************/
|
||||
|
||||
#ifndef SRSLTE_DFT_PRECODING_H
|
||||
#define SRSLTE_DFT_PRECODING_H
|
||||
|
||||
#include "srslte/config.h"
|
||||
#include "srslte/phy/common/phy_common.h"
|
||||
#include "srslte/phy/dft/dft.h"
|
||||
|
||||
/* DFT-based Transform Precoding object */
|
||||
typedef struct SRSLTE_API {
|
||||
|
||||
uint32_t max_prb;
|
||||
srslte_dft_plan_t dft_plan[SRSLTE_MAX_PRB + 1];
|
||||
|
||||
} srslte_dft_precoding_t;
|
||||
|
||||
SRSLTE_API int srslte_dft_precoding_init(srslte_dft_precoding_t* q, uint32_t max_prb, bool is_tx);
|
||||
|
||||
SRSLTE_API int srslte_dft_precoding_init_tx(srslte_dft_precoding_t* q, uint32_t max_prb);
|
||||
|
||||
SRSLTE_API int srslte_dft_precoding_init_rx(srslte_dft_precoding_t* q, uint32_t max_prb);
|
||||
|
||||
SRSLTE_API void srslte_dft_precoding_free(srslte_dft_precoding_t* q);
|
||||
|
||||
SRSLTE_API bool srslte_dft_precoding_valid_prb(uint32_t nof_prb);
|
||||
|
||||
SRSLTE_API uint32_t srslte_dft_precoding_get_valid_prb(uint32_t nof_prb);
|
||||
|
||||
SRSLTE_API int
|
||||
srslte_dft_precoding(srslte_dft_precoding_t* q, cf_t* input, cf_t* output, uint32_t nof_prb, uint32_t nof_symbols);
|
||||
|
||||
#endif // SRSLTE_DFT_PRECODING_H
|
@ -1,171 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
/******************************************************************************
|
||||
* File: enb_dl.h
|
||||
*
|
||||
* Description: ENB downlink object.
|
||||
*
|
||||
* This module is a frontend to all the downlink data and control
|
||||
* channel processing modules for the ENB transmitter side.
|
||||
*
|
||||
* Reference:
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef SRSLTE_ENB_DL_H
|
||||
#define SRSLTE_ENB_DL_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "srslte/phy/ch_estimation/refsignal_dl.h"
|
||||
#include "srslte/phy/common/phy_common.h"
|
||||
#include "srslte/phy/dft/ofdm.h"
|
||||
#include "srslte/phy/phch/dci.h"
|
||||
#include "srslte/phy/phch/pbch.h"
|
||||
#include "srslte/phy/phch/pcfich.h"
|
||||
#include "srslte/phy/phch/pdcch.h"
|
||||
#include "srslte/phy/phch/pdsch.h"
|
||||
#include "srslte/phy/phch/pdsch_cfg.h"
|
||||
#include "srslte/phy/phch/phich.h"
|
||||
#include "srslte/phy/phch/pmch.h"
|
||||
#include "srslte/phy/phch/ra.h"
|
||||
#include "srslte/phy/phch/regs.h"
|
||||
#include "srslte/phy/sync/pss.h"
|
||||
#include "srslte/phy/sync/sss.h"
|
||||
|
||||
#include "srslte/phy/enb/enb_ul.h"
|
||||
#include "srslte/phy/ue/ue_dl.h"
|
||||
|
||||
#include "srslte/phy/utils/debug.h"
|
||||
#include "srslte/phy/utils/vector.h"
|
||||
|
||||
#include "srslte/config.h"
|
||||
|
||||
typedef struct SRSLTE_API {
|
||||
srslte_cell_t cell;
|
||||
|
||||
srslte_dl_sf_cfg_t dl_sf;
|
||||
|
||||
cf_t* sf_symbols[SRSLTE_MAX_PORTS];
|
||||
|
||||
srslte_ofdm_t ifft[SRSLTE_MAX_PORTS];
|
||||
srslte_ofdm_t ifft_mbsfn;
|
||||
|
||||
srslte_pbch_t pbch;
|
||||
srslte_pcfich_t pcfich;
|
||||
srslte_regs_t regs;
|
||||
srslte_pdcch_t pdcch;
|
||||
srslte_pdsch_t pdsch;
|
||||
srslte_pmch_t pmch;
|
||||
srslte_phich_t phich;
|
||||
|
||||
srslte_refsignal_t csr_signal;
|
||||
srslte_refsignal_t mbsfnr_signal;
|
||||
|
||||
cf_t pss_signal[SRSLTE_PSS_LEN];
|
||||
float sss_signal0[SRSLTE_SSS_LEN];
|
||||
float sss_signal5[SRSLTE_SSS_LEN];
|
||||
|
||||
uint32_t nof_common_locations[3];
|
||||
srslte_dci_location_t common_locations[3][SRSLTE_MAX_CANDIDATES_COM];
|
||||
|
||||
} srslte_enb_dl_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t ack;
|
||||
uint32_t n_prb_lowest;
|
||||
uint32_t n_dmrs;
|
||||
} srslte_enb_dl_phich_t;
|
||||
|
||||
/* This function shall be called just after the initial synchronization */
|
||||
SRSLTE_API int srslte_enb_dl_init(srslte_enb_dl_t* q, cf_t* out_buffer[SRSLTE_MAX_PORTS], uint32_t max_prb);
|
||||
|
||||
SRSLTE_API void srslte_enb_dl_free(srslte_enb_dl_t* q);
|
||||
|
||||
SRSLTE_API int srslte_enb_dl_set_cell(srslte_enb_dl_t* q, srslte_cell_t cell);
|
||||
|
||||
SRSLTE_API bool srslte_enb_dl_location_is_common_ncce(srslte_enb_dl_t* q, uint32_t ncce);
|
||||
|
||||
SRSLTE_API void srslte_enb_dl_put_base(srslte_enb_dl_t* q, srslte_dl_sf_cfg_t* dl_sf);
|
||||
|
||||
SRSLTE_API void srslte_enb_dl_put_phich(srslte_enb_dl_t* q, srslte_phich_grant_t* grant, bool ack);
|
||||
|
||||
SRSLTE_API int srslte_enb_dl_put_pdcch_dl(srslte_enb_dl_t* q, srslte_dci_cfg_t* dci_cfg, srslte_dci_dl_t* dci_dl);
|
||||
|
||||
SRSLTE_API int srslte_enb_dl_put_pdcch_ul(srslte_enb_dl_t* q, srslte_dci_cfg_t* dci_cfg, srslte_dci_ul_t* dci_ul);
|
||||
|
||||
SRSLTE_API int
|
||||
srslte_enb_dl_put_pdsch(srslte_enb_dl_t* q, srslte_pdsch_cfg_t* pdsch, uint8_t* data[SRSLTE_MAX_CODEWORDS]);
|
||||
|
||||
SRSLTE_API int srslte_enb_dl_put_pmch(srslte_enb_dl_t* q, srslte_pmch_cfg_t* pmch_cfg, uint8_t* data);
|
||||
|
||||
SRSLTE_API void srslte_enb_dl_gen_signal(srslte_enb_dl_t* q);
|
||||
|
||||
SRSLTE_API bool srslte_enb_dl_gen_cqi_periodic(const srslte_cell_t* cell,
|
||||
const srslte_dl_cfg_t* dl_cfg,
|
||||
uint32_t tti,
|
||||
uint32_t last_ri,
|
||||
srslte_cqi_cfg_t* cqi_cfg);
|
||||
|
||||
SRSLTE_API bool srslte_enb_dl_gen_cqi_aperiodic(const srslte_cell_t* cell,
|
||||
const srslte_dl_cfg_t* dl_cfg,
|
||||
uint32_t ri,
|
||||
srslte_cqi_cfg_t* cqi_cfg);
|
||||
|
||||
SRSLTE_API void srslte_enb_dl_save_signal(srslte_enb_dl_t* q);
|
||||
|
||||
/**
|
||||
* Generates the uplink control information configuration from the cell, subframe and HARQ ACK information. Note that
|
||||
* it expects the UCI configuration shall have been configured already with scheduling request and channel quality
|
||||
* information prior to this call.
|
||||
*
|
||||
* @param cell points to the physical layer cell parameters
|
||||
* @param sf points to the subframe configuration
|
||||
* @param ack_info is the HARQ-ACK information
|
||||
* @param uci_cfg the UCI configuration destination
|
||||
*/
|
||||
SRSLTE_API void srslte_enb_dl_gen_ack(const srslte_cell_t* cell,
|
||||
const srslte_dl_sf_cfg_t* sf,
|
||||
const srslte_pdsch_ack_t* ack_info,
|
||||
srslte_uci_cfg_t* uci_cfg);
|
||||
|
||||
/**
|
||||
* gets the HARQ-ACK values from the received Uplink Control Information configuration, the cell, and HARQ ACK
|
||||
* info itself. Note that it expects that the HARQ-ACK info has been set prior the UCI Data decoding.
|
||||
*
|
||||
* @param cell points to the physical layer cell parameters
|
||||
* @param uci_cfg points to the UCI configration
|
||||
* @param uci_value points to the received UCI values
|
||||
* @param ack_info is the HARQ-ACK information
|
||||
*/
|
||||
SRSLTE_API void srslte_enb_dl_get_ack(const srslte_cell_t* cell,
|
||||
const srslte_uci_cfg_t* uci_cfg,
|
||||
const srslte_uci_value_t* uci_value,
|
||||
srslte_pdsch_ack_t* pdsch_ack);
|
||||
|
||||
/**
|
||||
* Gets the maximum signal power in decibels full scale. It is equivalent to the transmit power if all resource elements
|
||||
* were populated.
|
||||
* @return The maximum power
|
||||
*/
|
||||
SRSLTE_API float srslte_enb_dl_get_maximum_signal_power_dBfs(uint32_t nof_prb);
|
||||
|
||||
#endif // SRSLTE_ENB_DL_H
|
@ -1,76 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SRSLTE_ENB_DL_NR_H
|
||||
#define SRSLTE_ENB_DL_NR_H
|
||||
|
||||
#include "srslte/phy/common/phy_common_nr.h"
|
||||
#include "srslte/phy/dft/ofdm.h"
|
||||
#include "srslte/phy/phch/pdcch_nr.h"
|
||||
#include "srslte/phy/phch/pdsch_nr.h"
|
||||
|
||||
typedef struct SRSLTE_API {
|
||||
srslte_pdsch_nr_args_t pdsch;
|
||||
srslte_pdcch_nr_args_t pdcch;
|
||||
uint32_t nof_tx_antennas;
|
||||
uint32_t nof_max_prb;
|
||||
} srslte_enb_dl_nr_args_t;
|
||||
|
||||
typedef struct SRSLTE_API {
|
||||
uint32_t max_prb;
|
||||
uint32_t nof_tx_antennas;
|
||||
srslte_carrier_nr_t carrier;
|
||||
srslte_coreset_t coreset;
|
||||
|
||||
srslte_ofdm_t fft[SRSLTE_MAX_PORTS];
|
||||
|
||||
cf_t* sf_symbols[SRSLTE_MAX_PORTS];
|
||||
srslte_pdsch_nr_t pdsch;
|
||||
srslte_dmrs_sch_t dmrs;
|
||||
|
||||
srslte_pdcch_nr_t pdcch;
|
||||
} srslte_enb_dl_nr_t;
|
||||
|
||||
SRSLTE_API int
|
||||
srslte_enb_dl_nr_init(srslte_enb_dl_nr_t* q, cf_t* output[SRSLTE_MAX_PORTS], const srslte_enb_dl_nr_args_t* args);
|
||||
|
||||
SRSLTE_API int srslte_enb_dl_nr_set_carrier(srslte_enb_dl_nr_t* q, const srslte_carrier_nr_t* carrier);
|
||||
|
||||
SRSLTE_API int srslte_enb_dl_nr_set_coreset(srslte_enb_dl_nr_t* q, const srslte_coreset_t* coreset);
|
||||
|
||||
SRSLTE_API void srslte_enb_dl_nr_free(srslte_enb_dl_nr_t* q);
|
||||
|
||||
SRSLTE_API int srslte_enb_dl_nr_base_zero(srslte_enb_dl_nr_t* q);
|
||||
|
||||
SRSLTE_API void srslte_enb_dl_nr_gen_signal(srslte_enb_dl_nr_t* q);
|
||||
|
||||
SRSLTE_API int
|
||||
srslte_enb_dl_nr_pdcch_put(srslte_enb_dl_nr_t* q, const srslte_slot_cfg_t* slot_cfg, const srslte_dci_dl_nr_t* dci_dl);
|
||||
|
||||
SRSLTE_API int srslte_enb_dl_nr_pdsch_put(srslte_enb_dl_nr_t* q,
|
||||
const srslte_slot_cfg_t* slot,
|
||||
const srslte_sch_cfg_nr_t* cfg,
|
||||
uint8_t* data[SRSLTE_MAX_TB]);
|
||||
|
||||
SRSLTE_API int
|
||||
srslte_enb_dl_nr_pdsch_info(const srslte_enb_dl_nr_t* q, const srslte_sch_cfg_nr_t* cfg, char* str, uint32_t str_len);
|
||||
|
||||
#endif // SRSLTE_ENB_DL_NR_H
|
@ -1,87 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
/******************************************************************************
|
||||
* File: enb_ul.h
|
||||
*
|
||||
* Description: ENB uplink object.
|
||||
*
|
||||
* This module is a frontend to all the uplink data and control
|
||||
* channel processing modules for the ENB receiver side.
|
||||
*
|
||||
* Reference:
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef SRSLTE_ENB_UL_H
|
||||
#define SRSLTE_ENB_UL_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "srslte/phy/ch_estimation/chest_ul.h"
|
||||
#include "srslte/phy/common/phy_common.h"
|
||||
#include "srslte/phy/dft/ofdm.h"
|
||||
#include "srslte/phy/phch/prach.h"
|
||||
#include "srslte/phy/phch/pucch.h"
|
||||
#include "srslte/phy/phch/pusch.h"
|
||||
#include "srslte/phy/phch/pusch_cfg.h"
|
||||
#include "srslte/phy/phch/ra.h"
|
||||
|
||||
#include "srslte/phy/utils/debug.h"
|
||||
#include "srslte/phy/utils/vector.h"
|
||||
|
||||
#include "srslte/config.h"
|
||||
|
||||
typedef struct SRSLTE_API {
|
||||
srslte_cell_t cell;
|
||||
|
||||
cf_t* sf_symbols;
|
||||
srslte_chest_ul_res_t chest_res;
|
||||
|
||||
srslte_ofdm_t fft;
|
||||
srslte_chest_ul_t chest;
|
||||
srslte_pusch_t pusch;
|
||||
srslte_pucch_t pucch;
|
||||
|
||||
} srslte_enb_ul_t;
|
||||
|
||||
/* This function shall be called just after the initial synchronization */
|
||||
SRSLTE_API int srslte_enb_ul_init(srslte_enb_ul_t* q, cf_t* in_buffer, uint32_t max_prb);
|
||||
|
||||
SRSLTE_API void srslte_enb_ul_free(srslte_enb_ul_t* q);
|
||||
|
||||
SRSLTE_API int srslte_enb_ul_set_cell(srslte_enb_ul_t* q,
|
||||
srslte_cell_t cell,
|
||||
srslte_refsignal_dmrs_pusch_cfg_t* pusch_cfg,
|
||||
srslte_refsignal_srs_cfg_t* srs_cfg);
|
||||
|
||||
SRSLTE_API void srslte_enb_ul_fft(srslte_enb_ul_t* q);
|
||||
|
||||
SRSLTE_API int srslte_enb_ul_get_pucch(srslte_enb_ul_t* q,
|
||||
srslte_ul_sf_cfg_t* ul_sf,
|
||||
srslte_pucch_cfg_t* cfg,
|
||||
srslte_pucch_res_t* res);
|
||||
|
||||
SRSLTE_API int srslte_enb_ul_get_pusch(srslte_enb_ul_t* q,
|
||||
srslte_ul_sf_cfg_t* ul_sf,
|
||||
srslte_pusch_cfg_t* cfg,
|
||||
srslte_pusch_res_t* res);
|
||||
|
||||
#endif // SRSLTE_ENB_UL_H
|
@ -1,47 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
/**********************************************************************************************
|
||||
* File: convcoder.h
|
||||
*
|
||||
* Description: Convolutional encoder.
|
||||
* LTE uses a tail biting convolutional code with constraint length 7
|
||||
* and coding rate 1/3.
|
||||
*
|
||||
* Reference: 3GPP TS 36.212 version 10.0.0 Release 10 Sec. 5.1.3.1
|
||||
*********************************************************************************************/
|
||||
|
||||
#ifndef SRSLTE_CONVCODER_H
|
||||
#define SRSLTE_CONVCODER_H
|
||||
|
||||
#include "srslte/config.h"
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef struct SRSLTE_API {
|
||||
uint32_t R;
|
||||
uint32_t K;
|
||||
int poly[3];
|
||||
bool tail_biting;
|
||||
} srslte_convcoder_t;
|
||||
|
||||
SRSLTE_API int srslte_convcoder_encode(srslte_convcoder_t* q, uint8_t* input, uint8_t* output, uint32_t frame_length);
|
||||
|
||||
#endif // SRSLTE_CONVCODER_H
|
@ -1,51 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
/**********************************************************************************************
|
||||
* File: rm_conv.h
|
||||
*
|
||||
* Description: Rate matching for convolutionally coded transport channels and control
|
||||
* information.
|
||||
*
|
||||
* Reference: 3GPP TS 36.212 version 10.0.0 Release 10 Sec. 5.1.4.2
|
||||
*********************************************************************************************/
|
||||
|
||||
#ifndef SRSLTE_RM_CONV_H
|
||||
#define SRSLTE_RM_CONV_H
|
||||
|
||||
#include "srslte/config.h"
|
||||
|
||||
#ifndef SRSLTE_RX_NULL
|
||||
#define SRSLTE_RX_NULL 10000
|
||||
#endif
|
||||
|
||||
#ifndef SRSLTE_TX_NULL
|
||||
#define SRSLTE_TX_NULL 100
|
||||
#endif
|
||||
SRSLTE_API int srslte_rm_conv_tx(uint8_t* input, uint32_t in_len, uint8_t* output, uint32_t out_len);
|
||||
|
||||
SRSLTE_API int srslte_rm_conv_rx(float* input, uint32_t in_len, float* output, uint32_t out_len);
|
||||
|
||||
/************* FIX THIS. MOVE ALL PROCESSING TO INT16 AND HAVE ONLY 1 IMPLEMENTATION ******/
|
||||
|
||||
SRSLTE_API int srslte_rm_conv_rx_s(int16_t* input, uint32_t in_len, int16_t* output, uint32_t out_len);
|
||||
|
||||
#endif // SRSLTE_RM_CONV_H
|
@ -1,85 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
/**********************************************************************************************
|
||||
* File: convcoder.h
|
||||
*
|
||||
* Description: Cyclic Redundancy Check
|
||||
* LTE requires CRC lengths 8, 16, 24A and 24B, each with it's own generator
|
||||
* polynomial.
|
||||
*
|
||||
* Reference: 3GPP TS 36.212 version 10.0.0 Release 10 Sec. 5.1.1
|
||||
*********************************************************************************************/
|
||||
|
||||
#ifndef SRSLTE_CRC_H
|
||||
#define SRSLTE_CRC_H
|
||||
|
||||
#include "srslte/config.h"
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct SRSLTE_API {
|
||||
uint64_t table[256];
|
||||
int polynom;
|
||||
int order;
|
||||
uint64_t crcinit;
|
||||
uint64_t crcmask;
|
||||
uint64_t crchighbit;
|
||||
uint32_t srslte_crc_out;
|
||||
} srslte_crc_t;
|
||||
|
||||
SRSLTE_API int srslte_crc_init(srslte_crc_t* h, uint32_t srslte_crc_poly, int srslte_crc_order);
|
||||
|
||||
SRSLTE_API int srslte_crc_set_init(srslte_crc_t* h, uint64_t init_value);
|
||||
|
||||
SRSLTE_API uint32_t srslte_crc_attach(srslte_crc_t* h, uint8_t* data, int len);
|
||||
|
||||
SRSLTE_API uint32_t srslte_crc_attach_byte(srslte_crc_t* h, uint8_t* data, int len);
|
||||
|
||||
static inline void srslte_crc_checksum_put_byte(srslte_crc_t* h, uint8_t byte)
|
||||
{
|
||||
|
||||
uint64_t crc = h->crcinit;
|
||||
|
||||
uint32_t idx;
|
||||
if (h->order > 8) {
|
||||
// For more than 8 bits
|
||||
uint32_t ord = h->order - 8U;
|
||||
idx = ((crc >> (ord)) & 0xffU) ^ byte;
|
||||
} else {
|
||||
// For 8 bits or less
|
||||
uint32_t ord = 8U - h->order;
|
||||
idx = ((crc << (ord)) & 0xffU) ^ byte;
|
||||
}
|
||||
|
||||
crc = (crc << 8U) ^ h->table[idx];
|
||||
h->crcinit = crc;
|
||||
}
|
||||
|
||||
static inline uint64_t srslte_crc_checksum_get(srslte_crc_t* h)
|
||||
{
|
||||
return (h->crcinit & h->crcmask);
|
||||
}
|
||||
|
||||
SRSLTE_API uint32_t srslte_crc_checksum_byte(srslte_crc_t* h, const uint8_t* data, int len);
|
||||
|
||||
SRSLTE_API uint32_t srslte_crc_checksum(srslte_crc_t* h, uint8_t* data, int len);
|
||||
|
||||
#endif // SRSLTE_CRC_H
|
@ -1,37 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \file ldpc_common.h
|
||||
* \brief Declaration of elements common to both the LDPC encoder and the LDPC decoder.
|
||||
* \author David Gregoratti
|
||||
* \date 2020
|
||||
*
|
||||
* \copyright Software Radio Systems Limited
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SRSLTE_LDPCCOMMON_H
|
||||
#define SRSLTE_LDPCCOMMON_H
|
||||
|
||||
#define FILLER_BIT 254 /*!< \brief Identifies a filler bit. */
|
||||
|
||||
#endif // SRSLTE_LDPCCOMMON_H
|
@ -1,100 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
/******************************************************************************
|
||||
* File: softbuffer.h
|
||||
*
|
||||
* Description: Buffer for RX and TX soft bits. This should be provided by MAC.
|
||||
* Provided here basically for the examples.
|
||||
*
|
||||
* Reference:
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef SRSLTE_SOFTBUFFER_H
|
||||
#define SRSLTE_SOFTBUFFER_H
|
||||
|
||||
#include "srslte/config.h"
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct SRSLTE_API {
|
||||
uint32_t max_cb;
|
||||
uint32_t max_cb_size;
|
||||
int16_t** buffer_f;
|
||||
uint8_t** data;
|
||||
bool* cb_crc;
|
||||
bool tb_crc;
|
||||
} srslte_softbuffer_rx_t;
|
||||
|
||||
typedef struct SRSLTE_API {
|
||||
uint32_t max_cb;
|
||||
uint32_t max_cb_size;
|
||||
uint8_t** buffer_b;
|
||||
} srslte_softbuffer_tx_t;
|
||||
|
||||
#define SOFTBUFFER_SIZE 18600
|
||||
|
||||
SRSLTE_API int srslte_softbuffer_rx_init(srslte_softbuffer_rx_t* q, uint32_t nof_prb);
|
||||
|
||||
/**
|
||||
* @brief Initialises Rx soft-buffer for a number of code blocks and their size
|
||||
* @param q The Rx soft-buffer pointer
|
||||
* @param max_cb The maximum number of code blocks to allocate
|
||||
* @param max_cb_size The code block size to allocate
|
||||
* @return It returns SRSLTE_SUCCESS if it allocates the soft-buffer succesfully, otherwise it returns SRSLTE_ERROR code
|
||||
*/
|
||||
SRSLTE_API int srslte_softbuffer_rx_init_guru(srslte_softbuffer_rx_t* q, uint32_t max_cb, uint32_t max_cb_size);
|
||||
|
||||
SRSLTE_API void srslte_softbuffer_rx_reset(srslte_softbuffer_rx_t* p);
|
||||
|
||||
SRSLTE_API void srslte_softbuffer_rx_reset_tbs(srslte_softbuffer_rx_t* q, uint32_t tbs);
|
||||
|
||||
SRSLTE_API void srslte_softbuffer_rx_reset_cb(srslte_softbuffer_rx_t* q, uint32_t nof_cb);
|
||||
|
||||
SRSLTE_API void srslte_softbuffer_rx_free(srslte_softbuffer_rx_t* p);
|
||||
|
||||
SRSLTE_API int srslte_softbuffer_tx_init(srslte_softbuffer_tx_t* q, uint32_t nof_prb);
|
||||
|
||||
/**
|
||||
* @brief Initialises Tx soft-buffer for a number of code blocks and their size
|
||||
* @param q The Tx soft-buffer pointer
|
||||
* @param max_cb The maximum number of code blocks to allocate
|
||||
* @param max_cb_size The code block size to allocate
|
||||
* @return It returns SRSLTE_SUCCESS if it allocates the soft-buffer succesfully, otherwise it returns SRSLTE_ERROR code
|
||||
*/
|
||||
SRSLTE_API int srslte_softbuffer_tx_init_guru(srslte_softbuffer_tx_t* q, uint32_t max_cb, uint32_t max_cb_size);
|
||||
|
||||
SRSLTE_API void srslte_softbuffer_tx_reset(srslte_softbuffer_tx_t* p);
|
||||
|
||||
SRSLTE_API void srslte_softbuffer_tx_reset_tbs(srslte_softbuffer_tx_t* q, uint32_t tbs);
|
||||
|
||||
SRSLTE_API void srslte_softbuffer_tx_reset_cb(srslte_softbuffer_tx_t* q, uint32_t nof_cb);
|
||||
|
||||
SRSLTE_API void srslte_softbuffer_tx_free(srslte_softbuffer_tx_t* p);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // SRSLTE_SOFTBUFFER_H
|
@ -1,50 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
/**********************************************************************************************
|
||||
* File: tc_interl.h
|
||||
*
|
||||
* Description: Turbo code interleaver.
|
||||
*
|
||||
* Reference: 3GPP TS 36.212 version 10.0.0 Release 10 Sec. 5.1.3.2.3
|
||||
*********************************************************************************************/
|
||||
|
||||
#ifndef SRSLTE_TC_INTERL_H
|
||||
#define SRSLTE_TC_INTERL_H
|
||||
|
||||
#include "srslte/config.h"
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct SRSLTE_API {
|
||||
uint16_t* forward;
|
||||
uint16_t* reverse;
|
||||
uint32_t max_long_cb;
|
||||
} srslte_tc_interl_t;
|
||||
|
||||
SRSLTE_API int srslte_tc_interl_LTE_gen(srslte_tc_interl_t* h, uint32_t long_cb);
|
||||
|
||||
SRSLTE_API int srslte_tc_interl_LTE_gen_interl(srslte_tc_interl_t* h, uint32_t long_cb, uint32_t interl_win);
|
||||
|
||||
SRSLTE_API int srslte_tc_interl_init(srslte_tc_interl_t* h, uint32_t max_long_cb);
|
||||
|
||||
SRSLTE_API void srslte_tc_interl_free(srslte_tc_interl_t* h);
|
||||
|
||||
#endif // SRSLTE_TC_INTERL_H
|
@ -1,71 +0,0 @@
|
||||
/**
|
||||
* Copyright 2013-2021 Software Radio Systems Limited
|
||||
*
|
||||
* This file is part of srsLTE.
|
||||
*
|
||||
* srsLTE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* srsLTE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* A copy of the GNU Affero General Public License can be found in
|
||||
* the LICENSE file in the top-level directory of this distribution
|
||||
* and at http://www.gnu.org/licenses/.
|
||||
*
|
||||
*/
|
||||
|
||||
/**********************************************************************************************
|
||||
* File: turbocoder.h
|
||||
*
|
||||
* Description: Turbo coder.
|
||||
* Parallel Concatenated Convolutional Code (PCCC) with two 8-state constituent
|
||||
* encoders and one turbo code internal interleaver. The coding rate of turbo
|
||||
* encoder is 1/3.
|
||||
*
|
||||
* Reference: 3GPP TS 36.212 version 10.0.0 Release 10 Sec. 5.1.3.2
|
||||
*********************************************************************************************/
|
||||
|
||||
#ifndef SRSLTE_TURBOCODER_H
|
||||
#define SRSLTE_TURBOCODER_H
|
||||
|
||||
#include "srslte/config.h"
|
||||
#include "srslte/phy/fec/crc.h"
|
||||
#include "srslte/phy/fec/turbo/tc_interl.h"
|
||||
#define SRSLTE_TCOD_MAX_LEN_CB_BYTES (6144 / 8)
|
||||
|
||||
#ifndef SRSLTE_TX_NULL
|
||||
#define SRSLTE_TX_NULL 100
|
||||
#endif
|
||||
|
||||
typedef struct SRSLTE_API {
|
||||
uint32_t max_long_cb;
|
||||
uint8_t* temp;
|
||||
} srslte_tcod_t;
|
||||
|
||||
/* This structure is used as an output for the LUT version of the encoder.
|
||||
* The encoder produces parity bits only and rate matching will interleave them
|
||||
* with the systematic bits
|
||||
*/
|
||||
|
||||
SRSLTE_API int srslte_tcod_init(srslte_tcod_t* h, uint32_t max_long_cb);
|
||||
|
||||
SRSLTE_API void srslte_tcod_free(srslte_tcod_t* h);
|
||||
|
||||
SRSLTE_API int srslte_tcod_encode(srslte_tcod_t* h, uint8_t* input, uint8_t* output, uint32_t long_cb);
|
||||
|
||||
SRSLTE_API int srslte_tcod_encode_lut(srslte_tcod_t* h,
|
||||
srslte_crc_t* crc_tb,
|
||||
srslte_crc_t* crc_cb,
|
||||
uint8_t* input,
|
||||
uint8_t* parity,
|
||||
uint32_t cblen_idx,
|
||||
bool last_cb);
|
||||
|
||||
SRSLTE_API void srslte_tcod_gentable();
|
||||
|
||||
#endif // SRSLTE_TURBOCODER_H
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue