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
lizhongxiao
OpenXG-RAN
Commits
a9e40033
Commit
a9e40033
authored
Aug 27, 2018
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lte-uesoftmodem compiles
parent
3367cc93
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
34 deletions
+34
-34
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-1
openair1/PHY/phy_extern_ue.h
openair1/PHY/phy_extern_ue.h
+2
-2
openair1/PHY/phy_vars_ue.h
openair1/PHY/phy_vars_ue.h
+2
-2
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+3
-3
targets/RT/USER/rfsim.c
targets/RT/USER/rfsim.c
+26
-26
No files found.
cmake_targets/CMakeLists.txt
View file @
a9e40033
...
...
@@ -1381,7 +1381,7 @@ endif ()
add_library
(
PHY_COMMON
${
PHY_SRC_COMMON
}
)
add_library
(
PHY
${
PHY_SRC
}
)
add_library
(
PHY_UE
${
PHY_SRC_UE
}
)
add_library
(
PHY_UE
${
PHY_SRC_UE
}
${
OPENAIR1_DIR
}
/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
${
OPENAIR1_DIR
}
/PHY/NR_REFSIG/nr_dmrs_rx.c
)
add_library
(
PHY_NR
${
PHY_NR_SRC
}
)
add_library
(
PHY_NR_UE
${
PHY_NR_UE_SRC
}
)
add_library
(
PHY_RU
${
PHY_SRC_RU
}
)
...
...
openair1/PHY/phy_extern_ue.h
View file @
a9e40033
...
...
@@ -100,8 +100,8 @@ extern double p_qam64[8];
extern
double
beta1_dlsch
[
6
][
MCS_COUNT
];
extern
double
beta2_dlsch
[
6
][
MCS_COUNT
];
extern
char
eNB_functions
[
6
][
20
];
extern
char
e
NB_timing
[
2
][
20
];
extern
char
NB_functions
[
7
][
20
];
extern
char
NB_timing
[
2
][
20
];
extern
char
ru_if_types
[
MAX_RU_IF_TYPES
][
20
];
extern
int16_t
unscrambling_lut
[
65536
*
16
];
...
...
openair1/PHY/phy_vars_ue.h
View file @
a9e40033
...
...
@@ -134,8 +134,8 @@ double beta2_dlsch[6][MCS_COUNT] = { {2.52163, 0.83231, 0.77472, 1.36536, 1.1682
#ifdef OCP_FRAMEWORK
#include <enums.h>
#else
char
eNB_functions
[
6
][
20
]
=
{
"eNodeB_3GPP"
,
"eNodeB_3GPP_BBU"
,
"NGFI_RAU_IF4p5"
,
"NGFI_RRU_IF5"
,
"NGFI_RRU_IF4p5"
,};
char
e
NB_timing
[
2
][
20
]
=
{
"synch_to_ext_device"
,
"synch_to_other"
};
char
NB_functions
[
7
][
20
]
=
{
"eNodeB_3GPP"
,
"eNodeB_3GPP_BBU"
,
"NGFI_RAU_IF4p5"
,
"NGFI_RRU_IF5"
,
"NGFI_RRU_IF4p5"
,};
char
NB_timing
[
2
][
20
]
=
{
"synch_to_ext_device"
,
"synch_to_other"
};
char
ru_if_types
[
MAX_RU_IF_TYPES
][
20
]
=
{
"local RF"
,
"IF5 RRU"
,
"IF5 Mobipass"
,
"IF4p5 RRU"
,
"IF1pp RRU"
};
#endif
...
...
targets/RT/USER/lte-ue.c
View file @
a9e40033
...
...
@@ -257,8 +257,8 @@ void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correcti
if
(
simL1flag
==
0
)
PHY_vars_UE_g
[
inst
][
0
]
=
init_ue_vars
(
fp0
,
inst
,
0
);
else
{
// needed for memcopy below. these are not used in the RU, but needed for UE
RC
.
ru
[
0
]
->
frame_parms
.
nb_antennas_rx
=
fp0
->
nb_antennas_rx
;
RC
.
ru
[
0
]
->
frame_parms
.
nb_antennas_tx
=
fp0
->
nb_antennas_tx
;
RC
.
ru
[
0
]
->
frame_parms
->
nb_antennas_rx
=
fp0
->
nb_antennas_rx
;
RC
.
ru
[
0
]
->
frame_parms
->
nb_antennas_tx
=
fp0
->
nb_antennas_tx
;
PHY_vars_UE_g
[
inst
][
0
]
=
init_ue_vars
(
&
RC
.
ru
[
0
]
->
frame_parms
,
inst
,
0
);
}
// turn off timing control loop in UE
...
...
@@ -2073,7 +2073,7 @@ int init_timer_thread(void) {
/* HACK: this function is needed to compile the UE
* fix it somehow
*/
int
8
_t
find_dlsch
(
uint16_t
rnti
,
PHY_VARS_eNB
*
eNB
,
find_type_t
type
)
int
16
_t
find_dlsch
(
uint16_t
rnti
,
PHY_VARS_eNB
*
eNB
,
find_type_t
type
)
{
printf
(
"you cannot read this
\n
"
);
abort
();
...
...
targets/RT/USER/rfsim.c
View file @
a9e40033
...
...
@@ -80,11 +80,11 @@ void wait_RUs(void)
// copy frame parameters from RU to UEs
for
(
i
=
0
;
i
<
NB_UE_INST
;
i
++
)
{
sim
.
current_UE_rx_timestamp
[
i
][
0
]
=
RC
.
ru
[
0
]
->
frame_parms
.
samples_per_tti
+
RC
.
ru
[
0
]
->
frame_parms
.
ofdm_symbol_size
+
RC
.
ru
[
0
]
->
frame_parms
.
nb_prefix_samples0
;
sim
.
current_UE_rx_timestamp
[
i
][
0
]
=
RC
.
ru
[
0
]
->
frame_parms
->
samples_per_tti
+
RC
.
ru
[
0
]
->
frame_parms
->
ofdm_symbol_size
+
RC
.
ru
[
0
]
->
frame_parms
->
nb_prefix_samples0
;
}
for
(
int
ru_id
=
0
;
ru_id
<
RC
.
nb_RU
;
ru_id
++
)
sim
.
current_ru_rx_timestamp
[
ru_id
][
0
]
=
RC
.
ru
[
ru_id
]
->
frame_parms
.
samples_per_tti
;
for
(
int
ru_id
=
0
;
ru_id
<
RC
.
nb_RU
;
ru_id
++
)
sim
.
current_ru_rx_timestamp
[
ru_id
][
0
]
=
RC
.
ru
[
ru_id
]
->
frame_parms
->
samples_per_tti
;
printf
(
"RUs are ready, let's go
\n
"
);
}
...
...
@@ -176,7 +176,7 @@ int ru_trx_read(openair0_device *device, openair0_timestamp *ptimestamp, void **
LOG_D
(
SIM
,
"RU_trx_read nsamps %d TS(%llu,%llu) => subframe %d
\n
"
,
nsamps
,
(
unsigned
long
long
)
sim
.
current_ru_rx_timestamp
[
ru_id
][
CC_id
],
(
unsigned
long
long
)
sim
.
last_ru_rx_timestamp
[
ru_id
][
CC_id
],
(
int
)((
*
ptimestamp
/
RC
.
ru
[
ru_id
]
->
frame_parms
.
samples_per_tti
)
%
10
));
(
int
)((
*
ptimestamp
/
RC
.
ru
[
ru_id
]
->
frame_parms
->
samples_per_tti
)
%
10
));
// if we're at a subframe boundary generate UL signals for this ru
while
(
sample_count
<
nsamps
)
{
...
...
@@ -188,8 +188,8 @@ int ru_trx_read(openair0_device *device, openair0_timestamp *ptimestamp, void **
subframe
=
(
sim
.
last_ru_rx_timestamp
[
ru_id
][
CC_id
]
/
RC
.
ru
[
ru_id
]
->
frame_parms
.
samples_per_tti
)
%
10
;
if
(
subframe_select
(
&
RC
.
ru
[
ru_id
]
->
frame_parms
,
subframe
)
!=
SF_DL
||
RC
.
ru
[
ru_id
]
->
frame_parms
.
frame_type
==
FDD
)
{
subframe
=
(
sim
.
last_ru_rx_timestamp
[
ru_id
][
CC_id
]
/
RC
.
ru
[
ru_id
]
->
frame_parms
->
samples_per_tti
)
%
10
;
if
(
subframe_select
(
&
RC
.
ru
[
ru_id
]
->
frame_parms
,
subframe
)
!=
SF_DL
||
RC
.
ru
[
ru_id
]
->
frame_parms
->
frame_type
==
FDD
)
{
LOG_D
(
SIM
,
"RU_trx_read generating UL subframe %d (Ts %llu, current TS %llu)
\n
"
,
subframe
,(
unsigned
long
long
)
*
ptimestamp
,
(
unsigned
long
long
)
sim
.
current_ru_rx_timestamp
[
ru_id
][
CC_id
]);
...
...
@@ -197,14 +197,14 @@ int ru_trx_read(openair0_device *device, openair0_timestamp *ptimestamp, void **
do_UL_sig
(
&
sim
,
subframe
,
0
,
// abstraction_flag
&
RC
.
ru
[
ru_id
]
->
frame_parms
,
RC
.
ru
[
ru_id
]
->
frame_parms
,
0
,
// frame is only used for abstraction
ru_id
,
CC_id
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_SIM_DO_UL_SIGNAL
,
0
);
}
sim
.
last_ru_rx_timestamp
[
ru_id
][
CC_id
]
+=
RC
.
ru
[
ru_id
]
->
frame_parms
.
samples_per_tti
;
sample_count
+=
RC
.
ru
[
ru_id
]
->
frame_parms
.
samples_per_tti
;
sim
.
last_ru_rx_timestamp
[
ru_id
][
CC_id
]
+=
RC
.
ru
[
ru_id
]
->
frame_parms
->
samples_per_tti
;
sample_count
+=
RC
.
ru
[
ru_id
]
->
frame_parms
->
samples_per_tti
;
}
...
...
@@ -300,7 +300,7 @@ int ru_trx_write(openair0_device *device,openair0_timestamp timestamp, void **bu
int
ru_id
=
device
->
Mod_id
;
LTE_DL_FRAME_PARMS
*
frame_parms
=
&
RC
.
ru
[
ru_id
]
->
frame_parms
;
LTE_DL_FRAME_PARMS
*
frame_parms
=
RC
.
ru
[
ru_id
]
->
frame_parms
;
pthread_mutex_lock
(
&
sim
.
subframe_mutex
);
LOG_D
(
SIM
,
"[TXPATH] ru_trx_write: RU %d mask %d
\n
"
,
ru_id
,
sim
.
subframe_ru_mask
);
...
...
@@ -391,13 +391,13 @@ void init_ocm(double snr_dB,double sinr_dB)
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
LOG_I
(
PHY
,
"Initializing channel descriptors (RU %d, UE %d) for N_RB_DL %d
\n
"
,
ru_id
,
UE_id
,
RC
.
ru
[
ru_id
]
->
frame_parms
.
N_RB_DL
);
RC
.
ru
[
ru_id
]
->
frame_parms
->
N_RB_DL
);
sim
.
RU2UE
[
ru_id
][
UE_id
][
CC_id
]
=
new_channel_desc_scm
(
RC
.
ru
[
ru_id
]
->
nb_tx
,
PHY_vars_UE_g
[
UE_id
][
CC_id
]
->
frame_parms
.
nb_antennas_rx
,
AWGN
,
N_RB2sampling_rate
(
RC
.
ru
[
ru_id
]
->
frame_parms
.
N_RB_DL
),
N_RB2channel_bandwidth
(
RC
.
ru
[
ru_id
]
->
frame_parms
.
N_RB_DL
),
N_RB2sampling_rate
(
RC
.
ru
[
ru_id
]
->
frame_parms
->
N_RB_DL
),
N_RB2channel_bandwidth
(
RC
.
ru
[
ru_id
]
->
frame_parms
->
N_RB_DL
),
0
.
0
,
0
,
0
);
...
...
@@ -409,8 +409,8 @@ void init_ocm(double snr_dB,double sinr_dB)
new_channel_desc_scm
(
PHY_vars_UE_g
[
UE_id
][
CC_id
]
->
frame_parms
.
nb_antennas_tx
,
RC
.
ru
[
ru_id
]
->
nb_rx
,
AWGN
,
N_RB2sampling_rate
(
RC
.
ru
[
ru_id
]
->
frame_parms
.
N_RB_UL
),
N_RB2channel_bandwidth
(
RC
.
ru
[
ru_id
]
->
frame_parms
.
N_RB_UL
),
N_RB2sampling_rate
(
RC
.
ru
[
ru_id
]
->
frame_parms
->
N_RB_UL
),
N_RB2channel_bandwidth
(
RC
.
ru
[
ru_id
]
->
frame_parms
->
N_RB_UL
),
0
.
0
,
0
,
0
);
...
...
@@ -424,16 +424,16 @@ void init_ocm(double snr_dB,double sinr_dB)
AssertFatal
(
sim
.
UE2RU
[
UE_id
][
ru_id
][
CC_id
]
!=
NULL
,
"UE2RU[%d][%d][%d] is null
\n
"
,
UE_id
,
ru_id
,
CC_id
);
//pathloss: -132.24 dBm/15kHz RE + target SNR - eNB TX power per RE
if
(
ru_id
==
(
UE_id
%
RC
.
nb_RU
))
{
sim
.
RU2UE
[
ru_id
][
UE_id
][
CC_id
]
->
path_loss_dB
=
-
132
.
24
+
snr_dB
-
RC
.
ru
[
ru_id
]
->
frame_parms
.
pdsch_config_common
.
referenceSignalPower
;
sim
.
UE2RU
[
UE_id
][
ru_id
][
CC_id
]
->
path_loss_dB
=
-
132
.
24
+
snr_dB
-
RC
.
ru
[
ru_id
]
->
frame_parms
.
pdsch_config_common
.
referenceSignalPower
;
sim
.
RU2UE
[
ru_id
][
UE_id
][
CC_id
]
->
path_loss_dB
=
-
132
.
24
+
snr_dB
-
RC
.
ru
[
ru_id
]
->
frame_parms
->
pdsch_config_common
.
referenceSignalPower
;
sim
.
UE2RU
[
UE_id
][
ru_id
][
CC_id
]
->
path_loss_dB
=
-
132
.
24
+
snr_dB
-
RC
.
ru
[
ru_id
]
->
frame_parms
->
pdsch_config_common
.
referenceSignalPower
;
}
else
{
sim
.
RU2UE
[
ru_id
][
UE_id
][
CC_id
]
->
path_loss_dB
=
-
132
.
24
+
sinr_dB
-
RC
.
ru
[
ru_id
]
->
frame_parms
.
pdsch_config_common
.
referenceSignalPower
;
sim
.
UE2RU
[
UE_id
][
ru_id
][
CC_id
]
->
path_loss_dB
=
-
132
.
24
+
sinr_dB
-
RC
.
ru
[
ru_id
]
->
frame_parms
.
pdsch_config_common
.
referenceSignalPower
;
sim
.
RU2UE
[
ru_id
][
UE_id
][
CC_id
]
->
path_loss_dB
=
-
132
.
24
+
sinr_dB
-
RC
.
ru
[
ru_id
]
->
frame_parms
->
pdsch_config_common
.
referenceSignalPower
;
sim
.
UE2RU
[
UE_id
][
ru_id
][
CC_id
]
->
path_loss_dB
=
-
132
.
24
+
sinr_dB
-
RC
.
ru
[
ru_id
]
->
frame_parms
->
pdsch_config_common
.
referenceSignalPower
;
}
LOG_I
(
OCM
,
"Path loss from eNB %d to UE %d (CCid %d)=> %f dB (eNB TX %d, SNR %f)
\n
"
,
ru_id
,
UE_id
,
CC_id
,
sim
.
RU2UE
[
ru_id
][
UE_id
][
CC_id
]
->
path_loss_dB
,
RC
.
ru
[
ru_id
]
->
frame_parms
.
pdsch_config_common
.
referenceSignalPower
,
snr_dB
);
RC
.
ru
[
ru_id
]
->
frame_parms
->
pdsch_config_common
.
referenceSignalPower
,
snr_dB
);
}
...
...
@@ -456,16 +456,16 @@ void update_ocm(double snr_dB,double sinr_dB)
AssertFatal
(
sim
.
UE2RU
[
UE_id
][
ru_id
][
CC_id
]
!=
NULL
,
"UE2RU[%d][%d][%d] is null
\n
"
,
UE_id
,
ru_id
,
CC_id
);
//pathloss: -132.24 dBm/15kHz RE + target SNR - eNB TX power per RE
if
(
ru_id
==
(
UE_id
%
RC
.
nb_RU
))
{
sim
.
RU2UE
[
ru_id
][
UE_id
][
CC_id
]
->
path_loss_dB
=
-
132
.
24
+
snr_dB
-
RC
.
ru
[
ru_id
]
->
frame_parms
.
pdsch_config_common
.
referenceSignalPower
;
sim
.
UE2RU
[
UE_id
][
ru_id
][
CC_id
]
->
path_loss_dB
=
-
132
.
24
+
snr_dB
-
RC
.
ru
[
ru_id
]
->
frame_parms
.
pdsch_config_common
.
referenceSignalPower
;
sim
.
RU2UE
[
ru_id
][
UE_id
][
CC_id
]
->
path_loss_dB
=
-
132
.
24
+
snr_dB
-
RC
.
ru
[
ru_id
]
->
frame_parms
->
pdsch_config_common
.
referenceSignalPower
;
sim
.
UE2RU
[
UE_id
][
ru_id
][
CC_id
]
->
path_loss_dB
=
-
132
.
24
+
snr_dB
-
RC
.
ru
[
ru_id
]
->
frame_parms
->
pdsch_config_common
.
referenceSignalPower
;
}
else
{
sim
.
RU2UE
[
ru_id
][
UE_id
][
CC_id
]
->
path_loss_dB
=
-
132
.
24
+
sinr_dB
-
RC
.
ru
[
ru_id
]
->
frame_parms
.
pdsch_config_common
.
referenceSignalPower
;
sim
.
UE2RU
[
UE_id
][
ru_id
][
CC_id
]
->
path_loss_dB
=
-
132
.
24
+
sinr_dB
-
RC
.
ru
[
ru_id
]
->
frame_parms
.
pdsch_config_common
.
referenceSignalPower
;
sim
.
RU2UE
[
ru_id
][
UE_id
][
CC_id
]
->
path_loss_dB
=
-
132
.
24
+
sinr_dB
-
RC
.
ru
[
ru_id
]
->
frame_parms
->
pdsch_config_common
.
referenceSignalPower
;
sim
.
UE2RU
[
UE_id
][
ru_id
][
CC_id
]
->
path_loss_dB
=
-
132
.
24
+
sinr_dB
-
RC
.
ru
[
ru_id
]
->
frame_parms
->
pdsch_config_common
.
referenceSignalPower
;
}
LOG_D
(
OCM
,
"Path loss from eNB %d to UE %d (CCid %d)=> %f dB (eNB TX %d, SNR %f)
\n
"
,
ru_id
,
UE_id
,
CC_id
,
sim
.
RU2UE
[
ru_id
][
UE_id
][
CC_id
]
->
path_loss_dB
,
RC
.
ru
[
ru_id
]
->
frame_parms
.
pdsch_config_common
.
referenceSignalPower
,
snr_dB
);
RC
.
ru
[
ru_id
]
->
frame_parms
->
pdsch_config_common
.
referenceSignalPower
,
snr_dB
);
}
}
...
...
@@ -509,7 +509,7 @@ void *rfsim_top(void *n_frames) {
pthread_mutex_lock
(
&
sim
.
subframe_mutex
);
int
subframe_ru_mask_local
=
(
subframe_select
(
&
RC
.
ru
[
0
]
->
frame_parms
,(
sf
+
4
)
%
10
)
!=
SF_UL
)
?
sim
.
subframe_ru_mask
:
((
1
<<
RC
.
nb_RU
)
-
1
);
int
subframe_UE_mask_local
=
(
RC
.
ru
[
0
]
->
frame_parms
.
frame_type
==
FDD
||
subframe_select
(
&
RC
.
ru
[
0
]
->
frame_parms
,(
sf
+
4
)
%
10
)
!=
SF_DL
)
?
sim
.
subframe_UE_mask
:
((
1
<<
NB_UE_INST
)
-
1
);
int
subframe_UE_mask_local
=
(
RC
.
ru
[
0
]
->
frame_parms
->
frame_type
==
FDD
||
subframe_select
(
&
RC
.
ru
[
0
]
->
frame_parms
,(
sf
+
4
)
%
10
)
!=
SF_DL
)
?
sim
.
subframe_UE_mask
:
((
1
<<
NB_UE_INST
)
-
1
);
pthread_mutex_unlock
(
&
sim
.
subframe_mutex
);
LOG_D
(
SIM
,
"Frame %d, Subframe %d, NB_RU %d, NB_UE %d: Checking masks %x,%x
\n
"
,
frame
,
sf
,
RC
.
nb_RU
,
NB_UE_INST
,
subframe_ru_mask_local
,
subframe_UE_mask_local
);
if
((
subframe_ru_mask_local
==
((
1
<<
RC
.
nb_RU
)
-
1
))
&&
...
...
@@ -526,7 +526,7 @@ void *rfsim_top(void *n_frames) {
// increment timestamps
for
(
int
ru_id
=
0
;
ru_id
<
RC
.
nb_RU
;
ru_id
++
)
{
sim
.
current_ru_rx_timestamp
[
ru_id
][
CC_id
]
+=
RC
.
ru
[
ru_id
]
->
frame_parms
.
samples_per_tti
;
sim
.
current_ru_rx_timestamp
[
ru_id
][
CC_id
]
+=
RC
.
ru
[
ru_id
]
->
frame_parms
->
samples_per_tti
;
LOG_D
(
SIM
,
"RU %d/%d: TS %"
PRIi64
"
\n
"
,
ru_id
,
CC_id
,
sim
.
current_ru_rx_timestamp
[
ru_id
][
CC_id
]);
}
for
(
int
UE_inst
=
0
;
UE_inst
<
NB_UE_INST
;
UE_inst
++
)
{
...
...
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