Commit e227a127 authored by hbilel's avatar hbilel

Merge remote-tracking branch 'oai1B/bugfix-42' into ue-tdd_fix_issueOai1B_42

parents 8f6746be 05a261ae
......@@ -1126,6 +1126,9 @@ void pdcch_extract_rbs_dual(int32_t **rxdataF,
int nushiftmod3 = frame_parms->nushift%3;
symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
#ifdef DEBUG_DCI_DECODING
LOG_I(PHY, "extract_rbs_dual: symbol_mod %d\n",symbol_mod);
#endif
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
......@@ -2679,11 +2682,15 @@ void dci_decoding_procedure0(LTE_UE_PDCCH **pdcch_vars,
nCCE = get_nCCE(pdcch_vars[eNB_id]->num_pdcch_symbols,frame_parms,mi);
if (nCCE > get_nCCE(3,frame_parms,1))
if (nCCE > get_nCCE(3,frame_parms,1)) {
LOG_D(PHY,"skip DCI decoding: nCCE=%d > get_nCCE(3,frame_parms,1)=%d\n", nCCE, get_nCCE(3,frame_parms,1));
return;
}
if (nCCE<L2)
if (nCCE<L2) {
LOG_D(PHY,"skip DCI decoding: nCCE=%d < L2=%d\n", nCCE, L2);
return;
}
if (do_common == 1) {
nb_candidates = (L2==4) ? 4 : 2;
......
......@@ -3299,11 +3299,19 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
l2 = (ue->frame_parms.symbols_per_tti/2)-1;
}
int prev_subframe_rx = (subframe_rx - 1)<0? 9: (subframe_rx - 1);
if (subframe_select(&ue->frame_parms,prev_subframe_rx) != SF_DL) {
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// RX processing of symbols l=0...l2
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
l=0;
} else {
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// RX processing of symbols l=1...l2 (l=0 is done in last scheduling epoch)
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
for (l=1; l<=l2; l++) {
l=1;
}
for (; l<=l2; l++) {
if (abstraction_flag == 0) {
start_meas(&ue->ofdm_demod_stats);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP, VCD_FUNCTION_IN);
......@@ -3424,13 +3432,18 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
ue_measurement_procedures(l-1,ue,proc,eNB_id,abstraction_flag,mode);
} // for l=1..l2
// do first symbol of next subframe for channel estimation
// do first symbol of next downlink subframe for channel estimation
int next_subframe_rx = (1+subframe_rx)%10;
if (subframe_select(&ue->frame_parms,next_subframe_rx) != SF_UL)
{
slot_fep(ue,
0,
(2+(subframe_rx<<1))%20,
(next_subframe_rx<<1),
ue->rx_offset,
0,
0);
}
} // not an S-subframe
// run pbch procedures if subframe is 0
......
......@@ -433,7 +433,14 @@ static void *UE_thread_synch(void *arg)
if (initial_sync( UE, UE->mode ) == 0) {
hw_slot_offset = (UE->rx_offset<<1) / UE->frame_parms.samples_per_tti;
LOG_I( HW, "Got synch: hw_slot_offset %d\n", hw_slot_offset );
LOG_I( HW, "Got synch: hw_slot_offset %d, carrier off %d Hz, rxgain %d (DL %u, UL %u), UE_scan_carrier %d\n",
hw_slot_offset,
freq_offset,
UE->rx_total_gain_dB,
downlink_frequency[0][0]+freq_offset,
downlink_frequency[0][0]+uplink_frequency_offset[0][0]+freq_offset,
UE->UE_scan_carrier );
if (UE->UE_scan_carrier == 1) {
UE->UE_scan_carrier = 0;
......@@ -710,10 +717,19 @@ static void *UE_thread_rxn_txnp4(void *arg)
while (sync_var<0)
pthread_cond_wait(&sync_cond, &sync_mutex);
#define THREAD_NAME_LEN 16
char threadname[THREAD_NAME_LEN];
ret = pthread_getname_np(proc->pthread_rxtx, threadname, THREAD_NAME_LEN);
if (ret != 0)
{
perror("pthread_getname_np : ");
exit_fun("Error getting thread name");
}
pthread_mutex_unlock(&sync_mutex);
printf("unlocked sync_mutex, waiting (UE_thread_rxtx)\n");
printf("Starting UE RXN_TXNP4 thread\n");
printf("Starting UE RXN_TXNP4 thread (%s)\n", threadname);
while (!oai_exit) {
if (pthread_mutex_lock(&proc->mutex_rxtx) != 0) {
......@@ -739,10 +755,27 @@ static void *UE_thread_rxn_txnp4(void *arg)
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_UE+(proc->subframe_rx&1), proc->frame_rx );
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_UE+(proc->subframe_tx&1), proc->frame_tx );
if ((subframe_select( &UE->frame_parms, proc->subframe_rx) == SF_DL) ||
lte_subframe_t sf_type = subframe_select( &UE->frame_parms, proc->subframe_rx);
if ((sf_type == SF_DL) ||
(UE->frame_parms.frame_type == FDD) ||
(subframe_select( &UE->frame_parms, proc->subframe_rx ) == SF_S)) {
(sf_type == SF_S)) {
if (UE->frame_parms.frame_type == TDD) {
LOG_D(PHY, "%s,TDD%d,%s: calling UE_RX\n",
threadname,
UE->frame_parms.tdd_config,
(sf_type==SF_DL? "SF_DL" :
(sf_type==SF_UL? "SF_UL" :
(sf_type==SF_S ? "SF_S" : "UNKNOWN_SF_TYPE"))));
} else {
LOG_D(PHY, "%s,%s,%s: calling UE_RX\n",
threadname,
(UE->frame_parms.frame_type==FDD? "FDD":
(UE->frame_parms.frame_type==TDD? "TDD":"UNKNOWN_DUPLEX_MODE")),
(sf_type==SF_DL? "SF_DL" :
(sf_type==SF_UL? "SF_UL" :
(sf_type==SF_S ? "SF_S" : "UNKNOWN_SF_TYPE"))));
}
phy_procedures_UE_RX( UE, proc, 0, 0, UE->mode, no_relay, NULL );
}
......@@ -1122,6 +1155,7 @@ void *UE_thread(void *arg) {
exit_fun("nothing to add");
return &UE_thread_retval;
}
LOG_D(PHY, "firing up rxtx_thread[%d] at subframe %d\n", sf&1, sf);
} else {
LOG_E( PHY, "[SCHED][UE] UE RX thread busy (IC %d)!!\n", instance_cnt_rxtx);
if (instance_cnt_rxtx > 2) {
......
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