Commit 912cba16 authored by Melissa Elkadi's avatar Melissa Elkadi

Enabled VNF timing adjustments.

Also ported in new gNB ulsch scheduler code from
Eurecom/develop branch.
parent 3da3b20c
......@@ -2024,8 +2024,8 @@ void vnf_nr_handle_timing_info(void *pRecvMsg, int recvMsgLen, vnf_p7_t* vnf_p7)
{
NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() LARGE SFN/SF DELTA between PNF and VNF delta:%d VNF:%d PNF:%d\n\n\n\n\n\n\n\n\n", __FUNCTION__, vnf_pnf_sfnslot_delta,NFAPI_SFNSLOT2DEC(vnf_p7->p7_connections[0].sfn,vnf_p7->p7_connections[0].slot),NFAPI_SFNSLOT2DEC(ind.last_sfn,ind.last_slot)) ;
// Panos: Careful here!!! Modification of the original nfapi-code
// vnf_p7->p7_connections[0].sfn = ind.last_sfn;
// vnf_p7->p7_connections[0].slot = ind.last_slot;
vnf_p7->p7_connections[0].sfn = ind.last_sfn;
vnf_p7->p7_connections[0].slot = ind.last_slot;
}
}
}
......
......@@ -372,6 +372,7 @@ typedef struct {
NR_SearchSpace_t *search_space_zero;
NR_ControlResourceSet_t *coreset0;
// Defined for abstracted mode
nr_downlink_indication_t dl_info;
} NR_UE_MAC_INST_t;
......
......@@ -720,8 +720,6 @@ void nr_schedule_ue_spec(module_id_t module_id,
int8_t current_harq_pid = sched_ctrl->dl_harq_pid;
if (current_harq_pid < 0) {
/* PP has not selected a specific HARQ Process, get a new one */
if (NFAPI_MODE == NFAPI_MODE_VNF)
sched_ctrl->available_dl_harq.head = 0;
current_harq_pid = sched_ctrl->available_dl_harq.head;
AssertFatal(current_harq_pid >= 0,
"no free HARQ process available for UE %d\n",
......@@ -738,9 +736,6 @@ void nr_schedule_ue_spec(module_id_t module_id,
remove_nr_list(&sched_ctrl->retrans_dl_harq, current_harq_pid);
}
NR_UE_harq_t *harq = &sched_ctrl->harq_processes[current_harq_pid];
if (NFAPI_MODE == NFAPI_MODE_VNF) {
harq->is_waiting = false;
}
DevAssert(!harq->is_waiting);
add_tail_nr_list(&sched_ctrl->feedback_dl_harq, current_harq_pid);
NR_sched_pucch_t *pucch = &sched_ctrl->sched_pucch[0];
......@@ -935,10 +930,6 @@ void nr_schedule_ue_spec(module_id_t module_id,
const int dci_format = f ? NR_DL_DCI_FORMAT_1_1 : NR_DL_DCI_FORMAT_1_0;
const int rnti_type = NR_RNTI_C;
if (NFAPI_MODE == NFAPI_MODE_VNF){
dci_payload.harq_pid = harq_pid;
dci_payload.tpc = 2;
}
fill_dci_pdu_rel15(scc,
UE_info->secondaryCellGroup[UE_id],
dci_pdu,
......
......@@ -963,15 +963,9 @@ void nr_schedule_ulsch(module_id_t module_id,
uint16_t rnti = UE_info->rnti[UE_id];
int8_t harq_id = sched_pusch->ul_harq_pid;
if (NFAPI_MODE == NFAPI_MODE_VNF)
harq_id = 1;
else
{
if (harq_id < 0) {
/* PP has not selected a specific HARQ Process, get a new one */
harq_id = sched_ctrl->available_ul_harq.head;
// if(NFAPI_MODE == NFAPI_MODE_VNF)
// harq_id = 1;
AssertFatal(harq_id >= 0,
"no free HARQ process available for UE %d\n",
UE_id);
......@@ -986,15 +980,11 @@ void nr_schedule_ulsch(module_id_t module_id,
else
remove_nr_list(&sched_ctrl->retrans_ul_harq, harq_id);
}
}
NR_UE_ul_harq_t *cur_harq = &sched_ctrl->ul_harq_processes[harq_id];
DevAssert(!cur_harq->is_waiting);
add_tail_nr_list(&sched_ctrl->feedback_ul_harq, harq_id);
cur_harq->feedback_slot = sched_pusch->slot;
cur_harq->is_waiting = true;
if (NFAPI_MODE == NFAPI_MODE_VNF)
cur_harq->is_waiting = 0;
int rnti_types[2] = { NR_RNTI_C, 0 };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment