Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zzha zzha
OpenXG-RAN
Commits
96629102
Commit
96629102
authored
May 03, 2017
by
gabrielC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean and remove a problematic memcpy
parent
3fcdec1a
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
113 additions
and
222 deletions
+113
-222
openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c
openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c
+4
-11
openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c
openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c
+16
-117
openair1/PHY/LTE_TRANSPORT/dci_tools.c
openair1/PHY/LTE_TRANSPORT/dci_tools.c
+12
-12
openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c
openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c
+2
-25
openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
+3
-3
openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c
openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c
+0
-2
openair1/PHY/LTE_TRANSPORT/lte_mcs.c
openair1/PHY/LTE_TRANSPORT/lte_mcs.c
+2
-2
openair1/PHY/LTE_TRANSPORT/sss.c
openair1/PHY/LTE_TRANSPORT/sss.c
+1
-1
openair1/PHY/LTE_TRANSPORT/ulsch_coding.c
openair1/PHY/LTE_TRANSPORT/ulsch_coding.c
+3
-5
openair1/PHY/MODULATION/slot_fep.c
openair1/PHY/MODULATION/slot_fep.c
+0
-2
openair1/SCHED/phy_procedures_lte_common.c
openair1/SCHED/phy_procedures_lte_common.c
+4
-4
openair1/SCHED/phy_procedures_lte_ue.c
openair1/SCHED/phy_procedures_lte_ue.c
+65
-36
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+1
-2
No files found.
openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c
View file @
96629102
...
...
@@ -23,6 +23,7 @@
#include <string.h>
#endif
#include "defs.h"
#include "SCHED/defs.h"
#include "PHY/defs.h"
#include "filt96_32.h"
#include "T.h"
...
...
@@ -642,7 +643,7 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue,
// dl_ch_prev = (int16_t *)&dl_ch_estimates[(p<<1)+aarx][(4-ue->frame_parms.Ncp)*(ue->frame_parms.ofdm_symbol_size)];
if
(((
Ns
>>
1
)
!=
0
)
||
(
((
Ns
>>
1
)
==
0
)
&&
interpolateS11S12
))
{
LOG_I
(
PHY
,
"Interpolate s11-->s0 to get s12 and s13 Ns %d
\n
"
,
Ns
);
//
LOG_I(PHY,"Interpolate s11-->s0 to get s12 and s13 Ns %d \n", Ns);
dl_ch_prev
=
(
int16_t
*
)
&
dl_ch_estimates_previous
[(
p
<<
1
)
+
aarx
][
pilot3
*
(
ue
->
frame_parms
.
ofdm_symbol_size
)];
multadd_complex_vector_real_scalar
(
dl_ch_prev
,
21845
,
dl_ch_prev
+
(
2
*
(
ue
->
frame_parms
.
ofdm_symbol_size
)),
1
,
ue
->
frame_parms
.
ofdm_symbol_size
);
...
...
@@ -657,15 +658,9 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue,
else
if
(
symbol
==
pilot1
)
{
dl_ch_prev
=
(
int16_t
*
)
&
dl_ch_estimates
[(
p
<<
1
)
+
aarx
][
0
];
LOG_I
(
PHY
,
"Interpolate s0-->s4 to get s1 s2 and s3 Ns %d
\n
"
,
Ns
);
//
LOG_I(PHY,"Interpolate s0-->s4 to get s1 s2 and s3 Ns %d \n", Ns);
if
(
ue
->
frame_parms
.
Ncp
==
0
)
{
// pilot spacing 4 symbols (1/4,1/2,3/4 combination)
//subframe_select(ue->frame_parms,((Ns>>1)-1)) == SF_UL
//if((Ns>>1) != 5)
uint8_t
previous_subframe
;
if
(
Ns
>>
1
==
0
)
previous_subframe
=
9
;
...
...
@@ -734,7 +729,7 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue,
if
((
ue
->
rx_offset_diff
!=
0
)
&&
((
Ns
>>
1
)
==
9
))
{
LOG_I
(
PHY
,
"Extrapolate s7-->s11 to get s12 and s13 Ns %d
\n
"
,
Ns
);
//
LOG_I(PHY,"Extrapolate s7-->s11 to get s12 and s13 Ns %d\n", Ns);
interpolateS11S12
=
0
;
//LOG_E(PHY,"Interpolate s7--s11 s12 s13 pilot 3 Ns %d l %d symbol %d \n", Ns, l, symbol);
int16_t
*
dlChEst_ofdm11
=
(
int16_t
*
)
&
dl_ch_estimates
[(
p
<<
1
)
+
aarx
][
pilot3
*
(
ue
->
frame_parms
.
ofdm_symbol_size
)];
...
...
@@ -766,8 +761,6 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue,
}
}
// }
}
}
...
...
openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c
View file @
96629102
...
...
@@ -171,7 +171,7 @@ void ue_rrc_measurements(PHY_VARS_UE *ue,
{
uint8_t
subframe
=
slot
>>
1
;
int
aarx
,
rb
,
n
;
int
aarx
,
rb
;
uint8_t
pss_symb
;
uint8_t
sss_symb
;
...
...
@@ -182,14 +182,14 @@ void ue_rrc_measurements(PHY_VARS_UE *ue,
uint8_t
eNB_offset
,
nu
,
l
,
nushift
,
k
;
uint16_t
off
;
uint8_t
isPss
;
// indicate if this is a slot for extracting PSS
uint8_t
isSss
;
// indicate if this is a slot for extracting SSS
int32_t
pss_ext
[
4
][
72
];
// contain the extracted 6*12 REs for mapping the PSS
int32_t
sss_ext
[
4
][
72
];
// contain the extracted 6*12 REs for mapping the SSS
int32_t
(
*
xss_ext
)[
72
];
// point to either pss_ext or sss_ext for common calculation
int16_t
*
re
,
*
im
;
// real and imag part of each 32-bit xss_ext[][] value
//
uint8_t isPss; // indicate if this is a slot for extracting PSS
//
uint8_t isSss; // indicate if this is a slot for extracting SSS
//
int32_t pss_ext[4][72]; // contain the extracted 6*12 REs for mapping the PSS
//
int32_t sss_ext[4][72]; // contain the extracted 6*12 REs for mapping the SSS
//
int32_t (*xss_ext)[72]; // point to either pss_ext or sss_ext for common calculation
//
int16_t *re,*im; // real and imag part of each 32-bit xss_ext[][] value
LOG_I
(
PHY
,
"UE RRC MEAS Start Subframe %d Frame Type %d slot %d
\n
"
,
subframe
,
ue
->
frame_parms
.
frame_type
,
slot
);
//
LOG_I(PHY,"UE RRC MEAS Start Subframe %d Frame Type %d slot %d \n",subframe,ue->frame_parms.frame_type,slot);
for
(
eNB_offset
=
0
;
eNB_offset
<
1
+
ue
->
measurements
.
n_adj_cells
;
eNB_offset
++
)
{
if
(
eNB_offset
==
0
)
{
...
...
@@ -255,32 +255,8 @@ void ue_rrc_measurements(PHY_VARS_UE *ue,
ue
->
measurements
.
n0_power_tot
/*+=*/
=
ue
->
measurements
.
n0_power
[
aarx
];
}
LOG_I
(
PHY
,
"Subframe %d RRC UE MEAS Noise Level %d
\n
"
,
subframe
,
ue
->
measurements
.
n0_power_tot
);
#if 0
if(ue->dlsch[subframe&0x1][0][0]->active == 1){// (harq_process->nb_rb==25 && r==3 && harq_process->round==0 ) {
//write_output("decoder_llr.m","decllr",dlsch_llr,G,1,0);
write_output("rxdataF0_pss_tdd.m" , "pss_cur_tdd",
&ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].rxdataF[0][2*ue->frame_parms.ofdm_symbol_size],
ue->frame_parms.ofdm_symbol_size,1,1);
write_output("rxdataF0_sss_tdd.m" , "sss_prev_tdd",
&ue->common_vars.common_vars_rx_data_per_thread[(subframe+1)&0x1].rxdataF[0][13*ue->frame_parms.ofdm_symbol_size],
ue->frame_parms.ofdm_symbol_size,1,1);
//LOG_I(PHY,"Subframe %d RRC UE MEAS Noise Level %d \n", subframe, ue->measurements.n0_power_tot);
/*write_output("rxdataF0_pss.m" , "pss_cur",
&ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].rxdataF[0][6*ue->frame_parms.ofdm_symbol_size],
ue->frame_parms.ofdm_symbol_size,1,1);
write_output("rxdataF0_sss.m" , "sss_prev",
&ue->common_vars.common_vars_rx_data_per_thread[(subframe)&0x1].rxdataF[0][5*ue->frame_parms.ofdm_symbol_size],
ue->frame_parms.ofdm_symbol_size,1,1);*/
//write_output("dl_ch_estimates_ext00.m", "dl_ch_estimates_ext00", &phy_vars_ue->pdsch_vars[subframe&0x1][0]->dl_ch_estimates_ext[0][0],14*frame_parms->N_RB_DL*12,1,1);
//write_output("rxdataF_comp00.m","rxdataF_comp00", &phy_vars_ue->pdsch_vars[subframe&0x1][0]->rxdataF_comp0[0][0],14*frame_parms->N_RB_DL*12,1,1);
//write_output("magDLFirst.m", "magDLFirst", &phy_vars_ue->pdsch_vars[subframe&0x1][0]->dl_ch_mag0[0][0],14*frame_parms->N_RB_DL*12,1,1);
//write_output("magDLSecond.m", "magDLSecond", &phy_vars_ue->pdsch_vars[subframe&0x1][0]->dl_ch_magb0[0][0],14*frame_parms->N_RB_DL*12,1,1);
AssertFatal (0,"");
}
#endif
ue
->
measurements
.
n0_power_tot_dB
=
(
unsigned
short
)
dB_fixed
(
ue
->
measurements
.
n0_power_tot
/
(
12
*
aarx
));
ue
->
measurements
.
n0_power_tot_dBm
=
ue
->
measurements
.
n0_power_tot_dB
-
ue
->
rx_total_gain_dB
-
dB_fixed
(
ue
->
frame_parms
.
ofdm_symbol_size
);
}
else
{
...
...
@@ -290,55 +266,6 @@ void ue_rrc_measurements(PHY_VARS_UE *ue,
else
if
((
ue
->
frame_parms
.
frame_type
==
TDD
)
&&
((
subframe
==
1
)
||
(
subframe
==
6
)))
{
// TDD PSS/SSS, compute noise in DTX REs // 2016-09-29 wilson fix incorrect noise power calculation
#if 0 // fixing REs extraction in noise power calculation
// check if this slot has a PSS or SSS sequence
if ((slot == 2) || (slot == 12)) {
isPss = 1;
} else {
isPss = 0;
}
if ((slot == 1) || (slot == 11)) {
isSss = 1;
} else {
isSss = 0;
}
if (isPss) {
pss_only_extract(ue, pss_ext, subframe);
xss_ext = pss_ext;
}
if (isSss) {
sss_only_extract(ue, sss_ext, subframe);
xss_ext = sss_ext;
}
// calculate noise power
int num_tot=0; // number of REs totally used in calculating noise power
for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) {
int num_per_rx=0; // number of REs used in caluclaing noise power for this RX antenna
ue->measurements.n0_power[aarx] = 0;
for (n=2; n<70; n++) { // skip the 2 REs next to PDSCH, i.e. n={0,1,70,71}
if (n==5) {n=67;}
re = (int16_t*)(&(xss_ext[aarx][n]));
im = re+1;
ue->measurements.n0_power[aarx] += (*re)*(*re) + (*im)*(*im);
num_per_rx++;
num_tot++;
}
ue->measurements.n0_power_dB[aarx] = (unsigned short) dB_fixed(ue->measurements.n0_power[aarx]/(num_per_rx));
ue->measurements.n0_power_tot /*+=*/ = ue->measurements.n0_power[aarx];
}
LOG_I(PHY,"Subframe %d RRC UE MEAS Noise Level %d \n", subframe, ue->measurements.n0_power_tot);
ue->measurements.n0_power_tot_dB = (unsigned short) dB_fixed(ue->measurements.n0_power_tot/(num_tot));
ue->measurements.n0_power_tot_dBm = ue->measurements.n0_power_tot_dB - ue->rx_total_gain_dB - dB_fixed(ue->frame_parms.ofdm_symbol_size);
#else
pss_symb
=
2
;
sss_symb
=
ue
->
frame_parms
.
symbols_per_tti
-
1
;
...
...
@@ -383,42 +310,15 @@ void ue_rrc_measurements(PHY_VARS_UE *ue,
// printf("pssm32 %d\n",ue->measurements.n0_power[aarx]);
ue
->
measurements
.
n0_power_dB
[
aarx
]
=
(
unsigned
short
)
dB_fixed
(
ue
->
measurements
.
n0_power
[
aarx
]
/
12
);
ue
->
measurements
.
n0_power_tot
/*+=*/
=
ue
->
measurements
.
n0_power
[
aarx
];
//rxF_sss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].rxdataF[aarx][(6*ue->frame_parms.ofdm_symbol_size)];
// note this is a dummy pointer, the pss is not really there!
// in FDD the pss is in the symbol after the sss, but not in TDD
//rxF_pss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].rxdataF[aarx][(7*ue->frame_parms.ofdm_symbol_size)];
/*
//-ve spectrum from SSS
// ue->measurements.n0_power[aarx] = (((int32_t)rxF_pss[-72]*rxF_pss[-72])+((int32_t)rxF_pss[-71]*rxF_pss[-71]));
ue->measurements.n0_power[aarx] = (((int32_t)rxF_pss[-70]*rxF_pss[-70])+((int32_t)rxF_pss[-69]*rxF_pss[-69]));
ue->measurements.n0_power[aarx] += (((int32_t)rxF_pss[-68]*rxF_pss[-68])+((int32_t)rxF_pss[-67]*rxF_pss[-67]));
ue->measurements.n0_power[aarx] += (((int32_t)rxF_pss[-66]*rxF_pss[-66])+((int32_t)rxF_pss[-65]*rxF_pss[-65]));
// ue->measurements.n0_power[aarx] += (((int32_t)rxF_pss[-64]*rxF_pss[-64])+((int32_t)rxF_pss[-63]*rxF_pss[-63]));
//+ve spectrum from SSS
// ue->measurements.n0_power[aarx] += (((int32_t)rxF_sss[2+72]*rxF_sss[2+72])+((int32_t)rxF_sss[2+71]*rxF_sss[2+71]));
ue->measurements.n0_power[aarx] = (((int32_t)rxF_sss[2+70]*rxF_sss[2+70])+((int32_t)rxF_sss[2+69]*rxF_sss[2+69]));
ue->measurements.n0_power[aarx] += (((int32_t)rxF_sss[2+68]*rxF_sss[2+68])+((int32_t)rxF_sss[2+67]*rxF_sss[2+67]));
ue->measurements.n0_power[aarx] += (((int32_t)rxF_sss[2+66]*rxF_sss[2+66])+((int32_t)rxF_sss[2+65]*rxF_sss[2+65]));
// ue->measurements.n0_power[aarx] += (((int32_t)rxF_sss[2+64]*rxF_sss[2+64])+((int32_t)rxF_sss[2+63]*rxF_sss[2+63]));
ue->measurements.n0_power_dB[aarx] = (unsigned short) dB_fixed(ue->measurements.n0_power[aarx]/(6));
ue->measurements.n0_power_tot += ue->measurements.n0_power[aarx]; */
}
ue
->
measurements
.
n0_power_tot_dB
=
(
unsigned
short
)
dB_fixed
(
ue
->
measurements
.
n0_power_tot
/
(
12
*
aarx
));
ue
->
measurements
.
n0_power_tot_dBm
=
ue
->
measurements
.
n0_power_tot_dB
-
ue
->
rx_total_gain_dB
-
dB_fixed
(
ue
->
frame_parms
.
ofdm_symbol_size
);
/*
ue->measurements.n0_power_tot_dB = (unsigned short) dB_fixed(ue->measurements.n0_power_tot/(6*aarx));
ue->measurements.n0_power_tot_dBm = ue->measurements.n0_power_tot_dB - ue->rx_total_gain_dB - dB_fixed(ue->frame_parms.ofdm_symbol_size);
*/
LOG_I
(
PHY
,
"Subframe %d RRC UE MEAS Noise Level %d
\n
"
,
subframe
,
ue
->
measurements
.
n0_power_tot
);
//LOG_I(PHY,"Subframe %d RRC UE MEAS Noise Level %d \n", subframe, ue->measurements.n0_power_tot);
}
#endif
}
}
}
...
...
@@ -548,7 +448,6 @@ void ue_rrc_measurements(PHY_VARS_UE *ue,
#endif
}
}
void
lte_ue_measurements
(
PHY_VARS_UE
*
ue
,
...
...
@@ -647,8 +546,8 @@ void lte_ue_measurements(PHY_VARS_UE *ue,
(((
k1
*
((
long
long
int
)(
ue
->
measurements
.
rx_power_avg
[
eNB_id
])))
+
(
k2
*
((
long
long
int
)(
ue
->
measurements
.
rx_power_tot
[
eNB_id
]))))
>>
10
);
LOG_I
(
PHY
,
"Noise Power Computation: k1 %d k2 %d n0 avg %d n0 tot %d
\n
"
,
k1
,
k2
,
ue
->
measurements
.
n0_power_avg
,
ue
->
measurements
.
n0_power_tot
);
//
LOG_I(PHY,"Noise Power Computation: k1 %d k2 %d n0 avg %d n0 tot %d\n", k1, k2, ue->measurements.n0_power_avg,
//
ue->measurements.n0_power_tot);
ue
->
measurements
.
n0_power_avg
=
(
int
)
(((
k1
*
((
long
long
int
)
(
ue
->
measurements
.
n0_power_avg
)))
+
(
k2
*
((
long
long
int
)
(
ue
->
measurements
.
n0_power_tot
))))
>>
10
);
...
...
@@ -665,7 +564,7 @@ void lte_ue_measurements(PHY_VARS_UE *ue,
ue
->
measurements
.
wideband_cqi_tot
[
eNB_id
]
=
dB_fixed2
(
ue
->
measurements
.
rx_power_tot
[
eNB_id
],
ue
->
measurements
.
n0_power_tot
);
ue
->
measurements
.
wideband_cqi_avg
[
eNB_id
]
=
dB_fixed2
(
ue
->
measurements
.
rx_power_avg
[
eNB_id
],
ue
->
measurements
.
n0_power_avg
);
ue
->
measurements
.
rx_rssi_dBm
[
eNB_id
]
=
ue
->
measurements
.
rx_power_avg_dB
[
eNB_id
]
-
ue
->
rx_total_gain_dB
;
//
#ifdef DEBUG_MEAS_UE
#ifdef DEBUG_MEAS_UE
LOG_I
(
PHY
,
"[eNB %d] Subframe %d, RSSI %d dBm, RSSI (digital) %d dB, WBandCQI %d dB, rxPwrAvg %d, n0PwrAvg %d
\n
"
,
eNB_id
,
subframe
,
...
...
@@ -674,7 +573,7 @@ void lte_ue_measurements(PHY_VARS_UE *ue,
ue
->
measurements
.
wideband_cqi_avg
[
eNB_id
],
ue
->
measurements
.
rx_power_avg
[
eNB_id
],
ue
->
measurements
.
n0_power_avg
);
//
#endif
#endif
}
ue
->
measurements
.
n0_power_avg_dB
=
dB_fixed
(
ue
->
measurements
.
n0_power_avg
);
...
...
openair1/PHY/LTE_TRANSPORT/dci_tools.c
View file @
96629102
...
...
@@ -2982,7 +2982,7 @@ int dump_dci(LTE_DL_FRAME_PARMS *frame_parms, DCI_ALLOC_t *dci)
break
;
case
25
:
LOG_
I
(
PHY
,
"DCI format1 (TDD 5 MHz), rnti %x (%x): rah %d, rb_alloc %x, mcs %d, harq_pid %d, ndi %d, RV %d, TPC %d, dai %d
\n
"
,
LOG_
D
(
PHY
,
"DCI format1 (TDD 5 MHz), rnti %x (%x): rah %d, rb_alloc %x, mcs %d, harq_pid %d, ndi %d, RV %d, TPC %d, dai %d
\n
"
,
dci
->
rnti
,
((
uint32_t
*
)
&
dci
->
dci_pdu
)[
0
],
((
DCI1_5MHz_TDD_t
*
)
&
dci
->
dci_pdu
[
0
])
->
rah
,
...
...
@@ -6386,7 +6386,7 @@ int generate_ue_dlsch_params_from_dci(int frame,
}
//
#ifdef DEBUG_DCI
#ifdef DEBUG_DCI
if
(
dlsch
[
0
]
&&
(
dlsch
[
0
]
->
rnti
!=
0xffff
))
{
printf
(
"dci_format:%d Abssubframe: %d.%d
\n
"
,
dci_format
,
frame
%
1024
,
subframe
);
...
...
@@ -6395,15 +6395,15 @@ int generate_ue_dlsch_params_from_dci(int frame,
printf
(
"PDSCH dlsch0 UE: rballoc %x
\n
"
,
dlsch0_harq
->
rb_alloc_even
[
0
]);
printf
(
"PDSCH dlsch0 UE: harq_pid %d
\n
"
,
harq_pid
);
//printf("PDSCH dlsch0 UE: tpc %d\n",TPC);
//
printf("PDSCH dlsch0 UE: g %d\n",dlsch[0]->g_pucch);
printf
(
"PDSCH dlsch0 UE: g %d
\n
"
,
dlsch
[
0
]
->
g_pucch
);
printf
(
"PDSCH dlsch0 UE: round %d
\n
"
,
dlsch0_harq
->
round
);
printf
(
"PDSCH dlsch0 UE: DCINdi %d
\n
"
,
dlsch0_harq
->
DCINdi
);
printf
(
"PDSCH dlsch0 UE: rvidx %d
\n
"
,
dlsch0_harq
->
rvidx
);
printf
(
"PDSCH dlsch0 UE: TBS %d
\n
"
,
dlsch0_harq
->
TBS
);
printf
(
"PDSCH dlsch0 UE: mcs %d
\n
"
,
dlsch0_harq
->
mcs
);
//
printf("PDSCH dlsch0 UE: pwr_off %d\n",dlsch0_harq->dl_power_off);
printf
(
"PDSCH dlsch0 UE: pwr_off %d
\n
"
,
dlsch0_harq
->
dl_power_off
);
}
//
#endif
#endif
#if T_TRACER
if
(
(
dlsch
[
0
]
->
rnti
!=
si_rnti
)
&&
(
dlsch
[
0
]
->
rnti
!=
ra_rnti
)
&&
(
dlsch
[
0
]
->
rnti
!=
p_rnti
))
...
...
@@ -8021,11 +8021,11 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
}
else
{
ulsch
->
harq_processes
[
harq_pid
]
->
O_ACK
=
0
;
}
LOG_I
(
PHY
,
"DCI 0 Processing: dl_subframe %d send_harq_status Odd %d send_harq_status Even %d harq_pid %d O_ACK %d
\n
"
,
dl_subframe
,
/*
LOG_I(PHY,"DCI 0 Processing: dl_subframe %d send_harq_status Odd %d send_harq_status Even %d harq_pid %d O_ACK %d\n", dl_subframe,
ue->dlsch[0][eNB_id][0]->harq_ack[dl_subframe].send_harq_status,
ue->dlsch[1][eNB_id][0]->harq_ack[dl_subframe].send_harq_status,
harq_pid,
ulsch
->
harq_processes
[
harq_pid
]
->
O_ACK
);
ulsch->harq_processes[harq_pid]->O_ACK);
*/
}
else
{
if
(
ulsch
->
bundling
)
...
...
@@ -8039,7 +8039,7 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
dlsch
[
0
]
->
harq_ack
[
subframe
].
vDAI_UL
=
dai
+
1
;
LOG_I
(
PHY
,
"[PUSCH %d] Format0 DCI %s, CQI_req=%d, cshift=%d, TPC=%d, DAI=%d, vDAI_UL[sf#%d]=%d, NDI=%d, MCS=%d, RBalloc=%d, first_rb=%d, harq_pid=%d, nb_rb=%d, subframe_scheduling_flag=%d"
/*
LOG_I(PHY, "[PUSCH %d] Format0 DCI %s, CQI_req=%d, cshift=%d, TPC=%d, DAI=%d, vDAI_UL[sf#%d]=%d, NDI=%d, MCS=%d, RBalloc=%d, first_rb=%d, harq_pid=%d, nb_rb=%d, subframe_scheduling_flag=%d"
" ulsch->bundling %d, O_ACK %d \n",
harq_pid,
(frame_parms->frame_type == TDD? "TDD" : "FDD"),
...
...
@@ -8047,7 +8047,7 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
ulsch->harq_processes[harq_pid]->first_rb, harq_pid, ulsch->harq_processes[harq_pid]->nb_rb,
ulsch->harq_processes[harq_pid]->subframe_scheduling_flag,
ulsch->bundling,
ulsch
->
harq_processes
[
harq_pid
]
->
O_ACK
);
ulsch->harq_processes[harq_pid]->O_ACK);
*/
ulsch
->
beta_offset_cqi_times8
=
beta_cqi
[
ue
->
pusch_config_dedicated
[
eNB_id
].
betaOffset_CQI_Index
];
//18;
ulsch
->
beta_offset_ri_times8
=
beta_ri
[
ue
->
pusch_config_dedicated
[
eNB_id
].
betaOffset_RI_Index
];
//10;
...
...
@@ -8099,7 +8099,7 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
// ulsch->n_DMRS2 = ((DCI0_5MHz_TDD_1_6_t *)dci_pdu)->cshift;
//
#ifdef DEBUG_DCI
#ifdef DEBUG_DCI
printf
(
"Format 0 DCI : ulsch (ue): AbsSubframe %d.%d
\n
"
,
proc
->
frame_rx
%
1024
,
subframe
);
printf
(
"Format 0 DCI : ulsch (ue): NBRB %d
\n
"
,
ulsch
->
harq_processes
[
harq_pid
]
->
nb_rb
);
...
...
@@ -8121,9 +8121,9 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
printf
(
"Format 0 DCI :ulsch (ue): Nsymb_pusch %d
\n
"
,
ulsch
->
Nsymb_pusch
);
printf
(
"Format 0 DCI :ulsch (ue): cshift %d
\n
"
,
ulsch
->
harq_processes
[
harq_pid
]
->
n_DMRS2
);
printf
(
"Format 0 DCI :ulsch (ue): phich status %d
\n
"
,
ulsch
->
harq_processes
[
harq_pid
]
->
status
);
//
#else
#else
UNUSED_VARIABLE
(
dai
);
//
#endif
#endif
return
(
0
);
}
else
{
LOG_E
(
PHY
,
"frame %d, subframe %d: FATAL ERROR, generate_ue_ulsch_params_from_dci, Illegal dci_format %d
\n
"
,
...
...
openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c
View file @
96629102
...
...
@@ -644,19 +644,6 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
//LOG_I(PHY,"[UE %d] DLSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d, mcs %d) Kr %d r %d harq_process->round %d\n",
// phy_vars_ue->Mod_id, frame, subframe, harq_pid,harq_process->status, harq_process->round,harq_process->TBS,harq_process->mcs,Kr,r,harq_process->round);
if
(
0
){
// (harq_process->nb_rb==25 && r==3 && harq_process->round==0 ) {
write_output
(
"decoder_llr.m"
,
"decllr"
,
dlsch_llr
,
G
,
1
,
0
);
write_output
(
"rxdataF0.m"
,
"rxdataF0"
,
&
phy_vars_ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
rxdataF
[
0
][
0
],
14
*
frame_parms
->
ofdm_symbol_size
,
1
,
1
);
write_output
(
"dl_ch_estimates_ext00.m"
,
"dl_ch_estimates_ext00"
,
&
phy_vars_ue
->
pdsch_vars
[
subframe
&
0x1
][
0
]
->
dl_ch_estimates_ext
[
0
][
0
],
14
*
frame_parms
->
N_RB_DL
*
12
,
1
,
1
);
write_output
(
"rxdataF_comp00.m"
,
"rxdataF_comp00"
,
&
phy_vars_ue
->
pdsch_vars
[
subframe
&
0x1
][
0
]
->
rxdataF_comp0
[
0
][
0
],
14
*
frame_parms
->
N_RB_DL
*
12
,
1
,
1
);
write_output
(
"magDLFirst.m"
,
"magDLFirst"
,
&
phy_vars_ue
->
pdsch_vars
[
subframe
&
0x1
][
0
]
->
dl_ch_mag0
[
0
][
0
],
14
*
frame_parms
->
N_RB_DL
*
12
,
1
,
1
);
write_output
(
"magDLSecond.m"
,
"magDLSecond"
,
&
phy_vars_ue
->
pdsch_vars
[
subframe
&
0x1
][
0
]
->
dl_ch_magb0
[
0
][
0
],
14
*
frame_parms
->
N_RB_DL
*
12
,
1
,
1
);
AssertFatal
(
0
,
"number of soft bits %d nb_rb %d"
,
G
,
frame_parms
->
N_RB_DL
);
}
dlsch
->
harq_ack
[
subframe
].
ack
=
0
;
dlsch
->
harq_ack
[
subframe
].
harq_id
=
harq_pid
;
dlsch
->
harq_ack
[
subframe
].
send_harq_status
=
1
;
...
...
@@ -671,7 +658,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
}
if
(
is_crnti
)
{
LOG_
I
(
PHY
,
"[UE %d] DLSCH: Setting NACK for subframe %d (pid %d, pid status %d, round %d/Max %d, TBS %d)
\n
"
,
LOG_
D
(
PHY
,
"[UE %d] DLSCH: Setting NACK for subframe %d (pid %d, pid status %d, round %d/Max %d, TBS %d)
\n
"
,
phy_vars_ue
->
Mod_id
,
subframe
,
harq_pid
,
harq_process
->
status
,
harq_process
->
round
,
dlsch
->
Mdlharq
,
harq_process
->
TBS
);
}
...
...
@@ -681,16 +668,6 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
//LOG_I(PHY,"[UE %d] DLSCH: Setting ACK for subframe %d TBS %d harq_process->mcs %d harq_process->nb_rb %d\n",
//phy_vars_ue->Mod_id,subframe,harq_process->TBS,harq_process->mcs,harq_process->nb_rb);
if
(
0
){
// (harq_process->mcs==28 && (subframe ==5 || subframe==0)) {
write_output
(
"decoder_llr_ok.m"
,
"decllr_ok"
,
dlsch_llr
,
G
,
1
,
0
);
write_output
(
"rxdataF0_ok.m"
,
"rxdataF0_ok"
,
&
phy_vars_ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
rxdataF
[
0
][
0
],
14
*
frame_parms
->
ofdm_symbol_size
,
1
,
1
);
write_output
(
"dl_ch_estimates_ext00.m"
,
"dl_ch_estimates_ext00_ok"
,
&
phy_vars_ue
->
pdsch_vars
[
subframe
&
0x1
][
0
]
->
dl_ch_estimates_ext
[
0
][
0
],
14
*
frame_parms
->
N_RB_DL
*
12
,
1
,
1
);
write_output
(
"rxdataF_comp00_ok.m"
,
"rxdataF_comp00_ok"
,
&
phy_vars_ue
->
pdsch_vars
[
subframe
&
0x1
][
0
]
->
rxdataF_comp0
[
0
][
0
],
14
*
frame_parms
->
N_RB_DL
*
12
,
1
,
1
);
write_output
(
"magDLFirst_ok.m"
,
"magDLFirst_ok"
,
&
phy_vars_ue
->
pdsch_vars
[
subframe
&
0x1
][
0
]
->
dl_ch_mag0
[
0
][
0
],
14
*
frame_parms
->
N_RB_DL
*
12
,
1
,
1
);
write_output
(
"magDLSecond_ok.m"
,
"magDLSecond_ok"
,
&
phy_vars_ue
->
pdsch_vars
[
subframe
&
0x1
][
0
]
->
dl_ch_magb0
[
0
][
0
],
14
*
frame_parms
->
N_RB_DL
*
12
,
1
,
1
);
AssertFatal
(
0
,
"number of soft bits %d"
,
G
);
}
harq_process
->
status
=
SCH_IDLE
;
harq_process
->
round
=
0
;
dlsch
->
harq_ack
[
subframe
].
ack
=
1
;
...
...
@@ -701,7 +678,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
if
(
is_crnti
)
{
LOG_
I
(
PHY
,
"[UE %d] DLSCH: Setting ACK for subframe %d (pid %d, round %d, TBS %d)
\n
"
,
phy_vars_ue
->
Mod_id
,
subframe
,
harq_pid
,
harq_process
->
round
,
harq_process
->
TBS
);
LOG_
D
(
PHY
,
"[UE %d] DLSCH: Setting ACK for subframe %d (pid %d, round %d, TBS %d)
\n
"
,
phy_vars_ue
->
Mod_id
,
subframe
,
harq_pid
,
harq_process
->
round
,
harq_process
->
TBS
);
}
//LOG_D(PHY,"[UE %d] DLSCH: Setting ACK for subframe %d (pid %d, round %d)\n",phy_vars_ue->Mod_id,subframe,harq_pid,harq_process->round);
...
...
openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
View file @
96629102
...
...
@@ -354,7 +354,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
#ifdef DEBUG_PHY
LOG_
I
(
PHY
,
"[DLSCH] nb_rb %d log2_maxh = %d (%d,%d)
\n
"
,
nb_rb
,
pdsch_vars
[
eNB_id
]
->
log2_maxh
,
avg
[
0
],
avgs
);
LOG_
D
(
PHY
,
"[DLSCH] nb_rb %d log2_maxh = %d (%d,%d)
\n
"
,
nb_rb
,
pdsch_vars
[
eNB_id
]
->
log2_maxh
,
avg
[
0
],
avgs
);
LOG_D
(
PHY
,
"[DLSCH] mimo_mode = %d
\n
"
,
dlsch0_harq
->
mimo_mode
);
#endif
...
...
@@ -465,14 +465,14 @@ int rx_pdsch(PHY_VARS_UE *ue,
avg
,
symbol
,
nb_rb
);
//
#ifdef DEBUG_PHY
#ifdef DEBUG_PHY
LOG_I
(
PHY
,
"[DLSCH] AbsSubframe %d.%d log2_maxh = %d [log2_maxh0 %d log2_maxh1 %d] (%d,%d)
\n
"
,
frame
%
1024
,
subframe
,
pdsch_vars
[
eNB_id
]
->
log2_maxh
,
pdsch_vars
[
eNB_id
]
->
log2_maxh0
,
pdsch_vars
[
eNB_id
]
->
log2_maxh1
,
avg
[
0
],
avgs
);
LOG_D
(
PHY
,
"[DLSCH] mimo_mode = %d
\n
"
,
dlsch0_harq
->
mimo_mode
);
//
#endif
#endif
}
#if T_TRACER
...
...
openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c
View file @
96629102
...
...
@@ -1092,8 +1092,6 @@ void dlsch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
len2
=
len
>>
2
;
// length in quad words (4 REs)
len2
+=
((
len_mod4
==
0
)
?
0
:
1
);
//printf("Sym %d llr Length %d %d\n", symbol,len,len2);
for
(
i
=
0
;
i
<
len2
;
i
++
)
{
#if defined(__x86_64__) || defined(__i386__)
...
...
openair1/PHY/LTE_TRANSPORT/lte_mcs.c
View file @
96629102
...
...
@@ -154,7 +154,7 @@ int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_ord
nsymb
=
(
frame_parms
->
Ncp
==
NORMAL
)
?
14
:
12
;
//printf("adjust_G2 : symbol %d, subframe %d\n",symbol,subframe);
//
printf("adjust_G2 : symbol %d, subframe %d\n",symbol,subframe);
if
((
subframe
!=
0
)
&&
(
subframe
!=
5
)
&&
(
subframe
!=
6
))
// if not PBCH/SSS or SSS
return
(
0
);
...
...
@@ -234,7 +234,7 @@ int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_ord
}
}
//printf("re_pbch_sss %d\n",re_pbch_sss);
//
printf("re_pbch_sss %d\n",re_pbch_sss);
return
(
re_pbch_sss
);
}
...
...
openair1/PHY/LTE_TRANSPORT/sss.c
View file @
96629102
...
...
@@ -166,7 +166,7 @@ int _do_pss_sss_extract(PHY_VARS_UE *ue,
int32_t
**
rxdataF
;
LOG_I
(
PHY
,
"do_pss_sss_extract subframe %d
\n
"
,
subframe
);
//
LOG_I(PHY,"do_pss_sss_extract subframe %d \n",subframe);
for
(
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
if
(
frame_parms
->
frame_type
==
FDD
)
{
...
...
openair1/PHY/LTE_TRANSPORT/ulsch_coding.c
View file @
96629102
...
...
@@ -515,10 +515,8 @@ uint32_t ulsch_encoding(uint8_t *a,
G
=
G
-
Q_RI
-
Q_CQI
;
ulsch
->
harq_processes
[
harq_pid
]
->
G
=
G
;
LOG_I
(
PHY
,
"ULSCH Encoding G %d, Q_RI %d (O_RI%d, Msc_initial %d, Nsymb_initial%d, beta_offset_ri_times8 %d), "
"Q_CQI %d, Q_ACK %d
\n
"
,
G
,
Q_RI
,
ulsch
->
O_RI
,
ulsch
->
harq_processes
[
harq_pid
]
->
Msc_initial
,
ulsch
->
harq_processes
[
harq_pid
]
->
Nsymb_initial
,
ulsch
->
beta_offset_ri_times8
,
Q_CQI
,
Q_ACK
);
/*
LOG_I(PHY,"ULSCH Encoding G %d, Q_RI %d (O_RI%d, Msc_initial %d, Nsymb_initial%d, beta_offset_ri_times8 %d), Q_CQI %d, Q_ACK %d \n",G,Q_RI,ulsch->O_RI,ulsch->harq_processes[harq_pid]->Msc_initial,ulsch->harq_processes[harq_pid]->Nsymb_initial,ulsch->beta_offset_ri_times8,Q_CQI,Q_ACK);
LOG_I(PHY,"ULSCH Encoding (Nid_cell %d, rnti %x): harq_pid %d round %d, RV %d, mcs %d, O_RI %d, O_ACK %d, G %d\n",
frame_parms->Nid_cell,ulsch->rnti,
...
...
@@ -529,7 +527,7 @@ uint32_t ulsch_encoding(uint8_t *a,
ulsch->O_RI,
ulsch->harq_processes[harq_pid]->O_ACK,
G);
*/
if
((
int
)
G
<
0
)
{
LOG_E
(
PHY
,
"FATAL: ulsch_coding.c G < 0 (%d) : Q_RI %d, Q_CQI %d, O %d, betaCQI_times8 %d)
\n
"
,
G
,
Q_RI
,
Q_CQI
,
ulsch
->
O
,
ulsch
->
beta_offset_cqi_times8
);
...
...
openair1/PHY/MODULATION/slot_fep.c
View file @
96629102
...
...
@@ -117,8 +117,6 @@ int slot_fep(PHY_VARS_UE *ue,
if
(
l
==
0
)
{
LOG_I
(
PHY
,
"FFT odfm symbol %d Slot %d
\n
"
,
symbol
,
Ns
);
if
(
rx_offset
>
(
frame_length_samples
-
frame_parms
->
ofdm_symbol_size
))
memcpy
((
short
*
)
&
common_vars
->
rxdata
[
aa
][
frame_length_samples
],
(
short
*
)
&
common_vars
->
rxdata
[
aa
][
0
],
...
...
openair1/SCHED/phy_procedures_lte_common.c
View file @
96629102
...
...
@@ -343,7 +343,7 @@ uint8_t get_reset_ack(LTE_DL_FRAME_PARMS *frame_parms,
o_ACK
[
cw_idx
]
=
harq_ack
[
subframe_dl0
].
ack
;
status
=
harq_ack
[
subframe_dl0
].
send_harq_status
;
LOG_I
(
PHY
,
"dl subframe %d send_harq_status %d cw_idx %d, reset %d
\n
"
,
subframe_dl0
,
status
,
cw_idx
,
do_reset
);
//
LOG_I(PHY,"dl subframe %d send_harq_status %d cw_idx %d, reset %d\n",subframe_dl0, status, cw_idx, do_reset);
if
(
do_reset
)
harq_ack
[
subframe_dl0
].
send_harq_status
=
0
;
//printf("get_ack: Getting ACK/NAK for PDSCH (subframe %d) => %d\n",subframe_dl,o_ACK[0]);
...
...
@@ -472,9 +472,9 @@ uint8_t get_reset_ack(LTE_DL_FRAME_PARMS *frame_parms,
pN_bundled
[
0
]
=
harq_ack
[
subframe_rx
].
vDAI_UL
;
status
=
harq_ack
[
subframe_dl0
].
send_harq_status
+
harq_ack
[
subframe_dl1
].
send_harq_status
;
LOG_I
(
PHY
,
"TDD Config3 UL Sfn %d, dl Sfn0 %d status %d o_Ack %d, dl Sfn1 %d status %d o_Ack %d subframe_rx %d N_bundled %d
\n
"
,
subframe_tx
,
subframe_dl0
,
harq_ack
[
subframe_dl0
].
send_harq_status
,
harq_ack
[
subframe_dl0
].
ack
,
subframe_dl1
,
harq_ack
[
subframe_dl1
].
send_harq_status
,
harq_ack
[
subframe_dl1
].
ack
,
subframe_rx
,
pN_bundled
[
0
]);
//LOG_D
(PHY,"TDD Config3 UL Sfn %d, dl Sfn0 %d status %d o_Ack %d, dl Sfn1 %d status %d o_Ack %d subframe_rx %d N_bundled %d \n",
//
subframe_tx, subframe_dl0, harq_ack[subframe_dl0].send_harq_status,harq_ack[subframe_dl0].ack,
//
subframe_dl1, harq_ack[subframe_dl1].send_harq_status,harq_ack[subframe_dl1].ack, subframe_rx, pN_bundled[0]);
if
(
do_reset
)
{
// reset ACK/NACK status
harq_ack
[
subframe_dl0
].
ack
=
2
;
...
...
openair1/SCHED/phy_procedures_lte_ue.c
View file @
96629102
...
...
@@ -453,21 +453,15 @@ void compute_cqi_ri_resources(PHY_VARS_UE *ue,
uint8_t
cqi_status
,
uint8_t
ri_status
)
{
PHY_MEASUREMENTS
*
meas
=
&
ue
->
measurements
;
uint8_t
transmission_mode
=
ue
->
transmission_mode
[
eNB_id
];
//
PHY_MEASUREMENTS *meas = &ue->measurements;
//
uint8_t transmission_mode = ue->transmission_mode[eNB_id];
LOG_I
(
PHY
,
"compute_cqi_ri_resources O_RI %d O %d uci format %d
\n
"
,
ulsch
->
O_RI
,
ulsch
->
O
,
ulsch
->
uci_format
);
//
LOG_I(PHY,"compute_cqi_ri_resources O_RI %d O %d uci format %d \n",ulsch->O_RI,ulsch->O,ulsch->uci_format);
if
(
cqi_status
==
1
||
ri_status
==
1
)
{
ulsch
->
O
=
4
;
}
else
{
//ulsch->O_RI = 0;
//ulsch->O = 0;
//ulsch->uci_format = HLC_subband_cqi_nopmi;
}
}
void
ue_compute_srs_occasion
(
PHY_VARS_UE
*
ue
,
UE_rxtx_proc_t
*
proc
,
uint8_t
eNB_id
,
uint8_t
isSubframeSRS
)
...
...
@@ -1408,8 +1402,8 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB
ue
->
ulsch
[
eNB_id
]
->
harq_processes
[
harq_pid
]
->
O_ACK
);
}
//
#ifdef DEBUG_PHY_PROC
LOG_
I
(
PHY
,
#ifdef DEBUG_PHY_PROC
LOG_
D
(
PHY
,
"[UE %d][PUSCH %d] AbsSubframe %d.%d Generating PUSCH : first_rb %d, nb_rb %d, round %d, mcs %d, rv %d, "
"cyclic_shift %d (cyclic_shift_common %d,n_DMRS2 %d,n_PRS %d), ACK (%d,%d), O_ACK %d, bundling %d, Nbundled %d, CQI %d, RI %d
\n
"
,
Mod_id
,
harq_pid
,
frame_tx
%
1024
,
subframe_tx
,
...
...
@@ -1428,7 +1422,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB
ue
->
ulsch
[
eNB_id
]
->
bundling
,
Nbundled
,
cqi_status
,
ri_status
);
//
#endif
#endif
...
...
@@ -1663,20 +1657,19 @@ void ue_srs_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8
int16_t
get_pucch2_cqi
(
PHY_VARS_UE
*
ue
,
int
eNB_id
,
int
*
len
)
{
if
((
ue
->
transmission_mode
[
eNB_id
]
<
4
)
||
(
ue
->
transmission_mode
[
eNB_id
]
==
7
))
{
// Mode 1-0 feedback
// 4-bit CQI message
LOG_I
(
PHY
,
"compute CQI value, TM %d, length 4, Cqi Avg %d, value %d
\n
"
,
ue
->
transmission_mode
[
eNB_id
],
/*
LOG_I(PHY,"compute CQI value, TM %d, length 4, Cqi Avg %d, value %d \n", ue->transmission_mode[eNB_id],
ue->measurements.wideband_cqi_avg[eNB_id],
sinr2cqi((double)ue->measurements.wideband_cqi_avg[eNB_id],
ue
->
transmission_mode
[
eNB_id
]));
ue->transmission_mode[eNB_id]));
*/
*
len
=
4
;
return
(
sinr2cqi
((
double
)
ue
->
measurements
.
wideband_cqi_avg
[
eNB_id
],
ue
->
transmission_mode
[
eNB_id
]));
}
else
{
// Mode 1-1 feedback, later
LOG_I
(
PHY
,
"compute CQI value, TM %d, length 0, Cqi Avg 0
\n
"
,
ue
->
transmission_mode
[
eNB_id
]);
//
LOG_I(PHY,"compute CQI value, TM %d, length 0, Cqi Avg 0 \n", ue->transmission_mode[eNB_id]);
*
len
=
0
;
// 2-antenna ports RI=1, 6 bits (2 PMI, 4 CQI)
...
...
@@ -1792,7 +1785,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
if
(
ue
->
ulsch
[
eNB_id
]
->
harq_processes
[
harq_pid
]
->
subframe_scheduling_flag
)
{
LOG_
I
(
PHY
,
"PUSCH is programmed on this subframe [pid %d] AbsSuframe %d.%d ==> Skip PUCCH transmission
\n
"
,
harq_pid
,
frame_tx
,
subframe_tx
);
LOG_
D
(
PHY
,
"PUSCH is programmed on this subframe [pid %d] AbsSuframe %d.%d ==> Skip PUCCH transmission
\n
"
,
harq_pid
,
frame_tx
,
subframe_tx
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_PUCCH
,
VCD_FUNCTION_OUT
);
return
;
}
...
...
@@ -1860,7 +1853,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
// if nothing to report ==> exit function
if
(
(
nb_cw
==
0
)
&&
(
SR_payload
==
0
)
&&
(
cqi_status
==
0
)
&&
(
ri_status
==
0
)
)
{
LOG_
I
(
PHY
,
"PUCCH No feedback AbsSubframe %d.%d SR_payload %d nb_cw %d pucch_ack_payload[0] %d pucch_ack_payload[1] %d cqi_status %d Return
\n
"
,
LOG_
D
(
PHY
,
"PUCCH No feedback AbsSubframe %d.%d SR_payload %d nb_cw %d pucch_ack_payload[0] %d pucch_ack_payload[1] %d cqi_status %d Return
\n
"
,
frame_tx
%
1024
,
subframe_tx
,
SR_payload
,
nb_cw
,
pucch_ack_payload
[
0
],
pucch_ack_payload
[
1
],
cqi_status
);
return
;
}
...
...
@@ -1885,7 +1878,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
(
uint8_t
*
)
&
pucch_payload
,
&
len
);
LOG_
I
(
PHY
,
"PUCCH feedback AbsSubframe %d.%d SR %d NbCW %d (%d %d) AckNack %d.%d CQI %d RI %d format %d pucch_resource %d pucch_payload %d %d
\n
"
,
LOG_
D
(
PHY
,
"PUCCH feedback AbsSubframe %d.%d SR %d NbCW %d (%d %d) AckNack %d.%d CQI %d RI %d format %d pucch_resource %d pucch_payload %d %d
\n
"
,
frame_tx
%
1024
,
subframe_tx
,
SR_payload
,
nb_cw
,
ack_status_cw0
,
ack_status_cw1
,
pucch_ack_payload
[
0
],
pucch_ack_payload
[
1
],
cqi_status
,
ri_status
,
format
,
pucch_resource
,
pucch_payload
[
0
],
pucch_payload
[
1
]);
...
...
@@ -1921,7 +1914,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
#endif
if
(
format
==
pucch_format1
)
{
LOG_
I
(
PHY
,
"[UE %d][SR %x] AbsSubframe %d.%d Generating PUCCH 1 (SR for PUSCH), an_srs_simultanous %d, shorten_pucch %d, n1_pucch %d, Po_PUCCH %d
\n
"
,
LOG_
D
(
PHY
,
"[UE %d][SR %x] AbsSubframe %d.%d Generating PUCCH 1 (SR for PUSCH), an_srs_simultanous %d, shorten_pucch %d, n1_pucch %d, Po_PUCCH %d
\n
"
,
Mod_id
,
ue
->
dlsch
[
subframe_DL
(
&
ue
->
frame_parms
,
proc
->
subframe_rx
)
&
0x1
][
eNB_id
][
0
]
->
rnti
,
frame_tx
%
1024
,
subframe_tx
,
...
...
@@ -1933,7 +1926,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
else
{
if
(
SR_payload
>
0
)
{
LOG_
I
(
PHY
,
"[UE %d][SR %x] AbsSubFrame %d.%d Generating PUCCH %s payload %d,%d (with SR for PUSCH), an_srs_simultanous %d, shorten_pucch %d, n1_pucch %d, Po_PUCCH %d, amp %d
\n
"
,
LOG_
D
(
PHY
,
"[UE %d][SR %x] AbsSubFrame %d.%d Generating PUCCH %s payload %d,%d (with SR for PUSCH), an_srs_simultanous %d, shorten_pucch %d, n1_pucch %d, Po_PUCCH %d, amp %d
\n
"
,
Mod_id
,
ue
->
dlsch
[
subframe_DL
(
&
ue
->
frame_parms
,
proc
->
subframe_rx
)
&
0x1
][
eNB_id
][
0
]
->
rnti
,
frame_tx
%
1024
,
subframe_tx
,
...
...
@@ -1946,7 +1939,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
Po_PUCCH
,
tx_amp
);
}
else
{
LOG_
I
(
PHY
,
"[UE %d][PDSCH %x] AbsSubFrame %d.%d rx_offset_diff: %d, Generating PUCCH %s, an_srs_simultanous %d, shorten_pucch %d, n1_pucch %d, b[0]=%d,b[1]=%d (SR_Payload %d), Po_PUCCH %d, amp %d
\n
"
,
LOG_
D
(
PHY
,
"[UE %d][PDSCH %x] AbsSubFrame %d.%d rx_offset_diff: %d, Generating PUCCH %s, an_srs_simultanous %d, shorten_pucch %d, n1_pucch %d, b[0]=%d,b[1]=%d (SR_Payload %d), Po_PUCCH %d, amp %d
\n
"
,
Mod_id
,
ue
->
dlsch
[
subframe_DL
(
&
ue
->
frame_parms
,
proc
->
subframe_rx
)
&
0x1
][
eNB_id
][
0
]
->
rnti
,
frame_tx
%
1024
,
subframe_tx
,
ue
->
rx_offset_diff
,
...
...
@@ -3216,6 +3209,48 @@ void ue_pmch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,int eNB_id,int abs
}
// is_pmch_subframe=true
}
void
copy_harq_proc_struct
(
LTE_DL_UE_HARQ_t
*
harq_processes_dest
,
LTE_DL_UE_HARQ_t
*
current_harq_processes
)
{
harq_processes_dest
->
B
=
current_harq_processes
->
B
;
harq_processes_dest
->
C
=
current_harq_processes
->
C
;
harq_processes_dest
->
Cminus
=
current_harq_processes
->
Cminus
;
harq_processes_dest
->
Cplus
=
current_harq_processes
->
Cplus
;
harq_processes_dest
->
DCINdi
=
current_harq_processes
->
DCINdi
;
harq_processes_dest
->
F
=
current_harq_processes
->
F
;
harq_processes_dest
->
G
=
current_harq_processes
->
G
;
harq_processes_dest
->
Kminus
=
current_harq_processes
->
Kminus
;
harq_processes_dest
->
Kplus
=
current_harq_processes
->
Kplus
;
harq_processes_dest
->
Nl
=
current_harq_processes
->
Nl
;
harq_processes_dest
->
Qm
=
current_harq_processes
->
Qm
;
harq_processes_dest
->
TBS
=
current_harq_processes
->
TBS
;
harq_processes_dest
->
b
=
current_harq_processes
->
b
;
harq_processes_dest
->
codeword
=
current_harq_processes
->
codeword
;
harq_processes_dest
->
delta_PUCCH
=
current_harq_processes
->
delta_PUCCH
;
harq_processes_dest
->
dl_power_off
=
current_harq_processes
->
dl_power_off
;
harq_processes_dest
->
first_tx
=
current_harq_processes
->
first_tx
;
harq_processes_dest
->
mcs
=
current_harq_processes
->
mcs
;
harq_processes_dest
->
mimo_mode
=
current_harq_processes
->
mimo_mode
;
harq_processes_dest
->
nb_rb
=
current_harq_processes
->
nb_rb
;
harq_processes_dest
->
pmi_alloc
=
current_harq_processes
->
pmi_alloc
;
harq_processes_dest
->
rb_alloc_even
[
0
]
=
current_harq_processes
->
rb_alloc_even
[
0
]
;
harq_processes_dest
->
rb_alloc_even
[
1
]
=
current_harq_processes
->
rb_alloc_even
[
1
]
;
harq_processes_dest
->
rb_alloc_even
[
2
]
=
current_harq_processes
->
rb_alloc_even
[
2
]
;
harq_processes_dest
->
rb_alloc_even
[
3
]
=
current_harq_processes
->
rb_alloc_even
[
3
]
;
harq_processes_dest
->
rb_alloc_odd
[
0
]
=
current_harq_processes
->
rb_alloc_odd
[
0
]
;
harq_processes_dest
->
rb_alloc_odd
[
1
]
=
current_harq_processes
->
rb_alloc_odd
[
1
]
;
harq_processes_dest
->
rb_alloc_odd
[
2
]
=
current_harq_processes
->
rb_alloc_odd
[
2
]
;
harq_processes_dest
->
rb_alloc_odd
[
3
]
=
current_harq_processes
->
rb_alloc_odd
[
3
]
;
harq_processes_dest
->
round
=
current_harq_processes
->
round
;
harq_processes_dest
->
rvidx
=
current_harq_processes
->
rvidx
;
harq_processes_dest
->
status
=
current_harq_processes
->
status
;
harq_processes_dest
->
vrb_type
=
current_harq_processes
->
vrb_type
;
}
void
copy_ack_struct
(
harq_status_t
*
harq_ack_dest
,
harq_status_t
*
current_harq_ack
)
{
memcpy
(
harq_ack_dest
,
current_harq_ack
,
sizeof
(
harq_status_t
));
}
void
ue_pdsch_procedures
(
PHY_VARS_UE
*
ue
,
UE_rxtx_proc_t
*
proc
,
int
eNB_id
,
PDSCH_t
pdsch
,
LTE_UE_DLSCH_t
*
dlsch0
,
LTE_UE_DLSCH_t
*
dlsch1
,
int
s0
,
int
s1
,
int
abstraction_flag
)
{
int
subframe_rx
=
proc
->
subframe_rx
;
...
...
@@ -3752,8 +3787,8 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
ue
->
frame_parms
.
samples_per_tti
*
4
));
// start timers
printf
(
"
\n
"
);
LOG_
I
(
PHY
,
" ****** start RX-Chain for AbsSubframe %d.%d ******
\n
"
,
frame_rx
%
1024
,
subframe_rx
);
LOG_
D
(
PHY
,
" ****** start RX-Chain for AbsSubframe %d.%d ******
\n
"
,
frame_rx
%
1024
,
subframe_rx
);
start_meas
(
&
ue
->
phy_proc_rx
[
subframe_rx
&
0x1
]);
start_meas
(
&
ue
->
generic_stat
);
...
...
@@ -3808,8 +3843,8 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
l
=
1
;
}
LOG_
I
(
PHY
,
" ------ slot 0 Processing: AbsSubframe %d.%d ------
\n
"
,
frame_rx
%
1024
,
subframe_rx
);
LOG_
I
(
PHY
,
" ------ --> FFT/ChannelEst/PDCCH slot 0: AbsSubframe %d.%d ------
\n
"
,
frame_rx
%
1024
,
subframe_rx
);
LOG_
D
(
PHY
,
" ------ slot 0 Processing: AbsSubframe %d.%d ------
\n
"
,
frame_rx
%
1024
,
subframe_rx
);
LOG_
D
(
PHY
,
" ------ --> FFT/ChannelEst/PDCCH slot 0: AbsSubframe %d.%d ------
\n
"
,
frame_rx
%
1024
,
subframe_rx
);
for
(;
l
<=
l2
;
l
++
)
{
if
(
abstraction_flag
==
0
)
{
start_meas
(
&
ue
->
ofdm_demod_stats
);
...
...
@@ -3827,7 +3862,7 @@ 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
,(
subframe_rx
<<
1
),
abstraction_flag
,
mode
);
if
((
l
==
pilot1
)
||
((
pmch_flag
==
1
)
&
(
l
==
l2
)))
{
LOG_
I
(
PHY
,
"[UE %d] Frame %d: Calling pdcch procedures (eNB %d)
\n
"
,
ue
->
Mod_id
,
frame_rx
,
eNB_id
);
LOG_
D
(
PHY
,
"[UE %d] Frame %d: Calling pdcch procedures (eNB %d)
\n
"
,
ue
->
Mod_id
,
frame_rx
,
eNB_id
);
if
(
ue_pdcch_procedures
(
eNB_id
,
ue
,
proc
,
abstraction_flag
)
==
-
1
)
{
LOG_E
(
PHY
,
"[UE %d] Frame %d, subframe %d: Error in pdcch procedures
\n
"
,
ue
->
Mod_id
,
frame_rx
,
subframe_rx
);
...
...
@@ -3938,8 +3973,6 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
stop_meas
(
&
ue
->
ofdm_demod_stats
);
}
LOG_I
(
PHY
,
" Measurement slot 1: AbsSubframe %d.%d ------
\n
"
,
frame_rx
%
1024
,
subframe_rx
);
ue_measurement_procedures
(
l
-
1
,
ue
,
proc
,
eNB_id
,
1
+
(
subframe_rx
<<
1
),
abstraction_flag
,
mode
);
}
// for l=1..l2
...
...
@@ -4097,6 +4130,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
}
// duplicate harq structure
uint8_t
current_harq_pid
=
ue
->
dlsch
[
subframe_rx
&
0x1
][
eNB_id
][
0
]
->
current_harq_pid
;
LTE_DL_UE_HARQ_t
*
current_harq_processes
=
ue
->
dlsch
[
subframe_rx
&
0x1
][
eNB_id
][
0
]
->
harq_processes
[
current_harq_pid
];
LTE_DL_UE_HARQ_t
*
harq_processes_dest
=
ue
->
dlsch
[(
subframe_rx
+
1
)
&
0x1
][
eNB_id
][
0
]
->
harq_processes
[
current_harq_pid
];
...
...
@@ -4104,13 +4138,8 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
harq_status_t
*
current_harq_ack
=
&
ue
->
dlsch
[
subframe_rx
&
0x1
][
eNB_id
][
0
]
->
harq_ack
[
subframe_rx
];
harq_status_t
*
harq_ack_dest
=
&
ue
->
dlsch
[(
subframe_rx
+
1
)
&
0x1
][
eNB_id
][
0
]
->
harq_ack
[
subframe_rx
];
memcpy
(
harq_processes_dest
,
current_harq_processes
,
sizeof
(
LTE_DL_UE_HARQ_t
));
memcpy
(
harq_ack_dest
,
current_harq_ack
,
sizeof
(
harq_status_t
));
//LOG_I(PHY,"AbsSubframe %d.%d CurrentHarqProcess.status %d DestHarqProcess.status %d\n",frame_rx%1024,subframe_rx,current_harq_processes->status,harq_processes_dest->status);
//LOG_I(PHY,"AbsSubframe %d.%d CurrentHarqProcess.round %d DestHarqProcess.round %d\n",frame_rx%1024,subframe_rx,current_harq_processes->round,harq_processes_dest->round);
//LOG_I(PHY,"AbsSubframe %d.%d CurrentHarqProcess.delta_PUCCH %d DestHarqProcess.delta_PUCCH %d\n",frame_rx%1024,subframe_rx,current_harq_processes->delta_PUCCH,harq_processes_dest->delta_PUCCH);
//LOG_I(PHY,"AbsSubframe %d.%d CurrentHarqProcess.rvidx %d DestHarqProcess.rvidx %d\n",frame_rx%1024,subframe_rx,current_harq_processes->rvidx,harq_processes_dest->rvidx);
copy_harq_proc_struct
(
harq_processes_dest
,
current_harq_processes
);
copy_ack_struct
(
harq_ack_dest
,
current_harq_ack
);
if
(
subframe_rx
==
9
)
{
if
(
frame_rx
%
10
==
0
)
{
...
...
targets/RT/USER/lte-ue.c
View file @
96629102
...
...
@@ -754,8 +754,7 @@ void *UE_thread(void *arg) {
UE
->
rx_offset
<
10
*
UE
->
frame_parms
.
samples_per_tti
)
UE
->
rx_offset_diff
=
1
;
LOG_I
(
PHY
,
"AbsSubframe %d.%d SET rx_off_diff to %d rx_offset %d
\n
"
,
proc
->
frame_rx
,
sub_frame
,
UE
->
rx_offset_diff
,
UE
->
rx_offset
);
LOG_D
(
PHY
,
"AbsSubframe %d.%d SET rx_off_diff to %d rx_offset %d
\n
"
,
proc
->
frame_rx
,
sub_frame
,
UE
->
rx_offset_diff
,
UE
->
rx_offset
);
readBlockSize
=
UE
->
frame_parms
.
samples_per_tti
-
UE
->
frame_parms
.
ofdm_symbol_size
-
UE
->
frame_parms
.
nb_prefix_samples0
-
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment