changes in ta procedure at gnb, to be tested with the phone
This commit is contained in:
@@ -514,20 +514,15 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
|||||||
} else
|
} else
|
||||||
UE_list->fiveG_connected[UE_id] = true;
|
UE_list->fiveG_connected[UE_id] = true;
|
||||||
|
|
||||||
if (get_softmodem_params()->phy_test) {
|
if (UE_list->fiveG_connected[UE_id]) {
|
||||||
|
|
||||||
// TbD once RACH is available, start ta_timer when UE is connected
|
// TbD once RACH is available, start ta_timer when UE is connected
|
||||||
if (ue_sched_ctl->ta_timer)
|
if (ue_sched_ctl->ta_timer)
|
||||||
ue_sched_ctl->ta_timer--;
|
ue_sched_ctl->ta_timer--;
|
||||||
if (ue_sched_ctl->ta_timer == 0) {
|
if (ue_sched_ctl->ta_timer == 0) {
|
||||||
gNB->ta_command = ue_sched_ctl->ta_update;
|
ue_sched_ctl->ta_apply = true;
|
||||||
/* if time is up, then set the timer to not send it for 5 frames
|
/* if time is up, then set the timer to not send it for 5 frames
|
||||||
// regardless of the TA value */
|
// regardless of the TA value */
|
||||||
ue_sched_ctl->ta_timer = 100;
|
ue_sched_ctl->ta_timer = 100;
|
||||||
/* reset ta_update */
|
|
||||||
ue_sched_ctl->ta_update = 31;
|
|
||||||
/* MAC CE flag indicating TA length */
|
|
||||||
gNB->ta_len = 2;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -542,8 +537,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
|||||||
ue_sched_ctl->current_harq_pid = slot % num_slots_per_tdd;
|
ue_sched_ctl->current_harq_pid = slot % num_slots_per_tdd;
|
||||||
nr_update_pucch_scheduling(module_idP, UE_id, frame, slot, num_slots_per_tdd,&pucch_sched);
|
nr_update_pucch_scheduling(module_idP, UE_id, frame, slot, num_slots_per_tdd,&pucch_sched);
|
||||||
nr_schedule_uss_dlsch_phytest(module_idP, frame, slot, &UE_list->UE_sched_ctrl[UE_id].sched_pucch[pucch_sched], NULL);
|
nr_schedule_uss_dlsch_phytest(module_idP, frame, slot, &UE_list->UE_sched_ctrl[UE_id].sched_pucch[pucch_sched], NULL);
|
||||||
// resetting ta flag
|
ue_sched_ctl->ta_apply = false;
|
||||||
gNB->ta_len = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (UE_list->fiveG_connected[UE_id])
|
if (UE_list->fiveG_connected[UE_id])
|
||||||
|
|||||||
@@ -94,13 +94,13 @@ int nr_generate_dlsch_pdu(module_id_t module_idP,
|
|||||||
// now TA is always send when ta_timer resets regardless of its value
|
// now TA is always send when ta_timer resets regardless of its value
|
||||||
// this is done to avoid issues with the timeAlignmentTimer which is
|
// this is done to avoid issues with the timeAlignmentTimer which is
|
||||||
// supposed to monitor if the UE received TA or not */
|
// supposed to monitor if the UE received TA or not */
|
||||||
if (gNB->ta_len) {
|
if (ue_sched_ctl->ta_apply) {
|
||||||
mac_pdu_ptr->R = 0;
|
mac_pdu_ptr->R = 0;
|
||||||
mac_pdu_ptr->LCID = DL_SCH_LCID_TA_COMMAND;
|
mac_pdu_ptr->LCID = DL_SCH_LCID_TA_COMMAND;
|
||||||
//last_size = 1;
|
//last_size = 1;
|
||||||
mac_pdu_ptr++;
|
mac_pdu_ptr++;
|
||||||
// TA MAC CE (1 octet)
|
// TA MAC CE (1 octet)
|
||||||
timing_advance_cmd = gNB->ta_command;
|
timing_advance_cmd = ue_sched_ctl->ta_update;
|
||||||
AssertFatal(timing_advance_cmd < 64, "timing_advance_cmd %d > 63\n", timing_advance_cmd);
|
AssertFatal(timing_advance_cmd < 64, "timing_advance_cmd %d > 63\n", timing_advance_cmd);
|
||||||
((NR_MAC_CE_TA *) ce_ptr)->TA_COMMAND = timing_advance_cmd; //(timing_advance_cmd+31)&0x3f;
|
((NR_MAC_CE_TA *) ce_ptr)->TA_COMMAND = timing_advance_cmd; //(timing_advance_cmd+31)&0x3f;
|
||||||
|
|
||||||
|
|||||||
@@ -596,7 +596,7 @@ void nr_schedule_uss_dlsch_phytest(module_id_t module_idP,
|
|||||||
|
|
||||||
LOG_D(MAC, "In nr_schedule_uss_dlsch_phytest frame %d slot %d\n",frameP,slotP);
|
LOG_D(MAC, "In nr_schedule_uss_dlsch_phytest frame %d slot %d\n",frameP,slotP);
|
||||||
|
|
||||||
int post_padding = 0, ta_len = 0, header_length_total = 0, sdu_length_total = 0, num_sdus = 0;
|
int post_padding = 0, header_length_total = 0, sdu_length_total = 0, num_sdus = 0;
|
||||||
int lcid, offset, i, header_length_last, TBS_bytes = 0;
|
int lcid, offset, i, header_length_last, TBS_bytes = 0;
|
||||||
int UE_id = 0, CC_id = 0;
|
int UE_id = 0, CC_id = 0;
|
||||||
|
|
||||||
@@ -615,12 +615,13 @@ void nr_schedule_uss_dlsch_phytest(module_id_t module_idP,
|
|||||||
unsigned char sdu_lcids[NB_RB_MAX] = {0};
|
unsigned char sdu_lcids[NB_RB_MAX] = {0};
|
||||||
uint16_t sdu_lengths[NB_RB_MAX] = {0};
|
uint16_t sdu_lengths[NB_RB_MAX] = {0};
|
||||||
uint16_t rnti = UE_list->rnti[UE_id];
|
uint16_t rnti = UE_list->rnti[UE_id];
|
||||||
|
NR_UE_sched_ctrl_t *ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id];
|
||||||
|
|
||||||
uint8_t mac_sdus[MAX_NR_DLSCH_PAYLOAD_BYTES];
|
uint8_t mac_sdus[MAX_NR_DLSCH_PAYLOAD_BYTES];
|
||||||
|
|
||||||
LOG_D(MAC, "Scheduling UE specific search space DCI type 1\n");
|
LOG_D(MAC, "Scheduling UE specific search space DCI type 1\n");
|
||||||
|
|
||||||
ta_len = gNB_mac->ta_len;
|
int ta_len = (ue_sched_ctl->ta_apply)?2:0;
|
||||||
|
|
||||||
TBS_bytes = configure_fapi_dl_pdu(module_idP,
|
TBS_bytes = configure_fapi_dl_pdu(module_idP,
|
||||||
dl_req,
|
dl_req,
|
||||||
|
|||||||
@@ -289,6 +289,7 @@ typedef struct {
|
|||||||
NR_sched_pusch *sched_pusch;
|
NR_sched_pusch *sched_pusch;
|
||||||
uint16_t ta_timer;
|
uint16_t ta_timer;
|
||||||
int16_t ta_update;
|
int16_t ta_update;
|
||||||
|
bool ta_apply;
|
||||||
uint8_t tpc0;
|
uint8_t tpc0;
|
||||||
uint8_t tpc1;
|
uint8_t tpc1;
|
||||||
uint16_t ul_rssi;
|
uint16_t ul_rssi;
|
||||||
@@ -353,10 +354,6 @@ typedef struct gNB_MAC_INST_s {
|
|||||||
int pusch_target_snrx10;
|
int pusch_target_snrx10;
|
||||||
/// Pucch target SNR
|
/// Pucch target SNR
|
||||||
int pucch_target_snrx10;
|
int pucch_target_snrx10;
|
||||||
/// TA command
|
|
||||||
int ta_command;
|
|
||||||
/// MAC CE flag indicating TA length
|
|
||||||
int ta_len;
|
|
||||||
/// Common cell resources
|
/// Common cell resources
|
||||||
NR_COMMON_channels_t common_channels[NFAPI_CC_MAX];
|
NR_COMMON_channels_t common_channels[NFAPI_CC_MAX];
|
||||||
/// current PDU index (BCH,DLSCH)
|
/// current PDU index (BCH,DLSCH)
|
||||||
|
|||||||
Reference in New Issue
Block a user