Commit 321f44ee authored by Robert Schmidt's avatar Robert Schmidt

slot indication from PNF with additional +2

parent c97ff740
......@@ -218,18 +218,6 @@ static void rx_func(processingData_L1_t *info)
clock_gettime(CLOCK_MONOTONIC,&info->gNB->rt_L1_profiling.start_L1_RX[rt_prof_idx]);
start_meas(&softmodem_stats_rxtx_sf);
// *******************************************************************
if (NFAPI_MODE == NFAPI_MODE_PNF) {
// I am a PNF and I need to let nFAPI know that we have a (sub)frame tick
//LOG_D(PHY, "oai_nfapi_slot_ind(frame:%u, slot:%d) ********\n", frame_rx, slot_rx);
start_meas(&nfapi_meas);
handle_nr_slot_ind(frame_rx, slot_rx);
stop_meas(&nfapi_meas);
}
// ****************************************
// RX processing
int rx_slot_type = nr_slot_select(cfg, frame_rx, slot_rx);
if (rx_slot_type == NR_UPLINK_SLOT || rx_slot_type == NR_MIXED_SLOT) {
......
......@@ -2273,7 +2273,9 @@ void oai_subframe_ind(uint16_t sfn, uint16_t sf) {
void handle_nr_slot_ind(uint16_t sfn, uint16_t slot)
{
//send VNF slot indication, which is aligned with TX thread, so that it can call the scheduler
uint8_t slot_ahead = 6; // TODO ok?
//we give two additional slots which should be enough time for the VNF to
//answer
uint8_t slot_ahead = 2;
uint32_t sfn_slot_tx = sfnslot_add_slot(sfn, slot, slot_ahead);
uint16_t sfn_tx = NFAPI_SFNSLOT2SFN(sfn_slot_tx);
uint8_t slot_tx = NFAPI_SFNSLOT2SLOT(sfn_slot_tx);
......
......@@ -1221,8 +1221,9 @@ int phy_nr_slot_indication(nfapi_nr_slot_indication_scf_t *ind) {
uint32_t vnf_sfn_slot = sfnslot_add_slot(ind->sfn, ind->slot, vnf_slot_ahead);
uint16_t vnf_sfn = NFAPI_SFNSLOT2SFN(vnf_sfn_slot);
uint8_t vnf_slot = NFAPI_SFNSLOT2SLOT(vnf_sfn_slot);
LOG_D(MAC, "VNF SFN/Slot %d.%d \n", vnf_sfn, vnf_slot);
LOG_I(MAC, "VNF SFN/Slot %d.%d \n", vnf_sfn, vnf_slot);
// received slot indication
nfapi_nr_slot_indication_scf_t *nr_slot_ind = CALLOC(1, sizeof(*nr_slot_ind));
nr_slot_ind->header = ind->header;
nr_slot_ind->sfn = vnf_sfn;
......
......@@ -189,7 +189,7 @@ int nfapi_nr_vnf_p7_start(nfapi_vnf_p7_config_t* config)
gNB->UL_INFO.frame, gNB->UL_INFO.slot, prev_slot);
if (setup_done && prev_slot != gNB->UL_INFO.slot) { //Give the VNF sufficient time to setup before starting scheduling && prev_slot != gNB->UL_INFO.slot
//Call the scheduler
// Call into the scheduler (this is hardcoded and should be init properly!)
gNB->UL_INFO.module_id = gNB->Mod_id;
gNB->UL_INFO.CC_id = gNB->CC_id;
NFAPI_TRACE(NFAPI_TRACE_DEBUG, "Calling NR_UL_indication for gNB->UL_INFO.frame = %d and slot %d\n",
......
......@@ -240,6 +240,7 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO)
if (NFAPI_MODE == NFAPI_MODE_VNF) { // If VNF, oai_nfapi functions send respective p7 msgs to PNF for which nPDUs > 0
// order wrong!!
if (number_ul_tti_pdu > 0)
oai_nfapi_ul_tti_req(UL_tti_req);
......
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