Commit 79016d3c authored by Raphael Defosseux's avatar Raphael Defosseux

Fixes to pass basic-sim in TDD and OAI-UE + USRP test

  -- cell synchronization was successful on the 1st try (in OAI UE + USRP) test
parent 490f0d61
......@@ -62,7 +62,11 @@ int generate_drs_pusch(PHY_VARS_UE *ue,
LTE_DL_FRAME_PARMS *fp = (ue==NULL) ? frame_parms : &ue->frame_parms;
int32_t *txF = (ue==NULL) ? txdataF[ant] : ue->common_vars.txdataF[ant];
uint32_t u,v,alpha_ind;
uint32_t u0=0,u1=0,v0=0,v1=0;
uint32_t u0 = (ue==NULL) ? 0 : frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.grouphop[subframe<<1];
uint32_t u1 = (ue==NULL) ? 0 : frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.grouphop[1+(subframe<<1)];
uint32_t v0 = (ue==NULL) ? 0 : frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.seqhop[subframe<<1];
uint32_t v1 = (ue==NULL) ? 0 : frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.seqhop[1+(subframe<<1)];
int32_t ref_re,ref_im;
uint8_t harq_pid = (proc == NULL) ? 0: subframe2harq_pid(fp,proc->frame_tx,subframe);
......
......@@ -423,7 +423,6 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
}
}
ue->common_vars.freq_offset=0;
/* Consider this is a false detection if the offset is > 1000 Hz */
if( (abs(ue->common_vars.freq_offset) > 150) && (ret == 0) ) {
ret=-1;
......@@ -446,18 +445,6 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
generate_phich_reg_mapping(frame_parms);
ue->pbch_vars[0]->pdu_errors_conseq=0;
if (ue->frame_parms.frame_type==FDD) {
ue->N_TA_offset = 0;
}
else {
if (ue->frame_parms.N_RB_DL == 100)
ue->N_TA_offset = 624;
else if (ue->frame_parms.N_RB_DL == 50)
ue->N_TA_offset = 624/2;
else if (ue->frame_parms.N_RB_DL == 25)
ue->N_TA_offset = 624/4;
}
}
LOG_I(PHY, "[UE %d] Frame %d RRC Measurements => rssi %3.1f dBm (dig %3.1f dB, gain %d), N0 %d dBm, rsrp %3.1f dBm/RE, rsrq %3.1f dB\n",ue->Mod_id,
......
......@@ -579,33 +579,10 @@ int wakeup_rxtx(PHY_VARS_eNB *eNB,RU_t *ru) {
RU_proc_t *ru_proc=&ru->proc;
L1_rxtx_proc_t *L1_proc=&proc->L1_proc;
LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms;
int i,ret;
int ret;
LOG_D(PHY,"ENTERED wakeup_rxtx, %d.%d\n",ru_proc->frame_rx,ru_proc->subframe_rx);
AssertFatal((ret=pthread_mutex_lock(&proc->mutex_RU))==0,"mutex_lock returns %d\n",ret);
for (i=0;i<eNB->num_RU;i++) {
if (ru == eNB->RU_list[i]) {
if ((proc->RU_mask[ru_proc->subframe_rx]&(1<<i)) > 0)
LOG_E(PHY,"eNB %d frame %d, subframe %d : previous information from RU %d (num_RU %d,mask %x) has not been served yet!\n",
eNB->Mod_id,proc->frame_rx,proc->subframe_rx,ru->idx,eNB->num_RU,proc->RU_mask[ru_proc->subframe_rx]);
proc->RU_mask[ru_proc->subframe_rx] |= (1<<i);
}
}
if (proc->RU_mask[ru_proc->subframe_rx] != (1<<eNB->num_RU)-1) { // not all RUs have provided their information so return
LOG_E(PHY,"Not all RUs have provided their info\n");
AssertFatal((ret=pthread_mutex_unlock(&proc->mutex_RU))==0,"mutex_unlock returns %d\n",ret);
return(0);
}
else { // all RUs have provided their information so continue on and wakeup eNB processing
proc->RU_mask[ru_proc->subframe_rx] = 0;
AssertFatal((ret=pthread_mutex_unlock(&proc->mutex_RU))==0,"mutex_unlock returns %d\n",ret);
}
// wake up TX for subframe n+sl_ahead
// lock the TX mutex and make sure the thread is ready
AssertFatal((ret=pthread_mutex_lock(&L1_proc->mutex)) == 0,"mutex_lock returns %d\n", ret);
......
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