Commit bed47a44 authored by Florian Kaltenberger's avatar Florian Kaltenberger

activated 8-bit LLR decoding for DLSCH. added gtkw configuration for UE usrp.

parent b441c37b
......@@ -4467,7 +4467,7 @@ int generate_ue_dlsch_params_from_dci(int frame,
dlsch[0]->g_pucch += delta_PUCCH_lut[TPC&3];
if (TPC!=1)
LOG_I(PHY,"format1 TPC %d, dlsch0_harq->delta_PUCCH %d\n",TPC,dlsch0_harq->delta_PUCCH);
LOG_D(PHY,"format1 TPC %d, dlsch0_harq->delta_PUCCH %d\n",TPC,dlsch0_harq->delta_PUCCH);
dlsch0_harq->rvidx = rv;
......@@ -4476,7 +4476,7 @@ int generate_ue_dlsch_params_from_dci(int frame,
dlsch0_harq->dl_power_off = 1; //no power offset
LOG_D(PHY,"UE (%x/%d): Subframe %d Format2 DCI: ndi %d, old_ndi %d (first tx %d) harq_status %d\n",dlsch[0]->rnti,harq_pid,subframe,ndi,dlsch0_harq->DCINdi,
LOG_D(PHY,"UE (%x/%d): Subframe %d Format1 DCI: ndi %d, old_ndi %d (first tx %d) harq_status %d\n",dlsch[0]->rnti,harq_pid,subframe,ndi,dlsch0_harq->DCINdi,
dlsch0_harq->first_tx,dlsch0_harq->status);
// printf("Format2 DCI (UE, hard pid %d): ndi %d, old_ndi %d (first tx %d)\n",harq_pid,ndi,dlsch0_harq->DCINdi,
......
......@@ -572,6 +572,10 @@ typedef struct {
vrb_t vrb_type;
/// downlink power offset field
uint8_t dl_power_off;
/// trials per round statistics
uint32_t trials[8];
/// error statistics per round
uint32_t errors[8];
} LTE_DL_UE_HARQ_t;
typedef struct {
......
......@@ -243,6 +243,9 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
return(max_turbo_iterations);
}
*/
harq_process->trials[harq_process->round]++;
A = harq_process->TBS; //2072 for QPSK 1/3
ret = dlsch->max_turbo_iterations;
......@@ -457,6 +460,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
dlsch->harq_ack[subframe].ack = 0;
dlsch->harq_ack[subframe].harq_id = harq_pid;
dlsch->harq_ack[subframe].send_harq_status = 1;
harq_process->errors[harq_process->round]++;
harq_process->round++;
// LOG_D(PHY,"[UE %d] DLSCH: Setting NACK for subframe %d (pid %d, round %d)\n",phy_vars_ue->Mod_id,subframe,harq_pid,harq_process->round);
......
......@@ -281,7 +281,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
// avgs = cmax(avgs,avg[(aarx<<1)+aatx]);
lte_ue_pdsch_vars[eNB_id]->log2_maxh = (log2_approx(avgs)/2);
lte_ue_pdsch_vars[eNB_id]->log2_maxh = (log2_approx(avgs)/2)+1;
// + log2_approx(frame_parms->nb_antennas_tx_eNB-1) //-1 because log2_approx counts the number of bits
// + log2_approx(frame_parms->nb_antennas_rx-1);
......
......@@ -61,6 +61,7 @@ int dump_ue_stats(PHY_VARS_UE *phy_vars_ue, char* buffer, int length, runmode_t
uint8_t eNB=0;
uint32_t RRC_status;
int len=length;
int harq_pid,round;
if (phy_vars_ue==NULL)
return 0;
......@@ -488,13 +489,27 @@ int dump_ue_stats(PHY_VARS_UE *phy_vars_ue, char* buffer, int length, runmode_t
if (phy_vars_ue->transmission_mode[eNB] == 6)
len += sprintf(&buffer[len], "[UE PROC] Mode 6 Wideband CQI eNB %d : %d dB\n",eNB,phy_vars_ue->PHY_measurements.precoded_cqi_dB[eNB][0]);
for (harq_pid=0;harq_pid<8;harq_pid++) {
len+=sprintf(&buffer[len],"[UE PROC] eNB %d: CW 0 harq_pid %d, mcs %d:",eNB,harq_pid,phy_vars_ue->dlsch_ue[0][0]->harq_processes[harq_pid]->mcs);
for (round=0;round<8;round++)
len+=sprintf(&buffer[len],"%d/%d ",
phy_vars_ue->dlsch_ue[0][0]->harq_processes[harq_pid]->errors[round],
phy_vars_ue->dlsch_ue[0][0]->harq_processes[harq_pid]->trials[round]);
len+=sprintf(&buffer[len],"\n");
}
if (phy_vars_ue->dlsch_ue[0] && phy_vars_ue->dlsch_ue[0][0] && phy_vars_ue->dlsch_ue[0][1]) {
len += sprintf(&buffer[len], "[UE PROC] Saved PMI for DLSCH eNB %d : %jx (%p)\n",eNB,pmi2hex_2Ar1(phy_vars_ue->dlsch_ue[0][0]->pmi_alloc),phy_vars_ue->dlsch_ue[0][0]);
len += sprintf(&buffer[len], "[UE PROC] eNB %d: dl_power_off = %d\n",eNB,phy_vars_ue->dlsch_ue[0][0]->harq_processes[0]->dl_power_off);
len += sprintf(&buffer[len], "[UE PROC] DL mcs1 (dlsch cw1) %d\n",phy_vars_ue->dlsch_ue[0][0]->harq_processes[0]->mcs);
len += sprintf(&buffer[len], "[UE PROC] DL mcs2 (dlsch cw2) %d\n",phy_vars_ue->dlsch_ue[0][1]->harq_processes[0]->mcs);
for (harq_pid=0;harq_pid<8;harq_pid++) {
len+=sprintf(&buffer[len],"[UE PROC] eNB %d: CW 1 harq_pid %d, mcs %d:",eNB,harq_pid,phy_vars_ue->dlsch_ue[0][1]->harq_processes[0]->mcs);
for (round=0;round<8;round++)
len+=sprintf(&buffer[len],"%d/%d ",
phy_vars_ue->dlsch_ue[0][1]->harq_processes[harq_pid]->errors[round],
phy_vars_ue->dlsch_ue[0][1]->harq_processes[harq_pid]->trials[round]);
len+=sprintf(&buffer[len],"\n");
}
}
len += sprintf(&buffer[len], "[UE PROC] DLSCH Total %d, Error %d, FER %d\n",phy_vars_ue->dlsch_received[0],phy_vars_ue->dlsch_errors[0],phy_vars_ue->dlsch_fer[0]);
......
......@@ -2637,7 +2637,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstrac
phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid],
subframe_prev,
harq_pid,
1,0);
1,1);
stop_meas(&phy_vars_ue->dlsch_decoding_stats);
}
......@@ -3320,7 +3320,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstrac
phy_vars_ue->dlsch_ue_MCH[0]->harq_processes[0],
subframe_prev,
0,
0,0);
0,1);
} else { // abstraction
#ifdef PHY_ABSTRACTION
ret = dlsch_decoding_emul(phy_vars_ue,
......
......@@ -504,6 +504,16 @@ static void *UE_thread_synch(void *arg)
if (abs(freq_offset) > 7500) {
LOG_I( PHY, "[initial_sync] No cell synchronization found, abandoning\n" );
FILE *fd;
if (fd = fopen("rxsig_frame0.dat","w")) {
fwrite((void*)&UE->lte_ue_common_vars.rxdata[0][0],
sizeof(int32_t),
10*UE->lte_frame_parms.samples_per_tti,
fd);
LOG_I(PHY,"Dummping Frame ... bye bye \n");
fclose(fd);
exit(0);
}
mac_xface->macphy_exit("No cell synchronization found, abandoning");
return &UE_thread_synch_retval; // not reached
}
......
[*]
[*] GTKWave Analyzer v3.3.58 (w)1999-2014 BSI
[*] Sun Mar 20 18:27:06 2016
[*]
[dumpfile] "/tmp/openair_dump_UE.vcd"
[dumpfile_mtime] "Sun Mar 20 18:14:17 2016"
[dumpfile_size] 92262400
[savefile] "/home/papillon/openairinterface5g/targets/RT/USER/ue_usrp.gtkw"
[timestart] 30032830000
[size] 1215 640
[pos] 105 102
*-22.292629 30041590000 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
[sst_width] 224
[signals_width] 262
[sst_expanded] 1
[sst_vpaned_height] 155
@24
variables.hw_subframe[63:0]
@28
functions.trx_read
functions.trx_write
@24
variables.subframe_number_RX_UE[63:0]
variables.subframe_number_TX_UE[63:0]
@28
functions.ue_thread_rx
functions.ue_thread_tx
@420
variables.ue_inst_cnt_rx[63:0]
variables.ue_inst_cnt_tx[63:0]
@28
functions.phy_procedures_ue_rx
functions.phy_procedures_ue_tx
@24
variables.frame_number_RX_UE[63:0]
variables.frame_number_TX_UE[63:0]
@28
functions.ue_slot_fep
functions.lte_ue_measurement_procedures
functions.ue_rrc_measurements
functions.ue_gain_control
functions.ue_adjust_synch
functions.lte_ue_pbch_procedures
functions.lte_ue_pdcch_procedures
functions.rx_pdcch
functions.dci_decoding
functions.phy_ue_generate_prach
functions.phy_ue_ulsch_encoding
functions.phy_ue_ulsch_modulation
functions.phy_ue_ulsch_scrambling
functions.phy_ue_config_sib2
[pattern_trace] 1
[pattern_trace] 0
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