Fixing "Unexpected ULSCH HARQ PID" issue.
1. If VNF is slower than PNF, next scheduling will be done after resync. 2. If VNF is unstable in slot progress, next scheduling will be done in next stable status. 3. SFN/SLOT indications are queued in nrUE. 4. get_queue is used instead of unquque for FIFO operation.
This commit is contained in:
@@ -443,8 +443,7 @@ static void *gNB_L1_thread( void *param ) {
|
||||
if (gNB->CC_id==0) {
|
||||
int next_slot;
|
||||
next_slot = (slot_rx + 1) % 20;
|
||||
LOG_I(PHY, "Calling rxtx1\n");
|
||||
if (rxtx(gNB,frame_rx,next_slot,frame_tx,next_slot,thread_name) < 0) break;
|
||||
if (rxtx(gNB,(frame_rx + ((slot_rx + 1) % 20 == 0))%1024,next_slot,(frame_tx + ((slot_rx + 1) % 20 == 0)) % 1024,next_slot,thread_name) < 0) break;
|
||||
}
|
||||
if (wait_on_condition(&L1_proc->mutex,&L1_proc->cond,&L1_proc->instance_cnt,thread_name)<0) break;
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PROC_RXTX0, 1 );
|
||||
@@ -458,7 +457,6 @@ static void *gNB_L1_thread( void *param ) {
|
||||
if (oai_exit) break;
|
||||
|
||||
if (gNB->CC_id==0) {
|
||||
LOG_I(PHY, "Calling rxtx2\n");
|
||||
if (rxtx(gNB,frame_rx,slot_rx,frame_tx,slot_tx,thread_name) < 0) break;
|
||||
}
|
||||
|
||||
|
||||
+17
-2
@@ -224,12 +224,15 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
|
||||
reset_queue(&nr_rx_ind_queue);
|
||||
reset_queue(&nr_crc_ind_queue);
|
||||
reset_queue(&nr_uci_ind_queue);
|
||||
reset_queue(&nr_sfn_slot_queue);
|
||||
|
||||
NR_PRACH_RESOURCES_t prach_resources;
|
||||
memset(&prach_resources, 0, sizeof(prach_resources));
|
||||
NR_UL_TIME_ALIGNMENT_t ul_time_alignment;
|
||||
memset(&ul_time_alignment, 0, sizeof(ul_time_alignment));
|
||||
int last_sfn_slot = -1;
|
||||
uint16_t *sfn_slot_p;
|
||||
int sfn_slot;
|
||||
|
||||
while (!oai_exit)
|
||||
{
|
||||
@@ -238,8 +241,14 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
|
||||
LOG_E(NR_MAC, "sem_wait() error\n");
|
||||
abort();
|
||||
}
|
||||
sfn_slot_p = get_queue(&nr_sfn_slot_queue);
|
||||
if (sfn_slot_p == NULL)
|
||||
continue;
|
||||
|
||||
sfn_slot = *sfn_slot_p;
|
||||
LOG_D(NR_MAC, "We have successfully dequeued snf slot = %d.%d, qsize = %zu\n",
|
||||
NFAPI_SFNSLOT2SFN(sfn_slot), NFAPI_SFNSLOT2SLOT(sfn_slot), nr_sfn_slot_queue.num_items);
|
||||
|
||||
int sfn_slot = current_sfn_slot;
|
||||
if (sfn_slot == last_sfn_slot)
|
||||
{
|
||||
LOG_D(NR_MAC, "repeated sfn_sf = %d.%d\n",
|
||||
@@ -320,7 +329,7 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
|
||||
nfapi_nr_rach_indication_t *rach_ind = unqueue_matching(&nr_rach_ind_queue, MAX_QUEUE_SIZE, sfn_slot_matcher, &sfn_slot);
|
||||
nfapi_nr_rx_data_indication_t *rx_ind = unqueue_matching(&nr_rx_ind_queue, MAX_QUEUE_SIZE, sfn_slot_matcher, &sfn_slot);
|
||||
nfapi_nr_crc_indication_t *crc_ind = unqueue_matching(&nr_crc_ind_queue, MAX_QUEUE_SIZE, sfn_slot_matcher, &sfn_slot);
|
||||
|
||||
LOG_D(NR_MAC, "Checking queues with crc_ind = %p\n", crc_ind);
|
||||
if (rach_ind && rach_ind->number_of_pdus > 0)
|
||||
{
|
||||
NR_UL_IND_t UL_INFO = {
|
||||
@@ -347,9 +356,15 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
|
||||
NR_UL_IND_t UL_INFO = {
|
||||
.crc_ind = *crc_ind,
|
||||
};
|
||||
for (int j = 0; j < crc_ind->number_crcs; j++)
|
||||
{
|
||||
LOG_I(NR_PHY, "Sending crc_ind.harq_id = %d for %d index SFN SLot %u %u with rnti %x\n",
|
||||
crc_ind->crc_list[j].harq_id, j, crc_ind->sfn, crc_ind->slot, crc_ind->crc_list[j].rnti);
|
||||
}
|
||||
send_nsa_standalone_msg(&UL_INFO, crc_ind->header.message_id);
|
||||
free(crc_ind->crc_list);
|
||||
}
|
||||
LOG_D(NR_MAC, "Ready for handling next SFN SLOT\n");
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -251,6 +251,7 @@ extern void set_softmodem_sighandler(void);
|
||||
extern uint64_t downlink_frequency[MAX_NUM_CCs][4];
|
||||
extern int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
|
||||
extern uint8_t nfapi_mode;
|
||||
extern int16_t vnf_pnf_sfnslot_delta;
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user