some cleanup for UE on USRP, OPENAIR2=0 flag works again and on USRP, UE TX on USRP still to be added

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6539 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
Raymond Knopp
2015-02-12 16:53:46 +00:00
parent 3506f66ad2
commit cc289f63c3
2 changed files with 19 additions and 4 deletions
+15 -3
View File
@@ -263,6 +263,10 @@ static inline int abs32(int x) {
return (((int)((short*)&x)[0])*((int)((short*)&x)[0]) + ((int)((short*)&x)[1])*((int)((short*)&x)[1]));
}
#ifdef DEBUG_PHY
int debug_cnt=0;
#endif
int lte_sync_time(int **rxdata, ///rx data in time domain
LTE_DL_FRAME_PARMS *frame_parms,
int *eNB_id) {
@@ -295,6 +299,7 @@ int lte_sync_time(int **rxdata, ///rx data in time domain
peak_pos = 0;
sync_source = 0;
for (n=0; n<length; n+=4) {
#ifdef RTAI_ENABLED
@@ -396,9 +401,16 @@ int lte_sync_time(int **rxdata, ///rx data in time domain
#ifdef USER_MODE
write_output("sync_corr0_ue.m","synccorr0",sync_corr_ue0,2*length,1,2);
write_output("sync_corr1_ue.m","synccorr1",sync_corr_ue1,2*length,1,2);
write_output("sync_corr2_ue.m","synccorr2",sync_corr_ue2,2*length,1,2);
if (debug_cnt == 5) {
write_output("sync_corr0_ue.m","synccorr0",sync_corr_ue0,2*length,1,2);
write_output("sync_corr1_ue.m","synccorr1",sync_corr_ue1,2*length,1,2);
write_output("sync_corr2_ue.m","synccorr2",sync_corr_ue2,2*length,1,2);
write_output("rxdata0.m","rxd0",rxdata[0],length<<1,1,1);
exit(-1);
}
else {
debug_cnt++;
}
#endif
#endif
+4 -1
View File
@@ -468,8 +468,11 @@ int initial_sync(PHY_VARS_UE *phy_vars_ue, runmode_t mode) {
generate_pcfich_reg_mapping(frame_parms);
generate_phich_reg_mapping(frame_parms);
// init_prach625(frame_parms);
#ifndef OPENAIR2
phy_vars_ue->UE_mode[0] = PUSCH;
#else
phy_vars_ue->UE_mode[0] = PRACH;
#endif
//phy_vars_ue->lte_ue_pbch_vars[0]->pdu_errors=0;
phy_vars_ue->lte_ue_pbch_vars[0]->pdu_errors_conseq=0;
//phy_vars_ue->lte_ue_pbch_vars[0]->pdu_errors_last=0;