From 1a38a7736ef8e40ef3ae0098559b3c11386a5f1c Mon Sep 17 00:00:00 2001 From: Xuyang Cao Date: Wed, 24 Jul 2024 14:24:59 -0400 Subject: [PATCH] parameterize dci decoder on bwp id test --- .gitignore | 4 +++- Dockerfile | 3 ++- nrscope/hdr/dci_decoder.h | 6 +++++- nrscope/src/libs/dci_decoder.cc | 3 ++- nrscope/src/libs/radio_nr.cc | 7 +++++-- 5 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 1de8a47a..a12806b9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ build/ -.vscode/ \ No newline at end of file +.vscode/ + +.DS_Store \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 2a867352..5b51de20 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,8 @@ RUN apt-get install -y software-properties-common RUN add-apt-repository ppa:ettusresearch/uhd RUN apt-get update -RUN apt-get install -y libuhd-dev uhd-host +RUN apt-get install -y libuhd-dev=4.1.0.5-3 +RUN apt-get install -y uhd-host=4.1.0.5-3 RUN apt-get install -y build-essential cmake libfftw3-dev libmbedtls-dev libboost-program-options-dev libconfig++-dev libsctp-dev RUN apt-get install -y git diff --git a/nrscope/hdr/dci_decoder.h b/nrscope/hdr/dci_decoder.h index d4dbce35..c5f0efdc 100644 --- a/nrscope/hdr/dci_decoder.h +++ b/nrscope/hdr/dci_decoder.h @@ -19,6 +19,9 @@ class DCIDecoder{ srsran_coreset_t coreset0_t; srsran_search_space_t* search_space; + // pdcch for non-0 bwps + std::vector more_bwp_pdcch_cfgs; + asn1::rrc_nr::sib1_s sib1; asn1::rrc_nr::cell_group_cfg_s master_cell_group; asn1::rrc_nr::rrc_setup_s rrc_setup; @@ -54,7 +57,8 @@ class DCIDecoder{ int dci_decoder_and_reception_init(srsran_ue_dl_nr_sratescs_info arg_scs_, TaskSchedulerNRScope* task_scheduler_nrscope, - cf_t* input[SRSRAN_MAX_PORTS]); + cf_t* input[SRSRAN_MAX_PORTS], + u_int8_t bwp_id); int decode_and_parse_dci_from_slot(srsran_slot_cfg_t* slot, TaskSchedulerNRScope* task_scheduler_nrscope); diff --git a/nrscope/src/libs/dci_decoder.cc b/nrscope/src/libs/dci_decoder.cc index f491a43c..03a4abdc 100644 --- a/nrscope/src/libs/dci_decoder.cc +++ b/nrscope/src/libs/dci_decoder.cc @@ -16,7 +16,8 @@ DCIDecoder::~DCIDecoder(){ int DCIDecoder::dci_decoder_and_reception_init(srsran_ue_dl_nr_sratescs_info arg_scs_, TaskSchedulerNRScope* task_scheduler_nrscope, - cf_t* input[SRSRAN_MAX_PORTS]){ + cf_t* input[SRSRAN_MAX_PORTS], + u_int8_t bwp_id){ memcpy(&base_carrier, &task_scheduler_nrscope->args_t.base_carrier, sizeof(srsran_carrier_nr_t)); arg_scs = arg_scs_; diff --git a/nrscope/src/libs/radio_nr.cc b/nrscope/src/libs/radio_nr.cc index c9d476a4..e6932b88 100644 --- a/nrscope/src/libs/radio_nr.cc +++ b/nrscope/src/libs/radio_nr.cc @@ -524,7 +524,7 @@ int Radio::RadioCapture(){ for(uint32_t i = 0; i < nof_threads; i++){ DCIDecoder *decoder = new DCIDecoder(100); - if(decoder->dci_decoder_and_reception_init(arg_scs, &task_scheduler_nrscope, rf_buffer_t.to_cf_t()) < SRSASN_SUCCESS){ + if(decoder->dci_decoder_and_reception_init(arg_scs, &task_scheduler_nrscope, rf_buffer_t.to_cf_t(), i) < SRSASN_SUCCESS){ ERROR("DCIDecoder Init Error"); return NR_FAILURE; } @@ -542,7 +542,10 @@ int Radio::RadioCapture(){ task_scheduler_nrscope.dl_prb_bits_rate.resize(task_scheduler_nrscope.nof_known_rntis); task_scheduler_nrscope.ul_prb_bits_rate.resize(task_scheduler_nrscope.nof_known_rntis); - std::thread sibs_thread {&SIBsDecoder::decode_and_parse_sib1_from_slot, &sibs_decoder, &slot, &task_scheduler_nrscope}; + // To save computing resources for dci decoders: assume SIB1 info should be static + if (!task_scheduler_nrscope.sib1_found) { + std::thread sibs_thread {&SIBsDecoder::decode_and_parse_sib1_from_slot, &sibs_decoder, &slot, &task_scheduler_nrscope}; + } std::thread rach_thread {&RachDecoder::decode_and_parse_msg4_from_slot, &rach_decoder, &slot, &task_scheduler_nrscope}; std::vector dci_threads;