Commit 90346d26 authored by Raymond Knopp's avatar Raymond Knopp

fixed issues in subframe 5 RE allocation when PDSCH overlaps PSS/SSS, Basic UE...

fixed issues in subframe 5 RE allocation when PDSCH overlaps PSS/SSS, Basic UE functionality on USRP, RK

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6596 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 5f7d6c7b
......@@ -78,7 +78,7 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
max_pos_fil = ((max_pos_fil * coef) + (max_pos * ncoef)) >> 15;
diff = max_pos_fil - 2; //frame_parms->nb_prefix_samples/8;
diff = max_pos_fil - frame_parms->nb_prefix_samples/8;
if ( diff > SYNCH_HYST )
phy_vars_ue->rx_offset++;
......
......@@ -2600,7 +2600,7 @@ int dump_dci(LTE_DL_FRAME_PARMS *frame_parms, DCI_ALLOC_t *dci) {
case 50:
msg("DCI format1A (TDD1-6, 10MHz), rnti %x (%x)\n",dci->rnti,((uint32_t*)&dci->dci_pdu[0])[0]);
msg("VRB_TYPE %d\n",((DCI1A_10MHz_TDD_1_6_t *)&dci->dci_pdu[0])->vrb_type);
msg("RB_ALLOC %x (NB_RB %d)\n",((DCI1A_10MHz_TDD_1_6_t *)&dci->dci_pdu[0])->rballoc,RIV2nb_rb_LUT25[((DCI1A_10MHz_TDD_1_6_t *)&dci->dci_pdu[0])->rballoc]);
msg("RB_ALLOC %x (NB_RB %d)\n",((DCI1A_10MHz_TDD_1_6_t *)&dci->dci_pdu[0])->rballoc,RIV2nb_rb_LUT50[((DCI1A_10MHz_TDD_1_6_t *)&dci->dci_pdu[0])->rballoc]);
msg("MCS %d\n",((DCI1A_10MHz_TDD_1_6_t *)&dci->dci_pdu[0])->mcs);
msg("HARQ_PID %d\n",((DCI1A_10MHz_TDD_1_6_t *)&dci->dci_pdu[0])->harq_pid);
msg("NDI %d\n",((DCI1A_10MHz_TDD_1_6_t *)&dci->dci_pdu[0])->ndi);
......@@ -2611,7 +2611,7 @@ int dump_dci(LTE_DL_FRAME_PARMS *frame_parms, DCI_ALLOC_t *dci) {
case 100:
msg("DCI format1A (TDD1-6, 20MHz), rnti %x (%x)\n",dci->rnti,((uint32_t*)&dci->dci_pdu[0])[0]);
msg("VRB_TYPE %d\n",((DCI1A_20MHz_TDD_1_6_t *)&dci->dci_pdu[0])->vrb_type);
msg("RB_ALLOC %x (NB_RB %d)\n",((DCI1A_20MHz_TDD_1_6_t *)&dci->dci_pdu[0])->rballoc,RIV2nb_rb_LUT25[((DCI1A_20MHz_TDD_1_6_t *)&dci->dci_pdu[0])->rballoc]);
msg("RB_ALLOC %x (NB_RB %d)\n",((DCI1A_20MHz_TDD_1_6_t *)&dci->dci_pdu[0])->rballoc,RIV2nb_rb_LUT100[((DCI1A_20MHz_TDD_1_6_t *)&dci->dci_pdu[0])->rballoc]);
msg("MCS %d\n",((DCI1A_20MHz_TDD_1_6_t *)&dci->dci_pdu[0])->mcs);
msg("HARQ_PID %d\n",((DCI1A_20MHz_TDD_1_6_t *)&dci->dci_pdu[0])->harq_pid);
msg("NDI %d\n",((DCI1A_20MHz_TDD_1_6_t *)&dci->dci_pdu[0])->ndi);
......@@ -2651,7 +2651,7 @@ int dump_dci(LTE_DL_FRAME_PARMS *frame_parms, DCI_ALLOC_t *dci) {
case 50:
msg("DCI format1A(FDD, 10MHz), rnti %x (%x)\n",dci->rnti,((uint32_t*)&dci->dci_pdu[0])[0]);
msg("VRB_TYPE %d\n",((DCI1A_10MHz_FDD_t *)&dci->dci_pdu[0])->vrb_type);
msg("RB_ALLOC %x (NB_RB %d)\n",((DCI1A_10MHz_FDD_t *)&dci->dci_pdu[0])->rballoc,RIV2nb_rb_LUT25[((DCI1A_10MHz_FDD_t *)&dci->dci_pdu[0])->rballoc]);
msg("RB_ALLOC %x (NB_RB %d)\n",((DCI1A_10MHz_FDD_t *)&dci->dci_pdu[0])->rballoc,RIV2nb_rb_LUT50[((DCI1A_10MHz_FDD_t *)&dci->dci_pdu[0])->rballoc]);
msg("MCS %d\n",((DCI1A_10MHz_FDD_t *)&dci->dci_pdu[0])->mcs);
msg("HARQ_PID %d\n",((DCI1A_10MHz_FDD_t *)&dci->dci_pdu[0])->harq_pid);
msg("NDI %d\n",((DCI1A_10MHz_FDD_t *)&dci->dci_pdu[0])->ndi);
......@@ -2661,7 +2661,7 @@ int dump_dci(LTE_DL_FRAME_PARMS *frame_parms, DCI_ALLOC_t *dci) {
case 100:
msg("DCI format1A(FDD, 20MHz), rnti %x (%x)\n",dci->rnti,((uint32_t*)&dci->dci_pdu[0])[0]);
msg("VRB_TYPE %d\n",((DCI1A_20MHz_FDD_t *)&dci->dci_pdu[0])->vrb_type);
msg("RB_ALLOC %x (NB_RB %d)\n",((DCI1A_20MHz_FDD_t *)&dci->dci_pdu[0])->rballoc,RIV2nb_rb_LUT25[((DCI1A_20MHz_FDD_t *)&dci->dci_pdu[0])->rballoc]);
msg("RB_ALLOC %x (NB_RB %d)\n",((DCI1A_20MHz_FDD_t *)&dci->dci_pdu[0])->rballoc,RIV2nb_rb_LUT100[((DCI1A_20MHz_FDD_t *)&dci->dci_pdu[0])->rballoc]);
msg("MCS %d\n",((DCI1A_20MHz_FDD_t *)&dci->dci_pdu[0])->mcs);
msg("HARQ_PID %d\n",((DCI1A_20MHz_FDD_t *)&dci->dci_pdu[0])->harq_pid);
msg("NDI %d\n",((DCI1A_20MHz_FDD_t *)&dci->dci_pdu[0])->ndi);
......@@ -3490,7 +3490,7 @@ int generate_ue_dlsch_params_from_dci(uint8_t subframe,
ndi = ((DCI1A_10MHz_FDD_t *)dci_pdu)->ndi;
TPC = ((DCI1A_10MHz_FDD_t *)dci_pdu)->TPC;
harq_pid = ((DCI1A_10MHz_FDD_t *)dci_pdu)->harq_pid;
//printf("FDD 1A: mcs %d, rballoc %x,rv %d, TPC %d\n",mcs,rballoc,rv,TPC);
//printf("FDD 1A: mcs %d, rballoc %x,ndi %d, rv %d, TPC %d\n",mcs,rballoc,ndi,rv,TPC);
}
if ((rnti==si_rnti) || (rnti==p_rnti) || (rnti==ra_rnti)){ //
......@@ -3588,7 +3588,7 @@ int generate_ue_dlsch_params_from_dci(uint8_t subframe,
return(-1);
}
// change the mcs limit from 7 to 8, supported by MAC
if (mcs > 8) {
if (mcs > 10) {
LOG_E(PHY,"Format 1A: unlikely mcs for format 1A (%d)\n",mcs);
return(-1);
}
......@@ -3608,15 +3608,16 @@ int generate_ue_dlsch_params_from_dci(uint8_t subframe,
LOG_D(PHY,"UE (%x/%d): Subframe %d Format1A DCI: ndi %d, old_ndi %d (first tx %d) harq_status %d\n",dlsch[0]->rnti,harq_pid,subframe,ndi,dlsch0_harq->DCINdi,
dlsch0_harq->first_tx,dlsch0_harq->status);
if ((rnti != si_rnti) && (rnti!=ra_rnti)) {
if ((ndi!=dlsch0_harq->DCINdi)|| // DCI has been toggled or this is the first transmission
(dlsch0_harq->first_tx==1)) {
dlsch0_harq->round = 0;
if (dlsch0_harq->first_tx==1) {
LOG_D(PHY,"[PDSCH %x/%d] Format 1A DCI First TX: Clearing flag\n");
LOG_I(PHY,"[PDSCH %x/%d] Format 1A DCI First TX: Clearing flag\n");
dlsch0_harq->first_tx = 0;
}
}
}
dlsch0_harq->DCINdi = ndi;
dlsch0_harq->mcs = mcs;
......
......@@ -2355,12 +2355,10 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF,
else if (rb < 96)
rb_alloc_ind = (rb_alloc[2]>>(rb-64)) & 1;
else if (rb < 100)
rb_alloc_ind = (rb_alloc[0]>>(rb-96)) & 1;
rb_alloc_ind = (rb_alloc[3]>>(rb-96)) & 1;
else
rb_alloc_ind = 0;
if (rb_alloc_ind==1)
nb_rb++;
// PBCH
if ((subframe==0) && (rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l>=(nsymb>>1)) && (l<((nsymb>>1) + 4))) {
......@@ -2412,13 +2410,10 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF,
skip_half=2;
}
if (rb_alloc_ind==1) {
/*
printf("rb %d\n",rb);
for (i=0;i<12;i++)
printf("(%d %d)",((short *)dl_ch0)[i<<1],((short*)dl_ch0)[1+(i<<1)]);
printf("\n");
*/
// printf("rb %d/symbol %d (skip_half %d)\n",rb,l,skip_half);
if (pilots==0) {
// printf("Extracting w/o pilots (symbol %d, rb %d, skip_half %d)\n",l,rb,skip_half);
if (skip_half==1) {
......@@ -2482,6 +2477,7 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF,
rxF_ext+=10;
}
}
nb_rb++;
}
dl_ch0+=12;
rxF+=12;
......@@ -2496,24 +2492,23 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF,
else if (rb < 96)
rb_alloc_ind = (rb_alloc[2]>>(rb-64)) & 1;
else if (rb < 100)
rb_alloc_ind = (rb_alloc[0]>>(rb-96)) & 1;
rb_alloc_ind = (rb_alloc[3]>>(rb-96)) & 1;
else
rb_alloc_ind = 0;
if (rb_alloc_ind==1)
nb_rb++;
// PBCH
if ((subframe==0) && (rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l>=(nsymb>>1)) && (l<((nsymb>>1) + 4))) {
if ((subframe==0) && (rb>=((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l>=(nsymb>>1)) && (l<((nsymb>>1) + 4))) {
rb_alloc_ind = 0;
}
//SSS
if (((subframe==0)||(subframe==5)) && (rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==sss_symb) ) {
if (((subframe==0)||(subframe==5)) && (rb>=((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==sss_symb) ) {
rb_alloc_ind = 0;
}
if (frame_parms->frame_type == FDD) {
//PSS
if (((subframe==0)||(subframe==5)) && (rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb) ) {
if (((subframe==0)||(subframe==5)) && (rb>=((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb) ) {
rb_alloc_ind = 0;
}
}
......@@ -2528,6 +2523,7 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF,
// printf("dlch_ext %d\n",dl_ch0_ext-&dl_ch_estimates_ext[aarx][0]);
// printf("DC rb %d (%p)\n",rb,rxF);
if (rb_alloc_ind==1) {
// printf("rb %d/symbol %d (skip_half %d)\n",rb,l,skip_half);
if (pilots==0) {
for (i=0;i<6;i++) {
dl_ch0_ext[i]=dl_ch0[i];
......@@ -2561,6 +2557,7 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF,
dl_ch0_ext+=10;
rxF_ext+=10;
} // symbol_mod==0
nb_rb++;
} // rballoc==1
else {
rxF = &rxdataF[aarx][((symbol*(frame_parms->ofdm_symbol_size)))];
......@@ -2580,12 +2577,11 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF,
else if (rb < 96)
rb_alloc_ind = (rb_alloc[2]>>(rb-64)) & 1;
else if (rb < 100)
rb_alloc_ind = (rb_alloc[0]>>(rb-96)) & 1;
rb_alloc_ind = (rb_alloc[3]>>(rb-96)) & 1;
else
rb_alloc_ind = 0;
if (rb_alloc_ind==1)
nb_rb++;
// PBCH
if ((subframe==0) && (rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l>=nsymb>>1) && (l<((nsymb>>1) + 4))) {
......@@ -2630,6 +2626,7 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF,
}
if (rb_alloc_ind==1) {
// printf("rb %d/symbol %d (skip_half %d)\n",rb,l,skip_half);
/*
printf("rb %d\n",rb);
for (i=0;i<12;i++)
......@@ -2700,6 +2697,7 @@ unsigned short dlsch_extract_rbs_single(int **rxdataF,
rxF_ext+=10;
}
} // pilots=0
nb_rb++;
}
dl_ch0+=12;
rxF+=12;
......@@ -2777,7 +2775,7 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
else if (rb < 96)
rb_alloc_ind = (rb_alloc[2]>>(rb-64)) & 1;
else if (rb < 100)
rb_alloc_ind = (rb_alloc[0]>>(rb-96)) & 1;
rb_alloc_ind = (rb_alloc[3]>>(rb-96)) & 1;
else
rb_alloc_ind = 0;
......@@ -2789,53 +2787,33 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
}
// PBCH
if ((subframe==0) && (rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l>=(nsymb>>1)) && (l<((nsymb>>1) + 4))) {
if ((subframe==0) && (rb>=((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l>=(nsymb>>1)) && (l<((nsymb>>1) + 4))) {
rb_alloc_ind = 0;
}
//PBCH subframe 0, symbols nsymb>>1 ... nsymb>>1 + 3
if ((subframe==0) && (rb==((frame_parms->N_RB_DL>>1)-3)) && (l>=(nsymb>>1)) && (l<((nsymb>>1) + 4)))
skip_half=1;
else if ((subframe==0) && (rb==((frame_parms->N_RB_DL>>1)+3)) && (l>=(nsymb>>1)) && (l<((nsymb>>1) + 4)))
skip_half=2;
//SSS
if (((subframe==0)||(subframe==5)) &&
(rb>((frame_parms->N_RB_DL>>1)-3)) &&
(rb>=((frame_parms->N_RB_DL>>1)-3)) &&
(rb<((frame_parms->N_RB_DL>>1)+3)) &&
(l==sss_symb) ) {
rb_alloc_ind = 0;
}
//SSS
if (((subframe==0)||(subframe==5)) &&
(rb==((frame_parms->N_RB_DL>>1)-3)) &&
(l==sss_symb))
skip_half=1;
else if (((subframe==0)||(subframe==5)) &&
(rb==((frame_parms->N_RB_DL>>1)+3)) &&
(l==sss_symb))
skip_half=2;
//PSS in subframe 0/5 if FDD
if (frame_parms->frame_type == FDD) { //FDD
if (((subframe==0)||(subframe==5)) && (rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb) ) {
if (((subframe==0)||(subframe==5)) && (rb>=((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb) ) {
rb_alloc_ind = 0;
}
if (((subframe==0)||(subframe==5)) && (rb==((frame_parms->N_RB_DL>>1)-3)) && (l==pss_symb))
skip_half=1;
else if (((subframe==0)||(subframe==5)) && (rb==((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb))
skip_half=2;
}
if ((frame_parms->frame_type == TDD) &&
(subframe==6)){ //TDD Subframe 6
if ((rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb) ) {
if ((rb>=((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb) ) {
rb_alloc_ind = 0;
}
if ((rb==((frame_parms->N_RB_DL>>1)-3)) && (l==pss_symb))
skip_half=1;
else if ((rb==((frame_parms->N_RB_DL>>1)+3)) && (l==pss_symb))
skip_half=2;
}
if (rb_alloc_ind==1) {
......@@ -2862,7 +2840,6 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
// printf("%d : (%d,%d)\n",(rxF+(2*i)-&rxdataF[(aatx<<1)+aarx][( (symbol*(frame_parms->ofdm_symbol_size)))*2])/2,
// ((short*)&rxF[i<<1])[0],((short*)&rxF[i<<1])[0]);
}
nb_rb++;
dl_ch0_ext+=12;
dl_ch1_ext+=12;
rxF_ext+=12;
......@@ -2880,11 +2857,13 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
dl_ch1_ext[j++]=dl_ch1[i];
}
}
nb_rb++;
dl_ch0_ext+=8;
dl_ch1_ext+=8;
rxF_ext+=8;
} // pilots==1
nb_rb++;
}
dl_ch0+=12;
dl_ch1+=12;
......@@ -2900,12 +2879,12 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
else if (rb < 96)
rb_alloc_ind = (rb_alloc[2]>>(rb-64)) & 1;
else if (rb < 100)
rb_alloc_ind = (rb_alloc[0]>>(rb-96)) & 1;
rb_alloc_ind = (rb_alloc[3]>>(rb-96)) & 1;
else
rb_alloc_ind = 0;
if (rb_alloc_ind == 1)
nb_rb++;
// PBCH
if ((subframe==0) && (rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l>=(nsymb>>1)) && (l<((nsymb>>1) + 4))) {
rb_alloc_ind = 0;
......@@ -3045,6 +3024,7 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
rxF_ext+=8;
}
}
nb_rb++;
}
dl_ch0+=12;
......@@ -3065,8 +3045,8 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
else
rb_alloc_ind = 0;
if (rb_alloc_ind==1)
nb_rb++;
// PBCH
......@@ -3143,6 +3123,7 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
dl_ch1_ext+=8;
rxF_ext+=8;
}
nb_rb++;
}
else {
rxF = &rxdataF[aarx][((symbol*(frame_parms->ofdm_symbol_size)))];
......@@ -3162,12 +3143,10 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
else if (rb < 96)
rb_alloc_ind = (rb_alloc[2]>>(rb-64)) & 1;
else if (rb < 100)
rb_alloc_ind = (rb_alloc[0]>>(rb-96)) & 1;
rb_alloc_ind = (rb_alloc[3]>>(rb-96)) & 1;
else
rb_alloc_ind = 0;
if (rb_alloc_ind==1)
nb_rb++;
// PBCH
if ((subframe==0) && (rb>((frame_parms->N_RB_DL>>1)-3)) && (rb<((frame_parms->N_RB_DL>>1)+3)) && (l>=(nsymb>>1)) && (l<((nsymb>>1) + 4))) {
......@@ -3307,6 +3286,7 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
}
}
nb_rb++;
}
dl_ch0+=12;
dl_ch1+=12;
......
......@@ -662,14 +662,14 @@ int dlsch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms,
if ((symbol_mod==0) || (symbol_mod==(4-frame_parms->Ncp))) {
if (frame_parms->mode1_flag==0)
len = (nb_rb*8) - (2*pbch_pss_sss_adjust/3);
len = (nb_rb*8);// - (2*pbch_pss_sss_adjust/3);
else
len = (nb_rb*10) - (5*pbch_pss_sss_adjust/6);
len = (nb_rb*10);// - (5*pbch_pss_sss_adjust/6);
}
else {
len = (nb_rb*12) - pbch_pss_sss_adjust;
len = (nb_rb*12);// - pbch_pss_sss_adjust;
}
// printf("dlsch_qpsk_llr: symbol %d,len %d,pbch_pss_sss_adjust %d\n",symbol,len,pbch_pss_sss_adjust);
// printf("dlsch_qpsk_llr: symbol %d,nb_rb %d, len %d,pbch_pss_sss_adjust %d\n",symbol,nb_rb,len,pbch_pss_sss_adjust);
for (i=0;i<len;i++) {
*llr32 = *rxF;
rxF++;
......
......@@ -1254,7 +1254,7 @@ int dlsch_modulation(mod_sym_t **txdataF,
if (rb_alloc_ind > 0)
{
// printf("Allocated rb %d, subframe_offset %d, symbol_offset %d, re_offset %d, jj %d\n",rb,subframe_offset,symbol_offset,re_offset,jj);
// printf("Allocated rb %d/symbol %d, skip_half %d, subframe_offset %d, symbol_offset %d, re_offset %d, jj %d\n",rb,l,skip_half,subframe_offset,symbol_offset,re_offset,jj);
allocate_REs_in_RB(frame_parms,
txdataF,
&jj,
......
......@@ -173,12 +173,7 @@ int pbch_detection(PHY_VARS_UE *phy_vars_ue, runmode_t mode) {
return -1;
break;
}
#ifndef USER_MODE
if (frame_parms->N_RB_DL != 25) {
LOG_E(PHY,"[UE%d] Initial sync: PBCH decoding: Detected NB_RB %d, but CBMIMO1 can only handle NB_RB=25\n",phy_vars_ue->Mod_id,frame_parms->N_RB_DL);
return -1;
}
#endif
// now check for PHICH parameters
frame_parms->phich_config_common.phich_duration = (PHICH_DURATION_t)((phy_vars_ue->lte_ue_pbch_vars[0]->decoded_output[2]>>4)&1);
......
......@@ -277,7 +277,6 @@ int adjust_G(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_orde
for (rb=((frame_parms->N_RB_DL>>1)-3);
rb<((frame_parms->N_RB_DL>>1)+3);
rb++) {
if (rb < 32)
rb_alloc_ind = (rb_alloc[0]>>rb) & 1;
else if (rb < 64)
......@@ -290,6 +289,7 @@ int adjust_G(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_orde
rb_alloc_ind = 0;
if (rb_alloc_ind==1) {
// printf("Adjust G: rb %d\n",rb);
re_pbch_sss += 12;
}
}
......
......@@ -49,8 +49,7 @@
#endif
extern int mac_get_rrc_status(uint8_t Mod_id,uint8_t eNB_flag,uint8_t index);
#ifdef EXMIMO
#if defined(USRP) || defined(EXMIMO)
#include "common_lib.h"
extern openair0_config_t openair0_cfg[];
#endif
......@@ -82,8 +81,10 @@ int dump_ue_stats(PHY_VARS_UE *phy_vars_ue, char* buffer, int length, runmode_t
phy_vars_ue->PHY_measurements.n0_power_dB[1]);
#ifdef EXMIMO
len += sprintf(&buffer[len], "[UE PROC] RX Gain %d dB (LNA %d, vga %d dB)\n",phy_vars_ue->rx_total_gain_dB, openair0_cfg[0].rxg_mode[0],(int)openair0_cfg[0].rx_gain[0]);
#else
len += sprintf(&buffer[len], "[UE PROC] RX Gain %d dB\n",phy_vars_ue->rx_total_gain_dB);
#endif
#ifdef USRP
len += sprintf(&buffer[len], "[UE PROC] RX Gain %d (%f) dB\n",phy_vars_ue->rx_total_gain_dB,
(double)phy_vars_ue->rx_total_gain_dB-USRP_GAIN_OFFSET);
#endif
len += sprintf(&buffer[len], "[UE_PROC] Frequency offset %d Hz (%d)\n",phy_vars_ue->lte_ue_common_vars.freq_offset,openair_daq_vars.freq_offset);
......
......@@ -33,6 +33,16 @@
#define SOFFSET 0
void rescale(int16_t *input,int length) {
__m128i *input128 = (__m128i *)input;
int i;
for (i=0;i<length>>2;i++) {
input128[i] = _mm_srai_epi16(input128[i],4);
}
}
int slot_fep(PHY_VARS_UE *phy_vars_ue,
unsigned char l,
unsigned char Ns,
......@@ -116,6 +126,10 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue,
(short *)&ue_common_vars->rxdata[aa][0],
frame_parms->ofdm_symbol_size*sizeof(int));
start_meas(&phy_vars_ue->rx_dft_stats);
#ifdef USRP
rescale((int16_t *)&ue_common_vars->rxdata[aa][(rx_offset-nb_prefix_samples0) % frame_length_samples],
frame_parms->ofdm_symbol_size+nb_prefix_samples0);
#endif
dft((int16_t *)&ue_common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
(int16_t *)&ue_common_vars->rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
stop_meas(&phy_vars_ue->rx_dft_stats);
......@@ -140,12 +154,21 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue,
memcpy((void *)tmp_dft_in,
(void *)&ue_common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
frame_parms->ofdm_symbol_size*sizeof(int));
#ifdef USRP
rescale((int16_t *)tmp_dft_in,
frame_parms->ofdm_symbol_size);
#endif
dft((int16_t *)tmp_dft_in,
(int16_t *)&ue_common_vars->rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
}
else // use dft input from RX buffer directly
else {// use dft input from RX buffer directly
#ifdef USRP
rescale((int16_t *)&ue_common_vars->rxdata[aa][(rx_offset-nb_prefix_samples) % frame_length_samples],
frame_parms->ofdm_symbol_size+nb_prefix_samples);
#endif
dft((int16_t *)&ue_common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
(int16_t *)&ue_common_vars->rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
}
stop_meas(&phy_vars_ue->rx_dft_stats);
......
......@@ -2076,6 +2076,7 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e
num_pdcch_symbols,phy_vars_eNB->proc[sched_subframe].frame_tx,subframe),
0,
subframe<<1);
stop_meas(&phy_vars_eNB->dlsch_scrambling_stats);
start_meas(&phy_vars_eNB->dlsch_modulation_stats);
......
This diff is collapsed.
This diff is collapsed.
......@@ -225,7 +225,8 @@ static const eutra_band_t eutra_bands[] =
{14, 788 * MHz, 798 * MHz, 758 * MHz, 768 * MHz, FDD},
{17, 704 * MHz, 716 * MHz, 734 * MHz, 746 * MHz, FDD},
{20, 832 * MHz, 862 * MHz, 791 * MHz, 821 * MHz, FDD},
{33, 1900 * MHz, 1920 * MHz, 1900 * MHz, 1920 * MHz, TDD},
{33, 1900 * MHz, 1920 * MHz, 1900 * MHz, 1920 * MHz, TDD},
{34, 2010 * MHz, 2025 * MHz, 2010 * MHz, 2025 * MHz, TDD},
{35, 1850 * MHz, 1910 * MHz, 1850 * MHz, 1910 * MHz, TDD},
......
......@@ -1336,7 +1336,7 @@ void fill_DLSCH_dci(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP
eNB->common_channels[CC_id].bcch_active = 0;
LOG_D(MAC,"[eNB %d] Frame %d subframeP %d: BCCH active\n", module_idP, frameP, subframeP);
// randomize frequency allocation for SI
first_rb = (unsigned char)(taus()%(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL-4));
first_rb = 10;//(unsigned char)(taus()%(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL-4));
/* Where is this from, should be removed!!!!
......
......@@ -6,6 +6,8 @@ typedef struct {
} plmn_data_t;
static const plmn_data_t plmn_data[] = {
// Test
{1, 1, "OAI Testing","OAI Test"},
// Abkhazia
{289, 67, "Aquafon Abkhazia", ""},
{289, 68, "A-Mobile Abkhazia", ""},
......@@ -294,39 +296,40 @@ Cambodia
Cameroon
624 1 Mobile Telephone Networks Cameroon MTN Cameroon Operational
624 2 Orange Cameroun Orange Operational
*/
Canada
302 220 Telus Mobility Telus Operational
302 221 Telus Mobility (Unknown) Telus Operational
302 290 Aurtek Wurekess Operational
302 320 Dave Wireless Mobilicity Operational
302 350 FIRST Networks Operations FIRST Operational
302 360 Telus Mobility MiKE Operational
302 361 Telus Mobility Telus Operational
302 370 Fido Solutions (Rogers Wireless) Fido Operational
302 380 Dryden Mobility DMTS Operational
302 490 Globalive Communications WIND Mobile Operational
302 500 Videotron Videotron Operational
302 510 Videotron Videotron Operational
302 610 Bell Mobility Bell Operational
302 620 ICE Wireless ICE Wireless Operational
302 640 Bell Mobility Bell Operational
302 651 Bell Mobility Bell Operational
302 652 BC Tel Mobility Operational
302 653 Telus Mobility Telus Operational
302 654 Sask Tel Mobility Operational
302 655 MTS Mobility MTS Operational
302 656 Thunder Bay Telephone Mobility TBay Operational
302 657 Telus Mobility Telus Operational
302 680 SaskTel Mobility SaskTel Operational
302 701 MB Tel Mobility Operational
302 702 MT&T Mobility (Aliant) Operational
302 703 New Tel Mobility (Aliant Operational
302 710 Globalstar Canada Globalstar Operational
302 720 Rorges Communications Rogers Wireless Operational
302 780 SaskTel Mobility SaskTel Operational
302 880 Shared Telus, Bell, and SaskTel Bell / Telus / SaskTel Operational
//Canada
{302, 220, "Telus Mobility", "Telus CA"},
{302, 221, "Telus Mobility (Unknown)", "Telus CA"},
{302, 290, "Aurtek Wurekess", "Aurtek CA"},
{302, 320, "Dave Wireless", "Mobilicity CA"},
{302, 350, "FIRST Networks Operations", "FIRST CA"},
{302, 360, "Telus Mobility", "MiKE CA"},
{302, 361, "Telus Mobility", "Telus CA"},
{302, 370, "Fido Solutions (Rogers Wireless)", "Fido CA"},
{302, 380, "Dryden Mobility", "DMTS CA"},
{302, 490, "Globalive Communications", "WIND Mobile CA"},
{302, 500, "Videotron", "Videotron CA"},
{302, 510, "Videotron", "Videotron CA"},
{302, 610, "Bell Mobility", "Bell CA"},
{302, 620, "ICE Wireless", "ICE Wireless CA"},
{302, 640, "Bell Mobility", "Bell CA"},
{302, 651, "Bell Mobility", "Bell CA"},
{302, 652, "BC Tel Mobility", "BC Tel CA"},
{302, 653, "Telus Mobility", "Telus"},
{302, 654, "Sask Tel Mobility", "Sask Tel CA"},
{302, 655, "MTS Mobility", "MTS CA"},
{302, 656, "Thunder Bay Telephone Mobility", "TBay CA"},
{302, 657, "Telus Mobility", "Telus CA"},
{302, 680, "SaskTel Mobility", "SaskTel CA"},
{302, 701, "MB Tel Mobility", "MB Tel CA"},
{302, 702, "MT&T Mobility (Aliant)", "MT&T CA"},
{302, 703, "New Tel Mobility (Aliant", "New Tel CA"},
{302, 710, "Globalstar Canada", "Globalstar CA"},
{302, 720, "Rogers Communications", "Rogers Wireless CA"},
{302, 780, "SaskTel Mobility", "SaskTel CA"},
{302, 880, "Shared Telus, Bell, and SaskTel", "Bell / Telus / SaskTel CA"},
/*
Cape Verde
625 1 CVMovel, S.A. CVMOVEL Operational
625 2 T+Telecomunicaçôes T+ Operational
......@@ -356,18 +359,20 @@ Chile
730 9 Centennial Cayman Corp. Chile Nextel Operational
730 10 Entel Telefonia Móvil S.A. entel Operational
730 99 WILL Telefonia Will Operational
*/
China
460 0 China Mobile Operational
460 1 China Unicom Operational
460 2 Liaoning PPTA Operational
460 3 China Unicom CDMA Operational
460 4 China Satellite Global Star Network Inactive
460 5 China Telecom Operational
460 6 China Unicom Operational
460 7 China Mobile Operational
460 20 China Tietong (GSM-R) Inactive
//China
{460, 0, "China Mobile", "China Mobile"},
{460, 1, "China Unicom", "China Unicom"},
{460, 2, "Liaoning PPTA","Liaoning China"},
{460, 3, "China Unicom CDMA", "China Unicom"},
{460, 4, "China Satellite Global Star Network",""},
{460, 5, "China Telecom", "China Telecom"},
{460, 6, "China Unicom", "China Unicom"},
{460, 7, "China Mobile", "China Mobile"},
{460, 20, "China Tietong (GSM-R)",""},
/*
Colombia
732 1 Colombia Telecomunicaciones S.A. Operational
732 2 Edatel S.A. Edatel Operational
......
This diff is collapsed.
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