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
wangjie
OpenXG-RAN
Commits
a2f37668
Commit
a2f37668
authored
Jul 26, 2017
by
tct-labo4
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ue_new_thread_idx' into develop_integration_w30
parents
767606f9
a738eead
Changes
23
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
446 additions
and
395 deletions
+446
-395
openair1/PHY/LTE_ESTIMATION/lte_adjust_sync.c
openair1/PHY/LTE_ESTIMATION/lte_adjust_sync.c
+3
-3
openair1/PHY/LTE_ESTIMATION/lte_dl_bf_channel_estimation.c
openair1/PHY/LTE_ESTIMATION/lte_dl_bf_channel_estimation.c
+3
-3
openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c
openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c
+8
-8
openair1/PHY/LTE_ESTIMATION/lte_dl_mbsfn_channel_estimation.c
...air1/PHY/LTE_ESTIMATION/lte_dl_mbsfn_channel_estimation.c
+13
-13
openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c
openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c
+22
-21
openair1/PHY/LTE_TRANSPORT/dci.c
openair1/PHY/LTE_TRANSPORT/dci.c
+84
-59
openair1/PHY/LTE_TRANSPORT/dci_tools.c
openair1/PHY/LTE_TRANSPORT/dci_tools.c
+3
-3
openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c
openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c
+6
-6
openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
+37
-37
openair1/PHY/LTE_TRANSPORT/phich.c
openair1/PHY/LTE_TRANSPORT/phich.c
+1
-1
openair1/PHY/LTE_TRANSPORT/pmch.c
openair1/PHY/LTE_TRANSPORT/pmch.c
+3
-3
openair1/PHY/LTE_TRANSPORT/pucch.c
openair1/PHY/LTE_TRANSPORT/pucch.c
+1
-1
openair1/PHY/LTE_TRANSPORT/sss.c
openair1/PHY/LTE_TRANSPORT/sss.c
+10
-9
openair1/PHY/LTE_TRANSPORT/ulsch_coding.c
openair1/PHY/LTE_TRANSPORT/ulsch_coding.c
+3
-3
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
+1
-1
openair1/PHY/MODULATION/slot_fep.c
openair1/PHY/MODULATION/slot_fep.c
+6
-6
openair1/PHY/MODULATION/slot_fep_mbsfn.c
openair1/PHY/MODULATION/slot_fep_mbsfn.c
+3
-3
openair1/PHY/TOOLS/lte_phy_scope.c
openair1/PHY/TOOLS/lte_phy_scope.c
+17
-17
openair1/PHY/TOOLS/lte_phy_scope_tm4.c
openair1/PHY/TOOLS/lte_phy_scope_tm4.c
+30
-30
openair1/PHY/defs.h
openair1/PHY/defs.h
+3
-0
openair1/SCHED/phy_procedures_lte_ue.c
openair1/SCHED/phy_procedures_lte_ue.c
+171
-162
openair1/SCHED/pucch_pc.c
openair1/SCHED/pucch_pc.c
+5
-5
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+13
-1
No files found.
openair1/PHY/LTE_ESTIMATION/lte_adjust_sync.c
View file @
a2f37668
...
...
@@ -60,8 +60,8 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
temp
=
0
;
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_rx
;
aa
++
)
{
Re
=
((
int16_t
*
)
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
dl_ch_estimates_time
[
eNB_id
][
aa
])[(
i
<<
2
)];
Im
=
((
int16_t
*
)
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
dl_ch_estimates_time
[
eNB_id
][
aa
])[
1
+
(
i
<<
2
)];
Re
=
((
int16_t
*
)
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
dl_ch_estimates_time
[
eNB_id
][
aa
])[(
i
<<
2
)];
Im
=
((
int16_t
*
)
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
dl_ch_estimates_time
[
eNB_id
][
aa
])[
1
+
(
i
<<
2
)];
temp
+=
(
Re
*
Re
/
2
)
+
(
Im
*
Im
/
2
);
}
...
...
@@ -78,7 +78,7 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
max_pos_fil
=
((
max_pos_fil
*
coef
)
+
(
max_pos
*
ncoef
))
>>
15
;
// do not filter to have proactive timing adjustment
//
max_pos_fil = max_pos;
max_pos_fil
=
max_pos
;
if
(
subframe
==
6
)
{
...
...
openair1/PHY/LTE_ESTIMATION/lte_dl_bf_channel_estimation.c
View file @
a2f37668
...
...
@@ -51,7 +51,7 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
int
uespec_pilot
[
300
];
LTE_DL_FRAME_PARMS
*
frame_parms
=
&
phy_vars_ue
->
frame_parms
;
LTE_UE_DLSCH_t
**
dlsch_ue
=
phy_vars_ue
->
dlsch
[
(
Ns
>>
1
)
%
RX_NB_TH
][
eNB_id
];
LTE_UE_DLSCH_t
**
dlsch_ue
=
phy_vars_ue
->
dlsch
[
phy_vars_ue
->
current_thread_id
[
Ns
>>
1
]
][
eNB_id
];
LTE_DL_UE_HARQ_t
*
dlsch0_harq
;
harq_pid
=
dlsch_ue
[
0
]
->
current_harq_pid
;
...
...
@@ -63,9 +63,9 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
else
rballoc
=
dlsch0_harq
->
rb_alloc_even
;
rxdataF
=
phy_vars_ue
->
common_vars
.
common_vars_rx_data_per_thread
[
(
Ns
>>
1
)
%
RX_NB_TH
].
rxdataF
;
rxdataF
=
phy_vars_ue
->
common_vars
.
common_vars_rx_data_per_thread
[
phy_vars_ue
->
current_thread_id
[
Ns
>>
1
]
].
rxdataF
;
dl_bf_ch_estimates
=
phy_vars_ue
->
pdsch_vars
[
(
Ns
>>
1
)
%
RX_NB_TH
][
eNB_id
]
->
dl_bf_ch_estimates
;
dl_bf_ch_estimates
=
phy_vars_ue
->
pdsch_vars
[
phy_vars_ue
->
current_thread_id
[
Ns
>>
1
]
][
eNB_id
]
->
dl_bf_ch_estimates
;
beamforming_mode
=
phy_vars_ue
->
transmission_mode
[
eNB_id
]
>
6
?
phy_vars_ue
->
transmission_mode
[
eNB_id
]
:
0
;
if
(
phy_vars_ue
->
high_speed_flag
==
0
)
// use second channel estimate position for temporary storage
...
...
openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c
View file @
a2f37668
...
...
@@ -50,10 +50,10 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue,
uint16_t
Nid_cell
=
(
eNB_offset
==
0
)
?
ue
->
frame_parms
.
Nid_cell
:
ue
->
measurements
.
adj_cell_id
[
eNB_offset
-
1
];
uint8_t
nushift
,
pilot1
,
pilot2
,
pilot3
;
uint8_t
previous_
sfn
=
((
Ns
>>
1
)
-
1
)
<
0
?
9
:
(
Ns
>>
1
)
-
1
;
int
**
dl_ch_estimates
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
(
Ns
>>
1
)
%
RX_NB_TH
].
dl_ch_estimates
[
eNB_offset
];
int
**
dl_ch_estimates_previous
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
(
previous_sfn
)
%
RX_NB_TH
].
dl_ch_estimates
[
eNB_offset
];
int
**
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
(
Ns
>>
1
)
%
RX_NB_TH
].
rxdataF
;
uint8_t
previous_
thread_id
=
ue
->
current_thread_id
[
Ns
>>
1
]
==
0
?
(
RX_NB_TH
-
1
)
:
(
ue
->
current_thread_id
[
Ns
>>
1
]
-
1
)
;
int
**
dl_ch_estimates
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]
].
dl_ch_estimates
[
eNB_offset
];
int
**
dl_ch_estimates_previous
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
previous_thread_id
].
dl_ch_estimates
[
eNB_offset
];
int
**
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]
].
rxdataF
;
if
(
ue
->
frame_parms
.
Ncp
==
0
)
{
// normal prefix
pilot1
=
4
;
...
...
@@ -800,15 +800,15 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue,
// do ifft of channel estimate
for
(
aarx
=
0
;
aarx
<
ue
->
frame_parms
.
nb_antennas_rx
;
aarx
++
)
for
(
p
=
0
;
p
<
ue
->
frame_parms
.
nb_antenna_ports_eNB
;
p
++
)
{
if
(
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
(
Ns
>>
1
)
%
RX_NB_TH
].
dl_ch_estimates
[
eNB_offset
][(
p
<<
1
)
+
aarx
])
idft
((
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
(
Ns
>>
1
)
%
RX_NB_TH
].
dl_ch_estimates
[
eNB_offset
][(
p
<<
1
)
+
aarx
][
8
],
(
int16_t
*
)
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
(
Ns
>>
1
)
%
RX_NB_TH
].
dl_ch_estimates_time
[
eNB_offset
][(
p
<<
1
)
+
aarx
],
1
);
if
(
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]
].
dl_ch_estimates
[
eNB_offset
][(
p
<<
1
)
+
aarx
])
idft
((
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]
].
dl_ch_estimates
[
eNB_offset
][(
p
<<
1
)
+
aarx
][
8
],
(
int16_t
*
)
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]
].
dl_ch_estimates_time
[
eNB_offset
][(
p
<<
1
)
+
aarx
],
1
);
}
#if T_TRACER
T
(
T_UE_PHY_DL_CHANNEL_ESTIMATE
,
T_INT
(
eNB_id
),
T_INT
(
ue
->
Mod_id
),
T_INT
(
ue
->
proc
.
proc_rxtx
[(
Ns
>>
1
)
&
1
].
frame_rx
%
1024
),
T_INT
(
ue
->
proc
.
proc_rxtx
[(
Ns
>>
1
)
&
1
].
subframe_rx
),
T_INT
(
0
),
T_BUFFER
(
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
(
Ns
>>
1
)
%
RX_NB_TH
].
dl_ch_estimates_time
[
eNB_offset
][
0
][
0
],
512
*
4
));
T_INT
(
0
),
T_BUFFER
(
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]
].
dl_ch_estimates_time
[
eNB_offset
][
0
][
0
],
512
*
4
));
#endif
return
(
0
);
...
...
openair1/PHY/LTE_ESTIMATION/lte_dl_mbsfn_channel_estimation.c
View file @
a2f37668
...
...
@@ -44,8 +44,8 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
// unsigned int n;
// int i;
int
**
dl_ch_estimates
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
dl_ch_estimates
[
0
];
int
**
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
rxdataF
;
int
**
dl_ch_estimates
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
dl_ch_estimates
[
0
];
int
**
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
rxdataF
;
ch_offset
=
(
l
*
(
ue
->
frame_parms
.
ofdm_symbol_size
));
symbol_offset
=
ch_offset
;
//phy_vars_ue->lte_frame_parms.ofdm_symbol_size*l;
...
...
@@ -734,31 +734,31 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
// do ifft of channel estimate
for
(
aa
=
0
;
aa
<
ue
->
frame_parms
.
nb_antennas_rx
*
ue
->
frame_parms
.
nb_antennas_tx
;
aa
++
)
{
if
(
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
dl_ch_estimates
[
eNB_offset
][
aa
])
{
if
(
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
dl_ch_estimates
[
eNB_offset
][
aa
])
{
switch
(
ue
->
frame_parms
.
N_RB_DL
)
{
case
6
:
idft128
((
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
dl_ch_estimates
[
eNB_offset
][
aa
][
8
],
(
int16_t
*
)
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
dl_ch_estimates_time
[
eNB_offset
][
aa
],
idft128
((
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
dl_ch_estimates
[
eNB_offset
][
aa
][
8
],
(
int16_t
*
)
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
dl_ch_estimates_time
[
eNB_offset
][
aa
],
1
);
break
;
case
25
:
idft512
((
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
dl_ch_estimates
[
eNB_offset
][
aa
][
8
],
(
int16_t
*
)
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
dl_ch_estimates_time
[
eNB_offset
][
aa
],
idft512
((
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
dl_ch_estimates
[
eNB_offset
][
aa
][
8
],
(
int16_t
*
)
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
dl_ch_estimates_time
[
eNB_offset
][
aa
],
1
);
break
;
case
50
:
idft1024
((
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
dl_ch_estimates
[
eNB_offset
][
aa
][
8
],
(
int16_t
*
)
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
dl_ch_estimates_time
[
eNB_offset
][
aa
],
idft1024
((
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
dl_ch_estimates
[
eNB_offset
][
aa
][
8
],
(
int16_t
*
)
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
dl_ch_estimates_time
[
eNB_offset
][
aa
],
1
);
break
;
case
75
:
idft1536
((
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
dl_ch_estimates
[
eNB_offset
][
aa
][
8
],
(
int16_t
*
)
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
dl_ch_estimates_time
[
eNB_offset
][
aa
],
idft1536
((
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
dl_ch_estimates
[
eNB_offset
][
aa
][
8
],
(
int16_t
*
)
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
dl_ch_estimates_time
[
eNB_offset
][
aa
],
1
);
break
;
case
100
:
idft2048
((
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
dl_ch_estimates
[
eNB_offset
][
aa
][
8
],
(
int16_t
*
)
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
dl_ch_estimates_time
[
eNB_offset
][
aa
],
idft2048
((
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
dl_ch_estimates
[
eNB_offset
][
aa
][
8
],
(
int16_t
*
)
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
dl_ch_estimates_time
[
eNB_offset
][
aa
],
1
);
break
;
default:
...
...
openair1/PHY/LTE_ESTIMATION/lte_ue_measurements.c
View file @
a2f37668
...
...
@@ -184,8 +184,9 @@ void ue_rrc_measurements(PHY_VARS_UE *ue,
uint16_t
Nid_cell
=
ue
->
frame_parms
.
Nid_cell
;
uint8_t
eNB_offset
,
nu
,
l
,
nushift
,
k
;
uint16_t
off
;
uint8_t
previous_thread_id
=
ue
->
current_thread_id
[
subframe
]
==
0
?
(
RX_NB_TH
-
1
)
:
(
ue
->
current_thread_id
[
subframe
]
-
1
);
//uint8_t isPss; // indicate if this is a slot for extracting PSS
//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
...
...
@@ -210,13 +211,13 @@ void ue_rrc_measurements(PHY_VARS_UE *ue,
if
(
ue
->
frame_parms
.
frame_type
==
FDD
)
{
rxF_sss
=
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
rxdataF
[
aarx
][(
5
*
ue
->
frame_parms
.
ofdm_symbol_size
)];
rxF_pss
=
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
rxdataF
[
aarx
][(
6
*
ue
->
frame_parms
.
ofdm_symbol_size
)];
rxF_sss
=
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
rxdataF
[
aarx
][(
5
*
ue
->
frame_parms
.
ofdm_symbol_size
)];
rxF_pss
=
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
rxdataF
[
aarx
][(
6
*
ue
->
frame_parms
.
ofdm_symbol_size
)];
}
else
{
rxF_sss
=
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
(
subframe
-
1
)
%
RX_NB_TH
].
rxdataF
[
aarx
][(
13
*
ue
->
frame_parms
.
ofdm_symbol_size
)];
rxF_pss
=
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
rxdataF
[
aarx
][(
2
*
ue
->
frame_parms
.
ofdm_symbol_size
)];
rxF_sss
=
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
previous_thread_id
].
rxdataF
[
aarx
][(
13
*
ue
->
frame_parms
.
ofdm_symbol_size
)];
rxF_pss
=
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
rxdataF
[
aarx
][(
2
*
ue
->
frame_parms
.
ofdm_symbol_size
)];
}
//-ve spectrum from SSS
...
...
@@ -234,13 +235,13 @@ void ue_rrc_measurements(PHY_VARS_UE *ue,
// printf("pss32 %d\n",ue->measurements.n0_power[aarx]); //-ve spectrum from PSS
if
(
ue
->
frame_parms
.
frame_type
==
FDD
)
{
rxF_sss
=
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
rxdataF
[
aarx
][(
6
*
ue
->
frame_parms
.
ofdm_symbol_size
)];
rxF_pss
=
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
rxdataF
[
aarx
][(
7
*
ue
->
frame_parms
.
ofdm_symbol_size
)];
rxF_sss
=
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
rxdataF
[
aarx
][(
6
*
ue
->
frame_parms
.
ofdm_symbol_size
)];
rxF_pss
=
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
rxdataF
[
aarx
][(
7
*
ue
->
frame_parms
.
ofdm_symbol_size
)];
}
else
{
rxF_sss
=
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
(
subframe
-
1
)
%
RX_NB_TH
].
rxdataF
[
aarx
][(
14
*
ue
->
frame_parms
.
ofdm_symbol_size
)];
rxF_pss
=
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
rxdataF
[
aarx
][(
3
*
ue
->
frame_parms
.
ofdm_symbol_size
)];
rxF_sss
=
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
previous_thread_id
].
rxdataF
[
aarx
][(
14
*
ue
->
frame_parms
.
ofdm_symbol_size
)];
rxF_pss
=
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
rxdataF
[
aarx
][(
3
*
ue
->
frame_parms
.
ofdm_symbol_size
)];
}
// ue->measurements.n0_power[aarx] += (((int32_t)rxF_pss[-72]*rxF_pss[-72])+((int32_t)rxF_pss[-71]*rxF_pss[-71]));
// printf("pssm36 %d\n",ue->measurements.n0_power[aarx]);
...
...
@@ -275,10 +276,10 @@ void ue_rrc_measurements(PHY_VARS_UE *ue,
if
(
ue
->
frame_parms
.
Ncp
==
NORMAL
)
{
for
(
aarx
=
0
;
aarx
<
ue
->
frame_parms
.
nb_antennas_rx
;
aarx
++
)
{
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[(
subframe
%
RX_NB_TH
)].
rxdataF
;
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[(
ue
->
current_thread_id
[
subframe
]
)].
rxdataF
;
rxF_pss
=
(
int16_t
*
)
&
rxdataF
[
aarx
][((
pss_symb
*
(
ue
->
frame_parms
.
ofdm_symbol_size
)))];
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
(
subframe
-
1
)
%
RX_NB_TH
].
rxdataF
;
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
previous_thread_id
].
rxdataF
;
rxF_sss
=
(
int16_t
*
)
&
rxdataF
[
aarx
][((
sss_symb
*
(
ue
->
frame_parms
.
ofdm_symbol_size
)))];
//-ve spectrum from SSS
...
...
@@ -303,7 +304,7 @@ void ue_rrc_measurements(PHY_VARS_UE *ue,
ue
->
measurements
.
n0_power
[
aarx
]
+=
(((
int32_t
)
rxF_pss
[
2
+
66
]
*
rxF_pss
[
2
+
66
])
+
((
int32_t
)
rxF_pss
[
2
+
65
]
*
rxF_pss
[
2
+
65
]));
// ue->measurements.n0_power[aarx] += (((int32_t)rxF_pss[2+64]*rxF_pss[2+64])+((int32_t)rxF_pss[2+63]*rxF_pss[2+63]));
// printf("pss32 %d\n",ue->measurements.n0_power[aarx]); //-ve spectrum from PSS
rxF_pss
=
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
rxdataF
[
aarx
][(
7
*
ue
->
frame_parms
.
ofdm_symbol_size
)];
rxF_pss
=
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
rxdataF
[
aarx
][(
7
*
ue
->
frame_parms
.
ofdm_symbol_size
)];
// ue->measurements.n0_power[aarx] += (((int32_t)rxF_pss[-72]*rxF_pss[-72])+((int32_t)rxF_pss[-71]*rxF_pss[-71]));
// printf("pssm36 %d\n",ue->measurements.n0_power[aarx]);
ue
->
measurements
.
n0_power
[
aarx
]
+=
(((
int32_t
)
rxF_pss
[
-
70
]
*
rxF_pss
[
-
70
])
+
((
int32_t
)
rxF_pss
[
-
69
]
*
rxF_pss
[
-
69
]));
...
...
@@ -349,7 +350,7 @@ void ue_rrc_measurements(PHY_VARS_UE *ue,
#endif
for
(
aarx
=
0
;
aarx
<
ue
->
frame_parms
.
nb_antennas_rx
;
aarx
++
)
{
rxF
=
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
rxdataF
[
aarx
][(
l
*
ue
->
frame_parms
.
ofdm_symbol_size
)];
rxF
=
(
int16_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
rxdataF
[
aarx
][(
l
*
ue
->
frame_parms
.
ofdm_symbol_size
)];
off
=
(
ue
->
frame_parms
.
first_carrier_offset
+
k
)
<<
1
;
if
(
l
==
(
4
-
ue
->
frame_parms
.
Ncp
))
{
...
...
@@ -515,7 +516,7 @@ void lte_ue_measurements(PHY_VARS_UE *ue,
for
(
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
for
(
aatx
=
0
;
aatx
<
frame_parms
->
nb_antenna_ports_eNB
;
aatx
++
)
{
ue
->
measurements
.
rx_spatial_power
[
eNB_id
][
aatx
][
aarx
]
=
(
signal_energy_nodc
(
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
dl_ch_estimates
[
eNB_id
][(
aatx
<<
1
)
+
aarx
][
0
],
(
signal_energy_nodc
(
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
dl_ch_estimates
[
eNB_id
][(
aatx
<<
1
)
+
aarx
][
0
],
(
N_RB_DL
*
12
)));
//- ue->measurements.n0_power[aarx];
...
...
@@ -608,8 +609,8 @@ void lte_ue_measurements(PHY_VARS_UE *ue,
// cqi/pmi information
for
(
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
dl_ch0
=
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
dl_ch_estimates
[
eNB_id
][
aarx
][
4
];
dl_ch1
=
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
dl_ch_estimates
[
eNB_id
][
2
+
aarx
][
4
];
dl_ch0
=
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
dl_ch_estimates
[
eNB_id
][
aarx
][
4
];
dl_ch1
=
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
dl_ch_estimates
[
eNB_id
][
2
+
aarx
][
4
];
for
(
subband
=
0
;
subband
<
nb_subbands
;
subband
++
)
{
...
...
@@ -664,13 +665,13 @@ void lte_ue_measurements(PHY_VARS_UE *ue,
#if defined(__x86_64__) || defined(__i386__)
__m128i
pmi128_re
,
pmi128_im
,
mmtmpPMI0
,
mmtmpPMI1
/* ,mmtmpPMI2,mmtmpPMI3 */
;
dl_ch0_128
=
(
__m128i
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
dl_ch_estimates
[
eNB_id
][
aarx
][
4
];
dl_ch1_128
=
(
__m128i
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
dl_ch_estimates
[
eNB_id
][
2
+
aarx
][
4
];
dl_ch0_128
=
(
__m128i
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
dl_ch_estimates
[
eNB_id
][
aarx
][
4
];
dl_ch1_128
=
(
__m128i
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
dl_ch_estimates
[
eNB_id
][
2
+
aarx
][
4
];
#elif defined(__arm__)
int32x4_t
pmi128_re
,
pmi128_im
,
mmtmpPMI0
,
mmtmpPMI1
,
mmtmpPMI0b
,
mmtmpPMI1b
;
dl_ch0_128
=
(
int16x8_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
dl_ch_estimates
[
eNB_id
][
aarx
][
4
];
dl_ch1_128
=
(
int16x8_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
dl_ch_estimates
[
eNB_id
][
2
+
aarx
][
4
];
dl_ch0_128
=
(
int16x8_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
dl_ch_estimates
[
eNB_id
][
aarx
][
4
];
dl_ch1_128
=
(
int16x8_t
*
)
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
dl_ch_estimates
[
eNB_id
][
2
+
aarx
][
4
];
#endif
for
(
subband
=
0
;
subband
<
nb_subbands
;
subband
++
)
{
...
...
@@ -764,7 +765,7 @@ void lte_ue_measurements(PHY_VARS_UE *ue,
else
{
// cqi information only for mode 1
for
(
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
dl_ch0
=
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
dl_ch_estimates
[
eNB_id
][
aarx
][
4
];
dl_ch0
=
&
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
dl_ch_estimates
[
eNB_id
][
aarx
][
4
];
for
(
subband
=
0
;
subband
<
7
;
subband
++
)
{
...
...
openair1/PHY/LTE_TRANSPORT/dci.c
View file @
a2f37668
This diff is collapsed.
Click to expand it.
openair1/PHY/LTE_TRANSPORT/dci_tools.c
View file @
a2f37668
...
...
@@ -7355,7 +7355,7 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
uint8_t
transmission_mode
=
ue
->
transmission_mode
[
eNB_id
];
ANFBmode_t
AckNackFBMode
;
LTE_UE_ULSCH_t
*
ulsch
=
ue
->
ulsch
[
eNB_id
];
LTE_UE_DLSCH_t
**
dlsch
=
ue
->
dlsch
[
subframe
%
RX_NB_TH
][
0
];
LTE_UE_DLSCH_t
**
dlsch
=
ue
->
dlsch
[
ue
->
current_thread_id
[
subframe
]
][
0
];
PHY_MEASUREMENTS
*
meas
=
&
ue
->
measurements
;
LTE_DL_FRAME_PARMS
*
frame_parms
=
&
ue
->
frame_parms
;
// uint32_t current_dlsch_cqi = ue->current_dlsch_cqi[eNB_id];
...
...
@@ -8162,7 +8162,7 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
//int dl_subframe = (subframe<4) ? (subframe+6) : (subframe-4);
int
dl_subframe
=
subframe
;
if
(
ue
->
dlsch
[
dl_subframe
%
RX_NB_TH
][
eNB_id
][
0
]
->
harq_ack
[
dl_subframe
].
send_harq_status
>
0
)
{
// we have downlink transmission
if
(
ue
->
dlsch
[
ue
->
current_thread_id
[
subframe
]
][
eNB_id
][
0
]
->
harq_ack
[
dl_subframe
].
send_harq_status
>
0
)
{
// we have downlink transmission
ulsch
->
harq_processes
[
harq_pid
]
->
O_ACK
=
1
;
}
else
{
ulsch
->
harq_processes
[
harq_pid
]
->
O_ACK
=
0
;
...
...
@@ -8921,7 +8921,7 @@ double sinr_eff_cqi_calc(PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe)
uint8_t
transmission_mode
=
ue
->
transmission_mode
[
eNB_id
];
PHY_MEASUREMENTS
*
meas
=
&
ue
->
measurements
;
LTE_DL_FRAME_PARMS
*
frame_parms
=
&
ue
->
frame_parms
;
int32_t
**
dl_channel_est
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
dl_ch_estimates
[
eNB_id
];
int32_t
**
dl_channel_est
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
dl_ch_estimates
[
eNB_id
];
double
*
s_dB
;
s_dB
=
ue
->
sinr_CQI_dB
;
// LTE_UE_ULSCH_t *ulsch = ue->ulsch[eNB_id];
...
...
openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c
View file @
a2f37668
...
...
@@ -272,7 +272,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
return(max_turbo_iterations);
}*/
/*harq_pid = dlsch->current_harq_pid[
subframe%RX_NB_TH
];
/*harq_pid = dlsch->current_harq_pid[
phy_vars_ue->current_thread_id[subframe]
];
if (harq_pid >= 8) {
printf("dlsch_decoding.c: Illegal harq_pid %d\n",harq_pid);
return(max_turbo_iterations);
...
...
@@ -962,9 +962,9 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
break
;
case
PDSCH
:
// TB0
dlsch_ue
=
phy_vars_ue
->
dlsch
[
subframe
%
RX_NB_TH
][
eNB_id
][
0
];
dlsch_ue
=
phy_vars_ue
->
dlsch
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
][
0
];
harq_pid
=
dlsch_ue
->
current_harq_pid
;
ue_id
=
(
uint32_t
)
find_ue
((
int16_t
)
phy_vars_ue
->
pdcch_vars
[
subframe
%
RX_NB_TH
][(
uint32_t
)
eNB_id
]
->
crnti
,
PHY_vars_eNB_g
[
eNB_id2
][
CC_id
]);
ue_id
=
(
uint32_t
)
find_ue
((
int16_t
)
phy_vars_ue
->
pdcch_vars
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][(
uint32_t
)
eNB_id
]
->
crnti
,
PHY_vars_eNB_g
[
eNB_id2
][
CC_id
]);
DevAssert
(
ue_id
!=
(
uint32_t
)
-
1
);
dlsch_eNB
=
PHY_vars_eNB_g
[
eNB_id2
][
CC_id
]
->
dlsch
[
ue_id
][
0
];
...
...
@@ -1008,9 +1008,9 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
break
;
case
PDSCH1
:
{
// TB1
dlsch_ue
=
phy_vars_ue
->
dlsch
[
subframe
%
RX_NB_TH
][
eNB_id
][
1
];
dlsch_ue
=
phy_vars_ue
->
dlsch
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
][
1
];
harq_pid
=
dlsch_ue
->
current_harq_pid
;
int8_t
UE_id
=
find_ue
(
phy_vars_ue
->
pdcch_vars
[
subframe
%
RX_NB_TH
][
eNB_id
]
->
crnti
,
PHY_vars_eNB_g
[
eNB_id2
][
CC_id
]
);
int8_t
UE_id
=
find_ue
(
phy_vars_ue
->
pdcch_vars
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
]
->
crnti
,
PHY_vars_eNB_g
[
eNB_id2
][
CC_id
]
);
DevAssert
(
UE_id
!=
-
1
);
dlsch_eNB
=
PHY_vars_eNB_g
[
eNB_id2
][
CC_id
]
->
dlsch
[
UE_id
][
1
];
// reset HARQ
...
...
@@ -1062,7 +1062,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
break
;
default:
dlsch_ue
=
phy_vars_ue
->
dlsch
[
subframe
%
RX_NB_TH
][
eNB_id
][
0
];
dlsch_ue
=
phy_vars_ue
->
dlsch
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
][
0
];
LOG_E
(
PHY
,
"dlsch_decoding_emul: FATAL, unknown DLSCH_id %d
\n
"
,
dlsch_id
);
dlsch_ue
->
last_iteration_cnt
=
1
+
dlsch_ue
->
max_turbo_iterations
;
return
(
1
+
dlsch_ue
->
max_turbo_iterations
);
...
...
openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
View file @
a2f37668
This diff is collapsed.
Click to expand it.
openair1/PHY/LTE_TRANSPORT/phich.c
View file @
a2f37668
...
...
@@ -1078,7 +1078,7 @@ void rx_phich(PHY_VARS_UE *ue,
LTE_DL_FRAME_PARMS
*
frame_parms
=&
ue
->
frame_parms
;
LTE_UE_PDCCH
**
pdcch_vars
=
&
ue
->
pdcch_vars
[
subframe
%
RX_NB_TH
][
eNB_id
];
LTE_UE_PDCCH
**
pdcch_vars
=
&
ue
->
pdcch_vars
[
ue
->
current_thread_id
[
subframe
]
][
eNB_id
];
// uint8_t HI;
uint8_t
harq_pid
=
phich_subframe_to_harq_pid
(
frame_parms
,
proc
->
frame_rx
,
subframe
);
...
...
openair1/PHY/LTE_TRANSPORT/pmch.c
View file @
a2f37668
...
...
@@ -74,7 +74,7 @@ void dump_mch(PHY_VARS_UE *ue,uint8_t eNB_id,uint16_t coded_bits_per_codeword,in
write_output
(
fname
,
vname
,
ue
->
pdsch_vars_MCH
[
eNB_id
]
->
dl_ch_magb0
[
0
],
12
*
N_RB_DL
*
nsymb_pmch
,
1
,
1
);
write_output
(
"mch00_ch0.m"
,
"pmch00_ch0"
,
&
(
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
dl_ch_estimates
[
eNB_id
][
0
][
0
]),
&
(
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
dl_ch_estimates
[
eNB_id
][
0
][
0
]),
ue
->
frame_parms
.
ofdm_symbol_size
*
12
,
1
,
1
);
write_output
(
"rxsig_mch.m"
,
"rxs_mch"
,
...
...
@@ -969,8 +969,8 @@ int rx_pmch(PHY_VARS_UE *ue,
//printf("*********************mch: symbol %d\n",symbol);
mch_extract_rbs
(
common_vars
->
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
rxdataF
,
common_vars
->
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
dl_ch_estimates
[
eNB_id
],
mch_extract_rbs
(
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
rxdataF
,
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
dl_ch_estimates
[
eNB_id
],
pdsch_vars
[
eNB_id
]
->
rxdataF_ext
,
pdsch_vars
[
eNB_id
]
->
dl_ch_estimates_ext
,
symbol
,
...
...
openair1/PHY/LTE_TRANSPORT/pucch.c
View file @
a2f37668
...
...
@@ -2530,7 +2530,7 @@ int32_t rx_pucch_emul(PHY_VARS_eNB *eNB,
rnti
=
eNB
->
ulsch
[
UE_index
]
->
rnti
;
for
(
UE_id
=
0
;
UE_id
<
NB_UE_INST
;
UE_id
++
)
{
if
(
rnti
==
PHY_vars_UE_g
[
UE_id
][
CC_id
]
->
pdcch_vars
[
subframe
%
RX_NB_TH
][
0
]
->
crnti
)
if
(
rnti
==
PHY_vars_UE_g
[
UE_id
][
CC_id
]
->
pdcch_vars
[
PHY_vars_UE_g
[
UE_id
][
CC_id
]
->
current_thread_id
[
subframe
]
][
0
]
->
crnti
)
break
;
}
...
...
openair1/PHY/LTE_TRANSPORT/sss.c
View file @
a2f37668
...
...
@@ -160,6 +160,7 @@ int _do_pss_sss_extract(PHY_VARS_UE *ue,
int32_t
*
pss_rxF
,
*
pss_rxF_ext
;
int32_t
*
sss_rxF
,
*
sss_rxF_ext
;
LTE_DL_FRAME_PARMS
*
frame_parms
=
&
ue
->
frame_parms
;
uint8_t
next_thread_id
=
ue
->
current_thread_id
[
subframe
]
==
(
RX_NB_TH
-
1
)
?
0
:
(
ue
->
current_thread_id
[
subframe
]
+
1
);
int
rx_offset
=
frame_parms
->
ofdm_symbol_size
-
3
*
12
;
uint8_t
pss_symb
,
sss_symb
;
...
...
@@ -173,7 +174,7 @@ int _do_pss_sss_extract(PHY_VARS_UE *ue,
pss_symb
=
6
-
frame_parms
->
Ncp
;
sss_symb
=
pss_symb
-
1
;
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
(
subframe
%
RX_NB_TH
)
].
rxdataF
;
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
rxdataF
;
pss_rxF
=
&
rxdataF
[
aarx
][(
rx_offset
+
(
pss_symb
*
(
frame_parms
->
ofdm_symbol_size
)))];
sss_rxF
=
&
rxdataF
[
aarx
][(
rx_offset
+
(
sss_symb
*
(
frame_parms
->
ofdm_symbol_size
)))];
...
...
@@ -183,18 +184,18 @@ int _do_pss_sss_extract(PHY_VARS_UE *ue,
if
(
subframe
==
5
||
subframe
==
0
)
{
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
(
subframe
%
RX_NB_TH
)
].
rxdataF
;
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
rxdataF
;
sss_rxF
=
&
rxdataF
[
aarx
][(
rx_offset
+
(
sss_symb
*
(
frame_parms
->
ofdm_symbol_size
)))];
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
((
subframe
+
1
)
%
RX_NB_TH
)
].
rxdataF
;
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
next_thread_id
].
rxdataF
;
pss_rxF
=
&
rxdataF
[
aarx
][(
rx_offset
+
(
pss_symb
*
(
frame_parms
->
ofdm_symbol_size
)))];
}
else
if
(
subframe
==
6
||
subframe
==
1
)
{
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
(
subframe
%
RX_NB_TH
)
].
rxdataF
;
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
rxdataF
;
pss_rxF
=
&
rxdataF
[
aarx
][(
rx_offset
+
(
pss_symb
*
(
frame_parms
->
ofdm_symbol_size
)))];
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
(
subframe
+
1
)
%
RX_NB_TH
].
rxdataF
;
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
next_thread_id
].
rxdataF
;
sss_rxF
=
&
rxdataF
[
aarx
][(
rx_offset
+
(
sss_symb
*
(
frame_parms
->
ofdm_symbol_size
)))];
}
else
...
...
@@ -222,18 +223,18 @@ int _do_pss_sss_extract(PHY_VARS_UE *ue,
{
if
(
subframe
==
5
||
subframe
==
0
)
{
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
(
subframe
%
RX_NB_TH
)
].
rxdataF
;
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
rxdataF
;
sss_rxF
=
&
rxdataF
[
aarx
][(
1
+
(
sss_symb
*
(
frame_parms
->
ofdm_symbol_size
)))];
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
((
subframe
+
1
)
%
RX_NB_TH
)
].
rxdataF
;
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
next_thread_id
].
rxdataF
;
pss_rxF
=
&
rxdataF
[
aarx
][(
1
+
(
pss_symb
*
(
frame_parms
->
ofdm_symbol_size
)))];
}
else
if
(
subframe
==
6
||
subframe
==
1
)
{
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
(
subframe
%
RX_NB_TH
)
].
rxdataF
;
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
rxdataF
;
pss_rxF
=
&
rxdataF
[
aarx
][(
rx_offset
+
(
pss_symb
*
(
frame_parms
->
ofdm_symbol_size
)))];
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
(
subframe
+
1
)
%
RX_NB_TH
].
rxdataF
;
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
next_thread_id
].
rxdataF
;
sss_rxF
=
&
rxdataF
[
aarx
][(
rx_offset
+
(
sss_symb
*
(
frame_parms
->
ofdm_symbol_size
)))];
}
else
...
...
openair1/PHY/LTE_TRANSPORT/ulsch_coding.c
View file @
a2f37668
...
...
@@ -262,7 +262,7 @@ uint32_t ulsch_encoding(uint8_t *a,
// fill CQI/PMI information
if
(
ulsch
->
O
>
0
)
{
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_ENCODING_FILL_CQI
,
VCD_FUNCTION_IN
);
rnti
=
ue
->
pdcch_vars
[
subframe_rx
%
RX_NB_TH
][
eNB_id
]
->
crnti
;
rnti
=
ue
->
pdcch_vars
[
ue
->
current_thread_id
[
subframe_rx
]
][
eNB_id
]
->
crnti
;
fill_CQI
(
ulsch
,
meas
,
0
,
harq_pid
,
ue
->
frame_parms
.
N_RB_DL
,
rnti
,
tmode
,
ue
->
sinr_eff
);
LOG_D
(
PHY
,
"ULSCH Encoding rnti %x
\n
"
,
rnti
);
...
...
@@ -971,7 +971,7 @@ int ulsch_encoding_emul(uint8_t *ulsch_buffer,
LTE_UE_DLSCH_t
**
dlsch
=
ue
->
dlsch
[
0
][
eNB_id
];
PHY_MEASUREMENTS
*
meas
=
&
ue
->
measurements
;
uint8_t
tmode
=
ue
->
transmission_mode
[
eNB_id
];
uint16_t
rnti
=
ue
->
pdcch_vars
[
subframe_rx
%
RX_NB_TH
][
eNB_id
]
->
crnti
;
uint16_t
rnti
=
ue
->
pdcch_vars
[
ue
->
current_thread_id
[
subframe_rx
]
][
eNB_id
]
->
crnti
;
LOG_D
(
PHY
,
"EMUL UE ulsch_encoding for eNB %d,mod_id %d, harq_pid %d rnti %x, ACK(%d,%d)
\n
"
,
eNB_id
,
ue
->
Mod_id
,
harq_pid
,
rnti
,
ulsch
->
o_ACK
[
0
],
ulsch
->
o_ACK
[
1
]);
...
...
@@ -1005,7 +1005,7 @@ int ulsch_encoding_emul(uint8_t *ulsch_buffer,
//UE_transport_info_TB_index[ue->Mod_id]+=ue->ulsch[eNB_id]->harq_processes[harq_pid]->TBS>>3;
// navid: currently more than one eNB is not supported in the code
UE_transport_info
[
ue
->
Mod_id
][
ue
->
CC_id
].
num_eNB
=
1
;
UE_transport_info
[
ue
->
Mod_id
][
ue
->
CC_id
].
rnti
[
0
]
=
ue
->
pdcch_vars
[
subframe_rx
%
RX_NB_TH
][
0
]
->
crnti
;
UE_transport_info
[
ue
->
Mod_id
][
ue
->
CC_id
].
rnti
[
0
]
=
ue
->
pdcch_vars
[
ue
->
current_thread_id
[
subframe_rx
]
][
0
]
->
crnti
;
UE_transport_info
[
ue
->
Mod_id
][
ue
->
CC_id
].
eNB_id
[
0
]
=
eNB_id
;
UE_transport_info
[
ue
->
Mod_id
][
ue
->
CC_id
].
harq_pid
[
0
]
=
harq_pid
;
UE_transport_info
[
ue
->
Mod_id
][
ue
->
CC_id
].
tbs
[
0
]
=
ue
->
ulsch
[
eNB_id
]
->
harq_processes
[
harq_pid
]
->
TBS
>>
3
;
...
...
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
View file @
a2f37668
...
...
@@ -2002,7 +2002,7 @@ uint32_t ulsch_decoding_emul(PHY_VARS_eNB *eNB, eNB_rxtx_proc_t *proc,
#endif
for
(
UE_id
=
0
;
UE_id
<
NB_UE_INST
;
UE_id
++
)
{
if
(
rnti
==
PHY_vars_UE_g
[
UE_id
][
CC_id
]
->
pdcch_vars
[
subframe
%
RX_NB_TH
][
0
]
->
crnti
)
if
(
rnti
==
PHY_vars_UE_g
[
UE_id
][
CC_id
]
->
pdcch_vars
[
PHY_vars_UE_g
[
UE_id
][
CC_id
]
->
current_thread_id
[
subframe
]
][
0
]
->
crnti
)
break
;
}
...
...
openair1/PHY/MODULATION/slot_fep.c
View file @
a2f37668
...
...
@@ -109,7 +109,7 @@ int slot_fep(PHY_VARS_UE *ue,
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_rx
;
aa
++
)
{
memset
(
&
common_vars
->
common_vars_rx_data_per_thread
[
(
Ns
>>
1
)
%
RX_NB_TH
].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
0
,
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int
));
memset
(
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]
].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
0
,
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int
));
rx_offset
=
sample_offset
+
slot_offset
+
nb_prefix_samples0
+
subframe_offset
-
SOFFSET
;
// Align with 256 bit
...
...
@@ -127,14 +127,14 @@ int slot_fep(PHY_VARS_UE *ue,
(
void
*
)
&
common_vars
->
rxdata
[
aa
][
rx_offset
%
frame_length_samples
],
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int
));
dft
((
int16_t
*
)
tmp_dft_in
,
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
(
Ns
>>
1
)
%
RX_NB_TH
].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]
].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
}
else
{
// use dft input from RX buffer directly
#if UE_TIMING_TRACE
start_meas
(
&
ue
->
rx_dft_stats
);
#endif
dft
((
int16_t
*
)
&
common_vars
->
rxdata
[
aa
][(
rx_offset
)
%
frame_length_samples
],
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
(
Ns
>>
1
)
%
RX_NB_TH
].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]
].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
#if UE_TIMING_TRACE
stop_meas
(
&
ue
->
rx_dft_stats
);
#endif
...
...
@@ -163,11 +163,11 @@ int slot_fep(PHY_VARS_UE *ue,
(
void
*
)
&
common_vars
->
rxdata
[
aa
][(
rx_offset
)
%
frame_length_samples
],
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int
));
dft
((
int16_t
*
)
tmp_dft_in
,
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
(
Ns
>>
1
)
%
RX_NB_TH
].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]
].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
}
else
{
// use dft input from RX buffer directly
dft
((
int16_t
*
)
&
common_vars
->
rxdata
[
aa
][(
rx_offset
)
%
frame_length_samples
],
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
(
Ns
>>
1
)
%
RX_NB_TH
].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]
].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
symbol
],
1
);
}
#if UE_TIMING_TRACE
stop_meas
(
&
ue
->
rx_dft_stats
);
...
...
@@ -223,7 +223,7 @@ int slot_fep(PHY_VARS_UE *ue,
start_meas
(
&
ue
->
dlsch_freq_offset_estimation_stats
);
#endif
lte_est_freq_offset
(
common_vars
->
common_vars_rx_data_per_thread
[
(
Ns
>>
1
)
%
RX_NB_TH
].
dl_ch_estimates
[
0
],
lte_est_freq_offset
(
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
Ns
>>
1
]
].
dl_ch_estimates
[
0
],
frame_parms
,
l
,
&
common_vars
->
freq_offset
,
...
...
openair1/PHY/MODULATION/slot_fep_mbsfn.c
View file @
a2f37668
...
...
@@ -109,7 +109,7 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
#endif
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_rx
;
aa
++
)
{
memset
(
&
common_vars
->
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
l
],
0
,
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int
));
memset
(
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
l
],
0
,
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int
));
if
(
l
==
0
)
{
#if UE_TIMING_TRACE
start_meas
(
&
ue
->
rx_dft_stats
);
...
...
@@ -118,7 +118,7 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
nb_prefix_samples0
+
subframe_offset
-
SOFFSET
)
%
frame_length_samples
],
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
l
],
1
);
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
l
],
1
);
#if UE_TIMING_TRACE
stop_meas
(
&
ue
->
rx_dft_stats
);
#endif
...
...
@@ -140,7 +140,7 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
(
frame_parms
->
ofdm_symbol_size
+
nb_prefix_samples
)
*
(
l
-
1
)
+
subframe_offset
-
SOFFSET
)
%
frame_length_samples
],
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
l
],
1
);
(
int16_t
*
)
&
common_vars
->
common_vars_rx_data_per_thread
[
ue
->
current_thread_id
[
subframe
]
].
rxdataF
[
aa
][
frame_parms
->
ofdm_symbol_size
*
l
],
1
);
#if UE_TIMING_TRACE
stop_meas
(
&
ue
->
rx_dft_stats
);
#endif
...
...
openair1/PHY/TOOLS/lte_phy_scope.c
View file @
a2f37668
...
...
@@ -514,32 +514,32 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
int
beamforming_mode
=
phy_vars_ue
->
transmission_mode
[
eNB_id
]
>
6
?
phy_vars_ue
->
transmission_mode
[
eNB_id
]
:
0
;
if
(
phy_vars_ue
->
dlsch
[
subframe
%
RX_NB_TH
][
eNB_id
][
0
]
!=
NULL
)
{
harq_pid
=
phy_vars_ue
->
dlsch
[
subframe
%
RX_NB_TH
][
eNB_id
][
0
]
->
current_harq_pid
;
if
(
phy_vars_ue
->
dlsch
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
][
0
]
!=
NULL
)
{
harq_pid
=
phy_vars_ue
->
dlsch
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
][
0
]
->
current_harq_pid
;
if
(
harq_pid
>=
8
)
return
;
mcs
=
phy_vars_ue
->
dlsch
[
subframe
%
RX_NB_TH
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
mcs
;
mcs
=
phy_vars_ue
->
dlsch
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
mcs
;
// Button 0
if
(
!
phy_vars_ue
->
dlsch
[
subframe
%
RX_NB_TH
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
dl_power_off
)
{
if
(
!
phy_vars_ue
->
dlsch
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
dl_power_off
)
{
// we are in TM5
fl_show_object
(
form
->
button_0
);
}
}
if
(
phy_vars_ue
->
pdcch_vars
[
subframe
%
RX_NB_TH
][
eNB_id
]
!=
NULL
)
{
num_pdcch_symbols
=
phy_vars_ue
->
pdcch_vars
[
subframe
%
RX_NB_TH
][
eNB_id
]
->
num_pdcch_symbols
;
if
(
phy_vars_ue
->
pdcch_vars
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
]
!=
NULL
)
{
num_pdcch_symbols
=
phy_vars_ue
->
pdcch_vars
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
]
->
num_pdcch_symbols
;
}
// coded_bits_per_codeword = frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti);
if
(
phy_vars_ue
->
dlsch
[
subframe
%
RX_NB_TH
][
eNB_id
][
0
]
!=
NULL
)
{
if
(
phy_vars_ue
->
dlsch
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
][
0
]
!=
NULL
)
{
coded_bits_per_codeword
=
get_G
(
frame_parms
,
phy_vars_ue
->
dlsch
[
subframe
%
RX_NB_TH
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
nb_rb
,
phy_vars_ue
->
dlsch
[
subframe
%
RX_NB_TH
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
rb_alloc_even
,
phy_vars_ue
->
dlsch
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
nb_rb
,
phy_vars_ue
->
dlsch
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
rb_alloc_even
,
get_Qm
(
mcs
),
phy_vars_ue
->
dlsch
[
subframe
%
RX_NB_TH
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
Nl
,
phy_vars_ue
->
dlsch
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
Nl
,
num_pdcch_symbols
,
frame
,
subframe
,
...
...
@@ -563,16 +563,16 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
bit_pdcch
=
(
float
*
)
calloc
(
12
*
frame_parms
->
N_RB_DL
*
num_pdcch_symbols
*
2
,
sizeof
(
float
));
rxsig_t
=
(
int16_t
**
)
phy_vars_ue
->
common_vars
.
rxdata
;
chest_t
=
(
int16_t
**
)
phy_vars_ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
dl_ch_estimates_time
[
eNB_id
];
chest_f
=
(
int16_t
**
)
phy_vars_ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
dl_ch_estimates
[
eNB_id
];
chest_t
=
(
int16_t
**
)
phy_vars_ue
->
common_vars
.
common_vars_rx_data_per_thread
[
phy_vars_ue
->
current_thread_id
[
subframe
]
].
dl_ch_estimates_time
[
eNB_id
];
chest_f
=
(
int16_t
**
)
phy_vars_ue
->
common_vars
.
common_vars_rx_data_per_thread
[
phy_vars_ue
->
current_thread_id
[
subframe
]
].
dl_ch_estimates
[
eNB_id
];
pbch_llr
=
(
int8_t
*
)
phy_vars_ue
->
pbch_vars
[
eNB_id
]
->
llr
;
pbch_comp
=
(
int16_t
*
)
phy_vars_ue
->
pbch_vars
[
eNB_id
]
->
rxdataF_comp
[
0
];
pdcch_llr
=
(
int8_t
*
)
phy_vars_ue
->
pdcch_vars
[
subframe
%
RX_NB_TH
][
eNB_id
]
->
llr
;
pdcch_comp
=
(
int16_t
*
)
phy_vars_ue
->
pdcch_vars
[
subframe
%
RX_NB_TH
][
eNB_id
]
->
rxdataF_comp
[
0
];
pdsch_llr
=
(
int16_t
*
)
phy_vars_ue
->
pdsch_vars
[
subframe
%
RX_NB_TH
][
eNB_id
]
->
llr
[
0
];
// stream 0
pdcch_llr
=
(
int8_t
*
)
phy_vars_ue
->
pdcch_vars
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
]
->
llr
;
pdcch_comp
=
(
int16_t
*
)
phy_vars_ue
->
pdcch_vars
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
]
->
rxdataF_comp
[
0
];
pdsch_llr
=
(
int16_t
*
)
phy_vars_ue
->
pdsch_vars
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
]
->
llr
[
0
];
// stream 0
// pdsch_llr = (int16_t*) phy_vars_ue->lte_ue_pdsch_vars_SI[eNB_id]->llr[0]; // stream 0
pdsch_comp
=
(
int16_t
*
)
phy_vars_ue
->
pdsch_vars
[
subframe
%
RX_NB_TH
][
eNB_id
]
->
rxdataF_comp0
[
0
];
pdsch_mag
=
(
int16_t
*
)
phy_vars_ue
->
pdsch_vars
[
subframe
%
RX_NB_TH
][
eNB_id
]
->
dl_ch_mag0
[
0
];
pdsch_comp
=
(
int16_t
*
)
phy_vars_ue
->
pdsch_vars
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
]
->
rxdataF_comp0
[
0
];
pdsch_mag
=
(
int16_t
*
)
phy_vars_ue
->
pdsch_vars
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
]
->
dl_ch_mag0
[
0
];
// Received signal in time domain of receive antenna 0
if
(
rxsig_t
!=
NULL
)
{
...
...
openair1/PHY/TOOLS/lte_phy_scope_tm4.c
View file @
a2f37668
...
...
@@ -465,11 +465,11 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
int
mcs1
=
0
;
unsigned
char
harq_pid
=
0
;
int
beamforming_mode
=
phy_vars_ue
->
transmission_mode
[
eNB_id
]
>
6
?
phy_vars_ue
->
transmission_mode
[
eNB_id
]
:
0
;
if
(
phy_vars_ue
->
dlsch
[
subframe
%
RX_NB_TH
][
eNB_id
][
0
]
!=
NULL
)
{
harq_pid
=
phy_vars_ue
->
dlsch
[
subframe
%
RX_NB_TH
][
eNB_id
][
0
]
->
current_harq_pid
;
if
(
phy_vars_ue
->
dlsch
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
][
0
]
!=
NULL
)
{
harq_pid
=
phy_vars_ue
->
dlsch
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
][
0
]
->
current_harq_pid
;
if
(
harq_pid
>=
8
)
return
;
mcs0
=
phy_vars_ue
->
dlsch
[
subframe
%
RX_NB_TH
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
mcs
;
mcs0
=
phy_vars_ue
->
dlsch
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
mcs
;
// Button 0
/*
if(!phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->dl_power_off) {
...
...
@@ -479,23 +479,23 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
*/
}
fl_show_object
(
form
->
button_0
);
if
(
phy_vars_ue
->
dlsch
[
subframe
%
RX_NB_TH
][
eNB_id
][
1
]
!=
NULL
)
{
harq_pid
=
phy_vars_ue
->
dlsch
[
subframe
%
RX_NB_TH
][
eNB_id
][
1
]
->
current_harq_pid
;
if
(
phy_vars_ue
->
dlsch
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
][
1
]
!=
NULL
)
{
harq_pid
=
phy_vars_ue
->
dlsch
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
][
1
]
->
current_harq_pid
;
if
(
harq_pid
>=
8
)
return
;
mcs1
=
phy_vars_ue
->
dlsch
[
subframe
%
RX_NB_TH
][
eNB_id
][
1
]
->
harq_processes
[
harq_pid
]
->
mcs
;
mcs1
=
phy_vars_ue
->
dlsch
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
][
1
]
->
harq_processes
[
harq_pid
]
->
mcs
;
}
if
(
phy_vars_ue
->
pdcch_vars
[
subframe
%
RX_NB_TH
][
eNB_id
]
!=
NULL
)
{
num_pdcch_symbols
=
phy_vars_ue
->
pdcch_vars
[
subframe
%
RX_NB_TH
][
eNB_id
]
->
num_pdcch_symbols
;
if
(
phy_vars_ue
->
pdcch_vars
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
]
!=
NULL
)
{
num_pdcch_symbols
=
phy_vars_ue
->
pdcch_vars
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
]
->
num_pdcch_symbols
;
}
// coded_bits_per_codeword = frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti);
if
(
phy_vars_ue
->
dlsch
[
subframe
%
RX_NB_TH
][
eNB_id
][
0
]
!=
NULL
)
{
if
(
phy_vars_ue
->
dlsch
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
][
0
]
!=
NULL
)
{
mod0
=
get_Qm
(
mcs0
);
coded_bits_per_codeword0
=
get_G
(
frame_parms
,
phy_vars_ue
->
dlsch
[
subframe
%
RX_NB_TH
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
nb_rb
,
phy_vars_ue
->
dlsch
[
subframe
%
RX_NB_TH
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
rb_alloc_even
,
phy_vars_ue
->
dlsch
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
nb_rb
,
phy_vars_ue
->
dlsch
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
rb_alloc_even
,
get_Qm
(
mcs0
),
phy_vars_ue
->
dlsch
[
subframe
%
RX_NB_TH
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
Nl
,
phy_vars_ue
->
dlsch
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
][
0
]
->
harq_processes
[
harq_pid
]
->
Nl
,
num_pdcch_symbols
,
frame
,
subframe
,
...
...
@@ -504,13 +504,13 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
coded_bits_per_codeword0
=
0
;
//frame_parms->N_RB_DL*12*get_Qm(mcs)*(frame_parms->symbols_per_tti);
mod0
=
0
;
}
if
(
phy_vars_ue
->
dlsch
[
subframe
%
RX_NB_TH
][
eNB_id
][
1
]
!=
NULL
)
{
if
(
phy_vars_ue
->
dlsch
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
][
1
]
!=
NULL
)
{
mod1
=
get_Qm
(
mcs1
);
coded_bits_per_codeword1
=
get_G
(
frame_parms
,
phy_vars_ue
->
dlsch
[
subframe
%
RX_NB_TH
][
eNB_id
][
1
]
->
harq_processes
[
harq_pid
]
->
nb_rb
,
phy_vars_ue
->
dlsch
[
subframe
%
RX_NB_TH
][
eNB_id
][
1
]
->
harq_processes
[
harq_pid
]
->
rb_alloc_even
,
phy_vars_ue
->
dlsch
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
][
1
]
->
harq_processes
[
harq_pid
]
->
nb_rb
,
phy_vars_ue
->
dlsch
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
][
1
]
->
harq_processes
[
harq_pid
]
->
rb_alloc_even
,
get_Qm
(
mcs1
),
phy_vars_ue
->
dlsch
[
subframe
%
RX_NB_TH
][
eNB_id
][
1
]
->
harq_processes
[
harq_pid
]
->
Nl
,
phy_vars_ue
->
dlsch
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
][
1
]
->
harq_processes
[
harq_pid
]
->
Nl
,
num_pdcch_symbols
,
frame
,
subframe
,
...
...
@@ -533,23 +533,23 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
llr_pdcch
=
(
float
*
)
calloc
(
12
*
frame_parms
->
N_RB_DL
*
num_pdcch_symbols
*
2
,
sizeof
(
float
));
// init to zero
bit_pdcch
=
(
float
*
)
calloc
(
12
*
frame_parms
->
N_RB_DL
*
num_pdcch_symbols
*
2
,
sizeof
(
float
));
rxsig_t
=
(
int16_t
**
)
phy_vars_ue
->
common_vars
.
rxdata
;
chest_t
=
(
int16_t
**
)
phy_vars_ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
dl_ch_estimates_time
[
eNB_id
];
chest_f
=
(
int16_t
**
)
phy_vars_ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
%
RX_NB_TH
].
dl_ch_estimates
[
eNB_id
];
chest_t
=
(
int16_t
**
)
phy_vars_ue
->
common_vars
.
common_vars_rx_data_per_thread
[
phy_vars_ue
->
current_thread_id
[
subframe
]
].
dl_ch_estimates_time
[
eNB_id
];
chest_f
=
(
int16_t
**
)
phy_vars_ue
->
common_vars
.
common_vars_rx_data_per_thread
[
phy_vars_ue
->
current_thread_id
[
subframe
]
].
dl_ch_estimates
[
eNB_id
];
pbch_llr
=
(
int8_t
*
)
phy_vars_ue
->
pbch_vars
[
eNB_id
]
->
llr
;
pbch_comp
=
(
int16_t
*
)
phy_vars_ue
->
pbch_vars
[
eNB_id
]
->
rxdataF_comp
[
0
];
pdcch_llr
=
(
int8_t
*
)
phy_vars_ue
->
pdcch_vars
[
subframe
%
RX_NB_TH
][
eNB_id
]
->
llr
;
pdcch_comp
=
(
int16_t
*
)
phy_vars_ue
->
pdcch_vars
[
subframe
%
RX_NB_TH
][
eNB_id
]
->
rxdataF_comp
[
0
];
pdsch_llr
=
(
int16_t
*
)
phy_vars_ue
->
pdsch_vars
[
subframe
%
RX_NB_TH
][
eNB_id
]
->
llr
[
0
];
// stream 0
pdsch_llr1
=
(
int16_t
*
)
phy_vars_ue
->
pdsch_vars
[
subframe
%
RX_NB_TH
][
eNB_id
]
->
llr
[
1
];
// stream 1
pdsch_comp
=
(
int16_t
*
)
phy_vars_ue
->
pdsch_vars
[
subframe
%
RX_NB_TH
][
eNB_id
]
->
rxdataF_comp0
[
0
];
//pdsch_comp = (int16_t*) phy_vars_ue->lte_ue_pdsch_vars[
subframe%RX_NB_TH
][eNB_id]->rxdataF_ext[0];
//pdsch_comp1 = (int16_t*) phy_vars_ue->lte_ue_pdsch_vars[
subframe%RX_NB_TH
][eNB_id]->rxdataF_ext[1];
pdsch_comp1
=
(
int16_t
*
)
(
phy_vars_ue
->
pdsch_vars
[
subframe
%
RX_NB_TH
][
eNB_id
]
->
rxdataF_comp1
[
0
][
0
])[
0
];
pdcch_llr
=
(
int8_t
*
)
phy_vars_ue
->
pdcch_vars
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
]
->
llr
;
pdcch_comp
=
(
int16_t
*
)
phy_vars_ue
->
pdcch_vars
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
]
->
rxdataF_comp
[
0
];
pdsch_llr
=
(
int16_t
*
)
phy_vars_ue
->
pdsch_vars
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
]
->
llr
[
0
];
// stream 0
pdsch_llr1
=
(
int16_t
*
)
phy_vars_ue
->
pdsch_vars
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
]
->
llr
[
1
];
// stream 1
pdsch_comp
=
(
int16_t
*
)
phy_vars_ue
->
pdsch_vars
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
]
->
rxdataF_comp0
[
0
];
//pdsch_comp = (int16_t*) phy_vars_ue->lte_ue_pdsch_vars[
phy_vars_ue->current_thread_id[subframe]
][eNB_id]->rxdataF_ext[0];
//pdsch_comp1 = (int16_t*) phy_vars_ue->lte_ue_pdsch_vars[
phy_vars_ue->current_thread_id[subframe]
][eNB_id]->rxdataF_ext[1];
pdsch_comp1
=
(
int16_t
*
)
(
phy_vars_ue
->
pdsch_vars
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
]
->
rxdataF_comp1
[
0
][
0
])[
0
];
//pdsch_comp1 = (int16_t*) (phy_vars_ue->lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext[0][0])[0];
pdsch_mag0
=
(
int16_t
*
)
phy_vars_ue
->
pdsch_vars
[
subframe
%
RX_NB_TH
][
eNB_id
]
->
dl_ch_mag0
[
0
];
pdsch_mag1
=
(
int16_t
*
)
(
phy_vars_ue
->
pdsch_vars
[
subframe
%
RX_NB_TH
][
eNB_id
]
->
dl_ch_mag1
[
0
][
0
])[
0
];
pdsch_magb0
=
(
int16_t
*
)
phy_vars_ue
->
pdsch_vars
[
subframe
%
RX_NB_TH
][
eNB_id
]
->
dl_ch_magb0
[
0
];
pdsch_magb1
=
(
int16_t
*
)
(
phy_vars_ue
->
pdsch_vars
[
subframe
%
RX_NB_TH
][
eNB_id
]
->
dl_ch_magb1
[
0
][
0
])[
0
];
pdsch_mag0
=
(
int16_t
*
)
phy_vars_ue
->
pdsch_vars
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
]
->
dl_ch_mag0
[
0
];
pdsch_mag1
=
(
int16_t
*
)
(
phy_vars_ue
->
pdsch_vars
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
]
->
dl_ch_mag1
[
0
][
0
])[
0
];
pdsch_magb0
=
(
int16_t
*
)
phy_vars_ue
->
pdsch_vars
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
]
->
dl_ch_magb0
[
0
];
pdsch_magb1
=
(
int16_t
*
)
(
phy_vars_ue
->
pdsch_vars
[
phy_vars_ue
->
current_thread_id
[
subframe
]
][
eNB_id
]
->
dl_ch_magb1
[
0
][
0
])[
0
];
fl_freeze_form
(
form
->
lte_phy_scope_ue
);
// Received signal in time domain of receive antenna 0
if
(
rxsig_t
!=
NULL
)
{
...
...
openair1/PHY/defs.h
View file @
a2f37668
...
...
@@ -738,6 +738,9 @@ typedef struct {
LTE_DL_FRAME_PARMS
frame_parms_before_ho
;
LTE_UE_COMMON
common_vars
;
// point to the current rxTx thread index
uint8_t
current_thread_id
[
10
];
LTE_UE_PDSCH
*
pdsch_vars
[
RX_NB_TH_MAX
][
NUMBER_OF_CONNECTED_eNB_MAX
+
1
];
// two RxTx Threads
LTE_UE_PDSCH_FLP
*
pdsch_vars_flp
[
NUMBER_OF_CONNECTED_eNB_MAX
+
1
];
LTE_UE_PDSCH
*
pdsch_vars_SI
[
NUMBER_OF_CONNECTED_eNB_MAX
+
1
];
...
...
openair1/SCHED/phy_procedures_lte_ue.c
View file @
a2f37668
This diff is collapsed.
Click to expand it.
openair1/SCHED/pucch_pc.c
View file @
a2f37668
...
...
@@ -52,7 +52,7 @@ int16_t pucch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t subframe,u
Po_PUCCH
=
get_PL
(
ue
->
Mod_id
,
ue
->
CC_id
,
eNB_id
)
+
ue
->
frame_parms
.
ul_power_control_config_common
.
p0_NominalPUCCH
+
ue
->
dlsch
[
proc
->
subframe_rx
%
RX_NB_TH
][
eNB_id
][
0
]
->
g_pucch
;
ue
->
dlsch
[
ue
->
current_thread_id
[
proc
->
subframe_rx
]
][
eNB_id
][
0
]
->
g_pucch
;
switch
(
pucch_fmt
)
{
case
pucch_format1
:
...
...
@@ -95,19 +95,19 @@ int16_t pucch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t subframe,u
if
(
pucch_fmt
!=
pucch_format1
)
{
LOG_D
(
PHY
,
"[UE %d][PDSCH %x] AbsSubframe %d.%d: Po_PUCCH %d dBm : Po_NOMINAL_PUCCH %d dBm, PL %d dB, g_pucch %d dB
\n
"
,
ue
->
Mod_id
,
ue
->
dlsch
[
proc
->
subframe_rx
%
RX_NB_TH
][
eNB_id
][
0
]
->
rnti
,
proc
->
frame_tx
%
1024
,
subframe
,
ue
->
dlsch
[
ue
->
current_thread_id
[
proc
->
subframe_rx
]
][
eNB_id
][
0
]
->
rnti
,
proc
->
frame_tx
%
1024
,
subframe
,
Po_PUCCH
,
ue
->
frame_parms
.
ul_power_control_config_common
.
p0_NominalPUCCH
,
get_PL
(
ue
->
Mod_id
,
ue
->
CC_id
,
eNB_id
),
ue
->
dlsch
[
proc
->
subframe_rx
%
RX_NB_TH
][
eNB_id
][
0
]
->
g_pucch
);
ue
->
dlsch
[
ue
->
current_thread_id
[
proc
->
subframe_rx
]
][
eNB_id
][
0
]
->
g_pucch
);
}
else
{
LOG_D
(
PHY
,
"[UE %d][SR %x] AbsSubframe %d.%d: Po_PUCCH %d dBm : Po_NOMINAL_PUCCH %d dBm, PL %d dB g_pucch %d dB
\n
"
,
ue
->
Mod_id
,
ue
->
dlsch
[
proc
->
subframe_rx
%
RX_NB_TH
][
eNB_id
][
0
]
->
rnti
,
proc
->
frame_tx
%
1024
,
subframe
,
ue
->
dlsch
[
ue
->
current_thread_id
[
proc
->
subframe_rx
]
][
eNB_id
][
0
]
->
rnti
,
proc
->
frame_tx
%
1024
,
subframe
,
Po_PUCCH
,
ue
->
frame_parms
.
ul_power_control_config_common
.
p0_NominalPUCCH
,
get_PL
(
ue
->
Mod_id
,
ue
->
CC_id
,
eNB_id
),
ue
->
dlsch
[
proc
->
subframe_rx
%
RX_NB_TH
][
eNB_id
][
0
]
->
g_pucch
);
ue
->
dlsch
[
ue
->
current_thread_id
[
proc
->
subframe_rx
]
][
eNB_id
][
0
]
->
g_pucch
);
}
return
(
Po_PUCCH
);
...
...
targets/RT/USER/lte-ue.c
View file @
a2f37668
...
...
@@ -645,6 +645,8 @@ void *UE_thread(void *arg) {
char
threadname
[
128
];
int
th_id
;
static
uint8_t
thread_idx
=
0
;
cpu_set_t
cpuset
;
CPU_ZERO
(
&
cpuset
);
if
(
threads
.
iq
!=
-
1
)
...
...
@@ -747,7 +749,16 @@ void *UE_thread(void *arg) {
}
else
{
sub_frame
++
;
sub_frame
%=
10
;
UE_rxtx_proc_t
*
proc
=
&
UE
->
proc
.
proc_rxtx
[
sub_frame
%
RX_NB_TH
];
UE_rxtx_proc_t
*
proc
=
&
UE
->
proc
.
proc_rxtx
[
thread_idx
];
// update thread index for received subframe
UE
->
current_thread_id
[
sub_frame
]
=
thread_idx
;
LOG_D
(
PHY
,
"Process Subframe %d thread Idx %d
\n
"
,
sub_frame
,
UE
->
current_thread_id
[
sub_frame
]);
thread_idx
++
;
if
(
thread_idx
>=
RX_NB_TH
)
thread_idx
=
0
;
if
(
UE
->
mode
!=
loop_through_memory
)
{
for
(
i
=
0
;
i
<
UE
->
frame_parms
.
nb_antennas_rx
;
i
++
)
...
...
@@ -833,6 +844,7 @@ void *UE_thread(void *arg) {
UE
->
frame_parms
.
ofdm_symbol_size
-
UE
->
frame_parms
.
nb_prefix_samples0
;
proc
->
instance_cnt_rxtx
++
;
LOG_D
(
PHY
,
"[SCHED][UE %d] UE RX instance_cnt_rxtx %d subframe %d !!
\n
"
,
UE
->
Mod_id
,
proc
->
instance_cnt_rxtx
,
proc
->
subframe_rx
);
if
(
proc
->
instance_cnt_rxtx
==
0
)
{
if
(
pthread_cond_signal
(
&
proc
->
cond_rxtx
)
!=
0
)
{
LOG_E
(
PHY
,
"[SCHED][UE %d] ERROR pthread_cond_signal for UE RX thread
\n
"
,
UE
->
Mod_id
);
...
...
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