Commit 91064382 authored by David Price's avatar David Price

monolithic still works. Seem to have problem in nFAPI mode where it thinks it...

monolithic still works.  Seem to have problem in nFAPI mode where it thinks it is decoding O_ACK to be 4 which is not valid
parent 8eacc62a
...@@ -874,12 +874,13 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, ...@@ -874,12 +874,13 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
int16_t cseq[6*14*1200] __attribute__((aligned(32))); int16_t cseq[6*14*1200] __attribute__((aligned(32)));
int off; int off;
int frame = proc->frame_rx;
int subframe = proc->subframe_rx; int subframe = proc->subframe_rx;
LTE_UL_eNB_HARQ_t *ulsch_harq; LTE_UL_eNB_HARQ_t *ulsch_harq;
harq_pid = subframe2harq_pid(frame_parms,proc->frame_rx,subframe); harq_pid = subframe2harq_pid(frame_parms,frame,subframe);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING0+harq_pid,1); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING0+harq_pid,1);
...@@ -1264,7 +1265,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, ...@@ -1264,7 +1265,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
} }
if (ulsch_harq->O_ACK > 2) { if (ulsch_harq->O_ACK > 2) {
LOG_E(PHY,"ulsch_decoding: FATAL, ACK cannot be more than 2 bits yet\n"); LOG_E(PHY,"ulsch_decoding: FATAL, ACK cannot be more than 2 bits yet O_ACK:%d SFN/SF:%04d%d UE_id:%d rnti:%x\n",ulsch_harq->O_ACK,proc->frame_rx,proc->subframe_rx,UE_id,ulsch->rnti);
return(-1); return(-1);
} }
...@@ -1576,6 +1577,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, ...@@ -1576,6 +1577,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
#endif #endif
} }
LOG_I(PHY,"frame %d subframe %d O_ACK:%d o_ACK[]=%d:%d:%d:%d\n",frame,subframe,ulsch_harq->O_ACK,ulsch_harq->o_ACK[0],ulsch_harq->o_ACK[1],ulsch_harq->o_ACK[2],ulsch_harq->o_ACK[3]);
// Do ULSCH Decoding for data portion // Do ULSCH Decoding for data portion
......
...@@ -338,8 +338,14 @@ void pdsch_procedures(PHY_VARS_eNB *eNB, ...@@ -338,8 +338,14 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,
dlsch_harq->pdu,dlsch_harq->pdsch_start,frame,subframe,dlsch_harq->nb_rb,dlsch_harq->rb_alloc[0],dlsch_harq->Qm,dlsch_harq->Nl,dlsch_harq->round); dlsch_harq->pdu,dlsch_harq->pdsch_start,frame,subframe,dlsch_harq->nb_rb,dlsch_harq->rb_alloc[0],dlsch_harq->Qm,dlsch_harq->Nl,dlsch_harq->round);
// 36-212 // 36-212
if (nfapi_mode == 0 || nfapi_mode == 1) { // monolthic OR PNF - do not need turbo encoding on VNF if (nfapi_mode == 0 || nfapi_mode == 1) { // monolthic OR PNF - do not need turbo encoding on VNF
if (dlsch_harq->pdu==NULL){
LOG_E(PHY,"dlsch_harq->pdu == NULL SFN/SF:%04d%d dlsch[rnti:%x] dlsch_harq[pdu:%p pdsch_start:%d Qm:%d Nl:%d round:%d nb_rb:%d rb_alloc[0]:%d]\n", frame,subframe,dlsch->rnti, dlsch_harq->pdu,dlsch_harq->pdsch_start,dlsch_harq->Qm,dlsch_harq->Nl,dlsch_harq->round,dlsch_harq->nb_rb,dlsch_harq->rb_alloc[0]);
return;
}
start_meas(&eNB->dlsch_encoding_stats); start_meas(&eNB->dlsch_encoding_stats);
AssertFatal(dlsch_harq->pdu!=NULL,"dlsch_harq->pdu == NULL (rnti %x)\n",dlsch->rnti);
eNB->te(eNB, eNB->te(eNB,
dlsch_harq->pdu, dlsch_harq->pdu,
dlsch_harq->pdsch_start, dlsch_harq->pdsch_start,
...@@ -721,8 +727,8 @@ void prach_procedures(PHY_VARS_eNB *eNB, ...@@ -721,8 +727,8 @@ void prach_procedures(PHY_VARS_eNB *eNB,
eNB->preamble_list[0].preamble_rel13.rach_resource_type = 0; eNB->preamble_list[0].preamble_rel13.rach_resource_type = 0;
eNB->preamble_list[0].instance_length = 0; //don't know exactly what this is eNB->preamble_list[0].instance_length = 0; //don't know exactly what this is
if (nfapi_mode == 1) // If NFAPI PNF then we need to send the message to the VNF if (nfapi_mode == 1) { // If NFAPI PNF then we need to send the message to the VNF
{
LOG_E(PHY,"Filling NFAPI indication for RACH : SFN_SF:%d TA %d, Preamble %d, rnti %x, rach_resource_type %d\n", LOG_E(PHY,"Filling NFAPI indication for RACH : SFN_SF:%d TA %d, Preamble %d, rnti %x, rach_resource_type %d\n",
NFAPI_SFNSF2DEC(eNB->UL_INFO.rach_ind.sfn_sf), NFAPI_SFNSF2DEC(eNB->UL_INFO.rach_ind.sfn_sf),
eNB->preamble_list[0].preamble_rel8.timing_advance, eNB->preamble_list[0].preamble_rel8.timing_advance,
...@@ -1763,7 +1769,7 @@ void fill_ulsch_harq_indication(PHY_VARS_eNB *eNB,LTE_UL_eNB_HARQ_t *ulsch_harq, ...@@ -1763,7 +1769,7 @@ void fill_ulsch_harq_indication(PHY_VARS_eNB *eNB,LTE_UL_eNB_HARQ_t *ulsch_harq,
return; return;
} }
LOG_D(PHY,"%s(eNB, ulsch_harq, rnti:%04x, frame:%d, subframe:%d, bundling:%d) harq_pdus:%d\n", __FUNCTION__, rnti, frame, subframe, bundling,eNB->UL_INFO.harq_ind.harq_indication_body.number_of_harqs); LOG_I(PHY,"%s(eNB, ulsch_harq, rnti:%04x, frame:%d, subframe:%d, bundling:%d) harq_pdus:%d O_ACK:%d\n", __FUNCTION__, rnti, frame, subframe, bundling,eNB->UL_INFO.harq_ind.harq_indication_body.number_of_harqs,ulsch_harq->O_ACK);
pthread_mutex_lock(&eNB->UL_INFO_mutex); pthread_mutex_lock(&eNB->UL_INFO_mutex);
nfapi_harq_indication_pdu_t *pdu = &eNB->UL_INFO.harq_ind.harq_indication_body.harq_pdu_list[eNB->UL_INFO.harq_ind.harq_indication_body.number_of_harqs]; nfapi_harq_indication_pdu_t *pdu = &eNB->UL_INFO.harq_ind.harq_indication_body.harq_pdu_list[eNB->UL_INFO.harq_ind.harq_indication_body.number_of_harqs];
...@@ -1773,6 +1779,8 @@ void fill_ulsch_harq_indication(PHY_VARS_eNB *eNB,LTE_UL_eNB_HARQ_t *ulsch_harq, ...@@ -1773,6 +1779,8 @@ void fill_ulsch_harq_indication(PHY_VARS_eNB *eNB,LTE_UL_eNB_HARQ_t *ulsch_harq,
eNB->UL_INFO.harq_ind.header.message_id = NFAPI_HARQ_INDICATION; eNB->UL_INFO.harq_ind.header.message_id = NFAPI_HARQ_INDICATION;
eNB->UL_INFO.harq_ind.sfn_sf = frame<<4|subframe; eNB->UL_INFO.harq_ind.sfn_sf = frame<<4|subframe;
eNB->UL_INFO.harq_ind.harq_indication_body.tl.tag = NFAPI_HARQ_INDICATION_BODY_TAG;
pdu->instance_length = 0; // don't know what to do with this pdu->instance_length = 0; // don't know what to do with this
// pdu->rx_ue_information.handle = handle; // pdu->rx_ue_information.handle = handle;
pdu->rx_ue_information.tl.tag = NFAPI_RX_UE_INFORMATION_TAG; pdu->rx_ue_information.tl.tag = NFAPI_RX_UE_INFORMATION_TAG;
...@@ -2073,8 +2081,7 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,const ...@@ -2073,8 +2081,7 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,const
uci_procedures(eNB,proc); uci_procedures(eNB,proc);
if (nfapi_mode == 0 || nfapi_mode == 1) // If PNF or monolithic if (nfapi_mode == 0 || nfapi_mode == 1) { // If PNF or monolithic
{
pusch_procedures(eNB,proc); pusch_procedures(eNB,proc);
} }
......
...@@ -1003,8 +1003,7 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP, ...@@ -1003,8 +1003,7 @@ rrc_mac_config_req_eNB(module_id_t Mod_idP,
if ( if (
(nfapi_mode == 1 || nfapi_mode == 2) && (nfapi_mode == 1 || nfapi_mode == 2) &&
(RC.mac[Mod_idP]->if_inst->PHY_config_req == NULL) (RC.mac[Mod_idP]->if_inst->PHY_config_req == NULL)
) ) {
{
while(RC.mac[Mod_idP]->if_inst->PHY_config_req == NULL) { while(RC.mac[Mod_idP]->if_inst->PHY_config_req == NULL) {
// DJP AssertFatal(RC.mac[Mod_idP]->if_inst->PHY_config_req != NULL,"if_inst->phy_config_request is null\n"); // DJP AssertFatal(RC.mac[Mod_idP]->if_inst->PHY_config_req != NULL,"if_inst->phy_config_request is null\n");
usleep(100 * 1000); usleep(100 * 1000);
......
...@@ -571,8 +571,8 @@ clear_nfapi_information(eNB_MAC_INST * eNB, int CC_idP, ...@@ -571,8 +571,8 @@ clear_nfapi_information(eNB_MAC_INST * eNB, int CC_idP,
eNB->pdu_index[CC_idP] = 0; eNB->pdu_index[CC_idP] = 0;
if (nfapi_mode==0 || nfapi_mode == 1) // monolithic or PNF if (nfapi_mode==0 || nfapi_mode == 1) { // monolithic or PNF
{
DL_req[CC_idP].dl_config_request_body.number_pdcch_ofdm_symbols = 1; DL_req[CC_idP].dl_config_request_body.number_pdcch_ofdm_symbols = 1;
DL_req[CC_idP].dl_config_request_body.number_dci = 0; DL_req[CC_idP].dl_config_request_body.number_dci = 0;
DL_req[CC_idP].dl_config_request_body.number_pdu = 0; DL_req[CC_idP].dl_config_request_body.number_pdu = 0;
......
...@@ -66,7 +66,6 @@ ...@@ -66,7 +66,6 @@
#include "T.h" #include "T.h"
extern uint8_t nfapi_mode; extern uint8_t nfapi_mode;
extern uint8_t sf_ahead;
extern int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req); extern int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req);
void add_subframe(uint16_t *frameP, uint16_t *subframeP, int offset) void add_subframe(uint16_t *frameP, uint16_t *subframeP, int offset)
......
...@@ -3674,6 +3674,8 @@ extract_harq(module_id_t mod_idP, int CC_idP, int UE_id, ...@@ -3674,6 +3674,8 @@ extract_harq(module_id_t mod_idP, int CC_idP, int UE_id,
uint8_t harq_pid = ((10 * frameP) + subframeP + 10236) & 7; uint8_t harq_pid = ((10 * frameP) + subframeP + 10236) & 7;
LOG_I(MAC,"frame %d subframe %d harq_pid %d mode %d tmode[0] %d num_ack_nak %d round %d\n",frameP,subframeP,harq_pid,harq_indication_fdd->mode,tmode[0],num_ack_nak,sched_ctl->round[CC_idP][harq_pid]);
switch (harq_indication_fdd->mode) { switch (harq_indication_fdd->mode) {
case 0: // Format 1a/b (10.1.2.1) case 0: // Format 1a/b (10.1.2.1)
AssertFatal(numCC == 1, AssertFatal(numCC == 1,
...@@ -3682,8 +3684,8 @@ extract_harq(module_id_t mod_idP, int CC_idP, int UE_id, ...@@ -3682,8 +3684,8 @@ extract_harq(module_id_t mod_idP, int CC_idP, int UE_id,
if (tmode[0] == 1 || tmode[0] == 2 || tmode[0] == 5 || tmode[0] == 6 || tmode[0] == 7) { // NOTE: have to handle the case of TM9-10 with 1 antenna port if (tmode[0] == 1 || tmode[0] == 2 || tmode[0] == 5 || tmode[0] == 6 || tmode[0] == 7) { // NOTE: have to handle the case of TM9-10 with 1 antenna port
// single ACK/NAK bit // single ACK/NAK bit
AssertFatal(num_ack_nak == 1, AssertFatal(num_ack_nak == 1,
"num_ack_nak %d > 1 for 1 CC and single-layer transmission\n", "num_ack_nak %d > 1 for 1 CC and single-layer transmission frame:%d subframe:%d\n",
num_ack_nak); num_ack_nak,frameP,subframeP);
AssertFatal(sched_ctl->round[CC_idP][harq_pid] < 8, AssertFatal(sched_ctl->round[CC_idP][harq_pid] < 8,
"Got ACK/NAK for inactive harq_pid %d for UE %d/%x\n", "Got ACK/NAK for inactive harq_pid %d for UE %d/%x\n",
harq_pid, UE_id, rnti); harq_pid, UE_id, rnti);
...@@ -4474,7 +4476,7 @@ harq_indication(module_id_t mod_idP, int CC_idP, frame_t frameP, ...@@ -4474,7 +4476,7 @@ harq_indication(module_id_t mod_idP, int CC_idP, frame_t frameP,
UE_sched_ctrl *sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; UE_sched_ctrl *sched_ctl = &UE_list->UE_sched_ctrl[UE_id];
COMMON_channels_t *cc = &RC.mac[mod_idP]->common_channels[CC_idP]; COMMON_channels_t *cc = &RC.mac[mod_idP]->common_channels[CC_idP];
// extract HARQ Information // extract HARQ Information
LOG_D(MAC, LOG_I(MAC,
"Frame %d, subframe %d: Received harq indication (%d) from UE %d/%x, ul_cqi %d\n", "Frame %d, subframe %d: Received harq indication (%d) from UE %d/%x, ul_cqi %d\n",
frameP, subframeP, channel, UE_id, rnti, ul_cqi); frameP, subframeP, channel, UE_id, rnti, ul_cqi);
if (cc->tdd_Config) if (cc->tdd_Config)
......
...@@ -75,7 +75,7 @@ eNBs = ...@@ -75,7 +75,7 @@ eNBs =
pusch_p0_Nominal = -86; pusch_p0_Nominal = -86;
pusch_alpha = "AL1"; pusch_alpha = "AL1";
pucch_p0_Nominal = -104; pucch_p0_Nominal = -96;
msg3_delta_Preamble = 6; msg3_delta_Preamble = 6;
pucch_deltaF_Format1 = "deltaF2"; pucch_deltaF_Format1 = "deltaF2";
pucch_deltaF_Format1b = "deltaF3"; pucch_deltaF_Format1b = "deltaF3";
......
...@@ -174,8 +174,8 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam ...@@ -174,8 +174,8 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
// ******************************************************************* // *******************************************************************
if (nfapi_mode == 1) if (nfapi_mode == 1) {
{
// I am a PNF and I need to let nFAPI know that we have a (sub)frame tick // I am a PNF and I need to let nFAPI know that we have a (sub)frame tick
uint16_t frame = proc->frame_rx; uint16_t frame = proc->frame_rx;
uint16_t subframe = proc->subframe_rx; uint16_t subframe = proc->subframe_rx;
...@@ -205,8 +205,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam ...@@ -205,8 +205,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
} }
} }
if (nfapi_mode == 1 && eNB->pdcch_vars[proc->subframe_tx&1].num_pdcch_symbols == 0) if (nfapi_mode == 1 && eNB->pdcch_vars[proc->subframe_tx&1].num_pdcch_symbols == 0) {
{
LOG_E(PHY, "eNB->pdcch_vars[proc->subframe_tx&1].num_pdcch_symbols == 0"); LOG_E(PHY, "eNB->pdcch_vars[proc->subframe_tx&1].num_pdcch_symbols == 0");
return 0; return 0;
} }
......
...@@ -129,7 +129,6 @@ int attach_rru(RU_t *ru); ...@@ -129,7 +129,6 @@ int attach_rru(RU_t *ru);
int connect_rau(RU_t *ru); int connect_rau(RU_t *ru);
extern uint8_t nfapi_mode;
extern uint16_t sf_ahead; extern uint16_t sf_ahead;
/*************************************************************/ /*************************************************************/
...@@ -1491,12 +1490,6 @@ static void* ru_thread( void* param ) { ...@@ -1491,12 +1490,6 @@ static void* ru_thread( void* param ) {
RC.eNB[0][0]->proc.frame_rx,RC.eNB[0][0]->proc.subframe_rx, RC.eNB[0][0]->proc.frame_rx,RC.eNB[0][0]->proc.subframe_rx,
RC.eNB[0][0]->proc.frame_tx); RC.eNB[0][0]->proc.frame_tx);
if (nfapi_mode == 1) // PNF
{
// This is the earliest I think we can do this
//wakeup_nfapi_subframe_thread();
}
if (0 && is_prach_subframe(fp, proc->frame_rx, proc->subframe_rx)) if (0 && is_prach_subframe(fp, proc->frame_rx, proc->subframe_rx))
LOG_D(PHY,"RU thread (do_prach %d, is_prach_subframe %d), received frame %d, subframe %d\n", LOG_D(PHY,"RU thread (do_prach %d, is_prach_subframe %d), received frame %d, subframe %d\n",
ru->do_prach, ru->do_prach,
......
...@@ -116,7 +116,7 @@ pthread_cond_t nfapi_sync_cond; ...@@ -116,7 +116,7 @@ pthread_cond_t nfapi_sync_cond;
pthread_mutex_t nfapi_sync_mutex; pthread_mutex_t nfapi_sync_mutex;
int nfapi_sync_var=-1; //!< protected by mutex \ref nfapi_sync_mutex int nfapi_sync_var=-1; //!< protected by mutex \ref nfapi_sync_mutex
uint8_t nfapi_mode = 0; uint8_t nfapi_mode = 0; // Default to monolithic mode
pthread_cond_t sync_cond; pthread_cond_t sync_cond;
pthread_mutex_t sync_mutex; pthread_mutex_t sync_mutex;
...@@ -1256,8 +1256,8 @@ int main( int argc, char **argv ) ...@@ -1256,8 +1256,8 @@ int main( int argc, char **argv )
rt_sleep_ns(10*100000000ULL); rt_sleep_ns(10*100000000ULL);
if (nfapi_mode) if (nfapi_mode) {
{
printf("NFAPI*** - mutex and cond created - will block shortly for completion of PNF connection\n"); printf("NFAPI*** - mutex and cond created - will block shortly for completion of PNF connection\n");
pthread_cond_init(&sync_cond,NULL); pthread_cond_init(&sync_cond,NULL);
pthread_mutex_init(&sync_mutex, NULL); pthread_mutex_init(&sync_mutex, NULL);
...@@ -1265,8 +1265,7 @@ int main( int argc, char **argv ) ...@@ -1265,8 +1265,7 @@ int main( int argc, char **argv )
const char *nfapi_mode_str = "<UNKNOWN>"; const char *nfapi_mode_str = "<UNKNOWN>";
switch(nfapi_mode) switch(nfapi_mode) {
{
case 0: case 0:
nfapi_mode_str = "MONOLITHIC"; nfapi_mode_str = "MONOLITHIC";
break; break;
...@@ -1329,8 +1328,7 @@ int main( int argc, char **argv ) ...@@ -1329,8 +1328,7 @@ int main( int argc, char **argv )
config_sync_var=0; config_sync_var=0;
if (nfapi_mode==1) // PNF if (nfapi_mode==1) { // PNF
{
wait_nfapi_init("main?"); wait_nfapi_init("main?");
} }
......
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