Commit 483cd5cf authored by David Price's avatar David Price

NFAPI RACH now working. Gets sent to VNF. VNF cores currently on receipt. ...

NFAPI RACH now working.  Gets sent to VNF.  VNF cores currently on receipt.  Probably fixed by merge from main RU-RAU-split which I will do next
parent de5bec31
...@@ -22,6 +22,7 @@ extern RAN_CONTEXT_t RC; ...@@ -22,6 +22,7 @@ extern RAN_CONTEXT_t RC;
#include <vendor_ext.h> #include <vendor_ext.h>
#include "fapi_stub.h" #include "fapi_stub.h"
//#include "fapi_l1.h"
#include "UTIL/LOG/log.h" #include "UTIL/LOG/log.h"
#define NUM_P5_PHY 2 #define NUM_P5_PHY 2
...@@ -1820,3 +1821,12 @@ void oai_subframe_ind(uint16_t frame, uint16_t subframe) ...@@ -1820,3 +1821,12 @@ void oai_subframe_ind(uint16_t frame, uint16_t subframe)
{ {
} }
} }
int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind)
{
rach_ind->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!!
LOG_I(PHY, "%s() sfn_sf:%d preambles:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(rach_ind->sfn_sf), rach_ind->rach_indication_body.number_of_preambles);
return nfapi_pnf_p7_rach_ind(p7_config_g, rach_ind);
}
...@@ -633,6 +633,34 @@ int phy_subframe_indication(struct nfapi_vnf_p7_config* config, uint16_t phy_id, ...@@ -633,6 +633,34 @@ int phy_subframe_indication(struct nfapi_vnf_p7_config* config, uint16_t phy_id,
return 0; return 0;
} }
int phy_rach_indication(struct nfapi_vnf_p7_config* config, nfapi_rach_indication_t* ind)
{
LOG_I(MAC, "%s() NFAPI SFN/SF:%d number_of_preambles:%u\n", __FUNCTION__, NFAPI_SFNSF2DEC(ind->sfn_sf), ind->rach_indication_body.number_of_preambles);
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
pthread_mutex_lock(&eNB->UL_INFO_mutex);
eNB->UL_INFO.rach_ind.number_of_preambles=ind->rach_indication_body.number_of_preambles;
if (eNB->UL_INFO.rach_ind.preamble_list==0)
{
LOG_W(MAC, "%s() Mallocing eNB->UL_INFO.rach_ind.preamble_list but have no code to free it, but should only be needed once...\n", __FUNCTION__);
eNB->UL_INFO.rach_ind.preamble_list = malloc(sizeof(nfapi_preamble_pdu_t)*MAX_NUM_RX_PRACH_PREAMBLES);
}
for(int i=0;i<ind->rach_indication_body.number_of_preambles;i++)
{
eNB->UL_INFO.rach_ind.preamble_list[0]=ind->rach_indication_body.preamble_list[0];
}
pthread_mutex_unlock(&eNB->UL_INFO_mutex);
// vnf_p7_info* p7_vnf = (vnf_p7_info*)(config->user_data);
//mac_rach_ind(p7_vnf->mac, ind);
return 1;
}
int phy_harq_indication(struct nfapi_vnf_p7_config* config, nfapi_harq_indication_t* ind) int phy_harq_indication(struct nfapi_vnf_p7_config* config, nfapi_harq_indication_t* ind)
{ {
// vnf_p7_info* p7_vnf = (vnf_p7_info*)(config->user_data); // vnf_p7_info* p7_vnf = (vnf_p7_info*)(config->user_data);
...@@ -652,12 +680,6 @@ int phy_rx_indication(struct nfapi_vnf_p7_config* config, nfapi_rx_indication_t* ...@@ -652,12 +680,6 @@ int phy_rx_indication(struct nfapi_vnf_p7_config* config, nfapi_rx_indication_t*
//mac_rx_ind(p7_vnf->mac, ind); //mac_rx_ind(p7_vnf->mac, ind);
return 1; return 1;
} }
int phy_rach_indication(struct nfapi_vnf_p7_config* config, nfapi_rach_indication_t* ind)
{
// vnf_p7_info* p7_vnf = (vnf_p7_info*)(config->user_data);
//mac_rach_ind(p7_vnf->mac, ind);
return 1;
}
int phy_srs_indication(struct nfapi_vnf_p7_config* config, nfapi_srs_indication_t* ind) int phy_srs_indication(struct nfapi_vnf_p7_config* config, nfapi_srs_indication_t* ind)
{ {
// vnf_p7_info* p7_vnf = (vnf_p7_info*)(config->user_data); // vnf_p7_info* p7_vnf = (vnf_p7_info*)(config->user_data);
......
...@@ -1732,9 +1732,9 @@ int phy_init_RU(RU_t *ru) { ...@@ -1732,9 +1732,9 @@ int phy_init_RU(RU_t *ru) {
#endif #endif
} }
LOG_E(PHY,"[INIT] %s() RC.nb_inst:%d \n", __FUNCTION__, RC.nb_inst); LOG_E(PHY,"[INIT] %s() RC.nb_L1_inst:%d \n", __FUNCTION__, RC.nb_L1_inst);
for (i=0; i<RC.nb_inst; i++) { for (i=0; i<RC.nb_L1_inst; i++) {
for (p=0;p<15;p++) { for (p=0;p<15;p++) {
LOG_D(PHY,"[INIT] %s() nb_antenna_ports_eNB:%d \n", __FUNCTION__, ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB); LOG_D(PHY,"[INIT] %s() nb_antenna_ports_eNB:%d \n", __FUNCTION__, ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB);
if (p<ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB || p==5) { if (p<ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB || p==5) {
......
...@@ -38,7 +38,8 @@ ...@@ -38,7 +38,8 @@
#include "SCHED/extern.h" #include "SCHED/extern.h"
#include "UTIL/LOG/vcd_signal_dumper.h" #include "UTIL/LOG/vcd_signal_dumper.h"
//#define PRACH_DEBUG 1 #define PRACH_DEBUG 1
//#define PRACH_WRITE_OUTPUT_DEBUG 1
uint16_t NCS_unrestricted[16] = {0,13,15,18,22,26,32,38,46,59,76,93,119,167,279,419}; uint16_t NCS_unrestricted[16] = {0,13,15,18,22,26,32,38,46,59,76,93,119,167,279,419};
uint16_t NCS_restricted[15] = {15,18,22,26,32,38,46,55,68,82,100,128,158,202,237}; // high-speed case uint16_t NCS_restricted[15] = {15,18,22,26,32,38,46,55,68,82,100,128,158,202,237}; // high-speed case
...@@ -565,7 +566,7 @@ int is_prach_subframe0(LTE_DL_FRAME_PARMS *frame_parms,uint8_t prach_ConfigIndex ...@@ -565,7 +566,7 @@ int is_prach_subframe0(LTE_DL_FRAME_PARMS *frame_parms,uint8_t prach_ConfigIndex
t1_ra = tdd_preamble_map[prach_ConfigIndex][tdd_config].map[0].t1_ra; t1_ra = tdd_preamble_map[prach_ConfigIndex][tdd_config].map[0].t1_ra;
t2_ra = tdd_preamble_map[prach_ConfigIndex][tdd_config].map[0].t2_ra; t2_ra = tdd_preamble_map[prach_ConfigIndex][tdd_config].map[0].t2_ra;
#ifdef PRACH_DEBUG #ifdef PRACH_DEBUG
LOG_D(PHY,"[PRACH] Checking for PRACH format (ConfigIndex %d) in TDD subframe %d (%d,%d,%d)\n", LOG_I(PHY,"[PRACH] Checking for PRACH format (ConfigIndex %d) in TDD subframe %d (%d,%d,%d)\n",
prach_ConfigIndex, prach_ConfigIndex,
subframe, subframe,
t0_ra,t1_ra,t2_ra); t0_ra,t1_ra,t2_ra);
...@@ -658,7 +659,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1 ...@@ -658,7 +659,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
#else //normal case (simulation) #else //normal case (simulation)
prach_start = subframe*ue->frame_parms.samples_per_tti-ue->N_TA_offset; prach_start = subframe*ue->frame_parms.samples_per_tti-ue->N_TA_offset;
LOG_D(PHY,"[UE %d] prach_start %d, rx_offset %d, hw_timing_advance %d, N_TA_offset %d\n", ue->Mod_id, LOG_I(PHY,"[UE %d] prach_start %d, rx_offset %d, hw_timing_advance %d, N_TA_offset %d\n", ue->Mod_id,
prach_start, prach_start,
ue->rx_offset, ue->rx_offset,
ue->hw_timing_advance, ue->hw_timing_advance,
...@@ -726,7 +727,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1 ...@@ -726,7 +727,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
} else { // This is the high-speed case } else { // This is the high-speed case
#ifdef PRACH_DEBUG #ifdef PRACH_DEBUG
LOG_D(PHY,"[UE %d] High-speed mode, NCS_config %d\n",ue->Mod_id,Ncs_config); LOG_I(PHY,"[UE %d] High-speed mode, NCS_config %d\n",ue->Mod_id,Ncs_config);
#endif #endif
not_found = 1; not_found = 1;
...@@ -787,7 +788,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1 ...@@ -787,7 +788,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
#ifdef PRACH_DEBUG #ifdef PRACH_DEBUG
if (NCS>0) if (NCS>0)
LOG_D(PHY,"Generate PRACH for RootSeqIndex %d, Preamble Index %d, NCS %d (NCS_config %d, N_ZC/NCS %d) n_ra_prb %d: Preamble_offset %d, Preamble_shift %d\n", LOG_I(PHY,"Generate PRACH for RootSeqIndex %d, Preamble Index %d, NCS %d (NCS_config %d, N_ZC/NCS %d) n_ra_prb %d: Preamble_offset %d, Preamble_shift %d\n",
rootSequenceIndex,preamble_index,NCS,Ncs_config,N_ZC/NCS,n_ra_prb, rootSequenceIndex,preamble_index,NCS,Ncs_config,N_ZC/NCS,n_ra_prb,
preamble_offset,preamble_shift); preamble_offset,preamble_shift);
...@@ -1042,14 +1043,14 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1 ...@@ -1042,14 +1043,14 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
break; break;
} }
//LOG_D(PHY,"prach_len=%d\n",prach_len); //LOG_I(PHY,"prach_len=%d\n",prach_len);
AssertFatal(prach_fmt<4, AssertFatal(prach_fmt<4,
"prach_fmt4 not fully implemented" ); "prach_fmt4 not fully implemented" );
#if defined(EXMIMO) || defined(OAI_USRP) #if defined(EXMIMO) || defined(OAI_USRP)
int j; int j;
int overflow = prach_start + prach_len - LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*ue->frame_parms.samples_per_tti; int overflow = prach_start + prach_len - LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*ue->frame_parms.samples_per_tti;
LOG_D( PHY, "prach_start=%d, overflow=%d\n", prach_start, overflow ); LOG_I( PHY, "prach_start=%d, overflow=%d\n", prach_start, overflow );
for (i=prach_start,j=0; i<min(ue->frame_parms.samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME,prach_start+prach_len); i++,j++) { for (i=prach_start,j=0; i<min(ue->frame_parms.samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME,prach_start+prach_len); i++,j++) {
((int16_t*)ue->common_vars.txdata[0])[2*i] = prach[2*j]<<4; ((int16_t*)ue->common_vars.txdata[0])[2*i] = prach[2*j]<<4;
...@@ -1082,7 +1083,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1 ...@@ -1082,7 +1083,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
#if 0 #if defined(PRACH_WRITE_OUTPUT_DEBUG)
write_output("prach_txF0.m","prachtxF0",prachF,prach_len-Ncp,1,1); write_output("prach_txF0.m","prachtxF0",prachF,prach_len-Ncp,1,1);
write_output("prach_tx0.m","prachtx0",prach+(Ncp<<1),prach_len-Ncp,1,1); write_output("prach_tx0.m","prachtx0",prach+(Ncp<<1),prach_len-Ncp,1,1);
write_output("txsig.m","txs",(int16_t*)(&ue->common_vars.txdata[0][0]),2*ue->frame_parms.samples_per_tti,1,1); write_output("txsig.m","txs",(int16_t*)(&ue->common_vars.txdata[0][0]),2*ue->frame_parms.samples_per_tti,1,1);
...@@ -1227,8 +1228,7 @@ void rx_prach0(PHY_VARS_eNB *eNB, ...@@ -1227,8 +1228,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
prachF = eNB->prach_vars.prachF; prachF = eNB->prach_vars.prachF;
rxsigF = eNB->prach_vars.rxsigF; rxsigF = eNB->prach_vars.rxsigF;
#ifdef PRACH_DEBUG #ifdef PRACH_DEBUG
if ((frame&1023) < 20) LOG_I(PHY,"PRACH (eNB) : running rx_prach for subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d , rootSequenceIndex %d\n", //if ((frame&1023) < 20) LOG_I(PHY,"PRACH (eNB) : running rx_prach for subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d , rootSequenceIndex %d\n", subframe,fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset,prach_ConfigIndex,rootSequenceIndex);
subframe,fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset,prach_ConfigIndex,rootSequenceIndex);
#endif #endif
} }
} }
...@@ -1259,9 +1259,19 @@ void rx_prach0(PHY_VARS_eNB *eNB, ...@@ -1259,9 +1259,19 @@ void rx_prach0(PHY_VARS_eNB *eNB,
for (aa=0; aa<nb_rx; aa++) { for (aa=0; aa<nb_rx; aa++) {
if (ru->if_south == LOCAL_RF) { // set the time-domain signal if we have to use it in this node if (ru->if_south == LOCAL_RF) { // set the time-domain signal if we have to use it in this node
// DJP - indexing below in subframe zero takes us off the beginning of the array???
prach[aa] = (int16_t*)&ru->common.rxdata[aa][(subframe*fp->samples_per_tti)-ru->N_TA_offset]; prach[aa] = (int16_t*)&ru->common.rxdata[aa][(subframe*fp->samples_per_tti)-ru->N_TA_offset];
#ifdef PRACH_DEBUG #ifdef PRACH_DEBUG
if ((frame&1023) < 20) LOG_I(PHY,"RU %d, br_flag %d ce_level %d frame %d subframe %d, : prach %p (energy %d)\n",ru->idx,br_flag,ce_level,frame,subframe,prach[aa],dB_fixed(en0=signal_energy(prach[aa],fp->samples_per_tti))); //int8_t rach_dBm = dB_fixed(rach_pwr) - eNB->rx_total_gain_dB;
//LOG_E(PHY,"RACH %d dBm rx_total_gain_db:%d rach_pwr, rxdata:%d dBm\n", rach_dBm, eNB->rx_total_gain_dB, rach_pwr, rxdata_pwr);
//if ((frame&1023) < 20) LOG_I(PHY,"RU %d, br_flag %d ce_level %d frame %d subframe %d, : prach %p (energy %d)\n",ru->idx,br_flag,ce_level,frame,subframe,prach[aa],dB_fixed(en0=signal_energy(prach[aa],fp->samples_per_tti)));
en0=signal_energy(prach[aa],fp->samples_per_tti);
int8_t dbEn0 = dB_fixed(en0);
if (dbEn0>32)
LOG_I(PHY,"RU %d, br_flag %d ce_level %d frame %d subframe %d, : prach %p (energy %d) TA:%d\n",ru->idx,br_flag,ce_level,frame,subframe,prach[aa],dbEn0,ru->N_TA_offset);
#endif #endif
} }
} }
...@@ -1479,6 +1489,8 @@ void rx_prach0(PHY_VARS_eNB *eNB, ...@@ -1479,6 +1489,8 @@ void rx_prach0(PHY_VARS_eNB *eNB,
#ifdef PRACH_DEBUG #ifdef PRACH_DEBUG
if ((en > 60)&&(br_flag==1)) LOG_I(PHY,"PRACH (br_flag %d,ce_level %d, n_ra_prb %d, k %d): Frame %d, Subframe %d => %d dB\n",br_flag,ce_level,n_ra_prb,k,eNB->proc.frame_rx,eNB->proc.subframe_rx,en); if ((en > 60)&&(br_flag==1)) LOG_I(PHY,"PRACH (br_flag %d,ce_level %d, n_ra_prb %d, k %d): Frame %d, Subframe %d => %d dB\n",br_flag,ce_level,n_ra_prb,k,eNB->proc.frame_rx,eNB->proc.subframe_rx,en);
#endif #endif
if (en > 60)
LOG_I(PHY,"PRACH (br_flag %d,ce_level %d, n_ra_prb %d, k %d): Frame %d, Subframe %d => %d dB\n",br_flag,ce_level,n_ra_prb,k,eNB->proc.frame_rx,eNB->proc.subframe_rx,en);
} }
...@@ -1624,7 +1636,7 @@ void rx_prach0(PHY_VARS_eNB *eNB, ...@@ -1624,7 +1636,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
} }
memset(prachF, 0, sizeof(int16_t)*2*1024 ); memset(prachF, 0, sizeof(int16_t)*2*1024 );
#ifdef PRACH_DEBUG #if defined(PRACH_WRITE_OUTPUT_DEBUG)
if (prach[0]!= NULL) write_output("prach_rx0.m","prach_rx0",prach[0],6144+792,1,1); if (prach[0]!= NULL) write_output("prach_rx0.m","prach_rx0",prach[0],6144+792,1,1);
#endif #endif
// write_output("prach_rx1.m","prach_rx1",prach[1],6144+792,1,1); // write_output("prach_rx1.m","prach_rx1",prach[1],6144+792,1,1);
...@@ -1658,7 +1670,7 @@ void rx_prach0(PHY_VARS_eNB *eNB, ...@@ -1658,7 +1670,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
prach_ifft[i] += (prach_ifft_tmp[i<<1]*prach_ifft_tmp[(i<<1)] + prach_ifft_tmp[1+(i<<1)]*prach_ifft_tmp[1+(i<<1)])>>15; prach_ifft[i] += (prach_ifft_tmp[i<<1]*prach_ifft_tmp[(i<<1)] + prach_ifft_tmp[1+(i<<1)]*prach_ifft_tmp[1+(i<<1)])>>15;
} }
#ifdef PRACH_DEBUG #if defined(PRACH_WRITE_OUTPUT_DEBUG)
if (aa==0) write_output("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1); if (aa==0) write_output("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1);
#endif #endif
// if (aa=1) write_output("prach_rxF_comp1.m","prach_rxF_comp1",prachF,1024,1,1); // if (aa=1) write_output("prach_rxF_comp1.m","prach_rxF_comp1",prachF,1024,1,1);
...@@ -1687,7 +1699,7 @@ void rx_prach0(PHY_VARS_eNB *eNB, ...@@ -1687,7 +1699,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
*max_preamble_delay = ((i*fft_size)>>log2_ifft_size)*update_TA/update_TA2; *max_preamble_delay = ((i*fft_size)>>log2_ifft_size)*update_TA/update_TA2;
*max_preamble = preamble_index; *max_preamble = preamble_index;
//#ifdef PRACH_DEBUG //#ifdef PRACH_DEBUG
if ((en>60) && (br_flag==1)) LOG_D(PHY,"frame %d, subframe %d : max_preamble_energy %d, max_preamble_delay %d, max_preamble %d (br_flag %d,ce_level %d, levdB %d, lev %d)\n",frame,subframe,*max_preamble_energy,*max_preamble_delay,*max_preamble,br_flag,ce_level,levdB,lev); if ((en>60) && (br_flag==1)) LOG_I(PHY,"frame %d, subframe %d : max_preamble_energy %d, max_preamble_delay %d, max_preamble %d (br_flag %d,ce_level %d, levdB %d, lev %d)\n",frame,subframe,*max_preamble_energy,*max_preamble_delay,*max_preamble,br_flag,ce_level,levdB,lev);
//#endif //#endif
} }
} }
...@@ -1707,19 +1719,22 @@ void rx_prach0(PHY_VARS_eNB *eNB, ...@@ -1707,19 +1719,22 @@ void rx_prach0(PHY_VARS_eNB *eNB,
k*=2; k*=2;
if (br_flag == 0) { if (br_flag == 0) {
/* #if defined(PRACH_WRITE_OUTPUT_DEBUG)
write_output("rxsigF.m","prach_rxF",&rxsigF[0][0],12288,1,1); write_output("rxsigF.m","prach_rxF",&rxsigF[0][0],12288,1,1);
write_output("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1); write_output("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1);
write_output("Xu.m","xu",Xu,N_ZC,1,1); write_output("Xu.m","xu",Xu,N_ZC,1,1);
write_output("prach_ifft0.m","prach_t0",prach_ifft,1024,1,1);*/ write_output("prach_ifft0.m","prach_t0",prach_ifft,1024,1,1);
#endif
} }
else { else {
#if defined(PRACH_WRITE_OUTPUT_DEBUG)
printf("Dumping prach (br_flag %d), k = %d (n_ra_prb %d)\n",br_flag,k,n_ra_prb); printf("Dumping prach (br_flag %d), k = %d (n_ra_prb %d)\n",br_flag,k,n_ra_prb);
write_output("rxsigF_br.m","prach_rxF_br",&rxsigF[0][0],12288,1,1); write_output("rxsigF_br.m","prach_rxF_br",&rxsigF[0][0],12288,1,1);
write_output("prach_rxF_comp0_br.m","prach_rxF_comp0_br",prachF,1024,1,1); write_output("prach_rxF_comp0_br.m","prach_rxF_comp0_br",prachF,1024,1,1);
write_output("Xu_br.m","xu_br",Xu,N_ZC,1,1); write_output("Xu_br.m","xu_br",Xu,N_ZC,1,1);
write_output("prach_ifft0_br.m","prach_t0_br",prach_ifft,1024,1,1); write_output("prach_ifft0_br.m","prach_t0_br",prach_ifft,1024,1,1);
exit(-1); exit(-1);
#endif
} }
} }
......
...@@ -86,10 +86,11 @@ void handle_nfapi_hi_dci0_hi_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, ...@@ -86,10 +86,11 @@ void handle_nfapi_hi_dci0_hi_pdu(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
LTE_eNB_PHICH *phich = &eNB->phich_vars[proc->subframe_tx&1]; LTE_eNB_PHICH *phich = &eNB->phich_vars[proc->subframe_tx&1];
// copy dci configuration in to eNB structure // copy dci configuration in to eNB structure
LOG_D(PHY,"Received HI PDU which value %d (rbstart %d,cshift %d)\n", LOG_D(PHY,"Received HI PDU which value %d (rbstart %d,cshift %d) pdu:%p\n",
hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.hi_value, hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.hi_value,
hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.resource_block_start, hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.resource_block_start,
hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.cyclic_shift_2_for_drms); hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.cyclic_shift_2_for_drms,
pdu);
phich->config[phich->num_hi].hi = hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.hi_value; phich->config[phich->num_hi].hi = hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.hi_value;
phich->config[phich->num_hi].first_rb = hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.resource_block_start; phich->config[phich->num_hi].first_rb = hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.resource_block_start;
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
# include "intertask_interface.h" # include "intertask_interface.h"
#endif #endif
int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind);
...@@ -584,7 +585,11 @@ void prach_procedures(PHY_VARS_eNB *eNB, ...@@ -584,7 +585,11 @@ void prach_procedures(PHY_VARS_eNB *eNB,
for (i=0;i<eNB->num_RU;i++) { for (i=0;i<eNB->num_RU;i++) {
ru=eNB->RU_list[i]; ru=eNB->RU_list[i];
for (ru_aa=0,aa=0;ru_aa<ru->nb_rx;ru_aa++,aa++) { for (ru_aa=0,aa=0;ru_aa<ru->nb_rx;ru_aa++,aa++) {
// Hasn't this been done already by init_eNB_afterRU() ???
eNB->prach_vars.rxsigF[0][aa] = eNB->RU_list[i]->prach_rxsigF[ru_aa]; eNB->prach_vars.rxsigF[0][aa] = eNB->RU_list[i]->prach_rxsigF[ru_aa];
//eNB->prach_vars.rxsigF[0][aa] = eNB->RU_list[i]->common.rxdata[0][subframe * eNB->frame_parms.samples_per_tti];
#ifdef Rel14 #ifdef Rel14
int ce_level; int ce_level;
...@@ -607,9 +612,10 @@ void prach_procedures(PHY_VARS_eNB *eNB, ...@@ -607,9 +612,10 @@ void prach_procedures(PHY_VARS_eNB *eNB,
); );
//#ifdef DEBUG_PHY_PROC //#ifdef DEBUG_PHY_PROC
LOG_D(PHY,"[RAPROC] Frame %d, subframe %d : Most likely preamble %d, energy %d dB delay %d\n", if (max_preamble_energy[0]/10 > 32)
LOG_E(PHY,"[RAPROC] Frame %d, subframe %d : Most likely preamble %d, energy %d dB delay %d\n",
frame,subframe, frame,subframe,
max_preamble[0], max_preamble[0],
max_preamble_energy[0]/10, max_preamble_energy[0]/10,
max_preamble_delay[0]); max_preamble_delay[0]);
//q#endif //q#endif
...@@ -663,7 +669,7 @@ void prach_procedures(PHY_VARS_eNB *eNB, ...@@ -663,7 +669,7 @@ void prach_procedures(PHY_VARS_eNB *eNB,
{ {
if (max_preamble_energy[0] > 350) { if (max_preamble_energy[0] > 350) {
LOG_D(PHY,"[eNB %d/%d][RAPROC] Frame %d, subframe %d Initiating RA procedure with preamble %d, energy %d.%d dB, delay %d\n", LOG_I(PHY,"[eNB %d/%d][RAPROC] Frame %d, subframe %d Initiating RA procedure with preamble %d, energy %d.%d dB, delay %d\n",
eNB->Mod_id, eNB->Mod_id,
eNB->CC_id, eNB->CC_id,
frame, frame,
...@@ -681,19 +687,31 @@ void prach_procedures(PHY_VARS_eNB *eNB, ...@@ -681,19 +687,31 @@ void prach_procedures(PHY_VARS_eNB *eNB,
pthread_mutex_lock(&eNB->UL_INFO_mutex); pthread_mutex_lock(&eNB->UL_INFO_mutex);
eNB->UL_INFO.rach_ind.number_of_preambles = 1; eNB->UL_INFO.rach_ind.number_of_preambles = 1;
eNB->UL_INFO.rach_ind.preamble_list = eNB->preamble_list; eNB->UL_INFO.rach_ind.preamble_list = &eNB->preamble_list[0];
eNB->UL_INFO.rach_ind.tl.tag = NFAPI_RACH_INDICATION_BODY_TAG;
eNB->preamble_list[0].preamble_rel8.tl.tag = NFAPI_PREAMBLE_REL8_TAG;
eNB->preamble_list[0].preamble_rel8.timing_advance = max_preamble_delay[0]; eNB->preamble_list[0].preamble_rel8.timing_advance = max_preamble_delay[0];
eNB->preamble_list[0].preamble_rel8.preamble = max_preamble[0]; eNB->preamble_list[0].preamble_rel8.preamble = max_preamble[0];
eNB->preamble_list[0].preamble_rel8.rnti = 1+subframe; // note: fid is implicitly 0 here eNB->preamble_list[0].preamble_rel8.rnti = 1+subframe; // note: fid is implicitly 0 here
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
LOG_D(PHY,"Filling NFAPI indication for RACH : TA %d, Preamble %d, rnti %x, rach_resource_type %d\n", nfapi_rach_indication_t rach_ind;
rach_ind.header.message_id = NFAPI_RACH_INDICATION;
rach_ind.sfn_sf = frame<<4 | subframe;
rach_ind.rach_indication_body = eNB->UL_INFO.rach_ind;
LOG_I(PHY,"\n\n\n\nDJP - this needs to be sent to VNF **********************************************\n\n\n\n");
LOG_I(PHY,"Filling NFAPI indication for RACH : TA %d, Preamble %d, rnti %x, rach_resource_type %d\n",
eNB->preamble_list[0].preamble_rel8.timing_advance, eNB->preamble_list[0].preamble_rel8.timing_advance,
eNB->preamble_list[0].preamble_rel8.preamble, eNB->preamble_list[0].preamble_rel8.preamble,
eNB->preamble_list[0].preamble_rel8.rnti, eNB->preamble_list[0].preamble_rel8.rnti,
eNB->preamble_list[0].preamble_rel13.rach_resource_type); eNB->preamble_list[0].preamble_rel13.rach_resource_type);
oai_nfapi_rach_ind(&rach_ind);
pthread_mutex_unlock(&eNB->UL_INFO_mutex); pthread_mutex_unlock(&eNB->UL_INFO_mutex);
} // max_preamble_energy > 350 } // max_preamble_energy > 350
...@@ -1733,7 +1751,7 @@ void fill_ulsch_harq_indication(PHY_VARS_eNB *eNB,LTE_UL_eNB_HARQ_t *ulsch_harq, ...@@ -1733,7 +1751,7 @@ void fill_ulsch_harq_indication(PHY_VARS_eNB *eNB,LTE_UL_eNB_HARQ_t *ulsch_harq,
void fill_uci_harq_indication(PHY_VARS_eNB *eNB,LTE_eNB_UCI *uci,int frame,int subframe,uint8_t *harq_ack,uint8_t tdd_mapping_mode,uint16_t tdd_multiplexing_mask) { void fill_uci_harq_indication(PHY_VARS_eNB *eNB,LTE_eNB_UCI *uci,int frame,int subframe,uint8_t *harq_ack,uint8_t tdd_mapping_mode,uint16_t tdd_multiplexing_mask) {
int UE_id=find_dlsch(uci->rnti,eNB,SEARCH_EXIST),i; int UE_id=find_dlsch(uci->rnti,eNB,SEARCH_EXIST);
pthread_mutex_lock(&eNB->UL_INFO_mutex); pthread_mutex_lock(&eNB->UL_INFO_mutex);
......
...@@ -125,7 +125,8 @@ void schedule_SRS(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP) { ...@@ -125,7 +125,8 @@ void schedule_SRS(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP) {
memset((void*)ul_config_pdu,0,sizeof(nfapi_ul_config_request_pdu_t)); memset((void*)ul_config_pdu,0,sizeof(nfapi_ul_config_request_pdu_t));
ul_config_pdu->pdu_type = NFAPI_UL_CONFIG_SRS_PDU_TYPE; ul_config_pdu->pdu_type = NFAPI_UL_CONFIG_SRS_PDU_TYPE;
ul_config_pdu->pdu_size = 2+(uint8_t)(2+sizeof(nfapi_ul_config_srs_pdu)); ul_config_pdu->pdu_size = 2+(uint8_t)(2+sizeof(nfapi_ul_config_srs_pdu));
ul_config_pdu->srs_pdu.srs_pdu_rel8.size = (uint8_t)sizeof(nfapi_ul_config_srs_pdu);; ul_config_pdu->srs_pdu.srs_pdu_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_SRS_PDU_REL8_TAG;
ul_config_pdu->srs_pdu.srs_pdu_rel8.size = (uint8_t)sizeof(nfapi_ul_config_srs_pdu);
ul_config_pdu->srs_pdu.srs_pdu_rel8.rnti = UE_list->UE_template[CC_id][UE_id].rnti; ul_config_pdu->srs_pdu.srs_pdu_rel8.rnti = UE_list->UE_template[CC_id][UE_id].rnti;
ul_config_pdu->srs_pdu.srs_pdu_rel8.srs_bandwidth = soundingRS_UL_ConfigDedicated->choice.setup.srs_Bandwidth; ul_config_pdu->srs_pdu.srs_pdu_rel8.srs_bandwidth = soundingRS_UL_ConfigDedicated->choice.setup.srs_Bandwidth;
ul_config_pdu->srs_pdu.srs_pdu_rel8.frequency_domain_position = soundingRS_UL_ConfigDedicated->choice.setup.freqDomainPosition; ul_config_pdu->srs_pdu.srs_pdu_rel8.frequency_domain_position = soundingRS_UL_ConfigDedicated->choice.setup.freqDomainPosition;
...@@ -136,6 +137,7 @@ void schedule_SRS(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP) { ...@@ -136,6 +137,7 @@ void schedule_SRS(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP) {
// ul_config_pdu->srs_pdu.srs_pdu_rel10.antenna_port = ;// // ul_config_pdu->srs_pdu.srs_pdu_rel10.antenna_port = ;//
// ul_config_pdu->srs_pdu.srs_pdu_rel13.number_of_combs = ;// // ul_config_pdu->srs_pdu.srs_pdu_rel13.number_of_combs = ;//
RC.mac[module_idP]->UL_req[CC_id].sfn_sf = (frameP<<4)+subframeP; RC.mac[module_idP]->UL_req[CC_id].sfn_sf = (frameP<<4)+subframeP;
RC.mac[module_idP]->UL_req[CC_id].header.message_id = NFAPI_UL_CONFIG_REQUEST;
ul_req->number_of_pdus++; ul_req->number_of_pdus++;
} // if (((10*frameP+subframeP) % srsPeriodicity) == srsOffset) } // if (((10*frameP+subframeP) % srsPeriodicity) == srsOffset)
} // if (soundingRS_UL_ConfigDedicated->present == SoundingRS_UL_ConfigDedicated_PR_setup) } // if (soundingRS_UL_ConfigDedicated->present == SoundingRS_UL_ConfigDedicated_PR_setup)
...@@ -181,7 +183,9 @@ void schedule_CSI(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP) { ...@@ -181,7 +183,9 @@ void schedule_CSI(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP) {
memset((void*)ul_config_pdu,0,sizeof(nfapi_ul_config_request_pdu_t)); memset((void*)ul_config_pdu,0,sizeof(nfapi_ul_config_request_pdu_t));
ul_config_pdu->pdu_type = NFAPI_UL_CONFIG_UCI_CQI_PDU_TYPE; ul_config_pdu->pdu_type = NFAPI_UL_CONFIG_UCI_CQI_PDU_TYPE;
ul_config_pdu->pdu_size = 2+(uint8_t)(2+sizeof(nfapi_ul_config_uci_cqi_pdu)); ul_config_pdu->pdu_size = 2+(uint8_t)(2+sizeof(nfapi_ul_config_uci_cqi_pdu));
ul_config_pdu->uci_cqi_pdu.ue_information.ue_information_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_UE_INFORMATION_REL8_TAG;
ul_config_pdu->uci_cqi_pdu.ue_information.ue_information_rel8.rnti = UE_list->UE_template[CC_id][UE_id].rnti; ul_config_pdu->uci_cqi_pdu.ue_information.ue_information_rel8.rnti = UE_list->UE_template[CC_id][UE_id].rnti;
ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_CQI_INFORMATION_REL8_TAG;
ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.pucch_index = cqi_ReportPeriodic->choice.setup.cqi_PUCCH_ResourceIndex; ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.pucch_index = cqi_ReportPeriodic->choice.setup.cqi_PUCCH_ResourceIndex;
ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.dl_cqi_pmi_size = get_rel8_dl_cqi_pmi_size(&UE_list->UE_sched_ctrl[UE_id], ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.dl_cqi_pmi_size = get_rel8_dl_cqi_pmi_size(&UE_list->UE_sched_ctrl[UE_id],
CC_id, CC_id,
...@@ -189,6 +193,7 @@ void schedule_CSI(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP) { ...@@ -189,6 +193,7 @@ void schedule_CSI(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP) {
get_tmode(module_idP,CC_id,UE_id), get_tmode(module_idP,CC_id,UE_id),
cqi_ReportPeriodic); cqi_ReportPeriodic);
ul_req->number_of_pdus++; ul_req->number_of_pdus++;
ul_req->tl.tag = NFAPI_UL_CONFIG_REQUEST_BODY_TAG;
#if defined(Rel10) || defined(Rel14) #if defined(Rel10) || defined(Rel14)
// PUT rel10-13 UCI options here // PUT rel10-13 UCI options here
...@@ -202,11 +207,14 @@ void schedule_CSI(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP) { ...@@ -202,11 +207,14 @@ void schedule_CSI(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP) {
memset((void*)ul_config_pdu,0,sizeof(nfapi_ul_config_request_pdu_t)); memset((void*)ul_config_pdu,0,sizeof(nfapi_ul_config_request_pdu_t));
ul_config_pdu->pdu_type = NFAPI_UL_CONFIG_UCI_CQI_PDU_TYPE; ul_config_pdu->pdu_type = NFAPI_UL_CONFIG_UCI_CQI_PDU_TYPE;
ul_config_pdu->pdu_size = 2+(uint8_t)(2+sizeof(nfapi_ul_config_uci_cqi_pdu)); ul_config_pdu->pdu_size = 2+(uint8_t)(2+sizeof(nfapi_ul_config_uci_cqi_pdu));
ul_config_pdu->uci_cqi_pdu.ue_information.ue_information_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_UE_INFORMATION_REL8_TAG;
ul_config_pdu->uci_cqi_pdu.ue_information.ue_information_rel8.rnti = UE_list->UE_template[CC_id][UE_id].rnti; ul_config_pdu->uci_cqi_pdu.ue_information.ue_information_rel8.rnti = UE_list->UE_template[CC_id][UE_id].rnti;
ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_CQI_INFORMATION_REL8_TAG;
ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.pucch_index = cqi_ReportPeriodic->choice.setup.cqi_PUCCH_ResourceIndex; ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.pucch_index = cqi_ReportPeriodic->choice.setup.cqi_PUCCH_ResourceIndex;
ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.dl_cqi_pmi_size = (cc->p_eNB==2)?1:2; ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.dl_cqi_pmi_size = (cc->p_eNB==2)?1:2;
RC.mac[module_idP]->UL_req[CC_id].sfn_sf = (frameP<<4)+subframeP; RC.mac[module_idP]->UL_req[CC_id].sfn_sf = (frameP<<4)+subframeP;
ul_req->number_of_pdus++; ul_req->number_of_pdus++;
ul_req->tl.tag = NFAPI_UL_CONFIG_REQUEST_BODY_TAG;
} }
} // if ((cqi_ReportPeriodic = cqi_ReportConfig->cqi_ReportPeriodic)!=NULL) { } // if ((cqi_ReportPeriodic = cqi_ReportConfig->cqi_ReportPeriodic)!=NULL) {
...@@ -271,7 +279,8 @@ void schedule_SR(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP) { ...@@ -271,7 +279,8 @@ void schedule_SR(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP) {
// if we get here then there is no UL grant so program the SR // if we get here then there is no UL grant so program the SR
ul_req->ul_config_pdu_list[ul_req->number_of_pdus].pdu_type = NFAPI_UL_CONFIG_UCI_SR_PDU_TYPE; ul_req->ul_config_pdu_list[ul_req->number_of_pdus].pdu_type = NFAPI_UL_CONFIG_UCI_SR_PDU_TYPE;
ul_req->ul_config_pdu_list[ul_req->number_of_pdus].uci_sr_pdu.ue_information.ue_information_rel8.rnti = UE_list->UE_template[CC_id][UE_id].rnti; ul_req->ul_config_pdu_list[ul_req->number_of_pdus].uci_sr_pdu.ue_information.ue_information_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_UE_INFORMATION_REL8_TAG;
ul_req->ul_config_pdu_list[ul_req->number_of_pdus].uci_sr_pdu.ue_information.ue_information_rel8.rnti = UE_list->UE_template[CC_id][UE_id].rnti;
// check Rel10 or Rel8 SR // check Rel10 or Rel8 SR
#if defined(Rel10) || defined(Rel14) #if defined(Rel10) || defined(Rel14)
...@@ -279,6 +288,7 @@ void schedule_SR(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP) { ...@@ -279,6 +288,7 @@ void schedule_SR(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP) {
(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->ext2->schedulingRequestConfig_v1020)&& (UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->ext2->schedulingRequestConfig_v1020)&&
(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->ext2->schedulingRequestConfig_v1020)) { (UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->ext2->schedulingRequestConfig_v1020)) {
ul_req->ul_config_pdu_list[ul_req->number_of_pdus].uci_sr_pdu.sr_information.sr_information_rel10.tl.tag = NFAPI_UL_CONFIG_REQUEST_SR_INFORMATION_REL10_TAG;
ul_req->ul_config_pdu_list[ul_req->number_of_pdus].uci_sr_pdu.sr_information.sr_information_rel10.number_of_pucch_resources = 1; ul_req->ul_config_pdu_list[ul_req->number_of_pdus].uci_sr_pdu.sr_information.sr_information_rel10.number_of_pucch_resources = 1;
ul_req->ul_config_pdu_list[ul_req->number_of_pdus].uci_sr_pdu.sr_information.sr_information_rel10.pucch_index_p1 = ul_req->ul_config_pdu_list[ul_req->number_of_pdus].uci_sr_pdu.sr_information.sr_information_rel10.pucch_index_p1 =
*UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->ext2->schedulingRequestConfig_v1020->sr_PUCCH_ResourceIndexP1_r10; *UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->ext2->schedulingRequestConfig_v1020->sr_PUCCH_ResourceIndexP1_r10;
...@@ -293,6 +303,7 @@ void schedule_SR(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP) { ...@@ -293,6 +303,7 @@ void schedule_SR(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP) {
LOG_D(MAC,"Frame %d, Subframe %d : Scheduling SR for UE %d/%x\n",frameP,subframeP,UE_id,UE_list->UE_template[CC_id][UE_id].rnti); LOG_D(MAC,"Frame %d, Subframe %d : Scheduling SR for UE %d/%x\n",frameP,subframeP,UE_id,UE_list->UE_template[CC_id][UE_id].rnti);
} }
RC.mac[module_idP]->UL_req[CC_id].sfn_sf = (frameP<<4)+subframeP; RC.mac[module_idP]->UL_req[CC_id].sfn_sf = (frameP<<4)+subframeP;
RC.mac[module_idP]->UL_req[CC_id].header.message_id = NFAPI_UL_CONFIG_REQUEST;
ul_req->number_of_pdus++; ul_req->number_of_pdus++;
} // for (UE_id=UE_list->head; UE_id>=0; UE_id=UE_list->next[UE_id]) } // for (UE_id=UE_list->head; UE_id>=0; UE_id=UE_list->next[UE_id])
} // for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) } // for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++)
...@@ -320,6 +331,7 @@ void check_ul_failure(module_id_t module_idP,int CC_id,int UE_id, ...@@ -320,6 +331,7 @@ void check_ul_failure(module_id_t module_idP,int CC_id,int UE_id,
memset((void*)dl_config_pdu,0,sizeof(nfapi_dl_config_request_pdu_t)); memset((void*)dl_config_pdu,0,sizeof(nfapi_dl_config_request_pdu_t));
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE; dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
dl_config_pdu->pdu_size = (uint8_t)(2+sizeof(nfapi_dl_config_dci_dl_pdu)); dl_config_pdu->pdu_size = (uint8_t)(2+sizeof(nfapi_dl_config_dci_dl_pdu));
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1A; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1A;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = get_aggregation(get_bw_index(module_idP,CC_id),eNB_UE_stats->dl_cqi,format1A); dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = get_aggregation(get_bw_index(module_idP,CC_id),eNB_UE_stats->dl_cqi,format1A);
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = rnti; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = rnti;
...@@ -333,6 +345,7 @@ void check_ul_failure(module_id_t module_idP,int CC_id,int UE_id, ...@@ -333,6 +345,7 @@ void check_ul_failure(module_id_t module_idP,int CC_id,int UE_id,
LOG_E(MAC, "%s() number_dci:%u\n", __FUNCTION__, DL_req[CC_id].dl_config_request_body.number_dci); LOG_E(MAC, "%s() number_dci:%u\n", __FUNCTION__, DL_req[CC_id].dl_config_request_body.number_dci);
DL_req[CC_id].dl_config_request_body.number_pdu++; DL_req[CC_id].dl_config_request_body.number_pdu++;
DL_req[CC_id].dl_config_request_body.tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
/* /*
add_ue_spec_dci(&DL_req[CC_id], add_ue_spec_dci(&DL_req[CC_id],
...@@ -539,6 +552,3 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP, sub_frame ...@@ -539,6 +552,3 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP, sub_frame
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER,VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER,VCD_FUNCTION_OUT);
} }
This diff is collapsed.
...@@ -705,6 +705,7 @@ schedule_ue_spec( ...@@ -705,6 +705,7 @@ schedule_ue_spec(
memset((void*)dl_config_pdu,0,sizeof(nfapi_dl_config_request_pdu_t)); memset((void*)dl_config_pdu,0,sizeof(nfapi_dl_config_request_pdu_t));
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE; dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
dl_config_pdu->pdu_size = (uint8_t)(2+sizeof(nfapi_dl_config_dci_dl_pdu)); dl_config_pdu->pdu_size = (uint8_t)(2+sizeof(nfapi_dl_config_dci_dl_pdu));
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = get_aggregation(get_bw_index(module_idP,CC_id),eNB_UE_stats->dl_cqi,format1); dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = get_aggregation(get_bw_index(module_idP,CC_id),eNB_UE_stats->dl_cqi,format1);
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = rnti; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = rnti;
...@@ -734,6 +735,7 @@ schedule_ue_spec( ...@@ -734,6 +735,7 @@ schedule_ue_spec(
rnti)) { rnti)) {
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;
fill_nfapi_dlsch_config(eNB,dl_req, fill_nfapi_dlsch_config(eNB,dl_req,
TBS, TBS,
...@@ -1188,6 +1190,7 @@ schedule_ue_spec( ...@@ -1188,6 +1190,7 @@ schedule_ue_spec(
memset((void*)dl_config_pdu,0,sizeof(nfapi_dl_config_request_pdu_t)); memset((void*)dl_config_pdu,0,sizeof(nfapi_dl_config_request_pdu_t));
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE; dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
dl_config_pdu->pdu_size = (uint8_t)(2+sizeof(nfapi_dl_config_dci_dl_pdu)); dl_config_pdu->pdu_size = (uint8_t)(2+sizeof(nfapi_dl_config_dci_dl_pdu));
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = get_aggregation(get_bw_index(module_idP,CC_id),eNB_UE_stats->dl_cqi,format1); dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = get_aggregation(get_bw_index(module_idP,CC_id),eNB_UE_stats->dl_cqi,format1);
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = rnti; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = rnti;
...@@ -1219,6 +1222,7 @@ schedule_ue_spec( ...@@ -1219,6 +1222,7 @@ schedule_ue_spec(
ue_sched_ctl->round[CC_id][harq_pid] = 0; ue_sched_ctl->round[CC_id][harq_pid] = 0;
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;
// Toggle NDI for next time // Toggle NDI for next time
LOG_D(MAC,"CC_id %d Frame %d, subframeP %d: Toggling Format1 NDI for UE %d (rnti %x/%d) oldNDI %d\n", LOG_D(MAC,"CC_id %d Frame %d, subframeP %d: Toggling Format1 NDI for UE %d (rnti %x/%d) oldNDI %d\n",
...@@ -1362,11 +1366,13 @@ fill_DLSCH_dci( ...@@ -1362,11 +1366,13 @@ fill_DLSCH_dci(
dl_config_pdu = &DL_req[CC_id].dl_config_request_body.dl_config_pdu_list[i]; dl_config_pdu = &DL_req[CC_id].dl_config_request_body.dl_config_pdu_list[i];
if ((dl_config_pdu->pdu_type == NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE)&& if ((dl_config_pdu->pdu_type == NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE)&&
(dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti == rnti)) { (dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti == rnti)) {
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_block_coding = allocate_prbs_sub(nb_rb,N_RB_DL,N_RBG,rballoc_sub); dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_block_coding = allocate_prbs_sub(nb_rb,N_RB_DL,N_RBG,rballoc_sub);
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_allocation_type = 0; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_allocation_type = 0;
} }
else if ((dl_config_pdu->pdu_type == NFAPI_DL_CONFIG_DLSCH_PDU_TYPE)&& else if ((dl_config_pdu->pdu_type == NFAPI_DL_CONFIG_DLSCH_PDU_TYPE)&&
(dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti == rnti)) { (dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti == rnti)) {
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL8_TAG;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_block_coding = allocate_prbs_sub(nb_rb,N_RB_DL,N_RBG,rballoc_sub); dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_block_coding = allocate_prbs_sub(nb_rb,N_RB_DL,N_RBG,rballoc_sub);
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type = 0; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.resource_allocation_type = 0;
} }
......
...@@ -912,6 +912,7 @@ void fill_nfapi_dl_dci_1A(nfapi_dl_config_request_pdu_t *dl_config_pdu, ...@@ -912,6 +912,7 @@ void fill_nfapi_dl_dci_1A(nfapi_dl_config_request_pdu_t *dl_config_pdu,
memset((void*)dl_config_pdu,0,sizeof(nfapi_dl_config_request_pdu_t)); memset((void*)dl_config_pdu,0,sizeof(nfapi_dl_config_request_pdu_t));
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE; dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
dl_config_pdu->pdu_size = (uint8_t)(2+sizeof(nfapi_dl_config_dci_dl_pdu)); dl_config_pdu->pdu_size = (uint8_t)(2+sizeof(nfapi_dl_config_dci_dl_pdu));
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1A; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1A;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = aggregation_level; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = aggregation_level;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = rnti; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = rnti;
...@@ -986,6 +987,7 @@ void program_dlsch_acknak(module_id_t module_idP, int CC_idP,int UE_idP, frame_t ...@@ -986,6 +987,7 @@ void program_dlsch_acknak(module_id_t module_idP, int CC_idP,int UE_idP, frame_t
// Convert it to an NFAPI_UL_CONFIG_ULSCH_HARQ_PDU_TYPE // Convert it to an NFAPI_UL_CONFIG_ULSCH_HARQ_PDU_TYPE
ulsch_harq_information = &ul_config_pdu->ulsch_harq_pdu.harq_information; ulsch_harq_information = &ul_config_pdu->ulsch_harq_pdu.harq_information;
ul_config_pdu->pdu_type = NFAPI_UL_CONFIG_ULSCH_HARQ_PDU_TYPE; ul_config_pdu->pdu_type = NFAPI_UL_CONFIG_ULSCH_HARQ_PDU_TYPE;
ul_config_pdu->ulsch_harq_pdu.initial_transmission_parameters.initial_transmission_parameters_rel8.tl.tag=NFAPI_UL_CONFIG_REQUEST_INITIAL_TRANSMISSION_PARAMETERS_REL8_TAG;
ul_config_pdu->ulsch_harq_pdu.initial_transmission_parameters.initial_transmission_parameters_rel8.n_srs_initial=0; // last symbol not punctured ul_config_pdu->ulsch_harq_pdu.initial_transmission_parameters.initial_transmission_parameters_rel8.n_srs_initial=0; // last symbol not punctured
ul_config_pdu->ulsch_harq_pdu.initial_transmission_parameters.initial_transmission_parameters_rel8.initial_number_of_resource_blocks= ul_config_pdu->ulsch_harq_pdu.initial_transmission_parameters.initial_transmission_parameters_rel8.initial_number_of_resource_blocks=
ul_config_pdu->ulsch_harq_pdu.ulsch_pdu.ulsch_pdu_rel8.number_of_resource_blocks; // we don't change the number of resource blocks across retransmissions yet ul_config_pdu->ulsch_harq_pdu.ulsch_pdu.ulsch_pdu_rel8.number_of_resource_blocks; // we don't change the number of resource blocks across retransmissions yet
...@@ -1011,6 +1013,7 @@ void program_dlsch_acknak(module_id_t module_idP, int CC_idP,int UE_idP, frame_t ...@@ -1011,6 +1013,7 @@ void program_dlsch_acknak(module_id_t module_idP, int CC_idP,int UE_idP, frame_t
// Convert it to an NFAPI_UL_CONFIG_ULSCH_CQI_RI_HARQ_PDU_TYPE // Convert it to an NFAPI_UL_CONFIG_ULSCH_CQI_RI_HARQ_PDU_TYPE
ulsch_harq_information = &ul_config_pdu->ulsch_cqi_harq_ri_pdu.harq_information; ulsch_harq_information = &ul_config_pdu->ulsch_cqi_harq_ri_pdu.harq_information;
ul_config_pdu->pdu_type = NFAPI_UL_CONFIG_ULSCH_CQI_HARQ_RI_PDU_TYPE; ul_config_pdu->pdu_type = NFAPI_UL_CONFIG_ULSCH_CQI_HARQ_RI_PDU_TYPE;
ul_config_pdu->ulsch_cqi_harq_ri_pdu.initial_transmission_parameters.initial_transmission_parameters_rel8.tl.tag=NFAPI_UL_CONFIG_REQUEST_INITIAL_TRANSMISSION_PARAMETERS_REL8_TAG;
ul_config_pdu->ulsch_cqi_harq_ri_pdu.initial_transmission_parameters.initial_transmission_parameters_rel8.n_srs_initial=0; // last symbol not punctured ul_config_pdu->ulsch_cqi_harq_ri_pdu.initial_transmission_parameters.initial_transmission_parameters_rel8.n_srs_initial=0; // last symbol not punctured
ul_config_pdu->ulsch_cqi_harq_ri_pdu.initial_transmission_parameters.initial_transmission_parameters_rel8.initial_number_of_resource_blocks= ul_config_pdu->ulsch_cqi_harq_ri_pdu.initial_transmission_parameters.initial_transmission_parameters_rel8.initial_number_of_resource_blocks=
ul_config_pdu->ulsch_harq_pdu.ulsch_pdu.ulsch_pdu_rel8.number_of_resource_blocks; // we don't change the number of resource blocks across retransmissions yet ul_config_pdu->ulsch_harq_pdu.ulsch_pdu.ulsch_pdu_rel8.number_of_resource_blocks; // we don't change the number of resource blocks across retransmissions yet
...@@ -1093,6 +1096,7 @@ void fill_nfapi_ulsch_harq_information(module_id_t module_idP, ...@@ -1093,6 +1096,7 @@ void fill_nfapi_ulsch_harq_information(module_id_t module_idP,
if (UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext5) puschConfigDedicated_v1250 = UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext5->pusch_ConfigDedicated_v1250; if (UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext5) puschConfigDedicated_v1250 = UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext5->pusch_ConfigDedicated_v1250;
*/ */
#endif #endif
harq_information->harq_information_rel10.tl.tag = NFAPI_UL_CONFIG_REQUEST_ULSCH_HARQ_INFORMATION_REL10_TAG;
harq_information->harq_information_rel10.delta_offset_harq = puschConfigDedicated->betaOffset_ACK_Index; harq_information->harq_information_rel10.delta_offset_harq = puschConfigDedicated->betaOffset_ACK_Index;
AssertFatal(UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->pucch_ConfigDedicated!=NULL,"pucch_ConfigDedicated is null!\n"); AssertFatal(UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->pucch_ConfigDedicated!=NULL,"pucch_ConfigDedicated is null!\n");
if ((UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->pucch_ConfigDedicated->tdd_AckNackFeedbackMode!=NULL)&& if ((UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->pucch_ConfigDedicated->tdd_AckNackFeedbackMode!=NULL)&&
...@@ -1150,6 +1154,7 @@ void fill_nfapi_harq_information(module_id_t module_idP, ...@@ -1150,6 +1154,7 @@ void fill_nfapi_harq_information(module_id_t module_idP,
AssertFatal(UE_list!=NULL,"UE_list is null\n"); AssertFatal(UE_list!=NULL,"UE_list is null\n");
AssertFatal(UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated!=NULL,"physicalConfigDedicated for rnti %x is null\n",rntiP); AssertFatal(UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated!=NULL,"physicalConfigDedicated for rnti %x is null\n",rntiP);
harq_information->harq_information_rel11.tl.tag = NFAPI_UL_CONFIG_REQUEST_HARQ_INFORMATION_REL11_TAG;
harq_information->harq_information_rel11.num_ant_ports = 1; harq_information->harq_information_rel11.num_ant_ports = 1;
switch(get_tmode(module_idP,CC_idP,UE_id)) { switch(get_tmode(module_idP,CC_idP,UE_id)) {
...@@ -1170,9 +1175,11 @@ void fill_nfapi_harq_information(module_id_t module_idP, ...@@ -1170,9 +1175,11 @@ void fill_nfapi_harq_information(module_id_t module_idP,
harq_information->harq_information_rel10_tdd.harq_size = 1; // 1-bit ACK/NAK harq_information->harq_information_rel10_tdd.harq_size = 1; // 1-bit ACK/NAK
harq_information->harq_information_rel10_tdd.ack_nack_mode = 0; // bundling harq_information->harq_information_rel10_tdd.ack_nack_mode = 0; // bundling
} }
harq_information->harq_information_rel10_tdd.n_pucch_1_0 = cc->radioResourceConfigCommon->pucch_ConfigCommon.n1PUCCH_AN + cce_idxP; harq_information->harq_information_rel10_tdd.tl.tag = NFAPI_UL_CONFIG_REQUEST_HARQ_INFORMATION_REL10_TDD_TAG;
harq_information->harq_information_rel10_tdd.n_pucch_1_0 = cc->radioResourceConfigCommon->pucch_ConfigCommon.n1PUCCH_AN + cce_idxP;
harq_information->harq_information_rel10_tdd.number_of_pucch_resources = 1; harq_information->harq_information_rel10_tdd.number_of_pucch_resources = 1;
} else { } else {
harq_information->harq_information_rel9_fdd.tl.tag = NFAPI_UL_CONFIG_REQUEST_HARQ_INFORMATION_REL9_FDD_TAG;
harq_information->harq_information_rel9_fdd.number_of_pucch_resources = 1; harq_information->harq_information_rel9_fdd.number_of_pucch_resources = 1;
harq_information->harq_information_rel9_fdd.harq_size = 1; // 1-bit ACK/NAK harq_information->harq_information_rel9_fdd.harq_size = 1; // 1-bit ACK/NAK
harq_information->harq_information_rel9_fdd.n_pucch_1_0 = cc->radioResourceConfigCommon->pucch_ConfigCommon.n1PUCCH_AN + cce_idxP; harq_information->harq_information_rel9_fdd.n_pucch_1_0 = cc->radioResourceConfigCommon->pucch_ConfigCommon.n1PUCCH_AN + cce_idxP;
...@@ -1189,11 +1196,13 @@ void fill_nfapi_harq_information(module_id_t module_idP, ...@@ -1189,11 +1196,13 @@ void fill_nfapi_harq_information(module_id_t module_idP,
else { else {
harq_information->harq_information_rel10_tdd.ack_nack_mode = 0; // bundling harq_information->harq_information_rel10_tdd.ack_nack_mode = 0; // bundling
} }
harq_information->harq_information_rel10_tdd.tl.tag = NFAPI_UL_CONFIG_REQUEST_HARQ_INFORMATION_REL10_TDD_TAG;
harq_information->harq_information_rel10_tdd.harq_size = 2; harq_information->harq_information_rel10_tdd.harq_size = 2;
harq_information->harq_information_rel10_tdd.n_pucch_1_0 = cc->radioResourceConfigCommon->pucch_ConfigCommon.n1PUCCH_AN + cce_idxP; harq_information->harq_information_rel10_tdd.n_pucch_1_0 = cc->radioResourceConfigCommon->pucch_ConfigCommon.n1PUCCH_AN + cce_idxP;
harq_information->harq_information_rel10_tdd.number_of_pucch_resources = 1; harq_information->harq_information_rel10_tdd.number_of_pucch_resources = 1;
} }
else { else {
harq_information->harq_information_rel9_fdd.tl.tag = NFAPI_UL_CONFIG_REQUEST_HARQ_INFORMATION_REL9_FDD_TAG;
harq_information->harq_information_rel9_fdd.number_of_pucch_resources = 1; harq_information->harq_information_rel9_fdd.number_of_pucch_resources = 1;
harq_information->harq_information_rel9_fdd.ack_nack_mode = 0; // 1a/b harq_information->harq_information_rel9_fdd.ack_nack_mode = 0; // 1a/b
harq_information->harq_information_rel9_fdd.harq_size = 2; harq_information->harq_information_rel9_fdd.harq_size = 2;
...@@ -1221,6 +1230,7 @@ uint16_t fill_nfapi_uci_acknak(module_id_t module_idP, ...@@ -1221,6 +1230,7 @@ uint16_t fill_nfapi_uci_acknak(module_id_t module_idP,
memset((void*)ul_config_pdu,0,sizeof(nfapi_ul_config_request_pdu_t)); memset((void*)ul_config_pdu,0,sizeof(nfapi_ul_config_request_pdu_t));
ul_config_pdu->pdu_type = NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE; ul_config_pdu->pdu_type = NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE;
ul_config_pdu->pdu_size = (uint8_t)(2+sizeof(nfapi_ul_config_uci_harq_pdu)); ul_config_pdu->pdu_size = (uint8_t)(2+sizeof(nfapi_ul_config_uci_harq_pdu));
ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_UE_INFORMATION_REL8_TAG;
ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.handle = 0; // don't know how to use this ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.handle = 0; // don't know how to use this
ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.rnti = rntiP; ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.rnti = rntiP;
...@@ -1232,6 +1242,7 @@ uint16_t fill_nfapi_uci_acknak(module_id_t module_idP, ...@@ -1232,6 +1242,7 @@ uint16_t fill_nfapi_uci_acknak(module_id_t module_idP,
LOG_D(MAC,"Filled in HARQ for rnti %x, cce_idxP %d-> n1_pucch %d\n",rntiP,cce_idxP,ul_config_pdu->uci_harq_pdu.harq_information.harq_information_rel9_fdd.n_pucch_1_0); LOG_D(MAC,"Filled in HARQ for rnti %x, cce_idxP %d-> n1_pucch %d\n",rntiP,cce_idxP,ul_config_pdu->uci_harq_pdu.harq_information.harq_information_rel9_fdd.n_pucch_1_0);
ul_req->number_of_pdus++; ul_req->number_of_pdus++;
ul_req->tl.tag = NFAPI_UL_CONFIG_REQUEST_BODY_TAG;
return(((ackNAK_absSF/10)<<4) + (ackNAK_absSF%10)); return(((ackNAK_absSF/10)<<4) + (ackNAK_absSF%10));
} }
...@@ -1268,6 +1279,7 @@ void fill_nfapi_dlsch_config(eNB_MAC_INST *eNB, ...@@ -1268,6 +1279,7 @@ void fill_nfapi_dlsch_config(eNB_MAC_INST *eNB,
memset((void*)dl_config_pdu,0,sizeof(nfapi_dl_config_request_pdu_t)); memset((void*)dl_config_pdu,0,sizeof(nfapi_dl_config_request_pdu_t));
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DLSCH_PDU_TYPE; dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DLSCH_PDU_TYPE;
dl_config_pdu->pdu_size = (uint8_t)(2+sizeof(nfapi_dl_config_dlsch_pdu)); dl_config_pdu->pdu_size = (uint8_t)(2+sizeof(nfapi_dl_config_dlsch_pdu));
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL8_TAG;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.length = length; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.length = length;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index = pdu_index; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pdu_index = pdu_index;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti = rnti; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.rnti = rnti;
...@@ -1291,6 +1303,7 @@ void fill_nfapi_dlsch_config(eNB_MAC_INST *eNB, ...@@ -1291,6 +1303,7 @@ void fill_nfapi_dlsch_config(eNB_MAC_INST *eNB,
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_prb_per_subband = num_bf_prb_per_subband; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_prb_per_subband = num_bf_prb_per_subband;
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector = num_bf_vector; dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector = num_bf_vector;
dl_req->number_pdu++; dl_req->number_pdu++;
dl_req->tl.tag=NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
} }
uint16_t fill_nfapi_tx_req(nfapi_tx_request_body_t *tx_req_body,uint16_t absSF,uint16_t pdu_length, uint16_t *pdu_index, uint8_t *pdu) { uint16_t fill_nfapi_tx_req(nfapi_tx_request_body_t *tx_req_body,uint16_t absSF,uint16_t pdu_length, uint16_t *pdu_index, uint8_t *pdu) {
...@@ -1302,6 +1315,7 @@ uint16_t fill_nfapi_tx_req(nfapi_tx_request_body_t *tx_req_body,uint16_t absSF,u ...@@ -1302,6 +1315,7 @@ uint16_t fill_nfapi_tx_req(nfapi_tx_request_body_t *tx_req_body,uint16_t absSF,u
TX_req->num_segments = 1; TX_req->num_segments = 1;
TX_req->segments[0].segment_length = pdu_length; TX_req->segments[0].segment_length = pdu_length;
TX_req->segments[0].segment_data = pdu; TX_req->segments[0].segment_data = pdu;
tx_req_body->tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
tx_req_body->number_of_pdus++; tx_req_body->number_of_pdus++;
return(((absSF/10)<<4) + (absSF%10)); return(((absSF/10)<<4) + (absSF%10));
...@@ -2906,6 +2920,7 @@ boolean_t CCE_allocation_infeasible(int module_idP, ...@@ -2906,6 +2920,7 @@ boolean_t CCE_allocation_infeasible(int module_idP,
boolean_t res=FALSE; boolean_t res=FALSE;
if (format_flag!=2) { // DL DCI if (format_flag!=2) { // DL DCI
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = rnti; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = rnti;
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = aggregation; dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = aggregation;
DL_req->number_pdu++; DL_req->number_pdu++;
...@@ -2915,6 +2930,7 @@ boolean_t CCE_allocation_infeasible(int module_idP, ...@@ -2915,6 +2930,7 @@ boolean_t CCE_allocation_infeasible(int module_idP,
DL_req->number_pdu--; DL_req->number_pdu--;
} }
else if (format_flag == 2) { // ue-specific UL DCI else if (format_flag == 2) { // ue-specific UL DCI
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.tl.tag = NFAPI_HI_DCI0_REQUEST_DCI_PDU_REL8_TAG;
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.rnti = rnti; hi_dci0_pdu->dci_pdu.dci_pdu_rel8.rnti = rnti;
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.aggregation_level = aggregation; hi_dci0_pdu->dci_pdu.dci_pdu_rel8.aggregation_level = aggregation;
HI_DCI0_req->number_of_dci++; HI_DCI0_req->number_of_dci++;
......
...@@ -543,10 +543,12 @@ void rx_sdu(const module_id_t enb_mod_idP, ...@@ -543,10 +543,12 @@ void rx_sdu(const module_id_t enb_mod_idP,
memset((void*)hi_dci0_pdu,0,sizeof(nfapi_hi_dci0_request_pdu_t)); memset((void*)hi_dci0_pdu,0,sizeof(nfapi_hi_dci0_request_pdu_t));
hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_HI_PDU_TYPE; hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_HI_PDU_TYPE;
hi_dci0_pdu->pdu_size = 2+sizeof(nfapi_hi_dci0_hi_pdu); hi_dci0_pdu->pdu_size = 2+sizeof(nfapi_hi_dci0_hi_pdu);
hi_dci0_pdu->hi_pdu.hi_pdu_rel8.tl.tag = NFAPI_HI_DCI0_REQUEST_HI_PDU_REL8_TAG;
hi_dci0_pdu->hi_pdu.hi_pdu_rel8.resource_block_start = first_rb; hi_dci0_pdu->hi_pdu.hi_pdu_rel8.resource_block_start = first_rb;
hi_dci0_pdu->hi_pdu.hi_pdu_rel8.cyclic_shift_2_for_drms = 0; hi_dci0_pdu->hi_pdu.hi_pdu_rel8.cyclic_shift_2_for_drms = 0;
hi_dci0_pdu->hi_pdu.hi_pdu_rel8.hi_value = 1; hi_dci0_pdu->hi_pdu.hi_pdu_rel8.hi_value = 1;
hi_dci0_req->number_of_hi++; hi_dci0_req->number_of_hi++;
hi_dci0_req->tl.tag = NFAPI_HI_DCI0_REQUEST_BODY_TAG;
/* NN--> FK: we could either check the payload, or use a phy helper to detect a false msg3 */ /* NN--> FK: we could either check the payload, or use a phy helper to detect a false msg3 */
if ((num_sdu == 0) && (num_ce==0)) { if ((num_sdu == 0) && (num_ce==0)) {
...@@ -866,7 +868,8 @@ void schedule_ulsch_rnti(module_id_t module_idP, ...@@ -866,7 +868,8 @@ void schedule_ulsch_rnti(module_id_t module_idP,
LOG_D(MAC,"exiting ulsch preprocesor\n"); LOG_D(MAC,"exiting ulsch preprocesor\n");
eNB->HI_DCI0_req[CC_id].sfn_sf = (frameP<<4)+subframeP; eNB->HI_DCI0_req[CC_id].sfn_sf = (frameP<<4)+subframeP;
eNB->HI_DCI0_req[CC_id].hi_dci0_request_body.tl.tag = NFAPI_HI_DCI0_REQUEST_BODY_TAG;
eNB->HI_DCI0_req[CC_id].header.message_id = NFAPI_HI_DCI0_REQUEST;
// loop over all active UEs // loop over all active UEs
for (UE_id=UE_list->head_ul; UE_id>=0; UE_id=UE_list->next_ul[UE_id]) { for (UE_id=UE_list->head_ul; UE_id>=0; UE_id=UE_list->next_ul[UE_id]) {
...@@ -1083,6 +1086,7 @@ abort(); ...@@ -1083,6 +1086,7 @@ abort();
memset((void*)hi_dci0_pdu,0,sizeof(nfapi_hi_dci0_request_pdu_t)); memset((void*)hi_dci0_pdu,0,sizeof(nfapi_hi_dci0_request_pdu_t));
hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_DCI_PDU_TYPE; hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_DCI_PDU_TYPE;
hi_dci0_pdu->pdu_size = 2+sizeof(nfapi_hi_dci0_dci_pdu); hi_dci0_pdu->pdu_size = 2+sizeof(nfapi_hi_dci0_dci_pdu);
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.tl.tag = NFAPI_HI_DCI0_REQUEST_DCI_PDU_REL8_TAG;
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.dci_format = NFAPI_UL_DCI_FORMAT_0; hi_dci0_pdu->dci_pdu.dci_pdu_rel8.dci_format = NFAPI_UL_DCI_FORMAT_0;
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.aggregation_level = aggregation; hi_dci0_pdu->dci_pdu.dci_pdu_rel8.aggregation_level = aggregation;
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.rnti = rnti; hi_dci0_pdu->dci_pdu.dci_pdu_rel8.rnti = rnti;
...@@ -1115,6 +1119,7 @@ abort(); ...@@ -1115,6 +1119,7 @@ abort();
else else
ul_config_pdu->pdu_type = NFAPI_UL_CONFIG_ULSCH_CQI_RI_PDU_TYPE; ul_config_pdu->pdu_type = NFAPI_UL_CONFIG_ULSCH_CQI_RI_PDU_TYPE;
ul_config_pdu->pdu_size = (uint8_t)(2+sizeof(nfapi_ul_config_ulsch_pdu)); ul_config_pdu->pdu_size = (uint8_t)(2+sizeof(nfapi_ul_config_ulsch_pdu));
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_ULSCH_PDU_REL8_TAG;
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel8.handle = eNB->ul_handle++; ul_config_pdu->ulsch_pdu.ulsch_pdu_rel8.handle = eNB->ul_handle++;
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel8.rnti = rnti; ul_config_pdu->ulsch_pdu.ulsch_pdu_rel8.rnti = rnti;
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel8.resource_block_start = first_rb[CC_id]; ul_config_pdu->ulsch_pdu.ulsch_pdu_rel8.resource_block_start = first_rb[CC_id];
...@@ -1136,6 +1141,7 @@ abort(); ...@@ -1136,6 +1141,7 @@ abort();
#ifdef Rel14 #ifdef Rel14
// Re13 fields // Re13 fields
if (UE_template->rach_resource_type>0) { // This is a BL/CE UE allocation if (UE_template->rach_resource_type>0) { // This is a BL/CE UE allocation
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.tl.tag = NFAPI_UL_CONFIG_REQUEST_ULSCH_PDU_REL13_TAG;
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.ue_type = UE_template->rach_resource_type>2 ? 2 : 1; ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.ue_type = UE_template->rach_resource_type>2 ? 2 : 1;
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.total_number_of_repetitions = 1; ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.total_number_of_repetitions = 1;
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.repetition_number = 1; ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.repetition_number = 1;
...@@ -1143,6 +1149,7 @@ abort(); ...@@ -1143,6 +1149,7 @@ abort();
} }
#endif #endif
ul_req_tmp->number_of_pdus++; ul_req_tmp->number_of_pdus++;
ul_req_tmp->tl.tag=NFAPI_UL_CONFIG_REQUEST_BODY_TAG;
if (cqi_req == 1) { if (cqi_req == 1) {
// Add CQI portion // Add CQI portion
...@@ -1150,6 +1157,7 @@ abort(); ...@@ -1150,6 +1157,7 @@ abort();
ul_config_pdu->pdu_type = NFAPI_UL_CONFIG_ULSCH_CQI_RI_PDU_TYPE; ul_config_pdu->pdu_type = NFAPI_UL_CONFIG_ULSCH_CQI_RI_PDU_TYPE;
ul_config_pdu->pdu_size = (uint8_t)(2+sizeof(nfapi_ul_config_ulsch_cqi_ri_pdu)); ul_config_pdu->pdu_size = (uint8_t)(2+sizeof(nfapi_ul_config_ulsch_cqi_ri_pdu));
ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.tl.tag = NFAPI_UL_CONFIG_REQUEST_CQI_RI_INFORMATION_REL9_TAG;
ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.report_type = 1; ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.report_type = 1;
ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.aperiodic_cqi_pmi_ri_report.number_of_cc = 1; ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.aperiodic_cqi_pmi_ri_report.number_of_cc = 1;
LOG_I(MAC,"report_type %d\n",ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.report_type); LOG_I(MAC,"report_type %d\n",ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9.report_type);
...@@ -1203,10 +1211,12 @@ abort(); ...@@ -1203,10 +1211,12 @@ abort();
memset((void*)hi_dci0_pdu,0,sizeof(nfapi_hi_dci0_request_pdu_t)); memset((void*)hi_dci0_pdu,0,sizeof(nfapi_hi_dci0_request_pdu_t));
hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_HI_PDU_TYPE; hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_HI_PDU_TYPE;
hi_dci0_pdu->pdu_size = 2+sizeof(nfapi_hi_dci0_hi_pdu); hi_dci0_pdu->pdu_size = 2+sizeof(nfapi_hi_dci0_hi_pdu);
hi_dci0_pdu->hi_pdu.hi_pdu_rel8.tl.tag = NFAPI_HI_DCI0_REQUEST_HI_PDU_REL8_TAG;
hi_dci0_pdu->hi_pdu.hi_pdu_rel8.resource_block_start = UE_template->first_rb_ul[harq_pid]; hi_dci0_pdu->hi_pdu.hi_pdu_rel8.resource_block_start = UE_template->first_rb_ul[harq_pid];
hi_dci0_pdu->hi_pdu.hi_pdu_rel8.cyclic_shift_2_for_drms = UE_template->cshift[harq_pid]; hi_dci0_pdu->hi_pdu.hi_pdu_rel8.cyclic_shift_2_for_drms = UE_template->cshift[harq_pid];
hi_dci0_pdu->hi_pdu.hi_pdu_rel8.hi_value = 0; hi_dci0_pdu->hi_pdu.hi_pdu_rel8.hi_value = 0;
hi_dci0_req->number_of_hi++; hi_dci0_req->number_of_hi++;
hi_dci0_req->tl.tag = NFAPI_HI_DCI0_REQUEST_BODY_TAG;
LOG_I(MAC,"[eNB %d][PUSCH %d/%x] CC_id %d Frame %d subframeP %d Scheduled (PHICH) UE %d (mcs %d, first rb %d, nb_rb %d, TBS %d, harq_pid %d,round %d)\n", LOG_I(MAC,"[eNB %d][PUSCH %d/%x] CC_id %d Frame %d subframeP %d Scheduled (PHICH) UE %d (mcs %d, first rb %d, nb_rb %d, TBS %d, harq_pid %d,round %d)\n",
module_idP,harq_pid,rnti,CC_id,frameP,subframeP,UE_id,mcs, module_idP,harq_pid,rnti,CC_id,frameP,subframeP,UE_id,mcs,
UE_template->first_rb_ul[harq_pid], UE_template->nb_rb_ul[harq_pid], UE_template->first_rb_ul[harq_pid], UE_template->nb_rb_ul[harq_pid],
......
...@@ -17,7 +17,7 @@ void handle_rach(UL_IND_t *UL_info) { ...@@ -17,7 +17,7 @@ void handle_rach(UL_IND_t *UL_info) {
AssertFatal(UL_info->rach_ind.number_of_preambles==1,"More than 1 preamble not supported\n"); AssertFatal(UL_info->rach_ind.number_of_preambles==1,"More than 1 preamble not supported\n");
UL_info->rach_ind.number_of_preambles=0; UL_info->rach_ind.number_of_preambles=0;
LOG_D(MAC,"Frame %d, Subframe %d Calling initiate_ra_proc\n",UL_info->frame,UL_info->subframe); LOG_I(MAC,"Frame %d, Subframe %d Calling initiate_ra_proc\n",UL_info->frame,UL_info->subframe);
initiate_ra_proc(UL_info->module_id, initiate_ra_proc(UL_info->module_id,
UL_info->CC_id, UL_info->CC_id,
UL_info->frame, UL_info->frame,
......
...@@ -1214,6 +1214,10 @@ static inline int wakeup_prach_ru(RU_t *ru) { ...@@ -1214,6 +1214,10 @@ static inline int wakeup_prach_ru(RU_t *ru) {
ru->proc.frame_prach = ru->proc.frame_rx; ru->proc.frame_prach = ru->proc.frame_rx;
ru->proc.subframe_prach = ru->proc.subframe_rx; ru->proc.subframe_prach = ru->proc.subframe_rx;
// DJP - think prach_procedures() is looking at eNB frame_prach
ru->eNB_list[0]->proc.frame_prach = ru->proc.frame_rx;
ru->eNB_list[0]->proc.subframe_prach = ru->proc.subframe_rx;
LOG_D(PHY,"RU %d: waking up PRACH thread\n",ru->idx); LOG_D(PHY,"RU %d: waking up PRACH thread\n",ru->idx);
// the thread can now be woken up // the thread can now be woken up
AssertFatal(pthread_cond_signal(&ru->proc.cond_prach) == 0, "ERROR pthread_cond_signal for RU prach thread\n"); AssertFatal(pthread_cond_signal(&ru->proc.cond_prach) == 0, "ERROR pthread_cond_signal for RU prach thread\n");
......
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