Commit 5be8cf7b authored by David Price's avatar David Price

RACH received on VNF. Message 2 created and sent to PNF. Got Message 2...

RACH received on VNF.  Message 2 created and sent to PNF.  Got Message 2 received on PNF.  Nothing useful done with it yet
parent 6c519f5b
...@@ -642,7 +642,7 @@ int phy_rach_indication(struct nfapi_vnf_p7_config* config, nfapi_rach_indicatio ...@@ -642,7 +642,7 @@ int phy_rach_indication(struct nfapi_vnf_p7_config* config, nfapi_rach_indicatio
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0]; struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
printf("[VNF] RACH_IND eNB:%p sfn_sf:%d number_of_preambles:%d", eNB, NFAPI_SFNSF2DEC(ind->sfn_sf), ind->rach_indication_body.number_of_preambles); printf("[VNF] RACH_IND eNB:%p sfn_sf:%d number_of_preambles:%d\n", eNB, NFAPI_SFNSF2DEC(ind->sfn_sf), ind->rach_indication_body.number_of_preambles);
pthread_mutex_lock(&eNB->UL_INFO_mutex); pthread_mutex_lock(&eNB->UL_INFO_mutex);
...@@ -1273,9 +1273,15 @@ int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) ...@@ -1273,9 +1273,15 @@ int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req)
//NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] %s() header message_id:%d\n", __FUNCTION__, dl_config_req->header.message_id); //NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] %s() header message_id:%d\n", __FUNCTION__, dl_config_req->header.message_id);
//NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] %s() p7_config:%p phy_id:%d message_id:%d sfn_sf:%d pdcch:%d dci:%d pdu:%d pdsch_rnti:%d pcfich:%d\n", __FUNCTION__, p7_config, dl_config_req->header.phy_id, dl_config_req->header.message_id, dl_config_req->sfn_sf, dl_config_req->dl_config_request_body.number_pdcch_ofdm_symbols, dl_config_req->dl_config_request_body.number_dci, dl_config_req->dl_config_request_body.number_pdu, dl_config_req->dl_config_request_body.number_pdsch_rnti, dl_config_req->dl_config_request_body.transmission_power_pcfich); NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] %s() DL_CONFIG p7_config:%p phy_id:%d message_id:%d sfn_sf:%d pdcch:%d dci:%d pdu:%d pdsch_rnti:%d pcfich:%d\n", __FUNCTION__, p7_config, dl_config_req->header.phy_id, dl_config_req->header.message_id, NFAPI_SFNSF2DEC(dl_config_req->sfn_sf), dl_config_req->dl_config_request_body.number_pdcch_ofdm_symbols, dl_config_req->dl_config_request_body.number_dci, dl_config_req->dl_config_request_body.number_pdu, dl_config_req->dl_config_request_body.number_pdsch_rnti, dl_config_req->dl_config_request_body.transmission_power_pcfich);
return nfapi_vnf_p7_dl_config_req(p7_config, dl_config_req); int retval = nfapi_vnf_p7_dl_config_req(p7_config, dl_config_req);
if (retval!=0)
{
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s() Problem sending retval:%d\n", __FUNCTION__, retval);
}
return retval;
} }
int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req) int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req)
...@@ -1283,9 +1289,14 @@ int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req) ...@@ -1283,9 +1289,14 @@ int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req)
nfapi_vnf_p7_config_t *p7_config = vnf.p7_vnfs[0].config; nfapi_vnf_p7_config_t *p7_config = vnf.p7_vnfs[0].config;
tx_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!! tx_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!!
//dl_config_req->header.message_id = NFAPI_DL_CONFIG_BCH_PDU_TYPE;
//NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] %s() p7_config:%p phy_id:%d message_id:%d sfn_sf:%d pdcch:%d dci:%d pdu:%d pdsch_rnti:%d pcfich:%d\n", __FUNCTION__, p7_config, dl_config_req->header.phy_id, dl_config_req->header.message_id, dl_config_req->sfn_sf, dl_config_req->dl_config_request_body.number_pdcch_ofdm_symbols, dl_config_req->dl_config_request_body.number_dci, dl_config_req->dl_config_request_body.number_pdu, dl_config_req->dl_config_request_body.number_pdsch_rnti, dl_config_req->dl_config_request_body.transmission_power_pcfich); NFAPI_TRACE(NFAPI_TRACE_INFO, "[VNF] %s() TX_REQ p7_config:%p phy_id:%d message_id:%d sfn_sf:%d number_of_pdus:%d\n", __FUNCTION__, p7_config, tx_req->header.phy_id, tx_req->header.message_id, NFAPI_SFNSF2DEC(tx_req->sfn_sf), tx_req->tx_request_body.number_of_pdus);
return nfapi_vnf_p7_tx_req(p7_config, tx_req); int retval = nfapi_vnf_p7_tx_req(p7_config, tx_req);
if (retval!=0)
{
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s() Problem sending retval:%d\n", __FUNCTION__, retval);
}
return retval;
} }
...@@ -1115,7 +1115,9 @@ void rx_prach0(PHY_VARS_eNB *eNB, ...@@ -1115,7 +1115,9 @@ void rx_prach0(PHY_VARS_eNB *eNB,
uint8_t restricted_set; uint8_t restricted_set;
uint8_t n_ra_prb; uint8_t n_ra_prb;
#ifdef PRACH_DEBUG
int frame; int frame;
#endif
int subframe; int subframe;
int16_t *prachF=NULL; int16_t *prachF=NULL;
int16_t **rxsigF=NULL; int16_t **rxsigF=NULL;
...@@ -1371,7 +1373,9 @@ void rx_prach0(PHY_VARS_eNB *eNB, ...@@ -1371,7 +1373,9 @@ void rx_prach0(PHY_VARS_eNB *eNB,
if (((eNB!=NULL) && (ru->function != NGFI_RAU_IF4p5))|| if (((eNB!=NULL) && (ru->function != NGFI_RAU_IF4p5))||
((eNB==NULL) && (ru->function == NGFI_RRU_IF4p5))) { // compute the DFTs of the PRACH temporal resources ((eNB==NULL) && (ru->function == NGFI_RRU_IF4p5))) { // compute the DFTs of the PRACH temporal resources
// Do forward transform // Do forward transform
#ifdef PRACH_DEBUG
LOG_D(PHY,"rx_prach: Doing FFT for N_RB_UL %d nb_rx:%d Ncp:%d\n",fp->N_RB_UL, nb_rx, Ncp); LOG_D(PHY,"rx_prach: Doing FFT for N_RB_UL %d nb_rx:%d Ncp:%d\n",fp->N_RB_UL, nb_rx, Ncp);
#endif
for (aa=0; aa<nb_rx; aa++) { for (aa=0; aa<nb_rx; aa++) {
AssertFatal(prach[aa]!=NULL,"prach[%d] is null\n",aa); AssertFatal(prach[aa]!=NULL,"prach[%d] is null\n",aa);
prach2 = prach[aa] + (Ncp<<1); prach2 = prach[aa] + (Ncp<<1);
......
...@@ -232,6 +232,13 @@ void generate_Msg2(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t ...@@ -232,6 +232,13 @@ void generate_Msg2(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t
} }
} }
LOG_D(MAC,"[eNB %d][RAPROC] Frame %d, Subframe %d : In generate_Msg2, RA_template->rach_resource_type:%d frameP:%d/%d RA_template:Msg2:%d/%d\n",module_idP,frameP,subframeP,RA_template->rach_resource_type,
frameP,
subframeP,
RA_template->Msg2_frame,
RA_template->Msg2_subframe
);
if (RA_template->rach_resource_type > 0) { if (RA_template->rach_resource_type > 0) {
// This uses an MPDCCH Type 2 common allocation according to Section 9.1.5 36-213 // This uses an MPDCCH Type 2 common allocation according to Section 9.1.5 36-213
...@@ -377,6 +384,11 @@ void generate_Msg2(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t ...@@ -377,6 +384,11 @@ void generate_Msg2(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t
dl_req->number_pdu++; dl_req->number_pdu++;
dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG; dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
eNB->DL_req[CC_idP].sfn_sf = (frameP<<4)+subframeP;
eNB->DL_req[CC_idP].header.message_id = NFAPI_DL_CONFIG_REQUEST;
LOG_E(MAC,"DL_CONFIG SFN/SF:%d/%d MESSAGE2\n", frameP, subframeP);
// Program UL processing for Msg3, same as regular LTE // Program UL processing for Msg3, same as regular LTE
get_Msg3alloc(&cc[CC_idP],subframeP,frameP,&RA_template->Msg3_frame,&RA_template->Msg3_subframe); get_Msg3alloc(&cc[CC_idP],subframeP,frameP,&RA_template->Msg3_frame,&RA_template->Msg3_subframe);
add_msg3(module_idP,CC_idP, RA_template,frameP,subframeP); add_msg3(module_idP,CC_idP, RA_template,frameP,subframeP);
...@@ -392,6 +404,8 @@ void generate_Msg2(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t ...@@ -392,6 +404,8 @@ void generate_Msg2(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t
TX_req->segments[0].segment_length = 7; TX_req->segments[0].segment_length = 7;
TX_req->segments[0].segment_data = cc[CC_idP].RAR_pdu.payload; TX_req->segments[0].segment_data = cc[CC_idP].RAR_pdu.payload;
eNB->TX_req[CC_idP].tx_request_body.number_of_pdus++; eNB->TX_req[CC_idP].tx_request_body.number_of_pdus++;
LOG_E(MAC,"TX_REQ SFN/SF:%d/%d MESSAGE2\n", frameP, subframeP);
} }
} }
...@@ -404,7 +418,6 @@ void generate_Msg2(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t ...@@ -404,7 +418,6 @@ void generate_Msg2(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t
LOG_I(MAC,"[eNB %d] CC_id %d Frame %d, subframeP %d: Generating RAR DCI, RA_active %d format 1A (%d,%d))\n", LOG_I(MAC,"[eNB %d] CC_id %d Frame %d, subframeP %d: Generating RAR DCI, RA_active %d format 1A (%d,%d))\n",
module_idP, CC_idP, frameP, subframeP, module_idP, CC_idP, frameP, subframeP,
RA_template->RA_active, RA_template->RA_active,
RA_template->RA_dci_fmt1, RA_template->RA_dci_fmt1,
RA_template->RA_dci_size_bits1); RA_template->RA_dci_size_bits1);
...@@ -436,8 +449,8 @@ void generate_Msg2(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t ...@@ -436,8 +449,8 @@ void generate_Msg2(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t
// This checks if the above DCI allocation is feasible in current subframe // This checks if the above DCI allocation is feasible in current subframe
if (!CCE_allocation_infeasible(module_idP,CC_idP,0,subframeP,dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level,RA_template->RA_rnti)) { if (!CCE_allocation_infeasible(module_idP,CC_idP,0,subframeP,dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level,RA_template->RA_rnti)) {
LOG_D(MAC,"Frame %d: Subframe %d : Adding common DCI for RA_RNTI %x\n", LOG_D(MAC,"Frame %d: Subframe %d : Adding common DCI for RA_RNTI %x pdu_index:%d\n",
frameP,subframeP,RA_template->RA_rnti); frameP,subframeP,RA_template->RA_rnti, eNB->pdu_index[CC_idP]);
dl_req->number_dci++; dl_req->number_dci++;
dl_req->number_pdu++; dl_req->number_pdu++;
dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG; dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
...@@ -472,6 +485,11 @@ void generate_Msg2(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t ...@@ -472,6 +485,11 @@ void generate_Msg2(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t
dl_req->number_pdu++; dl_req->number_pdu++;
dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG; dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
eNB->DL_req[CC_idP].sfn_sf = (frameP<<4)+subframeP;
eNB->DL_req[CC_idP].header.message_id = NFAPI_DL_CONFIG_REQUEST;
LOG_E(MAC,"DL_CONFIG SFN/SF:%d/%d MESSAGE2\n", frameP, subframeP);
// Program UL processing for Msg3 // Program UL processing for Msg3
get_Msg3alloc(&cc[CC_idP],subframeP,frameP,&RA_template->Msg3_frame,&RA_template->Msg3_subframe); get_Msg3alloc(&cc[CC_idP],subframeP,frameP,&RA_template->Msg3_frame,&RA_template->Msg3_subframe);
...@@ -492,6 +510,9 @@ void generate_Msg2(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t ...@@ -492,6 +510,9 @@ void generate_Msg2(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t
TX_req->segments[0].segment_length = 7; TX_req->segments[0].segment_length = 7;
TX_req->segments[0].segment_data = cc[CC_idP].RAR_pdu.payload; TX_req->segments[0].segment_data = cc[CC_idP].RAR_pdu.payload;
eNB->TX_req[CC_idP].tx_request_body.number_of_pdus++; eNB->TX_req[CC_idP].tx_request_body.number_of_pdus++;
LOG_E(MAC,"TX_REQ SFN/SF:%d/%d MESSAGE2\n", frameP, subframeP);
} // PDCCH CCE allocation is feasible } // PDCCH CCE allocation is feasible
} // Msg2 frame/subframe condition } // Msg2 frame/subframe condition
} // else BL/CE } // else BL/CE
...@@ -1237,7 +1258,7 @@ void initiate_ra_proc(module_id_t module_idP, ...@@ -1237,7 +1258,7 @@ void initiate_ra_proc(module_id_t module_idP,
ext4_prach=cc->radioResourceConfigCommon_BR->ext4->prach_ConfigCommon_v1310; ext4_prach=cc->radioResourceConfigCommon_BR->ext4->prach_ConfigCommon_v1310;
prach_ParametersListCE_r13= &ext4_prach->prach_ParametersListCE_r13; prach_ParametersListCE_r13= &ext4_prach->prach_ParametersListCE_r13;
} }
LOG_I(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d, Subframe %d Initiating RA procedure for preamble index %d\n",module_idP,CC_id,frameP,subframeP,preamble_index); LOG_E(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d, Subframe %d Initiating RA procedure for preamble index %d\n",module_idP,CC_id,frameP,subframeP,preamble_index);
#ifdef Rel14 #ifdef Rel14
LOG_D(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d, Subframe %d PRACH resource type %d\n",module_idP,CC_id,frameP,subframeP,rach_resource_type); LOG_D(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d, Subframe %d PRACH resource type %d\n",module_idP,CC_id,frameP,subframeP,rach_resource_type);
#endif #endif
......
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