Commit 3af5cb20 authored by Raymond Knopp's avatar Raymond Knopp

debugging after merge (SL synch + SLBCH ok)

parent 5dbb0e31
...@@ -1090,7 +1090,6 @@ set(PHY_SRC_COMMON ...@@ -1090,7 +1090,6 @@ set(PHY_SRC_COMMON
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pcfich.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pcfich.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/srs_modulation.c ${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/srs_modulation.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/initial_syncSL.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/get_pmi.c ${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/get_pmi.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/phich_common.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/phich_common.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pcfich_common.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pcfich_common.c
...@@ -1205,6 +1204,7 @@ set(PHY_SRC_UE ...@@ -1205,6 +1204,7 @@ set(PHY_SRC_UE
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/ulsch_coding.c ${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/ulsch_coding.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/rar_tools_ue.c ${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/rar_tools_ue.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/initial_sync.c ${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/initial_sync.c
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/initial_syncSL.c
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep.c ${OPENAIR1_DIR}/PHY/MODULATION/slot_fep.c
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep_mbsfn.c ${OPENAIR1_DIR}/PHY/MODULATION/slot_fep_mbsfn.c
${OPENAIR1_DIR}/PHY/MODULATION/ul_7_5_kHz_ue.c ${OPENAIR1_DIR}/PHY/MODULATION/ul_7_5_kHz_ue.c
......
...@@ -675,9 +675,9 @@ int init_lte_ue_signal(PHY_VARS_UE *ue, ...@@ -675,9 +675,9 @@ int init_lte_ue_signal(PHY_VARS_UE *ue,
init_dfts(); init_dfts();
init_frame_parms(&ue->frame_parms,1); init_frame_parms(&ue->frame_parms,1);
init_7_5KHz();
lte_sync_time_init(&ue->frame_parms); lte_sync_time_init(&ue->frame_parms);
init_lte_top(&ue->frame_parms); init_lte_top(&ue->frame_parms);
init_7_5KHz();
init_ul_hopping(&ue->frame_parms); init_ul_hopping(&ue->frame_parms);
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
//#include "PHY/phy_vars_ue.h" //#include "PHY/phy_vars_ue.h"
#include "PHY/phy_extern_ue.h" #include "PHY/phy_extern_ue.h"
#include <math.h> #include <math.h>
#include "PHY/MODULATION/modulation_extern.h"
#include "LAYER2/MAC/mac.h" #include "LAYER2/MAC/mac.h"
#include "RRC/LTE/rrc_extern.h" #include "RRC/LTE/rrc_extern.h"
...@@ -41,7 +41,7 @@ int64_t* sync_corr_ue0 = NULL; ...@@ -41,7 +41,7 @@ int64_t* sync_corr_ue0 = NULL;
int64_t* sync_corr_ue1 = NULL; int64_t* sync_corr_ue1 = NULL;
int64_t* sync_corr_ue2 = NULL; int64_t* sync_corr_ue2 = NULL;
/*
extern int16_t s6n_kHz_7_5[1920]; extern int16_t s6n_kHz_7_5[1920];
extern int16_t s6e_kHz_7_5[1920]; extern int16_t s6e_kHz_7_5[1920];
extern int16_t s25n_kHz_7_5[7680]; extern int16_t s25n_kHz_7_5[7680];
...@@ -52,7 +52,7 @@ extern int16_t s75n_kHz_7_5[24576]; ...@@ -52,7 +52,7 @@ extern int16_t s75n_kHz_7_5[24576];
extern int16_t s75e_kHz_7_5[24576]; extern int16_t s75e_kHz_7_5[24576];
extern int16_t s100n_kHz_7_5[30720]; extern int16_t s100n_kHz_7_5[30720];
extern int16_t s100e_kHz_7_5[30720]; extern int16_t s100e_kHz_7_5[30720];
*/
int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *common_vars int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *common_vars
{ {
...@@ -336,36 +336,35 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com ...@@ -336,36 +336,35 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
idft128((int16_t*)syncF_tmp, /// complex input idft128((int16_t*)syncF_tmp, /// complex input
(int16_t*)sync_tmp, /// complex output (int16_t*)sync_tmp, /// complex output
1); 1);
kHz7_5ptr = (frame_parms->Ncp==0) ? &s6n_kHz_7_5[2*138]: &s6e_kHz_7_5[2*160]; kHz7_5ptr = (frame_parms->Ncp==0) ? ((int16_t*)s6n_kHz_7_5)+(2*138): ((int16_t*)s6e_kHz_7_5)+(2*160);
break; break;
case 25: case 25:
idft512((int16_t*)syncF_tmp, /// complex input idft512((int16_t*)syncF_tmp, /// complex input
(int16_t*)sync_tmp, /// complex output (int16_t*)sync_tmp, /// complex output
1); 1);
kHz7_5ptr = (frame_parms->Ncp==0) ? &s25n_kHz_7_5[2*552] : &s25e_kHz_7_5[2*640]; kHz7_5ptr = (frame_parms->Ncp==0) ? ((int16_t*)s25n_kHz_7_5)+(2*552) : ((int16_t*)s25e_kHz_7_5)+(2*640);
break; break;
case 50: case 50:
idft1024((int16_t*)syncF_tmp, /// complex input idft1024((int16_t*)syncF_tmp, /// complex input
(int16_t*)sync_tmp, /// complex output (int16_t*)sync_tmp, /// complex output
1); 1);
kHz7_5ptr = (frame_parms->Ncp==0) ? &s50n_kHz_7_5[2*1104] : &s50e_kHz_7_5[2*1280]; kHz7_5ptr = (frame_parms->Ncp==0) ? ((int16_t*)s50n_kHz_7_5)+(2*1104) : ((int16_t*)s50e_kHz_7_5)+(2*1280);
printf("%p\n",kHz7_5ptr);
break; break;
case 75: case 75:
idft1536((int16_t*)syncF_tmp, /// complex input idft1536((int16_t*)syncF_tmp, /// complex input
(int16_t*)sync_tmp, (int16_t*)sync_tmp,
1); /// complex output 1); /// complex output
kHz7_5ptr = (frame_parms->Ncp==0) ? &s75n_kHz_7_5[2*1656]: &s75e_kHz_7_5[2*1920]; kHz7_5ptr = (frame_parms->Ncp==0) ? ((int16_t*)s75n_kHz_7_5)+(2*1656): ((int16_t*)s75e_kHz_7_5)+(2*1920);
break; break;
case 100: case 100:
idft2048((int16_t*)syncF_tmp, /// complex input idft2048((int16_t*)syncF_tmp, /// complex input
(int16_t*)sync_tmp, /// complex output (int16_t*)sync_tmp, /// complex output
1); 1);
kHz7_5ptr = (frame_parms->Ncp==0) ? &s100n_kHz_7_5[2*2208] : &s100e_kHz_7_5[2*2560]; kHz7_5ptr = (frame_parms->Ncp==0) ? ((int16_t*)s100n_kHz_7_5)+(2*2208) : ((int16_t*)s100e_kHz_7_5)+(2*2560);
break; break;
default: default:
...@@ -451,18 +450,18 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com ...@@ -451,18 +450,18 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
} }
/*
write_output("primary_sync0.m","psync0",primary_synch0_time,frame_parms->ofdm_symbol_size,1,1); LOG_M("primary_sync0.m","psync0",primary_synch0_time,frame_parms->ofdm_symbol_size,1,1);
write_output("primary_sync1.m","psync1",primary_synch1_time,frame_parms->ofdm_symbol_size,1,1); LOG_M("primary_sync1.m","psync1",primary_synch1_time,frame_parms->ofdm_symbol_size,1,1);
write_output("primary_sync2.m","psync2",primary_synch2_time,frame_parms->ofdm_symbol_size,1,1); LOG_M("primary_sync2.m","psync2",primary_synch2_time,frame_parms->ofdm_symbol_size,1,1);
write_output("primary_syncSL0.m","psyncSL0",primary_synch0SL_time,frame_parms->ofdm_symbol_size+frame_parms->nb_prefix_samples,1,1); LOG_M("primary_syncSL0.m","psyncSL0",primary_synch0SL_time,frame_parms->ofdm_symbol_size+frame_parms->nb_prefix_samples,1,1);
write_output("primary_syncSL1.m","psyncSL1",primary_synch1SL_time,frame_parms->ofdm_symbol_size+frame_parms->nb_prefix_samples,1,1); LOG_M("primary_syncSL1.m","psyncSL1",primary_synch1SL_time,frame_parms->ofdm_symbol_size+frame_parms->nb_prefix_samples,1,1);
write_output("primary_syncSL1rx.m","psyncSL1rx",primary_synch1SL_time_rx,2*(frame_parms->ofdm_symbol_size+frame_parms->nb_prefix_samples),1,1); LOG_M("primary_syncSL1rx.m","psyncSL1rx",primary_synch1SL_time_rx,2*(frame_parms->ofdm_symbol_size+frame_parms->nb_prefix_samples),1,1);
write_output("primary_syncSL0rx.m","psyncSL0rx",primary_synch0SL_time_rx,2*(frame_parms->ofdm_symbol_size+frame_parms->nb_prefix_samples),1,1); LOG_M("primary_syncSL0rx.m","psyncSL0rx",primary_synch0SL_time_rx,2*(frame_parms->ofdm_symbol_size+frame_parms->nb_prefix_samples),1,1);
write_output("kHz75.m","kHz75",kHz7_5ptr,2*1096,1,1); LOG_M("kHz75.m","kHz75",kHz7_5ptr,2*1096,1,1);
*/
if ( LOG_DUMPFLAG(DEBUG_LTEESTIM)){ if ( LOG_DUMPFLAG(DEBUG_LTEESTIM)){
LOG_M("primary_sync0.m","psync0",primary_synch0_time,frame_parms->ofdm_symbol_size,1,1); LOG_M("primary_sync0.m","psync0",primary_synch0_time,frame_parms->ofdm_symbol_size,1,1);
LOG_M("primary_sync1.m","psync1",primary_synch1_time,frame_parms->ofdm_symbol_size,1,1); LOG_M("primary_sync1.m","psync1",primary_synch1_time,frame_parms->ofdm_symbol_size,1,1);
......
...@@ -66,14 +66,14 @@ int initial_syncSL(PHY_VARS_UE *ue) { ...@@ -66,14 +66,14 @@ int initial_syncSL(PHY_VARS_UE *ue) {
if (rx_psbch(ue,0,0) == -1) { if (rx_psbch(ue,0,0) == -1) {
ue->slbch_errors++; ue->slbch_errors++;
LOG_I(PHY,"PBCH not decoded\n"); LOG_I(PHY,"SLPBCH not decoded\n");
write_output("rxsig0.m","rxs0",&ue->common_vars.rxdata_syncSL[0][0],40*ue->frame_parms.samples_per_tti,1,1); write_output("rxsig0.m","rxs0",&ue->common_vars.rxdata_syncSL[0][0],40*ue->frame_parms.samples_per_tti,1,1);
write_output("corr0.m","rxsync0",sync_corr_ue0,40*ue->frame_parms.samples_per_tti,1,6); write_output("corr0.m","rxsync0",sync_corr_ue0,40*ue->frame_parms.samples_per_tti,1,6);
write_output("corr1.m","rxsync1",sync_corr_ue1,40*ue->frame_parms.samples_per_tti,1,6); write_output("corr1.m","rxsync1",sync_corr_ue1,40*ue->frame_parms.samples_per_tti,1,6);
exit(-1); exit(-1);
return(-1); return(-1);
} }
else { else {
// send payload to RRC // send payload to RRC
......
...@@ -211,12 +211,12 @@ int rx_psbch(PHY_VARS_UE *ue,int frame_rx,int subframe_rx) { ...@@ -211,12 +211,12 @@ int rx_psbch(PHY_VARS_UE *ue,int frame_rx,int subframe_rx) {
free(ru_tmp.common.rxdata_7_5kHz); free(ru_tmp.common.rxdata_7_5kHz);
#ifdef PSBCH_DEBUG #ifdef PSBCH_DEBUG
if (ue->is_synchronizedSL == 1 && ue->frame_parms.Nid_SL==170) { if (ue->is_synchronizedSL == 1 && ue->frame_parms.Nid_SL==170) {
write_output("slbch.m","slbchrx",ue->common_vars.rxdata[0],ue->frame_parms.samples_per_tti,1,1); LOG_M("slbch.m","slbchrx",ue->common_vars.rxdata[0],ue->frame_parms.samples_per_tti,1,1);
write_output("slbch_rxF.m", LOG_M("slbch_rxF.m",
"slbchrxF", "slbchrxF",
&rxdataF[0][0], &rxdataF[0][0],
14*ue->frame_parms.ofdm_symbol_size,1,1); 14*ue->frame_parms.ofdm_symbol_size,1,1);
write_output("slbch_rxF_ext.m","slbchrxF_ext",rxdataF_ext[0],14*12*ue->frame_parms.N_RB_DL,1,1); LOG_M("slbch_rxF_ext.m","slbchrxF_ext",rxdataF_ext[0],14*12*ue->frame_parms.N_RB_DL,1,1);
} }
#endif #endif
...@@ -254,7 +254,7 @@ int rx_psbch(PHY_VARS_UE *ue,int frame_rx,int subframe_rx) { ...@@ -254,7 +254,7 @@ int rx_psbch(PHY_VARS_UE *ue,int frame_rx,int subframe_rx) {
2,0); 2,0);
#ifdef PSBCH_DEBUG #ifdef PSBCH_DEBUG
if (ue->is_synchronizedSL == 1 && ue->frame_parms.Nid_SL == 170) write_output("drsbch_est0.m","drsbchest0",drs_ch_estimates[0],ue->frame_parms.N_RB_UL*12*14,1,1); if (ue->is_synchronizedSL == 1 && ue->frame_parms.Nid_SL == 170) LOG_M("drsbch_est0.m","drsbchest0",drs_ch_estimates[0],ue->frame_parms.N_RB_UL*12*14,1,1);
#endif #endif
avgs = 0; avgs = 0;
...@@ -306,14 +306,14 @@ int rx_psbch(PHY_VARS_UE *ue,int frame_rx,int subframe_rx) { ...@@ -306,14 +306,14 @@ int rx_psbch(PHY_VARS_UE *ue,int frame_rx,int subframe_rx) {
72); 72);
#ifdef PSBCH_DEBUG #ifdef PSBCH_DEBUG
if (ue->frame_parms.Nid_SL == 170) write_output("slbch_rxF_comp.m","slbchrxF_comp",rxdataF_comp[0],ue->frame_parms.N_RB_UL*12*14,1,1); if (ue->frame_parms.Nid_SL == 170) LOG_M("slbch_rxF_comp.m","slbchrxF_comp",rxdataF_comp[0],ue->frame_parms.N_RB_UL*12*14,1,1);
#endif #endif
int8_t llr[PSBCH_E]; int8_t llr[PSBCH_E];
int8_t *llrp = llr; int8_t *llrp = llr;
for (int l=0; l<10; l++) { for (int l=0; l<10; l++) {
pbch_quantize(llrp, pbch_quantize(llrp,
(int16_t*)&rxdataF_comp[0][l*ue->frame_parms.N_RB_UL*12*2], (int16_t*)&rxdataF_comp[0][l*ue->frame_parms.N_RB_UL*12],
72*2); 72*2);
llrp += 72*2; llrp += 72*2;
if (l==0) l=3; if (l==0) l=3;
...@@ -325,7 +325,7 @@ int rx_psbch(PHY_VARS_UE *ue,int frame_rx,int subframe_rx) { ...@@ -325,7 +325,7 @@ int rx_psbch(PHY_VARS_UE *ue,int frame_rx,int subframe_rx) {
1); 1);
#ifdef PSBCH_DEBUG #ifdef PSBCH_DEBUG
if (ue->frame_parms.Nid_SL == 170) write_output("slbch_llr.m","slbch_llr",llr,PSBCH_E,1,4); if (ue->frame_parms.Nid_SL == 170) LOG_M("slbch_llr.m","slbch_llr",llr,PSBCH_E,1,4);
#endif #endif
uint8_t slbch_a[2+(PSBCH_A>>3)]; uint8_t slbch_a[2+(PSBCH_A>>3)];
......
...@@ -971,8 +971,8 @@ extern "C" { ...@@ -971,8 +971,8 @@ extern "C" {
* \param openair0_cfg RF frontend parameters set by application * \param openair0_cfg RF frontend parameters set by application
*/ */
int device_init(openair0_device *device, openair0_config_t *openair0_cfg) { int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
LOG_D(PHY, "openair0_cfg[0].sdr_addrs == '%s'\n", openair0_cfg[0].sdr_addrs); LOG_I(PHY, "openair0_cfg[0].sdr_addrs == '%s'\n", openair0_cfg[0].sdr_addrs);
LOG_D(PHY, "openair0_cfg[0].clock_source == '%d'\n", openair0_cfg[0].clock_source); LOG_I(PHY, "openair0_cfg[0].clock_source == '%d'\n", openair0_cfg[0].clock_source);
#if defined(USRP_REC_PLAY) #if defined(USRP_REC_PLAY)
paramdef_t usrp_recplay_params[7]; paramdef_t usrp_recplay_params[7];
struct sysinfo systeminfo; struct sysinfo systeminfo;
......
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