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) ...@@ -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)) ; 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 // Panos: Careful here!!! Modification of the original nfapi-code
// vnf_p7->p7_connections[0].sfn = ind.last_sfn; vnf_p7->p7_connections[0].sfn = ind.last_sfn;
// vnf_p7->p7_connections[0].slot = ind.last_slot; vnf_p7->p7_connections[0].slot = ind.last_slot;
} }
} }
} }
......
...@@ -372,6 +372,7 @@ typedef struct { ...@@ -372,6 +372,7 @@ typedef struct {
NR_SearchSpace_t *search_space_zero; NR_SearchSpace_t *search_space_zero;
NR_ControlResourceSet_t *coreset0; NR_ControlResourceSet_t *coreset0;
// Defined for abstracted mode
nr_downlink_indication_t dl_info; nr_downlink_indication_t dl_info;
} NR_UE_MAC_INST_t; } NR_UE_MAC_INST_t;
......
...@@ -720,8 +720,6 @@ void nr_schedule_ue_spec(module_id_t module_id, ...@@ -720,8 +720,6 @@ void nr_schedule_ue_spec(module_id_t module_id,
int8_t current_harq_pid = sched_ctrl->dl_harq_pid; int8_t current_harq_pid = sched_ctrl->dl_harq_pid;
if (current_harq_pid < 0) { if (current_harq_pid < 0) {
/* PP has not selected a specific HARQ Process, get a new one */ /* 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; current_harq_pid = sched_ctrl->available_dl_harq.head;
AssertFatal(current_harq_pid >= 0, AssertFatal(current_harq_pid >= 0,
"no free HARQ process available for UE %d\n", "no free HARQ process available for UE %d\n",
...@@ -738,9 +736,6 @@ void nr_schedule_ue_spec(module_id_t module_id, ...@@ -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); remove_nr_list(&sched_ctrl->retrans_dl_harq, current_harq_pid);
} }
NR_UE_harq_t *harq = &sched_ctrl->harq_processes[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); DevAssert(!harq->is_waiting);
add_tail_nr_list(&sched_ctrl->feedback_dl_harq, current_harq_pid); add_tail_nr_list(&sched_ctrl->feedback_dl_harq, current_harq_pid);
NR_sched_pucch_t *pucch = &sched_ctrl->sched_pucch[0]; NR_sched_pucch_t *pucch = &sched_ctrl->sched_pucch[0];
...@@ -935,10 +930,6 @@ void nr_schedule_ue_spec(module_id_t module_id, ...@@ -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 dci_format = f ? NR_DL_DCI_FORMAT_1_1 : NR_DL_DCI_FORMAT_1_0;
const int rnti_type = NR_RNTI_C; 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, fill_dci_pdu_rel15(scc,
UE_info->secondaryCellGroup[UE_id], UE_info->secondaryCellGroup[UE_id],
dci_pdu, dci_pdu,
......
...@@ -963,38 +963,28 @@ void nr_schedule_ulsch(module_id_t module_id, ...@@ -963,38 +963,28 @@ void nr_schedule_ulsch(module_id_t module_id,
uint16_t rnti = UE_info->rnti[UE_id]; uint16_t rnti = UE_info->rnti[UE_id];
int8_t harq_id = sched_pusch->ul_harq_pid; int8_t harq_id = sched_pusch->ul_harq_pid;
if (NFAPI_MODE == NFAPI_MODE_VNF) if (harq_id < 0) {
harq_id = 1; /* PP has not selected a specific HARQ Process, get a new one */
else harq_id = sched_ctrl->available_ul_harq.head;
{ AssertFatal(harq_id >= 0,
if (harq_id < 0) { "no free HARQ process available for UE %d\n",
/* PP has not selected a specific HARQ Process, get a new one */ UE_id);
harq_id = sched_ctrl->available_ul_harq.head; remove_front_nr_list(&sched_ctrl->available_ul_harq);
// if(NFAPI_MODE == NFAPI_MODE_VNF) sched_pusch->ul_harq_pid = harq_id;
// harq_id = 1; } else {
AssertFatal(harq_id >= 0, /* PP selected a specific HARQ process. Check whether it will be a new
"no free HARQ process available for UE %d\n", * transmission or a retransmission, and remove from the corresponding
UE_id); * list */
remove_front_nr_list(&sched_ctrl->available_ul_harq); if (sched_ctrl->ul_harq_processes[harq_id].round == 0)
sched_pusch->ul_harq_pid = harq_id; remove_nr_list(&sched_ctrl->available_ul_harq, harq_id);
} else { else
/* PP selected a specific HARQ process. Check whether it will be a new remove_nr_list(&sched_ctrl->retrans_ul_harq, harq_id);
* transmission or a retransmission, and remove from the corresponding
* list */
if (sched_ctrl->ul_harq_processes[harq_id].round == 0)
remove_nr_list(&sched_ctrl->available_ul_harq, harq_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]; NR_UE_ul_harq_t *cur_harq = &sched_ctrl->ul_harq_processes[harq_id];
DevAssert(!cur_harq->is_waiting); DevAssert(!cur_harq->is_waiting);
add_tail_nr_list(&sched_ctrl->feedback_ul_harq, harq_id); add_tail_nr_list(&sched_ctrl->feedback_ul_harq, harq_id);
cur_harq->feedback_slot = sched_pusch->slot; cur_harq->feedback_slot = sched_pusch->slot;
cur_harq->is_waiting = true; cur_harq->is_waiting = true;
if (NFAPI_MODE == NFAPI_MODE_VNF)
cur_harq->is_waiting = 0;
int rnti_types[2] = { NR_RNTI_C, 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