Skip to content

Commit

Permalink
parameterize dci decoder on bwp id test
Browse files Browse the repository at this point in the history
  • Loading branch information
XuyangCaoPrinceton committed Jul 24, 2024
1 parent c9b0983 commit 1a38a77
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
build/

.vscode/
.vscode/

.DS_Store
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion nrscope/hdr/dci_decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ class DCIDecoder{
srsran_coreset_t coreset0_t;
srsran_search_space_t* search_space;

// pdcch for non-0 bwps
std::vector<srsran_pdcch_cfg_nr_t> 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;
Expand Down Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion nrscope/src/libs/dci_decoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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_;
Expand Down
7 changes: 5 additions & 2 deletions nrscope/src/libs/radio_nr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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 <std::thread> dci_threads;
Expand Down

0 comments on commit 1a38a77

Please sign in to comment.