Commit d00b966d authored by Raymond Knopp's avatar Raymond Knopp

finishing mere with constant_power branch. Testing OTA.

parent 49efcebe
...@@ -60,6 +60,8 @@ elseif (${RF_BOARD} STREQUAL "OAI_IRIS") ...@@ -60,6 +60,8 @@ elseif (${RF_BOARD} STREQUAL "OAI_IRIS")
endif (${RF_BOARD} STREQUAL "OAI_USRP") endif (${RF_BOARD} STREQUAL "OAI_USRP")
message("RU=${RU}")
pkg_search_module(OPENPGM openpgm-5.1 openpgm-5.2) pkg_search_module(OPENPGM openpgm-5.1 openpgm-5.2)
if(NOT ${OPENPGM_FOUND}) if(NOT ${OPENPGM_FOUND})
message("PACKAGE openpgm-5.1 is required by binaries such as oaisim: will fail later if this target is built") message("PACKAGE openpgm-5.1 is required by binaries such as oaisim: will fail later if this target is built")
...@@ -3396,6 +3398,8 @@ foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim pr ...@@ -3396,6 +3398,8 @@ foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim pr
${OPENAIR_DIR}/common/utils/backtrace.c ${OPENAIR_DIR}/common/utils/backtrace.c
${OPENAIR_DIR}/common/utils/system.c ${OPENAIR_DIR}/common/utils/system.c
${OPENAIR_DIR}/common/utils/utils.c ${OPENAIR_DIR}/common/utils/utils.c
${OPENAIR_DIR}/common/utils/lte/ue_power.c
${OPENAIR_DIR}/common/utils/lte/prach_utils.c
${OPENAIR1_DIR}/PHY/INIT/lte_param_init.c ${OPENAIR1_DIR}/PHY/INIT/lte_param_init.c
${XFORMS_SOURCE} ${XFORMS_SOURCE}
${T_SOURCE} ${T_SOURCE}
......
...@@ -301,6 +301,7 @@ function main() { ...@@ -301,6 +301,7 @@ function main() {
shift 2;; shift 2;;
-P | --phy_simulators) -P | --phy_simulators)
SIMUS_PHY=1 SIMUS_PHY=1
RU=0
echo_info "Will compile dlsim, ulsim, ..." echo_info "Will compile dlsim, ulsim, ..."
shift;; shift;;
-S | --core_simulators) -S | --core_simulators)
......
...@@ -17,4 +17,5 @@ set ( UE_TIMING_TRACE False ) ...@@ -17,4 +17,5 @@ set ( UE_TIMING_TRACE False )
set ( USRP_REC_PLAY False ) set ( USRP_REC_PLAY False )
set ( SKIP_SHARED_LIB_FLAG False ) set ( SKIP_SHARED_LIB_FLAG False )
set ( PHYSIM True) set ( PHYSIM True)
set ( RU 0)
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt) include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)
...@@ -1203,10 +1203,13 @@ void dump_ulsch(PHY_VARS_eNB *eNB,int frame,int subframe,uint8_t UE_id,int round ...@@ -1203,10 +1203,13 @@ void dump_ulsch(PHY_VARS_eNB *eNB,int frame,int subframe,uint8_t UE_id,int round
uint8_t harq_pid; uint8_t harq_pid;
char fname[100],vname[100]; char fname[100],vname[100];
harq_pid = subframe2harq_pid(&eNB->frame_parms,frame,subframe); harq_pid = subframe2harq_pid(&eNB->frame_parms,frame,subframe);
LOG_UI(PHY,"Dumping ULSCH in subframe %d with harq_pid %d, round %d for NB_rb %d, TBS %d, Qm %d, N_symb %d\n", LOG_UI(PHY,"Dumping ULSCH in subframe %d with harq_pid %d, round %d for NB_rb %d, first_rb %d, TBS %d, Qm %d, N_symb %d\n",
subframe,harq_pid,round,eNB->ulsch[UE_id]->harq_processes[harq_pid]->nb_rb, subframe,harq_pid,round,eNB->ulsch[UE_id]->harq_processes[harq_pid]->nb_rb,
eNB->ulsch[UE_id]->harq_processes[harq_pid]->first_rb,
eNB->ulsch[UE_id]->harq_processes[harq_pid]->TBS,eNB->ulsch[UE_id]->harq_processes[harq_pid]->Qm, eNB->ulsch[UE_id]->harq_processes[harq_pid]->TBS,eNB->ulsch[UE_id]->harq_processes[harq_pid]->Qm,
eNB->ulsch[UE_id]->harq_processes[harq_pid]->Nsymb_pusch); eNB->ulsch[UE_id]->harq_processes[harq_pid]->Nsymb_pusch);
for (int aa=0;aa<eNB->frame_parms.nb_antennas_rx;aa++)
LOG_UI(PHY,"ulsch_power[%d] %d, ulsch_noise_power[%d] %d\n",aa,dB_fixed_times10(eNB->pusch_vars[UE_id]->ulsch_power[aa]),aa,dB_fixed_times10(eNB->pusch_vars[UE_id]->ulsch_noise_power[aa]));
sprintf(fname,"/tmp/ulsch_r%d_d",round); sprintf(fname,"/tmp/ulsch_r%d_d",round);
sprintf(vname,"/tmp/ulsch_r%d_dseq",round); sprintf(vname,"/tmp/ulsch_r%d_dseq",round);
LOG_UM(fname,vname,&eNB->ulsch[UE_id]->harq_processes[harq_pid]->d[0][96], LOG_UM(fname,vname,&eNB->ulsch[UE_id]->harq_processes[harq_pid]->d[0][96],
...@@ -1264,6 +1267,13 @@ void dump_ulsch(PHY_VARS_eNB *eNB,int frame,int subframe,uint8_t UE_id,int round ...@@ -1264,6 +1267,13 @@ void dump_ulsch(PHY_VARS_eNB *eNB,int frame,int subframe,uint8_t UE_id,int round
sprintf(fname,"/tmp/ulsch0_rxF_comp0_r%d.m",round); sprintf(fname,"/tmp/ulsch0_rxF_comp0_r%d.m",round);
sprintf(vname,"ulsch0_rxF_comp0_r%d",round); sprintf(vname,"ulsch0_rxF_comp0_r%d",round);
LOG_UM(fname,vname,&eNB->pusch_vars[UE_id]->rxdataF_comp[0][0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1); LOG_UM(fname,vname,&eNB->pusch_vars[UE_id]->rxdataF_comp[0][0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1);
if (eNB->frame_parms.nb_antennas_rx>1) {
sprintf(fname,"/tmp/ulsch0_rxF_comp1_r%d.m",round);
sprintf(vname,"ulsch0_rxF_comp1_r%d",round);
LOG_UM(fname,vname,&eNB->pusch_vars[UE_id]->rxdataF_comp[1][0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1);
}
// LOG_M("ulsch_rxF_comp1.m","ulsch0_rxF_comp1",&eNB->pusch_vars[UE_id]->rxdataF_comp[0][1][0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1); // LOG_M("ulsch_rxF_comp1.m","ulsch0_rxF_comp1",&eNB->pusch_vars[UE_id]->rxdataF_comp[0][1][0],eNB->frame_parms.N_RB_UL*12*nsymb,1,1);
sprintf(fname,"/tmp/ulsch_rxF_llr_r%d.m",round); sprintf(fname,"/tmp/ulsch_rxF_llr_r%d.m",round);
sprintf(vname,"ulsch_llr_r%d",round); sprintf(vname,"ulsch_llr_r%d",round);
......
...@@ -1473,6 +1473,16 @@ void pusch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) { ...@@ -1473,6 +1473,16 @@ void pusch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
ulsch_harq->V_UL_DAI, ulsch_harq->V_UL_DAI,
ulsch_harq->nb_rb>20 ? 1 : 0); ulsch_harq->nb_rb>20 ? 1 : 0);
stop_meas(&eNB->ulsch_decoding_stats); stop_meas(&eNB->ulsch_decoding_stats);
int ulsch_id=-1;
for (ulsch_id=0;ulsch_id<NUMBER_OF_ULSCH_MAX;ulsch_id++)
if (ulsch->rnti == eNB->ulsch_stats[ulsch_id].rnti) break;
AssertFatal(ulsch_id>=0,"no ulsch_id found\n");
if (eNB->ulsch_stats[ulsch_id].round_trials[0]>100) {
dump_ulsch(eNB,frame,subframe,i,ulsch_harq->round);
AssertFatal(1==0,"exiting\n");
}
} }
else if ((ulsch) && else if ((ulsch) &&
(ulsch->rnti>0) && (ulsch->rnti>0) &&
...@@ -1639,10 +1649,10 @@ void fill_rx_indication(PHY_VARS_eNB *eNB, ...@@ -1639,10 +1649,10 @@ void fill_rx_indication(PHY_VARS_eNB *eNB,
else else
pdu->rx_indication_rel8.ul_cqi = (640 + SNRtimes10) / 5; pdu->rx_indication_rel8.ul_cqi = (640 + SNRtimes10) / 5;
LOG_D(PHY,"[PUSCH %d] Frame %d Subframe %d Filling RX_indication with SNR %d (%d,%d,%d), timing_advance %d (update %d,sync_pos %d)\n", LOG_I(PHY,"[PUSCH %d] Frame %d Subframe %d Filling RX_indication with SNR %d (%d,%d,%d), timing_advance %d (update %d,sync_pos %d)\n",
harq_pid,frame,subframe,SNRtimes10,pdu->rx_indication_rel8.ul_cqi,dB_fixed_times10(total_power),dB_fixed_times10(avg_noise_power),pdu->rx_indication_rel8.timing_advance,timing_advance_update,sync_pos); harq_pid,frame,subframe,SNRtimes10,pdu->rx_indication_rel8.ul_cqi,dB_fixed_times10(total_power),dB_fixed_times10(avg_noise_power),pdu->rx_indication_rel8.timing_advance,timing_advance_update,sync_pos);
for (int i=0;i<eNB->frame_parms.nb_antennas_rx;i++) for (int i=0;i<eNB->frame_parms.nb_antennas_rx;i++)
LOG_D(PHY,"antenna %d: ulsch_power %d, noise_power %d\n",i,dB_fixed_times10(eNB->pusch_vars[ULSCH_id]->ulsch_power[i]),dB_fixed_times10(eNB->pusch_vars[ULSCH_id]->ulsch_noise_power[i])); LOG_I(PHY,"antenna %d: ulsch_power %d, noise_power %d\n",i,dB_fixed_times10(eNB->pusch_vars[ULSCH_id]->ulsch_power[i]),dB_fixed_times10(eNB->pusch_vars[ULSCH_id]->ulsch_noise_power[i]));
eNB->UL_INFO.rx_ind.rx_indication_body.number_of_pdus++; eNB->UL_INFO.rx_ind.rx_indication_body.number_of_pdus++;
eNB->UL_INFO.rx_ind.sfn_sf = frame<<4 | subframe; eNB->UL_INFO.rx_ind.sfn_sf = frame<<4 | subframe;
......
...@@ -82,6 +82,7 @@ double DS_TDL = .03; ...@@ -82,6 +82,7 @@ double DS_TDL = .03;
static int cmpdouble(const void *p1, const void *p2) { static int cmpdouble(const void *p1, const void *p2) {
return *(double *)p1 > *(double *)p2; return *(double *)p1 > *(double *)p2;
} }
RAN_CONTEXT_t RC;
int emulate_rf = 0; int emulate_rf = 0;
int split73=0; int split73=0;
......
...@@ -84,7 +84,7 @@ static int cmpdouble(const void *p1, const void *p2) { ...@@ -84,7 +84,7 @@ static int cmpdouble(const void *p1, const void *p2) {
return *(double *)p1 > *(double *)p2; return *(double *)p1 > *(double *)p2;
} }
RAN_CONTEXT_t RC;
int split73=0; int split73=0;
void sendFs6Ul(PHY_VARS_eNB *eNB, int UE_id, int harq_pid, int segmentID, int16_t *data, int dataLen, int r_offset) { void sendFs6Ul(PHY_VARS_eNB *eNB, int UE_id, int harq_pid, int segmentID, int16_t *data, int dataLen, int r_offset) {
AssertFatal(false, "Must not be called in this context\n"); AssertFatal(false, "Must not be called in this context\n");
...@@ -404,7 +404,7 @@ int main(int argc, char **argv) { ...@@ -404,7 +404,7 @@ int main(int argc, char **argv) {
printf("Detected cpu_freq %f GHz\n",cpu_freq_GHz); printf("Detected cpu_freq %f GHz\n",cpu_freq_GHz);
AssertFatal(load_configmodule(argc,argv,CONFIG_ENABLECMDLINEONLY) != NULL, "Cannot load configuration module, exiting\n"); AssertFatal(load_configmodule(argc,argv,CONFIG_ENABLECMDLINEONLY) != NULL, "Cannot load configuration module, exiting\n");
logInit(); logInit();
set_glog(OAILOG_WARNING); set_glog(OAILOG_INFO);
T_stdout = 1; T_stdout = 1;
// enable these lines if you need debug info // enable these lines if you need debug info
// however itti will catch all signals, so ctrl-c won't work anymore // however itti will catch all signals, so ctrl-c won't work anymore
...@@ -1137,6 +1137,15 @@ int main(int argc, char **argv) { ...@@ -1137,6 +1137,15 @@ int main(int argc, char **argv) {
sqrt(sigma2/2)*gaussdouble(0.0,1.0)); sqrt(sigma2/2)*gaussdouble(0.0,1.0));
} }
} }
if (n_frames==1)
for (i=0; i<eNB->frame_parms.samples_per_tti; i++) {
for (aa=0; aa<eNB->frame_parms.nb_antennas_rx; aa++) {
((short *) &ru->common.rxdata[aa][eNB->frame_parms.samples_per_tti*(subframe+1)%10])[2*i] =
(short) (sqrt(sigma2/2)*gaussdouble(0.0,1.0));
((short *) &ru->common.rxdata[aa][eNB->frame_parms.samples_per_tti*(subframe+1)%10])[2*i+1] =
(short) (sqrt(sigma2/2)*gaussdouble(0.0,1.0));
}
}
if (n_frames<=10) { if (n_frames<=10) {
printf("rx_level Null symbol %f\n",10*log10((double)signal_energy((int *) printf("rx_level Null symbol %f\n",10*log10((double)signal_energy((int *)
...@@ -1162,9 +1171,10 @@ int main(int argc, char **argv) { ...@@ -1162,9 +1171,10 @@ int main(int argc, char **argv) {
start_meas(&eNB->phy_proc_rx); start_meas(&eNB->phy_proc_rx);
ru->feprx = (get_thread_worker_conf() == WORKER_ENABLE) ? ru_fep_full_2thread : fep_full; ru->feprx = (get_thread_worker_conf() == WORKER_ENABLE) ? ru_fep_full_2thread : fep_full;
ru->feprx(ru,subframe); ru->feprx(ru,subframe);
if (n_frames==1) lte_eNB_I0_measurements(eNB,(subframe+1)%10,0,1);
phy_procedures_eNB_uespec_RX(eNB,proc_rxtx); phy_procedures_eNB_uespec_RX(eNB,proc_rxtx);
stop_meas(&eNB->phy_proc_rx); stop_meas(&eNB->phy_proc_rx);
if (cqi_flag > 0) { if (cqi_flag > 0) {
cqi_error = 0; cqi_error = 0;
...@@ -1290,6 +1300,7 @@ int main(int argc, char **argv) { ...@@ -1290,6 +1300,7 @@ int main(int argc, char **argv) {
LOG_UDUMPMSG(SIM,dataArray(table_rx),table_rx->size,LOG_DUMP_DOUBLE,"The receiver raw data: \n"); LOG_UDUMPMSG(SIM,dataArray(table_rx),table_rx->size,LOG_DUMP_DOUBLE,"The receiver raw data: \n");
} }
dump_ulsch_stats(eNB);
printf("\n**********rb: %d ***mcs : %d *********SNR = %f dB (%f): TX %u dB (gain %f dB), N0W %f dB, I0 %u dB, delta_IF %d [ (%d,%d) dB / (%u,%u) dB ]**************************\n", printf("\n**********rb: %d ***mcs : %d *********SNR = %f dB (%f): TX %u dB (gain %f dB), N0W %f dB, I0 %u dB, delta_IF %d [ (%d,%d) dB / (%u,%u) dB ]**************************\n",
nb_rb,mcs,SNR,SNR2, nb_rb,mcs,SNR,SNR2,
tx_lev_dB, tx_lev_dB,
......
...@@ -211,13 +211,13 @@ typedef struct RB_INFO_TABLE_ENTRY_NB_IoT_s { ...@@ -211,13 +211,13 @@ typedef struct RB_INFO_TABLE_ENTRY_NB_IoT_s {
RB_INFO_NB_IoT Rb_info; RB_INFO_NB_IoT Rb_info;
uint8_t Active; uint8_t Active;
uint32_t Next_check_frame; uint32_t Next_check_frame;
uint8_t Status; uint8_t status;
} RB_INFO_TABLE_ENTRY_NB_IoT; } RB_INFO_TABLE_ENTRY_NB_IoT;
typedef struct SRB_INFO_TABLE_ENTRY_NB_IoT_s { typedef struct SRB_INFO_TABLE_ENTRY_NB_IoT_s {
SRB_INFO_NB_IoT Srb_info; SRB_INFO_NB_IoT Srb_info;
uint8_t Active; uint8_t Active;
uint8_t Status; uint8_t status;
uint32_t Next_check_frame; uint32_t Next_check_frame;
} SRB_INFO_TABLE_ENTRY_NB_IoT; } SRB_INFO_TABLE_ENTRY_NB_IoT;
...@@ -269,7 +269,7 @@ typedef struct eNB_RRC_UE_NB_IoT_s { ...@@ -269,7 +269,7 @@ typedef struct eNB_RRC_UE_NB_IoT_s {
e_LTE_CipheringAlgorithm_r12 ciphering_algorithm; //Specs. TS 36.331 V14.1.0 pag 432 Change position of chipering enumerative w.r.t previous version e_LTE_CipheringAlgorithm_r12 ciphering_algorithm; //Specs. TS 36.331 V14.1.0 pag 432 Change position of chipering enumerative w.r.t previous version
e_LTE_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm; e_LTE_SecurityAlgorithmConfig__integrityProtAlgorithm integrity_algorithm;
uint8_t Status; uint8_t status;
rnti_t rnti; rnti_t rnti;
uint64_t random_ue_identity; uint64_t random_ue_identity;
......
...@@ -238,13 +238,13 @@ typedef struct RB_INFO_TABLE_ENTRY_NR_s { ...@@ -238,13 +238,13 @@ typedef struct RB_INFO_TABLE_ENTRY_NR_s {
NR_RB_INFO Rb_info; NR_RB_INFO Rb_info;
uint8_t Active; uint8_t Active;
uint32_t Next_check_frame; uint32_t Next_check_frame;
uint8_t Status; uint8_t status;
} NR_RB_INFO_TABLE_ENTRY; } NR_RB_INFO_TABLE_ENTRY;
typedef struct SRB_INFO_TABLE_ENTRY_NR_s { typedef struct SRB_INFO_TABLE_ENTRY_NR_s {
NR_SRB_INFO Srb_info; NR_SRB_INFO Srb_info;
uint8_t Active; uint8_t Active;
uint8_t Status; uint8_t status;
uint32_t Next_check_frame; uint32_t Next_check_frame;
} NR_SRB_INFO_TABLE_ENTRY; } NR_SRB_INFO_TABLE_ENTRY;
...@@ -297,7 +297,7 @@ typedef struct gNB_RRC_UE_s { ...@@ -297,7 +297,7 @@ typedef struct gNB_RRC_UE_s {
NR_CipheringAlgorithm_t ciphering_algorithm; NR_CipheringAlgorithm_t ciphering_algorithm;
e_NR_IntegrityProtAlgorithm integrity_algorithm; e_NR_IntegrityProtAlgorithm integrity_algorithm;
uint8_t Status; uint8_t status;
rnti_t rnti; rnti_t rnti;
uint64_t random_ue_identity; uint64_t random_ue_identity;
......
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