diff --git a/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface.h b/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface.h index 17bd564f2f..eb953b2c34 100644 --- a/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface.h +++ b/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface.h @@ -305,7 +305,7 @@ typedef struct { nfapi_tl_t tl; uint8_t format_indicator; //1 bit -uint16_t frequency_domain_assignment; //up to 9 bits +uint16_t frequency_domain_assignment; //up to 16 bits uint8_t time_domain_assignment; // 4 bits uint8_t frequency_hopping_flag; //1 bit diff --git a/openair1/PHY/NR_TRANSPORT/nr_dci.c b/openair1/PHY/NR_TRANSPORT/nr_dci.c index fad9cd3a18..ddf21d062d 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dci.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dci.c @@ -32,8 +32,8 @@ #include "nr_dci.h" -#define DEBUG_PDCCH_DMRS -#define DEBUG_DCI +//#define DEBUG_PDCCH_DMRS +//#define DEBUG_DCI extern short nr_mod_table[NR_MOD_TABLE_SIZE_SHORT]; diff --git a/openair1/PHY/NR_TRANSPORT/nr_dci_tools.c b/openair1/PHY/NR_TRANSPORT/nr_dci_tools.c index c34428b6b0..a47f32d6e0 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dci_tools.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dci_tools.c @@ -42,6 +42,7 @@ void nr_fill_dci_and_dlsch(PHY_VARS_gNB *gNB, { NR_DL_FRAME_PARMS *fp = &gNB->frame_parms; uint32_t *dci_pdu = dci_alloc->dci_pdu; + memset((void*)dci_pdu,0,4*sizeof(uint32_t)); nfapi_nr_dl_config_dci_dl_pdu_rel15_t *pdu_rel15 = &pdu->dci_dl_pdu.dci_dl_pdu_rel15; nfapi_nr_dl_config_pdcch_parameters_rel15_t *params_rel15 = &pdu->dci_dl_pdu.pdcch_params_rel15; nfapi_nr_config_request_t *cfg = &gNB->gNB_config; @@ -58,22 +59,22 @@ void nr_fill_dci_and_dlsch(PHY_VARS_gNB *gNB, // Freq domain assignment fsize = (int)ceil( log2( (N_RB*(N_RB+1))>>1 ) ); for (int i=0; ifrequency_domain_assignment>>(fsize-i))&1)<frequency_domain_assignment>>(fsize-i-1))&1)<time_domain_assignment>>(3-i))&1)<<(pos+i); + pos += 4; // VRB to PRB mapping *dci_pdu |= (pdu_rel15->vrb_to_prb_mapping&1)<time_domain_assignment>>(4-i))&1)<<(pos+i); - pos += 4; //MCS for (int i=0; i<5; i++) - *dci_pdu |= ((pdu_rel15->mcs>>(5-i))&1)<<(pos+i); + *dci_pdu |= ((pdu_rel15->mcs>>(4-i))&1)<<(pos+i); pos += 5; // TB scaling for (int i=0; i<2; i++) - *dci_pdu |= ((pdu_rel15->tb_scaling>>(2-i))&1)<<(pos+i); + *dci_pdu |= ((pdu_rel15->tb_scaling>>(1-i))&1)<<(pos+i); break; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c index 6c65066a2e..1868d987a4 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c @@ -73,11 +73,13 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP, pdu_rel15->frequency_domain_assignment = 5; pdu_rel15->time_domain_assignment = 2; pdu_rel15->vrb_to_prb_mapping = 0; + pdu_rel15->mcs = 12; pdu_rel15->tb_scaling = 1; - LOG_I(MAC, "[gNB scheduler phytest] DCI type 1 payload: freq_alloc %d, time_alloc %d, vrb to prb %d, tb_scaling %d\n", + LOG_I(MAC, "[gNB scheduler phytest] DCI type 1 payload: freq_alloc %d, time_alloc %d, vrb to prb %d, mcs %d tb_scaling %d\n", pdu_rel15->frequency_domain_assignment, pdu_rel15->time_domain_assignment, pdu_rel15->vrb_to_prb_mapping, + pdu_rel15->mcs, pdu_rel15->tb_scaling); params_rel15->rnti = 0x03;