AssertFatal(fp->ul_CarrierFreq==(fp->dl_CarrierFreq+dlul_offset),"Disagreement in uplink frequency for band %d: ul_CarrierFreq = %lu Hz vs expected %lu Hz\n",fp->nr_band,fp->ul_CarrierFreq,fp->dl_CarrierFreq+dlul_offset);
LOG_I(PHY,"DL frequency %lu Hz, UL frequency %lu Hz: band %d, uldl offset %d Hz\n",fp->dl_CarrierFreq,fp->ul_CarrierFreq,fp->nr_band,dlul_offset);
LOG_I(PHY,"Initializing frame parms: DL frequency %lu Hz, UL frequency %lu Hz: band %d, uldl offset %d Hz\n",fp->dl_CarrierFreq,fp->ul_CarrierFreq,fp->nr_band,uplink_frequency_offset);
AssertFatal(fp->frame_type==config->cell_config.frame_duplex_type,"Invalid duplex type in config request file for band %d\n",fp->nr_band);
AssertFatal(fp->frame_type==config->cell_config.frame_duplex_type,"Invalid duplex type in config request file for band %d\n",fp->nr_band);
AssertFatal(fp->ul_CarrierFreq==(fp->dl_CarrierFreq+uplink_frequency_offset),"Disagreement in uplink frequency for band %d\n",fp->nr_band);
AssertFatal(fp->ul_CarrierFreq==(fp->dl_CarrierFreq+uplink_frequency_offset),"Disagreement in uplink frequency for band %d: ul_CarrierFreq = %lu Hz vs expected %lu Hz\n",fp->nr_band,fp->ul_CarrierFreq,fp->dl_CarrierFreq+uplink_frequency_offset);
#if DISABLE_LOG_X
#if DISABLE_LOG_X
printf("Initializing UE frame parms for mu %d, N_RB %d, Ncp %d\n",fp->numerology_index,fp->N_RB_DL,Ncp);
printf("Initializing UE frame parms for mu %d, N_RB %d, Ncp %d\n",fp->numerology_index,fp->N_RB_DL,Ncp);
...
@@ -365,11 +383,6 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp,
...
@@ -365,11 +383,6 @@ int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *fp,
AssertFatal(0==1,"Band %d is a supplementary band (%d). This is not supported yet.\n",nr_bandP,supplementary_bands[j]);
}
LOG_I(PHY,"Scanning band %d, dl_min %"PRIu64", ul_min %"PRIu64"\n",nr_bandtable[ind].band,nr_bandtable[ind].dl_min,nr_bandtable[ind].ul_min);
AssertFatal(nr_bandP<=nr_bandtable[NR_BANDTABLE_SIZE-1].band,"NR band %d exceeds NR bands table maximum limit %d\n",nr_bandP,nr_bandtable[NR_BANDTABLE_SIZE-1].band);
//const uint16_t n_RB_DLBWP = dl_config->dl_config_list[dl_config->number_pdus].dci_config_pdu.dci_config_rel15.N_RB_BWP; //make sure this has been set
//const uint16_t n_RB_DLBWP = dl_config->dl_config_list[dl_config->number_pdus].dci_config_pdu.dci_config_rel15.N_RB_BWP; //make sure this has been set
AssertFatal(mac->DLbwp[0]!=NULL,"DLbwp[0] should not be zero here!\n");
AssertFatal(mac->DLbwp[0]!=NULL,"DLbwp[0] should not be zero here!\n");
...
@@ -3134,6 +3166,28 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, dc
...
@@ -3134,6 +3166,28 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, dc
* 49 PADDING_NR_DCI: (Note 2) If DCI format 0_0 is monitored in common search space
* 49 PADDING_NR_DCI: (Note 2) If DCI format 0_0 is monitored in common search space
* 50 SUL_IND_0_0:
* 50 SUL_IND_0_0:
*/
*/
// Calculate the slot in which ULSCH should be scheduled. This is current slot + K2,
// where K2 is the offset between the slot in which UL DCI is received and the slot
// in which ULSCH should be scheduled. K2 is configured in RRC configuration.
// Get the numerology to calculate the Tx frame and slot
@@ -3172,7 +3226,10 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, dc
...
@@ -3172,7 +3226,10 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, dc
}
}
/* SUL_IND_0_0 */// To be implemented, FIXME!!!
/* SUL_IND_0_0 */// To be implemented, FIXME!!!
ul_config->slot=slot_tx;
ul_config->sfn=frame_tx;
ul_config->number_pdus=ul_config->number_pdus+1;
ul_config->number_pdus=ul_config->number_pdus+1;
LOG_D(MAC,"nr_ue_process_dci(): Calculated frame and slot for pusch Tx: %d.%d, number of pdus %d\n",ul_config->sfn,ul_config->slot,ul_config->number_pdus);
break;
break;
caseNR_UL_DCI_FORMAT_0_1:
caseNR_UL_DCI_FORMAT_0_1:
...
@@ -3204,6 +3261,28 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, dc
...
@@ -3204,6 +3261,28 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, dc
* 48 UL_SCH_IND
* 48 UL_SCH_IND
* 49 PADDING_NR_DCI: (Note 2) If DCI format 0_0 is monitored in common search space
* 49 PADDING_NR_DCI: (Note 2) If DCI format 0_0 is monitored in common search space
*/
*/
// Calculate the slot in which ULSCH should be scheduled. This is current slot + K2,
// where K2 is the offset between the slot in which UL DCI is received and the slot
// in which ULSCH should be scheduled. K2 is configured in RRC configuration.
// Get the numerology to calculate the Tx frame and slot
@@ -3497,8 +3583,11 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, dc
...
@@ -3497,8 +3583,11 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, dc
/* UL_SCH_IND */
/* UL_SCH_IND */
// A value of "1" indicates UL-SCH shall be transmitted on the PUSCH and
// A value of "1" indicates UL-SCH shall be transmitted on the PUSCH and
// a value of "0" indicates UL-SCH shall not be transmitted on the PUSCH
// a value of "0" indicates UL-SCH shall not be transmitted on the PUSCH
ul_config->slot=slot_tx;
ul_config->sfn=frame_tx;
ul_config->number_pdus=ul_config->number_pdus+1;
ul_config->number_pdus=ul_config->number_pdus+1;
LOG_D(MAC,"nr_ue_process_dci(): Calculated frame and slot for pusch Tx: %d.%d, number of pdus %d\n",ul_config->sfn,ul_config->slot,ul_config->number_pdus);