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
spbro
OpenXG-RAN
Commits
d06018d1
Commit
d06018d1
authored
Feb 07, 2021
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'four_antenna_eNB' into oairu
parents
7a169947
89657f20
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
180 additions
and
162 deletions
+180
-162
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-1
openair1/PHY/INIT/lte_init.c
openair1/PHY/INIT/lte_init.c
+2
-2
openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c
openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c
+2
-2
openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c
openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c
+13
-14
openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
+4
-4
openair1/PHY/LTE_TRANSPORT/pucch.c
openair1/PHY/LTE_TRANSPORT/pucch.c
+34
-34
openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c
openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c
+78
-64
openair1/SIMULATION/LTE_PHY/ulsim.c
openair1/SIMULATION/LTE_PHY/ulsim.c
+6
-9
openair1/SIMULATION/TOOLS/multipath_channel.c
openair1/SIMULATION/TOOLS/multipath_channel.c
+21
-20
openair1/SIMULATION/TOOLS/sim.h
openair1/SIMULATION/TOOLS/sim.h
+8
-8
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+6
-4
targets/RT/USER/lte-enb.c
targets/RT/USER/lte-enb.c
+5
-0
No files found.
cmake_targets/CMakeLists.txt
View file @
d06018d1
...
...
@@ -852,7 +852,7 @@ endif (${RU} STREQUAL 0)
# Hardware dependant options
###################################
add_list1_option
(
NB_ANTENNAS_RX
"
2
"
"Number of antennas in reception"
"1"
"2"
"4"
)
add_list1_option
(
NB_ANTENNAS_RX
"
4
"
"Number of antennas in reception"
"1"
"2"
"4"
)
add_list1_option
(
NB_ANTENNAS_TX
"4"
"Number of antennas in transmission"
"1"
"2"
"4"
)
add_list2_option
(
RF_BOARD
"EXMIMO"
"RF head type"
"None"
"OAI_USRP"
"OAI_BLADERF"
"OAI_LMSSDR"
"OAI_SIMU"
)
...
...
openair1/PHY/INIT/lte_init.c
View file @
d06018d1
...
...
@@ -519,7 +519,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
AssertFatal
(
fp
->
symbols_per_tti
>
11
,
"fp->symbols_per_tti %d < 12
\n
"
,
fp
->
symbols_per_tti
);
AssertFatal
(
fp
->
N_RB_UL
>
5
,
"fp->N_RB_UL %d < 6
\n
"
,
fp
->
N_RB_UL
);
for
(
i
=
0
;
i
<
2
;
i
++
)
{
for
(
i
=
0
;
i
<
fp
->
nb_antennas_rx
;
i
++
)
{
// FIXME We should get rid of this
pusch_vars
[
ULSCH_id
]
->
rxdataF_ext
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
fp
->
N_RB_UL
*
12
*
fp
->
symbols_per_tti
);
...
...
@@ -592,7 +592,7 @@ void phy_free_lte_eNB(PHY_VARS_eNB *eNB) {
free_and_zero
(
prach_vars
->
rxsigF
[
0
]);
for
(
int
ULSCH_id
=
0
;
ULSCH_id
<
NUMBER_OF_ULSCH_MAX
;
ULSCH_id
++
)
{
for
(
i
=
0
;
i
<
2
;
i
++
)
{
for
(
i
=
0
;
i
<
fp
->
nb_antennas_rx
;
i
++
)
{
free_and_zero
(
pusch_vars
[
ULSCH_id
]
->
rxdataF_ext
[
i
]);
free_and_zero
(
pusch_vars
[
ULSCH_id
]
->
rxdataF_ext2
[
i
]);
free_and_zero
(
pusch_vars
[
ULSCH_id
]
->
drs_ch_estimates
[
i
]);
...
...
openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c
View file @
d06018d1
...
...
@@ -121,8 +121,8 @@ int lte_est_timing_advance_pusch(LTE_DL_FRAME_PARMS *frame_parms,
int
sync_pos
=
0
;
//(frame_parms->ofdm_symbol_size-cyclic_shift*frame_parms->ofdm_symbol_size/12)%(frame_parms->ofdm_symbol_size);
AssertFatal
(
frame_parms
->
ofdm_symbol_size
>
127
,
"frame_parms->ofdm_symbol_size %d<128
\n
"
,
frame_parms
->
ofdm_symbol_size
);
AssertFatal
(
frame_parms
->
nb_antennas_rx
>
0
&&
frame_parms
->
nb_antennas_rx
<
3
,
"frame_parms->nb_antennas_rx %d not in [0,1
]
\n
"
,
frame_parms
->
nb_antennas_rx
);
AssertFatal
(
frame_parms
->
nb_antennas_rx
>
0
&&
frame_parms
->
nb_antennas_rx
<
=
4
,
"frame_parms->nb_antennas_rx %d not in [1...%d
]
\n
"
,
frame_parms
->
nb_antennas_rx
,
4
);
for
(
i
=
0
;
i
<
frame_parms
->
ofdm_symbol_size
;
i
++
)
{
temp
=
0
;
...
...
openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c
View file @
d06018d1
...
...
@@ -112,34 +112,33 @@ void lte_eNB_I0_measurements(PHY_VARS_eNB *eNB,
for
(
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
measurements
->
n0_subband_power
[
aarx
][
rb
]
=
0
;
for
(
int
s
=
0
;
s
<
(
14
-
(
frame_parms
->
Ncp
<<
1
));
s
++
)
{
// select the 7th symbol in an uplink subframe
offset
=
offset0
+
(
s
*
frame_parms
->
ofdm_symbol_size
);
ul_ch
=
&
common_vars
->
rxdataF
[
aarx
][
offset
];
len
=
12
;
offset
=
offset0
+
(
s
*
frame_parms
->
ofdm_symbol_size
);
ul_ch
=
&
common_vars
->
rxdataF
[
aarx
][
offset
];
len
=
12
;
// just do first half of middle PRB for odd number of PRBs
if
(((
frame_parms
->
N_RB_UL
&
1
)
==
1
)
&&
(
rb
==
(
frame_parms
->
N_RB_UL
>>
1
)))
{
len
=
6
;
}
if
(((
frame_parms
->
N_RB_UL
&
1
)
==
1
)
&&
(
rb
==
(
frame_parms
->
N_RB_UL
>>
1
)))
{
len
=
6
;
}
AssertFatal
(
ul_ch
,
"RX signal buffer (freq) problem"
);
AssertFatal
(
ul_ch
,
"RX signal buffer (freq) problem"
);
measurements
->
n0_subband_power
[
aarx
][
rb
]
+=
signal_energy_nodc
(
ul_ch
,
len
);
measurements
->
n0_subband_power
[
aarx
][
rb
]
+=
signal_energy_nodc
(
ul_ch
,
len
);
}
}
// symbol
measurements
->
n0_subband_power
[
aarx
][
rb
]
/=
(
14
-
(
frame_parms
->
Ncp
<<
1
));
measurements
->
n0_subband_power_dB
[
aarx
][
rb
]
=
dB_fixed
(
measurements
->
n0_subband_power
[
aarx
][
rb
]);
n0_power_tot
+=
measurements
->
n0_subband_power
[
aarx
][
rb
];
}
}
//antenna
n0_power_tot
/=
frame_parms
->
nb_antennas_rx
;
n0_power_tot2
+=
n0_power_tot
;
measurements
->
n0_subband_power_tot_dB
[
rb
]
=
dB_fixed
(
n0_power_tot
);
measurements
->
n0_subband_power_tot_dBm
[
rb
]
=
measurements
->
n0_subband_power_tot_dB
[
rb
]
-
eNB
->
rx_total_gain_dB
-
dB_fixed
(
frame_parms
->
N_RB_UL
);
}
}
}
//rb not used in subframe
}
//rb
if
(
nb_rb
>
0
)
measurements
->
n0_subband_power_avg_dB
=
dB_fixed
(
n0_power_tot2
/
nb_rb
);
}
...
...
openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
View file @
d06018d1
...
...
@@ -42,10 +42,10 @@ extern int16_t *ul_ref_sigs_rx[30][2][34];
int32_t
lte_ul_channel_estimation
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
L1_rxtx_proc_t
*
proc
,
LTE_eNB_ULSCH_t
*
ulsch
,
int32_t
**
ul_ch_estimates
,
int32_t
**
ul_ch_estimates_time
,
int32_t
**
rxdataF_ext
,
LTE_eNB_ULSCH_t
*
ulsch
,
int32_t
**
ul_ch_estimates
,
int32_t
**
ul_ch_estimates_time
,
int32_t
**
rxdataF_ext
,
module_id_t
UE_id
,
unsigned
char
l
,
unsigned
char
Ns
)
{
...
...
openair1/PHY/LTE_TRANSPORT/pucch.c
View file @
d06018d1
...
...
@@ -99,7 +99,7 @@ void dump_uci_stats(FILE *fd,PHY_VARS_eNB *eNB,int frame) {
/* PUCCH format3 >> */
/* SubCarrier Demap */
uint16_t
pucchfmt3_subCarrierDeMapping
(
PHY_VARS_eNB
*
eNB
,
int16_t
SubCarrierDeMapData
[
NB_ANTENNAS_RX
][
14
][
12
][
2
],
int16_t
SubCarrierDeMapData
[
4
][
14
][
12
][
2
],
uint16_t
n3_pucch
)
{
LTE_eNB_COMMON
*
eNB_common_vars
=
&
eNB
->
common_vars
;
LTE_DL_FRAME_PARMS
*
frame_parms
=
&
eNB
->
frame_parms
;
...
...
@@ -149,8 +149,8 @@ uint16_t pucchfmt3_subCarrierDeMapping( PHY_VARS_eNB *eNB,
}
/* cyclic shift hopping remove */
uint16_t
pucchfmt3_Baseseq_csh_remove
(
int16_t
SubCarrierDeMapData
[
NB_ANTENNAS_RX
][
14
][
12
][
2
],
int16_t
CshData_fmt3
[
NB_ANTENNAS_RX
][
14
][
12
][
2
],
uint16_t
pucchfmt3_Baseseq_csh_remove
(
int16_t
SubCarrierDeMapData
[
4
][
14
][
12
][
2
],
int16_t
CshData_fmt3
[
4
][
14
][
12
][
2
],
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
subframe
,
uint8_t
ncs_cell
[
20
][
7
]
)
{
...
...
@@ -200,9 +200,9 @@ const int16_t TBL_3_SF5_GEN_N_DASH_NS[MAXROW_TBL_SF5_OS_IDX] = {0,3,6,8,10};
const
int16_t
TBL_3_SF4_GEN_N_DASH_NS
[
MAXROW_TBL_SF4_OS_IDX
]
=
{
0
,
3
,
6
,
9
};
/* Channel estimation */
uint16_t
pucchfmt3_ChannelEstimation
(
int16_t
SubCarrierDeMapData
[
NB_ANTENNAS_RX
][
14
][
12
][
2
],
double
delta_theta
[
NB_ANTENNAS_RX
][
12
],
int16_t
ChestValue
[
NB_ANTENNAS_RX
][
2
][
12
][
2
],
uint16_t
pucchfmt3_ChannelEstimation
(
int16_t
SubCarrierDeMapData
[
4
][
14
][
12
][
2
],
double
delta_theta
[
4
][
12
],
int16_t
ChestValue
[
4
][
2
][
12
][
2
],
int16_t
*
Interpw
,
uint8_t
subframe
,
uint8_t
shortened_format
,
...
...
@@ -214,12 +214,12 @@ uint16_t pucchfmt3_ChannelEstimation( int16_t SubCarrierDeMapData[NB_ANTENNAS_RX
int16_t
np
,
np_n
,
ip_ind
=-
1
;
//int16_t npucch_sf;
int16_t
calctmp
[
2
];
int16_t
BsCshData
[
NB_ANTENNAS_RX
][
D_NSYM1SF
][
D_NSC1RB
][
2
];
//int16_t delta_theta_calctmp[
NB_ANTENNAS_RX][4][D_NSC1RB][2], delta_theta_comp[NB_ANTENNAS_RX
][D_NSC1RB][2];
int16_t
delta_theta_comp
[
NB_ANTENNAS_RX
][
D_NSC1RB
][
2
];
int16_t
CsData_allavg
[
NB_ANTENNAS_RX
][
14
][
2
];
int16_t
CsData_temp
[
NB_ANTENNAS_RX
][
D_NSYM1SF
][
D_NSC1RB
][
2
];
int32_t
IP_CsData_allsfavg
[
NB_ANTENNAS_RX
][
14
][
4
][
2
];
int16_t
BsCshData
[
4
][
D_NSYM1SF
][
D_NSC1RB
][
2
];
//int16_t delta_theta_calctmp[
4][4][D_NSC1RB][2], delta_theta_comp[4
][D_NSC1RB][2];
int16_t
delta_theta_comp
[
4
][
D_NSC1RB
][
2
];
int16_t
CsData_allavg
[
4
][
14
][
2
];
int16_t
CsData_temp
[
4
][
D_NSYM1SF
][
D_NSC1RB
][
2
];
int32_t
IP_CsData_allsfavg
[
4
][
14
][
4
][
2
];
int32_t
IP_allavg
[
D_NPUCCH_SF5
];
//int16_t temp_ch[2];
int16_t
m
[
NUMBER_OF_UE_MAX
],
m_self
=
0
,
same_m_number
;
...
...
@@ -463,9 +463,9 @@ uint16_t pucchfmt3_ChannelEstimation( int16_t SubCarrierDeMapData[NB_ANTENNAS_RX
}
/* Channel Equalization */
uint16_t
pucchfmt3_Equalization
(
int16_t
CshData_fmt3
[
NB_ANTENNAS_RX
][
14
][
12
][
2
],
int16_t
ChdetAfterValue_fmt3
[
NB_ANTENNAS_RX
][
14
][
12
][
2
],
int16_t
ChestValue
[
NB_ANTENNAS_RX
][
2
][
12
][
2
],
uint16_t
pucchfmt3_Equalization
(
int16_t
CshData_fmt3
[
4
][
14
][
12
][
2
],
int16_t
ChdetAfterValue_fmt3
[
4
][
14
][
12
][
2
],
int16_t
ChestValue
[
4
][
2
][
12
][
2
],
LTE_DL_FRAME_PARMS
*
frame_parms
)
{
int16_t
aa
,
sltNo
,
symNo
,
k
;
...
...
@@ -488,9 +488,9 @@ uint16_t pucchfmt3_Equalization( int16_t CshData_fmt3[NB_ANTENNAS_RX][14][12][2]
}
/* Frequency deviation remove AFC */
uint16_t
pucchfmt3_FrqDevRemove
(
int16_t
ChdetAfterValue_fmt3
[
NB_ANTENNAS_RX
][
14
][
12
][
2
],
double
delta_theta
[
NB_ANTENNAS_RX
][
12
],
int16_t
RemoveFrqDev_fmt3
[
NB_ANTENNAS_RX
][
2
][
5
][
12
][
2
],
uint16_t
pucchfmt3_FrqDevRemove
(
int16_t
ChdetAfterValue_fmt3
[
4
][
14
][
12
][
2
],
double
delta_theta
[
4
][
12
],
int16_t
RemoveFrqDev_fmt3
[
4
][
2
][
5
][
12
][
2
],
LTE_DL_FRAME_PARMS
*
frame_parms
)
{
int16_t
aa
,
sltNo
,
symNo1slt
,
k
,
n
;
double
calctmp
[
2
];
...
...
@@ -540,8 +540,8 @@ const int16_t TBL_3_SF4[MAXROW_TBL_SF4_fmt3][MAXCLM_TBL_SF4][2] = {
};
/* orthogonal sequence remove */
uint16_t
pucchfmt3_OrthSeqRemove
(
int16_t
RemoveFrqDev_fmt3
[
NB_ANTENNAS_RX
][
2
][
5
][
12
][
2
],
int16_t
Fmt3xDataRmvOrth
[
NB_ANTENNAS_RX
][
2
][
5
][
12
][
2
],
uint16_t
pucchfmt3_OrthSeqRemove
(
int16_t
RemoveFrqDev_fmt3
[
4
][
2
][
5
][
12
][
2
],
int16_t
Fmt3xDataRmvOrth
[
4
][
2
][
5
][
12
][
2
],
uint8_t
shortened_format
,
uint16_t
n3_pucch
,
LTE_DL_FRAME_PARMS
*
frame_parms
)
{
...
...
@@ -587,7 +587,7 @@ uint16_t pucchfmt3_OrthSeqRemove( int16_t RemoveFrqDev_fmt3[NB_ANTENNAS_RX][2][5
}
/* averaging antenna */
uint16_t
pucchfmt3_AvgAnt
(
int16_t
Fmt3xDataRmvOrth
[
NB_ANTENNAS_RX
][
2
][
5
][
12
][
2
],
uint16_t
pucchfmt3_AvgAnt
(
int16_t
Fmt3xDataRmvOrth
[
4
][
2
][
5
][
12
][
2
],
int16_t
Fmt3xDataAvgAnt
[
2
][
5
][
12
][
2
],
uint8_t
shortened_format
,
LTE_DL_FRAME_PARMS
*
frame_parms
)
{
...
...
@@ -907,7 +907,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
uint32_t
u
,
v
,
n
,
aa
;
uint32_t
z
[
12
*
14
];
int16_t
*
zptr
;
int16_t
rxcomp
[
NB_ANTENNAS_RX
][
2
*
12
*
14
];
int16_t
rxcomp
[
4
][
2
*
12
*
14
];
uint8_t
ns
,
N_UL_symb
,
nsymb
,
n_oc
,
n_oc0
,
n_oc1
;
uint8_t
c
=
(
frame_parms
->
Ncp
==
0
)
?
3
:
2
;
int16_t
nprime
,
nprime0
,
nprime1
;
...
...
@@ -918,12 +918,12 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
int16_t
tmp_re
,
tmp_im
,
W_re
=
0
,
W_im
=
0
;
int16_t
*
rxptr
;
uint32_t
symbol_offset
;
int16_t
stat0_ref_re
[
NB_ANTENNAS_RX
],
stat0_ref_im
[
NB_ANTENNAS_RX
],
stat1_ref_re
[
NB_ANTENNAS_RX
],
stat1_ref_im
[
NB_ANTENNAS_RX
],
*
cfo
;
int16_t
chest0_re
[
NB_ANTENNAS_RX
][
12
],
chest0_im
[
NB_ANTENNAS_RX
][
12
];
int16_t
chest1_re
[
NB_ANTENNAS_RX
][
12
],
chest1_im
[
NB_ANTENNAS_RX
][
12
];
int16_t
stat0_ref_re
[
4
],
stat0_ref_im
[
4
],
stat1_ref_re
[
4
],
stat1_ref_im
[
4
],
*
cfo
;
int16_t
chest0_re
[
4
][
12
],
chest0_im
[
4
][
12
];
int16_t
chest1_re
[
4
][
12
],
chest1_im
[
4
][
12
];
int32_t
chest_mag
;
int32_t
stat0_re
[
NB_ANTENNAS_RX
],
stat1_re
[
NB_ANTENNAS_RX
],
stat0_im
[
NB_ANTENNAS_RX
],
stat1_im
[
NB_ANTENNAS_RX
];
uint32_t
stat0
[
NB_ANTENNAS_RX
],
stat1
[
NB_ANTENNAS_RX
],
stat_max
=
0
,
stat0_max
[
NB_ANTENNAS_RX
],
stat1_max
[
NB_ANTENNAS_RX
];
int32_t
stat0_re
[
4
],
stat1_re
[
4
],
stat0_im
[
4
],
stat1_im
[
4
];
uint32_t
stat0
[
4
],
stat1
[
4
],
stat_max
=
0
,
stat0_max
[
4
],
stat1_max
[
4
];
uint8_t
log2_maxh
;
uint8_t
deltaPUCCH_Shift
=
frame_parms
->
pucch_config_common
.
deltaPUCCH_Shift
;
uint8_t
NRB2
=
frame_parms
->
pucch_config_common
.
nRB_CQI
;
...
...
@@ -936,13 +936,13 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
int
chL
;
/* PUCCH format3 >> */
uint16_t
Ret
=
0
;
int16_t
SubCarrierDeMapData
[
NB_ANTENNAS_RX
][
14
][
12
][
2
];
//[Antenna][Symbol][Subcarrier][Complex]
int16_t
CshData_fmt3
[
NB_ANTENNAS_RX
][
14
][
12
][
2
];
//[Antenna][Symbol][Subcarrier][Complex]
double
delta_theta
[
NB_ANTENNAS_RX
][
12
];
//[Antenna][Subcarrier][Complex]
int16_t
ChestValue
[
NB_ANTENNAS_RX
][
2
][
12
][
2
];
//[Antenna][Slot][Subcarrier][Complex]
int16_t
ChdetAfterValue_fmt3
[
NB_ANTENNAS_RX
][
14
][
12
][
2
];
//[Antenna][Symbol][Subcarrier][Complex]
int16_t
RemoveFrqDev_fmt3
[
NB_ANTENNAS_RX
][
2
][
5
][
12
][
2
];
//[Antenna][Slot][PUCCH_Symbol][Subcarrier][Complex]
int16_t
Fmt3xDataRmvOrth
[
NB_ANTENNAS_RX
][
2
][
5
][
12
][
2
];
//[Antenna][Slot][PUCCH_Symbol][Subcarrier][Complex]
int16_t
SubCarrierDeMapData
[
4
][
14
][
12
][
2
];
//[Antenna][Symbol][Subcarrier][Complex]
int16_t
CshData_fmt3
[
4
][
14
][
12
][
2
];
//[Antenna][Symbol][Subcarrier][Complex]
double
delta_theta
[
4
][
12
];
//[Antenna][Subcarrier][Complex]
int16_t
ChestValue
[
4
][
2
][
12
][
2
];
//[Antenna][Slot][Subcarrier][Complex]
int16_t
ChdetAfterValue_fmt3
[
4
][
14
][
12
][
2
];
//[Antenna][Symbol][Subcarrier][Complex]
int16_t
RemoveFrqDev_fmt3
[
4
][
2
][
5
][
12
][
2
];
//[Antenna][Slot][PUCCH_Symbol][Subcarrier][Complex]
int16_t
Fmt3xDataRmvOrth
[
4
][
2
][
5
][
12
][
2
];
//[Antenna][Slot][PUCCH_Symbol][Subcarrier][Complex]
int16_t
Fmt3xDataAvgAnt
[
2
][
5
][
12
][
2
];
//[Slot][PUCCH_Symbol][Subcarrier][Complex]
int16_t
Fmt3xDataAvgSym
[
2
][
12
][
2
];
//[Slot][Subcarrier][Complex]
int16_t
IFFTOutData_Fmt3
[
2
][
12
][
2
];
//[Slot][Subcarrier][Complex]
...
...
openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c
View file @
d06018d1
This diff is collapsed.
Click to expand it.
openair1/SIMULATION/LTE_PHY/ulsim.c
View file @
d06018d1
...
...
@@ -344,7 +344,6 @@ int main(int argc, char **argv) {
int
UE_id
=
0
;
static
int
nb_rb
=
25
,
first_rb
=
0
,
mcs
=
0
,
round
=
0
;
//unsigned char l;
static
int
awgn_flag
=
0
;
SCM_t
channel_model
=
Rice1
;
unsigned
char
*
input_buffer
=
0
,
harq_pid
;
unsigned
short
input_buffer_length
;
...
...
@@ -1088,14 +1087,12 @@ int main(int argc, char **argv) {
}
}
if
(
awgn_flag
==
0
)
{
if
(
UE2eNB
->
max_Doppler
==
0
)
{
multipath_channel
(
UE2eNB
,
s_re
,
s_im
,
r_re
,
r_im
,
eNB
->
frame_parms
.
samples_per_tti
,
hold_channel
,
0
);
}
else
{
multipath_tv_channel
(
UE2eNB
,
s_re
,
s_im
,
r_re
,
r_im
,
2
*
eNB
->
frame_parms
.
samples_per_tti
,
hold_channel
);
}
if
(
UE2eNB
->
max_Doppler
==
0
)
{
multipath_channel
(
UE2eNB
,
s_re
,
s_im
,
r_re
,
r_im
,
eNB
->
frame_parms
.
samples_per_tti
,
hold_channel
,
0
);
}
else
{
multipath_tv_channel
(
UE2eNB
,
s_re
,
s_im
,
r_re
,
r_im
,
2
*
eNB
->
frame_parms
.
samples_per_tti
,
hold_channel
);
}
if
(
abstx
)
{
...
...
openair1/SIMULATION/TOOLS/multipath_channel.c
View file @
d06018d1
...
...
@@ -39,13 +39,13 @@ uint8_t multipath_channel_nosigconv(channel_desc_t *desc)
//#define CHANNEL_SSE
#ifdef CHANNEL_SSE
void
multipath_channel
(
channel_desc_t
*
desc
,
double
tx_sig_re
[
2
][
30720
*
2
],
double
tx_sig_im
[
2
][
30720
*
2
],
double
rx_sig_re
[
2
][
30720
*
2
],
double
rx_sig_im
[
2
][
30720
*
2
],
double
tx_sig_re
[
NB_ANTENNAS_TX
][
30720
*
2
],
double
tx_sig_im
[
NB_ANTENANS_TX
][
30720
*
2
],
double
rx_sig_re
[
NB_ANTENNAS_RX
][
30720
*
2
],
double
rx_sig_im
[
NB_ANTENNAS_RX
][
30720
*
2
],
uint32_t
length
,
uint8_t
keep_channel
,
int
log_channel
)
int
log_channel
)
{
int
i
,
ii
,
j
,
l
;
...
...
@@ -146,13 +146,13 @@ void multipath_channel(channel_desc_t *desc,
#else
void
multipath_channel
(
channel_desc_t
*
desc
,
double
*
tx_sig_re
[
2
],
double
*
tx_sig_im
[
2
],
double
*
rx_sig_re
[
2
],
double
*
rx_sig_im
[
2
],
double
*
tx_sig_re
[
NB_ANTENNAS_TX
],
double
*
tx_sig_im
[
NB_ANTENNAS_TX
],
double
*
rx_sig_re
[
NB_ANTENNAS_RX
],
double
*
rx_sig_im
[
NB_ANTENNAS_RX
],
uint32_t
length
,
uint8_t
keep_channel
,
int
log_channel
)
int
log_channel
)
{
int
i
,
ii
,
j
,
l
;
...
...
@@ -198,21 +198,22 @@ void multipath_channel(channel_desc_t *desc,
rx_tmp
.
x
+=
(
tx
.
x
*
desc
->
ch
[
ii
+
(
j
*
desc
->
nb_rx
)][
l
].
x
)
-
(
tx
.
y
*
desc
->
ch
[
ii
+
(
j
*
desc
->
nb_rx
)][
l
].
y
);
rx_tmp
.
y
+=
(
tx
.
y
*
desc
->
ch
[
ii
+
(
j
*
desc
->
nb_rx
)][
l
].
x
)
+
(
tx
.
x
*
desc
->
ch
[
ii
+
(
j
*
desc
->
nb_rx
)][
l
].
y
);
if
(
i
==
0
&&
log_channel
==
1
)
{
printf
(
"channel[%d][%d][%d] = %f dB (%e,%e)
\n
"
,
ii
,
j
,
l
,
10
*
log10
(
pow
(
desc
->
ch
[
ii
+
(
j
*
desc
->
nb_rx
)][
l
].
x
,
2
.
0
)
+
pow
(
desc
->
ch
[
ii
+
(
j
*
desc
->
nb_rx
)][
l
].
y
,
2
.
0
)),
desc
->
ch
[
ii
+
(
j
*
desc
->
nb_rx
)][
l
].
x
,
desc
->
ch
[
ii
+
(
j
*
desc
->
nb_rx
)][
l
].
y
);
}
if
(
i
==
0
&&
log_channel
==
1
)
{
printf
(
"channel[%d][%d][%d] = %f dB (%e,%e)
\n
"
,
ii
,
j
,
l
,
10
*
log10
(
pow
(
desc
->
ch
[
ii
+
(
j
*
desc
->
nb_rx
)][
l
].
x
,
2
.
0
)
+
pow
(
desc
->
ch
[
ii
+
(
j
*
desc
->
nb_rx
)][
l
].
y
,
2
.
0
)),
desc
->
ch
[
ii
+
(
j
*
desc
->
nb_rx
)][
l
].
x
,
desc
->
ch
[
ii
+
(
j
*
desc
->
nb_rx
)][
l
].
y
);
}
}
//l
}
// j
rx_sig_re
[
ii
][
i
+
dd
]
=
rx_tmp
.
x
*
path_loss
;
rx_sig_im
[
ii
][
i
+
dd
]
=
rx_tmp
.
y
*
path_loss
;
/* if ((ii==0)&&((i%32)==0)
) {
printf("%p %p %f,%f => %e,%e\n"
,rx_sig_re[ii],rx_sig_im[ii],rx_tmp.x,rx_tmp.y,rx_sig_re[ii][i-dd],rx_sig_im[ii][i-dd]);
}*/
#ifdef DEBUG_CHANNEL
if
((
i
%
32
)
==
0
)
{
printf
(
"rx aa %d: %p %p %f,%f => %e,%e
\n
"
,
ii
,
rx_sig_re
[
ii
],
rx_sig_im
[
ii
],
rx_tmp
.
x
,
rx_tmp
.
y
,
rx_sig_re
[
ii
][
i
-
dd
],
rx_sig_im
[
ii
][
i
-
dd
]);
}
#endif
//rx_sig_re[ii][i] = sqrt(.5)*(tx_sig_re[0][i] + tx_sig_re[1][i]);
//rx_sig_im[ii][i] = sqrt(.5)*(tx_sig_im[0][i] + tx_sig_im[1][i]);
...
...
openair1/SIMULATION/TOOLS/sim.h
View file @
d06018d1
...
...
@@ -300,10 +300,10 @@ void set_channeldesc_owner(channel_desc_t *cdesc, channelmod_moduleid_t module_i
int
random_channel
(
channel_desc_t
*
desc
,
uint8_t
abstraction_flag
);
/**\fn void multipath_channel(channel_desc_t *desc,
double tx_sig_re[
2
],
double tx_sig_im[
2
],
double rx_sig_re[
2
],
double rx_sig_im[
2
],
double tx_sig_re[
NB_ANTENNAS_TX
],
double tx_sig_im[
NB_ANTENANS_TX
],
double rx_sig_re[
NB_ANTENNAS_RX
],
double rx_sig_im[
NB_ANTENNAS_RX
],
uint32_t length,
uint8_t keep_channel,
int log_channel)
...
...
@@ -320,10 +320,10 @@ int random_channel(channel_desc_t *desc, uint8_t abstraction_flag);
*/
void
multipath_channel
(
channel_desc_t
*
desc
,
double
*
tx_sig_re
[
2
],
double
*
tx_sig_im
[
2
],
double
*
rx_sig_re
[
2
],
double
*
rx_sig_im
[
2
],
double
*
tx_sig_re
[
NB_ANTENNAS_TX
],
double
*
tx_sig_im
[
NB_ANTENNAS_TX
],
double
*
rx_sig_re
[
NB_ANTENNAS_RX
],
double
*
rx_sig_im
[
NB_ANTENNAS_RX
],
uint32_t
length
,
uint8_t
keep_channel
,
int
log_channel
);
...
...
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
View file @
d06018d1
...
...
@@ -624,14 +624,14 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp
#if defined(__x86_64) || defined(__i386__)
#ifdef __AVX2__
nsamps2
=
(
nsamps
+
7
)
>>
3
;
__m256i
buff_tmp
[
2
][
nsamps2
];
__m256i
buff_tmp
[
4
][
nsamps2
];
#else
nsamps2
=
(
nsamps
+
3
)
>>
2
;
__m128i
buff_tmp
[
2
][
nsamps2
];
__m128i
buff_tmp
[
4
][
nsamps2
];
#endif
#elif defined(__arm__)
nsamps2
=
(
nsamps
+
3
)
>>
2
;
int16x8_t
buff_tmp
[
2
][
nsamps2
];
int16x8_t
buff_tmp
[
4
][
nsamps2
];
#endif
int
rxshift
;
...
...
@@ -1301,8 +1301,10 @@ extern "C" {
LOG_I
(
HW
,
"rx_max_num_samps %zu
\n
"
,
s
->
usrp
->
get_rx_stream
(
stream_args_rx
)
->
get_max_num_samps
());
for
(
int
i
=
0
;
i
<
openair0_cfg
[
0
].
rx_num_channels
;
i
++
)
for
(
int
i
=
0
;
i
<
openair0_cfg
[
0
].
rx_num_channels
;
i
++
)
{
LOG_I
(
HW
,
"setting rx channel %d
\n
"
,
i
);
stream_args_rx
.
channels
.
push_back
(
i
);
}
s
->
rx_stream
=
s
->
usrp
->
get_rx_stream
(
stream_args_rx
);
uhd
::
stream_args_t
stream_args_tx
(
"sc16"
,
"sc16"
);
...
...
targets/RT/USER/lte-enb.c
View file @
d06018d1
...
...
@@ -551,6 +551,8 @@ int wakeup_tx(PHY_VARS_eNB *eNB,
L1_rxtx_proc_t
*
L1_proc_tx
=
&
eNB
->
proc
.
L1_proc_tx
;
int
ret
;
LOG_D
(
PHY
,
"ENTERED wakeup_tx (IC %d)
\n
"
,
L1_proc_tx
->
instance_cnt
);
// check if subframe is a has TX else return
if
(
subframe_select
(
&
eNB
->
frame_parms
,
subframe_tx
)
==
SF_UL
)
return
0
;
AssertFatal
((
ret
=
pthread_mutex_lock
(
&
L1_proc_tx
->
mutex
))
==
0
,
"mutex_lock returns %d
\n
"
,
ret
);
LOG_D
(
PHY
,
"L1 RX %d.%d Waiting to wake up L1 TX %d.%d (IC L1TX %d)
\n
"
,
frame_rx
,
subframe_rx
,
frame_tx
,
subframe_tx
,
L1_proc_tx
->
instance_cnt
);
...
...
@@ -591,7 +593,10 @@ int wakeup_rxtx(PHY_VARS_eNB *eNB,
if
(
L1_proc
->
instance_cnt
==
0
)
{
// L1_thread is busy so abort the subframe
AssertFatal
((
ret
=
pthread_mutex_unlock
(
&
L1_proc
->
mutex
))
==
0
,
"mutex_unlock return %d
\n
"
,
ret
);
LOG_W
(
PHY
,
"L1_thread isn't ready in %d.%d, aborting RX processing
\n
"
,
ru_proc
->
frame_rx
,
ru_proc
->
tti_rx
);
AssertFatal
(
1
==
0
,
"L1_thread isn't ready in %d.%d (L1RX %d.%d), aborting RX, exiting
\n
"
,
ru_proc
->
frame_rx
,
ru_proc
->
tti_rx
,
L1_proc
->
frame_rx
,
L1_proc
->
subframe_rx
);
return
(
0
);
}
++
L1_proc
->
instance_cnt
;
...
...
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