Commit 1db923d6 authored by Rohit Gupta's avatar Rohit Gupta

Merge branch 'enhancement-10-harmony' of...

Merge branch 'enhancement-10-harmony' of https://gitlab.eurecom.fr/oai/openairinterface5g into enhancement-10-harmony
parents 8220c9e5 e196210a
...@@ -894,7 +894,8 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo , ...@@ -894,7 +894,8 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
task_EPC = task_EPC + ' ) > ' + logfile_task_EPC_out + ' 2>&1 ' task_EPC = task_EPC + ' ) > ' + logfile_task_EPC_out + ' 2>&1 '
write_file(logfile_task_EPC, task_EPC, mode="w") write_file(logfile_task_EPC, task_EPC, mode="w")
#first we compile all the programs #first we compile all the programs but only for run_0
if run == 0:
thread_EPC = oaiThread(1, "EPC_thread", EPCMachine, user, password , task_EPC_compile, False, timeout_thread) thread_EPC = oaiThread(1, "EPC_thread", EPCMachine, user, password , task_EPC_compile, False, timeout_thread)
thread_eNB = oaiThread(2, "eNB_thread", eNBMachine, user, password , task_eNB_compile, False, timeout_thread) thread_eNB = oaiThread(2, "eNB_thread", eNBMachine, user, password , task_eNB_compile, False, timeout_thread)
thread_UE = oaiThread(3, "UE_thread", UEMachine, user, password , task_UE_compile, False, timeout_thread) thread_UE = oaiThread(3, "UE_thread", UEMachine, user, password , task_UE_compile, False, timeout_thread)
......
...@@ -83,7 +83,7 @@ Options ...@@ -83,7 +83,7 @@ Options
--install-optional-packages --install-optional-packages
Install useful but not mandatory packages such as valgrind Install useful but not mandatory packages such as valgrind
-g | --run-with-gdb -g | --run-with-gdb
Add debugging symbols to compilation directives. It also disables any compiler optimization. Add debugging symbols to compilation directives. It also disables any compiler optimization. Only for debugging. Do not use in normal operation!
-h | --help -h | --help
Print this help Print this help
--eNB --eNB
...@@ -137,9 +137,9 @@ Options ...@@ -137,9 +137,9 @@ Options
--disable-hardware-dependency --disable-hardware-dependency
Disable HW dependency during installation Disable HW dependency during installation
Usage (first build): Usage (first build):
oaisim (eNB + UE): ./build_oai -I -g --oaisim -x --install-system-files oaisim (eNB + UE): ./build_oai -I --oaisim -x --install-system-files
Eurecom EXMIMO + COTS UE : ./build_oai -I -g --eNB -x --install-system-files Eurecom EXMIMO + COTS UE : ./build_oai -I --eNB -x --install-system-files
NI/ETTUS B201 + COTS UE : ./build_oai -I -g --eNB -x --install-system-files -w USRP NI/ETTUS B201 + COTS UE : ./build_oai -I --eNB -x --install-system-files -w USRP
Usage (Regular): Usage (Regular):
oaisim : ./build_oai --oaisim -x oaisim : ./build_oai --oaisim -x
Eurecom EXMIMO + OAI ENB : ./build_oai --eNB -x Eurecom EXMIMO + OAI ENB : ./build_oai --eNB -x
......
...@@ -493,6 +493,11 @@ void compute_beta8(llr_t* alpha,llr_t* beta,llr_t *m_11,llr_t* m_10,unsigned sho ...@@ -493,6 +493,11 @@ void compute_beta8(llr_t* alpha,llr_t* beta,llr_t *m_11,llr_t* m_10,unsigned sho
#endif #endif
if (frame_length > 6143) {
LOG_E(PHY,"compute_beta: frame_length %d\n",frame_length);
return;
}
// we are supposed to run compute_alpha just before compute_beta // we are supposed to run compute_alpha just before compute_beta
// so the initial states of backward computation can be set from last value of alpha states (forward computation) // so the initial states of backward computation can be set from last value of alpha states (forward computation)
......
...@@ -818,11 +818,14 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1 ...@@ -818,11 +818,14 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
break; break;
case 75: case 75:
memset((void*)prachF,0,4*19432); memset((void*)prachF,0,4*18432);
break; break;
case 100: case 100:
if (ue->frame_parms.threequarter_fs == 0)
memset((void*)prachF,0,4*24576); memset((void*)prachF,0,4*24576);
else
memset((void*)prachF,0,4*18432);
break; break;
} }
...@@ -886,6 +889,9 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1 ...@@ -886,6 +889,9 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
break; break;
} }
if (ue->frame_parms.threequarter_fs == 1)
Ncp=(Ncp*3)>>2;
prach2 = prach+(Ncp<<1); prach2 = prach+(Ncp<<1);
// do IDFT // do IDFT
...@@ -986,6 +992,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1 ...@@ -986,6 +992,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
break; break;
case 100: case 100:
if (ue->frame_parms.threequarter_fs == 0) {
if (prach_fmt == 4) { if (prach_fmt == 4) {
idft4096(prachF,prach2,1); idft4096(prachF,prach2,1);
memmove( prach, prach+8192, Ncp<<2 ); memmove( prach, prach+8192, Ncp<<2 );
...@@ -1000,6 +1007,24 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1 ...@@ -1000,6 +1007,24 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
prach_len = 2* 24576+Ncp; prach_len = 2* 24576+Ncp;
} }
} }
}
else {
if (prach_fmt == 4) {
idft3072(prachF,prach2);
//TODO: account for repeated format in dft output
memmove( prach, prach+6144, Ncp<<2 );
prach_len = 3072+Ncp;
} else {
idft18432(prachF,prach2);
memmove( prach, prach+36864, Ncp<<2 );
prach_len = 18432+Ncp;
printf("Generated prach for 100 PRB, 3/4 sampling\n");
if (prach_fmt>1) {
memmove( prach2+36834, prach2, 73728 );
prach_len = 2*18432+Ncp;
}
}
}
break; break;
} }
...@@ -1496,7 +1521,7 @@ void rx_prach(PHY_VARS_eNB *eNB, ...@@ -1496,7 +1521,7 @@ void rx_prach(PHY_VARS_eNB *eNB,
#ifdef PRACH_DEBUG #ifdef PRACH_DEBUG
if (en>40) { // if (en>40) {
k = (12*n_ra_prb) - 6*eNB->frame_parms.N_RB_UL; k = (12*n_ra_prb) - 6*eNB->frame_parms.N_RB_UL;
if (k<0) if (k<0)
...@@ -1510,7 +1535,7 @@ void rx_prach(PHY_VARS_eNB *eNB, ...@@ -1510,7 +1535,7 @@ void rx_prach(PHY_VARS_eNB *eNB,
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("prach_ifft0.m","prach_t0",prach_ifft[0],1024,1,1); write_output("prach_ifft0.m","prach_t0",prach_ifft[0],1024,1,1);
exit(-1); exit(-1);
} // }
#endif #endif
} // new dft } // new dft
......
...@@ -190,6 +190,9 @@ void generate_pucch1x(int32_t **txdataF, ...@@ -190,6 +190,9 @@ void generate_pucch1x(int32_t **txdataF,
else { else {
d = (frame_parms->Ncp==0) ? 2 : 0; d = (frame_parms->Ncp==0) ? 2 : 0;
h= (nprime0+d)%(c*Nprime_div_deltaPUCCH_Shift); h= (nprime0+d)%(c*Nprime_div_deltaPUCCH_Shift);
#ifdef DEBUG_PUCCH_TX
printf("[PHY] PUCCH: h %d, d %d\n",h,d);
#endif
nprime1 = (h/c) + (h%c)*Nprime_div_deltaPUCCH_Shift; nprime1 = (h/c) + (h%c)*Nprime_div_deltaPUCCH_Shift;
} }
...@@ -208,7 +211,7 @@ void generate_pucch1x(int32_t **txdataF, ...@@ -208,7 +211,7 @@ void generate_pucch1x(int32_t **txdataF,
n_oc1<<=1; n_oc1<<=1;
#ifdef DEBUG_PUCCH_TX #ifdef DEBUG_PUCCH_TX
printf("[PHY] PUCCH: noc0 %d noc11 %d\n",n_oc0,n_oc1); printf("[PHY] PUCCH: noc0 %d noc1 %d\n",n_oc0,n_oc1);
#endif #endif
nprime=nprime0; nprime=nprime0;
......
...@@ -1200,6 +1200,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, ...@@ -1200,6 +1200,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
y[i2] = c*ulsch_llr[i++]; y[i2] = c*ulsch_llr[i++];
i2=(i2+(Cmux<<2)-3); i2=(i2+(Cmux<<2)-3);
*/ */
// slightly more optimized version (equivalent to above) for 16QAM to improve computational performance
*(__m64 *)&y[i2] = _mm_sign_pi16(*(__m64*)&ulsch_llr[i],*(__m64*)&cseq[i]);i+=4;i2+=(Cmux<<2); *(__m64 *)&y[i2] = _mm_sign_pi16(*(__m64*)&ulsch_llr[i],*(__m64*)&cseq[i]);i+=4;i2+=(Cmux<<2);
...@@ -1531,6 +1532,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, ...@@ -1531,6 +1532,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
// RI // RI
// rank 1
if ((ulsch_harq->O_RI == 1) && (Qprime_RI > 0)) { if ((ulsch_harq->O_RI == 1) && (Qprime_RI > 0)) {
ulsch_harq->o_RI[0] = ((ulsch_harq->q_RI[0] + ulsch_harq->q_RI[Q_m/2]) > 0) ? 0 : 1; ulsch_harq->o_RI[0] = ((ulsch_harq->q_RI[0] + ulsch_harq->q_RI[Q_m/2]) > 0) ? 0 : 1;
} }
......
...@@ -5229,7 +5229,7 @@ void dft8192(int16_t *x,int16_t *y,int scale) ...@@ -5229,7 +5229,7 @@ void dft8192(int16_t *x,int16_t *y,int scale)
xtmpp = xtmp; xtmpp = xtmp;
for (i=0; i<32; i++) { for (i=0; i<16; i++) {
transpose4_ooff_simd256(x256 ,xtmpp,512); transpose4_ooff_simd256(x256 ,xtmpp,512);
transpose4_ooff_simd256(x256+2,xtmpp+1,512); transpose4_ooff_simd256(x256+2,xtmpp+1,512);
transpose4_ooff_simd256(x256+4,xtmpp+2,512); transpose4_ooff_simd256(x256+4,xtmpp+2,512);
...@@ -5267,7 +5267,7 @@ void dft8192(int16_t *x,int16_t *y,int scale) ...@@ -5267,7 +5267,7 @@ void dft8192(int16_t *x,int16_t *y,int scale)
} }
dft4096((int16_t*)(xtmp),(int16_t*)ytmp,1); dft4096((int16_t*)(xtmp),(int16_t*)ytmp,1);
dft4096((int16_t*)(xtmp+1024),(int16_t*)(ytmp+512),1); dft4096((int16_t*)(xtmp+512),(int16_t*)(ytmp+512),1);
for (i=0; i<512; i++) { for (i=0; i<512; i++) {
...@@ -5319,7 +5319,7 @@ void idft8192(int16_t *x,int16_t *y,int scale) ...@@ -5319,7 +5319,7 @@ void idft8192(int16_t *x,int16_t *y,int scale)
xtmpp = xtmp; xtmpp = xtmp;
for (i=0; i<32; i++) { for (i=0; i<16; i++) {
transpose4_ooff_simd256(x256 ,xtmpp,512); transpose4_ooff_simd256(x256 ,xtmpp,512);
transpose4_ooff_simd256(x256+2,xtmpp+1,512); transpose4_ooff_simd256(x256+2,xtmpp+1,512);
transpose4_ooff_simd256(x256+4,xtmpp+2,512); transpose4_ooff_simd256(x256+4,xtmpp+2,512);
...@@ -5357,7 +5357,7 @@ void idft8192(int16_t *x,int16_t *y,int scale) ...@@ -5357,7 +5357,7 @@ void idft8192(int16_t *x,int16_t *y,int scale)
} }
idft4096((int16_t*)(xtmp),(int16_t*)ytmp,1); idft4096((int16_t*)(xtmp),(int16_t*)ytmp,1);
idft4096((int16_t*)(xtmp+1024),(int16_t*)(ytmp+512),1); idft4096((int16_t*)(xtmp+512),(int16_t*)(ytmp+512),1);
for (i=0; i<512; i++) { for (i=0; i<512; i++) {
...@@ -5680,15 +5680,58 @@ void idft12288(int16_t *input, int16_t *output) ...@@ -5680,15 +5680,58 @@ void idft12288(int16_t *input, int16_t *output)
// write_output("out.m","out",output,6144,1,1); // write_output("out.m","out",output,6144,1,1);
} }
#include "twiddle18432.h"
// 6144 x 3 // 6144 x 3
void dft18432(int16_t *input, int16_t *output) void dft18432(int16_t *input, int16_t *output) {
{
int i,i2,j;
uint32_t tmp[3][6144] __attribute__((aligned(32)));
uint32_t tmpo[3][6144] __attribute__((aligned(32)));
for (i=0,j=0; i<6144; i++) {
tmp[0][i] = ((uint32_t *)input)[j++];
tmp[1][i] = ((uint32_t *)input)[j++];
tmp[2][i] = ((uint32_t *)input)[j++];
}
dft6144((int16_t*)(tmp[0]),(int16_t*)(tmpo[0]));
dft6144((int16_t*)(tmp[1]),(int16_t*)(tmpo[1]));
dft6144((int16_t*)(tmp[2]),(int16_t*)(tmpo[2]));
for (i=0,i2=0; i<12288; i+=8,i2+=4) {
bfly3((simd_q15_t*)(&tmpo[0][i2]),(simd_q15_t*)(&tmpo[1][i2]),(simd_q15_t*)(&tmpo[2][i2]),
(simd_q15_t*)(output+i),(simd_q15_t*)(output+12288+i),(simd_q15_t*)(output+24576+i),
(simd_q15_t*)(twa18432+i),(simd_q15_t*)(twb18432+i));
}
_mm_empty();
_m_empty();
} }
void idft18432(int16_t *input, int16_t *output) void idft18432(int16_t *input, int16_t *output) {
{
int i,i2,j;
uint32_t tmp[3][6144] __attribute__((aligned(32)));
uint32_t tmpo[3][6144] __attribute__((aligned(32)));
for (i=0,j=0; i<6144; i++) {
tmp[0][i] = ((uint32_t *)input)[j++];
tmp[1][i] = ((uint32_t *)input)[j++];
tmp[2][i] = ((uint32_t *)input)[j++];
}
idft6144((int16_t*)(tmp[0]),(int16_t*)(tmpo[0]));
idft6144((int16_t*)(tmp[1]),(int16_t*)(tmpo[1]));
idft6144((int16_t*)(tmp[2]),(int16_t*)(tmpo[2]));
for (i=0,i2=0; i<12288; i+=8,i2+=4) {
ibfly3((simd_q15_t*)(&tmpo[0][i2]),(simd_q15_t*)(&tmpo[1][i2]),(simd_q15_t*)(&tmpo[2][i2]),
(simd_q15_t*)(output+i),(simd_q15_t*)(output+12288+i),(simd_q15_t*)(output+24576+i),
(simd_q15_t*)(twa18432+i),(simd_q15_t*)(twb18432+i));
}
_mm_empty();
_m_empty();
} }
#include "twiddle24576.h" #include "twiddle24576.h"
...@@ -5733,8 +5776,8 @@ void dft24576(int16_t *input, int16_t *output) ...@@ -5733,8 +5776,8 @@ void dft24576(int16_t *input, int16_t *output)
void idft24576(int16_t *input, int16_t *output) void idft24576(int16_t *input, int16_t *output)
{ {
int i,i2,j; int i,i2,j;
uint32_t tmp[3][16384] __attribute__((aligned(32))); uint32_t tmp[3][8192] __attribute__((aligned(32)));
uint32_t tmpo[3][16384] __attribute__((aligned(32))); uint32_t tmpo[3][8192] __attribute__((aligned(32)));
for (i=0,j=0; i<8192; i++) { for (i=0,j=0; i<8192; i++) {
tmp[0][i] = ((uint32_t *)input)[j++]; tmp[0][i] = ((uint32_t *)input)[j++];
...@@ -5746,13 +5789,6 @@ void idft24576(int16_t *input, int16_t *output) ...@@ -5746,13 +5789,6 @@ void idft24576(int16_t *input, int16_t *output)
idft8192((int16_t*)(tmp[1]),(int16_t*)(tmpo[1]),1); idft8192((int16_t*)(tmp[1]),(int16_t*)(tmpo[1]),1);
idft8192((int16_t*)(tmp[2]),(int16_t*)(tmpo[2]),1); idft8192((int16_t*)(tmp[2]),(int16_t*)(tmpo[2]),1);
/*
for (i=1; i<8192; i++) {
tmpo[0][i] = tmpo[0][i<<1];
tmpo[1][i] = tmpo[1][i<<1];
tmpo[2][i] = tmpo[2][i<<1];
}*/
/* /*
write_output("in.m","in",input,24576,1,1); write_output("in.m","in",input,24576,1,1);
write_output("out0.m","o0",tmpo[0],8192,1,1); write_output("out0.m","o0",tmpo[0],8192,1,1);
...@@ -19129,6 +19165,55 @@ int main(int argc, char**argv) ...@@ -19129,6 +19165,55 @@ int main(int argc, char**argv)
write_output("y2048.m","y2048",y,2048,1,1); write_output("y2048.m","y2048",y,2048,1,1);
write_output("x2048.m","x2048",x,2048,1,1); write_output("x2048.m","x2048",x,2048,1,1);
memset((void*)x,0,2048*sizeof(int32_t));
for (i=2;i<2402;i++) {
if ((taus() & 1)==0)
((int16_t*)x)[i] = 364;
else
((int16_t*)x)[i] = -364;
}
for (i=2*(4096-1200);i<8192;i++) {
if ((taus() & 1)==0)
((int16_t*)x)[i] = 364;
else
((int16_t*)x)[i] = -364;
}
reset_meas(&ts);
for (i=0; i<10000; i++) {
start_meas(&ts);
idft4096((int16_t *)x,(int16_t *)y,1);
stop_meas(&ts);
}
printf("\n\n4096-point(%f cycles)\n",(double)ts.diff/(double)ts.trials);
write_output("y4096.m","y4096",y,4096,1,1);
write_output("x4096.m","x4096",x,4096,1,1);
memset((void*)x,0,8192*sizeof(int32_t));
for (i=2;i<4802;i++) {
if ((taus() & 1)==0)
((int16_t*)x)[i] = 364;
else
((int16_t*)x)[i] = -364;
}
for (i=2*(4096-1200);i<8192;i++) {
if ((taus() & 1)==0)
((int16_t*)x)[i] = 364;
else
((int16_t*)x)[i] = -364;
}
reset_meas(&ts);
for (i=0; i<10000; i++) {
start_meas(&ts);
idft8192((int16_t *)x,(int16_t *)y,1);
stop_meas(&ts);
}
printf("\n\n8192-point(%f cycles)\n",(double)ts.diff/(double)ts.trials);
write_output("y8192.m","y8192",y,8192,1,1);
write_output("x8192.m","x8192",x,8192,1,1);
return(0); return(0);
} }
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -736,14 +736,8 @@ void ue_prach_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin ...@@ -736,14 +736,8 @@ void ue_prach_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
#endif #endif
if (abstraction_flag == 0) { if (abstraction_flag == 0) {
LOG_I(PHY,"[UE %d][RAPROC] Frame %d, Subframe %d : Generating PRACH, preamble %d, TARGET_RECEIVED_POWER %d dBm, PRACH TDD Resource index %d, RA-RNTI %d\n",
ue->Mod_id, LOG_I(PHY,"mode %d\n",mode);
frame_tx,
subframe_tx,
ue->prach_resources[eNB_id]->ra_PreambleIndex,
ue->prach_resources[eNB_id]->ra_PREAMBLE_RECEIVED_TARGET_POWER,
ue->prach_resources[eNB_id]->ra_TDD_map_index,
ue->prach_resources[eNB_id]->ra_RNTI);
if ((ue->mac_enabled==1) && (mode != calib_prach_tx)) { if ((ue->mac_enabled==1) && (mode != calib_prach_tx)) {
ue->tx_power_dBm[subframe_tx] = ue->prach_resources[eNB_id]->ra_PREAMBLE_RECEIVED_TARGET_POWER+get_PL(ue->Mod_id,ue->CC_id,eNB_id); ue->tx_power_dBm[subframe_tx] = ue->prach_resources[eNB_id]->ra_PREAMBLE_RECEIVED_TARGET_POWER+get_PL(ue->Mod_id,ue->CC_id,eNB_id);
...@@ -753,6 +747,15 @@ void ue_prach_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin ...@@ -753,6 +747,15 @@ void ue_prach_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
ue->prach_resources[eNB_id]->ra_PreambleIndex = 19; ue->prach_resources[eNB_id]->ra_PreambleIndex = 19;
} }
LOG_I(PHY,"[UE %d][RAPROC] Frame %d, Subframe %d : Generating PRACH, preamble %d, TARGET_RECEIVED_POWER %d dBm, PRACH TDD Resource index %d, RA-RNTI %d\n",
ue->Mod_id,
frame_tx,
subframe_tx,
ue->prach_resources[eNB_id]->ra_PreambleIndex,
ue->prach_resources[eNB_id]->ra_PREAMBLE_RECEIVED_TARGET_POWER,
ue->prach_resources[eNB_id]->ra_TDD_map_index,
ue->prach_resources[eNB_id]->ra_RNTI);
ue->tx_total_RE[subframe_tx] = 96; ue->tx_total_RE[subframe_tx] = 96;
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
...@@ -1046,7 +1049,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB ...@@ -1046,7 +1049,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB
ue->tx_total_RE[subframe_tx] = nb_rb*12; ue->tx_total_RE[subframe_tx] = nb_rb*12;
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
tx_amp = get_tx_amp(ue->tx_power_dBm, tx_amp = get_tx_amp(ue->tx_power_dBm[subframe_tx],
ue->tx_power_max_dBm, ue->tx_power_max_dBm,
ue->frame_parms.N_RB_UL, ue->frame_parms.N_RB_UL,
nb_rb); nb_rb);
......
...@@ -104,13 +104,15 @@ int main(int argc, char **argv) ...@@ -104,13 +104,15 @@ int main(int argc, char **argv)
double delay_avg=0; double delay_avg=0;
double ue_speed = 0; double ue_speed = 0;
int NCS_config = 1,rootSequenceIndex=0; int NCS_config = 1,rootSequenceIndex=0;
int threequarter_fs = 0;
logInit(); logInit();
number_of_cards = 1; number_of_cards = 1;
while ((c = getopt (argc, argv, "hHaA:Cr:p:g:n:s:S:t:x:y:v:V:z:N:F:d:Z:L:R:")) != -1) { while ((c = getopt (argc, argv, "hHaA:Cr:p:g:n:s:S:t:x:y:v:V:z:N:F:d:Z:L:R:E")) != -1) {
switch (c) { switch (c) {
case 'a': case 'a':
printf("Running AWGN simulation\n"); printf("Running AWGN simulation\n");
...@@ -182,6 +184,10 @@ int main(int argc, char **argv) ...@@ -182,6 +184,10 @@ int main(int argc, char **argv)
break; break;
case 'E':
threequarter_fs=1;
break;
case 'n': case 'n':
n_frames = atoi(optarg); n_frames = atoi(optarg);
break; break;
...@@ -316,7 +322,7 @@ int main(int argc, char **argv) ...@@ -316,7 +322,7 @@ int main(int argc, char **argv)
Nid_cell, Nid_cell,
3, 3,
N_RB_DL, N_RB_DL,
0, threequarter_fs,
osf, osf,
0); 0);
...@@ -397,6 +403,7 @@ int main(int argc, char **argv) ...@@ -397,6 +403,7 @@ int main(int argc, char **argv)
eNB->node_function = eNodeB_3GPP; eNB->node_function = eNodeB_3GPP;
eNB->proc.subframe_rx = subframe; eNB->proc.subframe_rx = subframe;
eNB->proc.subframe_prach = subframe;
/* N_ZC not used later, so prach_fmt is also useless, don't set */ /* N_ZC not used later, so prach_fmt is also useless, don't set */
//prach_fmt = get_prach_fmt(eNB->frame_parms.prach_config_common.prach_ConfigInfo.prach_ConfigIndex, //prach_fmt = get_prach_fmt(eNB->frame_parms.prach_config_common.prach_ConfigInfo.prach_ConfigIndex,
...@@ -530,7 +537,7 @@ int main(int argc, char **argv) ...@@ -530,7 +537,7 @@ int main(int argc, char **argv)
write_output("rxsig0.m","rxs0", write_output("rxsig0.m","rxs0",
&eNB->common_vars.rxdata[0][0][subframe*frame_parms->samples_per_tti], &eNB->common_vars.rxdata[0][0][subframe*frame_parms->samples_per_tti],
frame_parms->samples_per_tti,1,1); frame_parms->samples_per_tti,1,1);
write_output("rxsigF0.m","rxsF0", &eNB->common_vars.rxdataF[0][0][0],512*nsymb*2,2,1); write_output("rxsigF0.m","rxsF0", eNB->prach_vars.rxsigF[0],6144,1,1);
write_output("prach_preamble.m","prachp",&eNB->X_u[0],839,1,1); write_output("prach_preamble.m","prachp",&eNB->X_u[0],839,1,1);
} }
} }
......
...@@ -66,7 +66,11 @@ int main(int argc, char **argv) ...@@ -66,7 +66,11 @@ int main(int argc, char **argv)
uint8_t snr1set=0; uint8_t snr1set=0;
//mod_sym_t **txdataF; //mod_sym_t **txdataF;
int **txdata; int **txdata;
double s_re[2][30720],s_im[2][30720],r_re[2][30720],r_im[2][30720]; double s_re0[30720],s_re1[30720],s_im0[30720],s_im1[30720],r_re0[30720],r_im0[30720],r_re1[30720],r_im1[30720];
double *s_re[2]={s_re0,s_re1};
double *s_im[2]={s_im0,s_im1};
double *r_re[2]={r_re0,r_re1};
double *r_im[2]={r_im0,r_im1};
double ricean_factor=0.0000005,iqim=0.0; double ricean_factor=0.0000005,iqim=0.0;
int trial, n_trials, ntrials=1, n_errors; int trial, n_trials, ntrials=1, n_errors;
...@@ -352,12 +356,15 @@ int main(int argc, char **argv) ...@@ -352,12 +356,15 @@ int main(int argc, char **argv)
init_ncs_cell(&UE->frame_parms,UE->ncs_cell); init_ncs_cell(&UE->frame_parms,UE->ncs_cell);
eNB->frame_parms.pucch_config_common.deltaPUCCH_Shift = 1; init_ul_hopping(&eNB->frame_parms);
eNB->frame_parms.pucch_config_common.nRB_CQI = 0; init_ul_hopping(&UE->frame_parms);
eNB->frame_parms.pucch_config_common.nCS_AN = 0;
UE->frame_parms.pucch_config_common.deltaPUCCH_Shift = 1; eNB->frame_parms.pucch_config_common.deltaPUCCH_Shift = 2;
UE->frame_parms.pucch_config_common.nRB_CQI = 0; eNB->frame_parms.pucch_config_common.nRB_CQI = 4;
UE->frame_parms.pucch_config_common.nCS_AN = 0; eNB->frame_parms.pucch_config_common.nCS_AN = 6;
UE->frame_parms.pucch_config_common.deltaPUCCH_Shift = 2;
UE->frame_parms.pucch_config_common.nRB_CQI = 4;
UE->frame_parms.pucch_config_common.nCS_AN = 6;
pucch_payload = 0; pucch_payload = 0;
......
...@@ -434,7 +434,7 @@ schedule_ue_spec( ...@@ -434,7 +434,7 @@ schedule_ue_spec(
int N_RBG[MAX_NUM_CCs]; int N_RBG[MAX_NUM_CCs];
unsigned char aggregation; unsigned char aggregation;
mac_rlc_status_resp_t rlc_status; mac_rlc_status_resp_t rlc_status;
unsigned char header_len_dcch=0, header_len_dcch_tmp=0, header_len_dcch_last=0; unsigned char header_len_dcch=0, header_len_dcch_tmp=0;
unsigned char header_len_dtch=0, header_len_dtch_tmp=0, header_len_dtch_last=0; unsigned char header_len_dtch=0, header_len_dtch_tmp=0, header_len_dtch_last=0;
unsigned char ta_len=0; unsigned char ta_len=0;
unsigned char sdu_lcids[NB_RB_MAX],lcid,offset,num_sdus=0; unsigned char sdu_lcids[NB_RB_MAX],lcid,offset,num_sdus=0;
......
...@@ -384,7 +384,7 @@ ue_meas_filtering( ...@@ -384,7 +384,7 @@ ue_meas_filtering(
void void
ue_measurement_report_triggering( ue_measurement_report_triggering(
const protocol_ctxt_t* const ctxt_pP, protocol_ctxt_t* const ctxt_pP,
const uint8_t eNB_index const uint8_t eNB_index
); );
......
...@@ -131,7 +131,7 @@ static void rrc_ue_generate_RRCConnectionSetupComplete( const protocol_ctxt_t* c ...@@ -131,7 +131,7 @@ static void rrc_ue_generate_RRCConnectionSetupComplete( const protocol_ctxt_t* c
*/ */
static void rrc_ue_generate_RRCConnectionReconfigurationComplete( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index, const uint8_t Transaction_id ); static void rrc_ue_generate_RRCConnectionReconfigurationComplete( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index, const uint8_t Transaction_id );
static void rrc_ue_generate_MeasurementReport( const protocol_ctxt_t* const ctxt_pP, uint8_t eNB_index ); static void rrc_ue_generate_MeasurementReport(protocol_ctxt_t* const ctxt_pP, uint8_t eNB_index );
static uint8_t check_trigger_meas_event( static uint8_t check_trigger_meas_event(
uint8_t module_idP, uint8_t module_idP,
...@@ -3562,7 +3562,7 @@ void ue_meas_filtering( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_ ...@@ -3562,7 +3562,7 @@ void ue_meas_filtering( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_
//Below routine implements Measurement Reporting procedure from 36.331 Section 5.5.5 //Below routine implements Measurement Reporting procedure from 36.331 Section 5.5.5
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static void rrc_ue_generate_MeasurementReport( const protocol_ctxt_t* const ctxt_pP, uint8_t eNB_index ) static void rrc_ue_generate_MeasurementReport(protocol_ctxt_t* const ctxt_pP, uint8_t eNB_index )
{ {
uint8_t buffer[32], size; uint8_t buffer[32], size;
...@@ -3643,7 +3643,7 @@ static void rrc_ue_generate_MeasurementReport( const protocol_ctxt_t* const ctxt ...@@ -3643,7 +3643,7 @@ static void rrc_ue_generate_MeasurementReport( const protocol_ctxt_t* const ctxt
// Measurement report triggering, described in 36.331 Section 5.5.4.1: called periodically // Measurement report triggering, described in 36.331 Section 5.5.4.1: called periodically
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void ue_measurement_report_triggering( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index ) void ue_measurement_report_triggering(protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index )
{ {
uint8_t i,j; uint8_t i,j;
Hysteresis_t hys; Hysteresis_t hys;
......
...@@ -1259,7 +1259,6 @@ int rrc_eNB_process_S1AP_E_RAB_SETUP_REQ(MessageDef *msg_p, const char *msg_name ...@@ -1259,7 +1259,6 @@ int rrc_eNB_process_S1AP_E_RAB_SETUP_REQ(MessageDef *msg_p, const char *msg_name
{ {
uint16_t ue_initial_id; uint16_t ue_initial_id;
uint32_t eNB_ue_s1ap_id; uint32_t eNB_ue_s1ap_id;
MessageDef *message_gtpv1u_p = NULL;
gtpv1u_enb_create_tunnel_req_t create_tunnel_req; gtpv1u_enb_create_tunnel_req_t create_tunnel_req;
gtpv1u_enb_create_tunnel_resp_t create_tunnel_resp; gtpv1u_enb_create_tunnel_resp_t create_tunnel_resp;
......
...@@ -79,6 +79,14 @@ rrc_eNB_S1AP_remove_ue_ids( ...@@ -79,6 +79,14 @@ rrc_eNB_S1AP_remove_ue_ids(
eNB_RRC_INST* const rrc_instance_pP, eNB_RRC_INST* const rrc_instance_pP,
struct rrc_ue_s1ap_ids_s* const ue_ids_pP struct rrc_ue_s1ap_ids_s* const ue_ids_pP
); );
void
rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_t* const ue_context_pP,
const uint8_t ho_state
);
/*! \fn void rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP(uint8_t mod_id, uint8_t ue_index)