Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
Michael Black
OpenXG UE
Commits
5378c5ca
Commit
5378c5ca
authored
Oct 23, 2017
by
Wang Tsu-Han
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added parallelization of fep and encoding
added numerology paramter
parent
8896bb42
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
214 additions
and
62 deletions
+214
-62
cmake_targets/build_oai
cmake_targets/build_oai
+0
-2
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
+58
-0
openair1/PHY/LTE_TRANSPORT/proto.h
openair1/PHY/LTE_TRANSPORT/proto.h
+11
-0
openair1/PHY/defs.h
openair1/PHY/defs.h
+2
-0
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+1
-0
targets/ARCH/COMMON/common_lib.c
targets/ARCH/COMMON/common_lib.c
+10
-10
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+14
-0
targets/RT/USER/lte-enb.c
targets/RT/USER/lte-enb.c
+34
-8
targets/RT/USER/lte-ru.c
targets/RT/USER/lte-ru.c
+32
-12
targets/RT/USER/lte-softmodem.c
targets/RT/USER/lte-softmodem.c
+20
-0
targets/RT/USER/lte-softmodem.h
targets/RT/USER/lte-softmodem.h
+32
-30
No files found.
cmake_targets/build_oai
View file @
5378c5ca
...
...
@@ -856,11 +856,9 @@ function main() {
ln
-sf
$dbin
/liboai_exmimodevif.so.
$REL
$dbin
/liboai_device.so
echo_info
"liboai_device.so is linked to EXMIMO device library"
elif
[
"
$HW
"
==
"OAI_USRP"
]
;
then
if
[
-d
"/usr/include/uhd"
]
;
then
compilations
\
$build_dir
oai_usrpdevif
\
liboai_usrpdevif.so
$dbin
/liboai_usrpdevif.so.
$REL
fi
ln
-sf
liboai_usrpdevif.so liboai_device.so
ln
-sf
$dbin
/liboai_usrpdevif.so.
$REL
$dbin
/liboai_device.so
...
...
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
View file @
5378c5ca
...
...
@@ -268,6 +268,8 @@ void clean_eNb_dlsch(LTE_eNB_DLSCH_t *dlsch)
}
int
dlsch_encoding_2threads0
(
te_params
*
tep
)
{
LTE_eNB_DLSCH_t
*
dlsch
=
tep
->
dlsch
;
...
...
@@ -560,6 +562,62 @@ int dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
return
(
0
);
}
int
dlsch_encoding_all
(
PHY_VARS_eNB
*
eNB
,
unsigned
char
*
a
,
uint8_t
num_pdcch_symbols
,
LTE_eNB_DLSCH_t
*
dlsch
,
int
frame
,
uint8_t
subframe
,
time_stats_t
*
rm_stats
,
time_stats_t
*
te_stats
,
time_stats_t
*
i_stats
)
{
int
encoding_return
=
0
;
unsigned
int
L
,
C
,
B
;
B
=
dlsch
->
harq_processes
[
dlsch
->
harq_ids
[
subframe
]]
->
B
;
if
(
B
<=
6144
)
{
L
=
0
;
C
=
1
;
}
else
{
L
=
24
;
C
=
B
/
(
6144
-
L
);
if
((
6144
-
L
)
*
C
<
B
)
{
C
=
C
+
1
;
}
}
if
(
C
>=
5
)
{
encoding_return
=
dlsch_encoding_2threads
(
eNB
,
a
,
num_pdcch_symbols
,
dlsch
,
frame
,
subframe
,
rm_stats
,
te_stats
,
i_stats
);
}
else
{
encoding_return
=
dlsch_encoding
(
eNB
,
a
,
num_pdcch_symbols
,
dlsch
,
frame
,
subframe
,
rm_stats
,
te_stats
,
i_stats
);
}
return
encoding_return
;
}
int
dlsch_encoding
(
PHY_VARS_eNB
*
eNB
,
unsigned
char
*
a
,
...
...
openair1/PHY/LTE_TRANSPORT/proto.h
View file @
5378c5ca
...
...
@@ -122,6 +122,17 @@ int32_t dlsch_encoding(PHY_VARS_eNB *eNB,
time_stats_t
*
te_stats
,
time_stats_t
*
i_stats
);
int32_t
dlsch_encoding_all
(
PHY_VARS_eNB
*
eNB
,
uint8_t
*
a
,
uint8_t
num_pdcch_symbols
,
LTE_eNB_DLSCH_t
*
dlsch
,
int
frame
,
uint8_t
subframe
,
time_stats_t
*
rm_stats
,
time_stats_t
*
te_stats
,
time_stats_t
*
i_stats
);
int32_t
dlsch_encoding_SIC
(
PHY_VARS_UE
*
ue
,
uint8_t
*
a
,
uint8_t
num_pdcch_symbols
,
...
...
openair1/PHY/defs.h
View file @
5378c5ca
...
...
@@ -556,6 +556,8 @@ typedef struct eNB_proc_t_s {
te_params
tep
;
/// set of scheduling variables RXn-TXnp4 threads
eNB_rxtx_proc_t
proc_rxtx
[
2
];
/// stats thread pthread descriptor
pthread_t
coding_stats_thread
;
}
eNB_proc_t
;
...
...
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
5378c5ca
...
...
@@ -1517,6 +1517,7 @@ void init_te_thread(PHY_VARS_eNB *eNB,pthread_attr_t *attr_te) {
}
void
fill_rx_indication
(
PHY_VARS_eNB
*
eNB
,
int
UE_id
,
int
frame
,
int
subframe
)
{
nfapi_rx_indication_pdu_t
*
pdu
;
...
...
targets/ARCH/COMMON/common_lib.c
View file @
5378c5ca
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
View file @
5378c5ca
...
...
@@ -744,6 +744,20 @@ extern "C" {
openair0_cfg
[
0
].
rx_gain_calib_table
=
calib_table_x310
;
switch
((
int
)
openair0_cfg
[
0
].
sample_rate
)
{
case
122880000
:
// from usrp_time_offset
//openair0_cfg[0].samples_per_packet = 2048;
openair0_cfg
[
0
].
tx_sample_advance
=
15
;
//to be checked
openair0_cfg
[
0
].
tx_bw
=
80e6
;
openair0_cfg
[
0
].
rx_bw
=
80e6
;
break
;
case
61440000
:
// from usrp_time_offset
//openair0_cfg[0].samples_per_packet = 2048;
openair0_cfg
[
0
].
tx_sample_advance
=
15
;
openair0_cfg
[
0
].
tx_bw
=
40e6
;
openair0_cfg
[
0
].
rx_bw
=
40e6
;
break
;
case
30720000
:
// from usrp_time_offset
//openair0_cfg[0].samples_per_packet = 2048;
...
...
targets/RT/USER/lte-enb.c
View file @
5378c5ca
...
...
@@ -577,9 +577,27 @@ static void* eNB_thread_prach_br( void* param ) {
#endif
extern
void
init_fep_thread
(
PHY_VARS_eNB
*
,
pthread_attr_t
*
);
extern
void
init_td_thread
(
PHY_VARS_eNB
*
,
pthread_attr_t
*
);
extern
void
init_te_thread
(
PHY_VARS_eNB
*
,
pthread_attr_t
*
);
//////////////////////////////////////need to modified////////////////*****
static
void
*
coding_stats_thread
(
void
*
param
)
{
PHY_VARS_eNB
*
eNB
=
(
PHY_VARS_eNB
*
)
param
;
wait_sync
(
"coding_stats_thread"
);
while
(
!
oai_exit
)
{
sleep
(
1
);
if
(
opp_enabled
==
1
)
{
if
(
eNB
->
td
)
print_meas
(
&
eNB
->
ulsch_decoding_stats
,
"ulsch_decoding"
,
NULL
,
NULL
);
if
(
eNB
->
te
)
print_meas
(
&
eNB
->
dlsch_encoding_stats
,
"dlsch_encoding"
,
NULL
,
NULL
);
}
}
return
(
NULL
);
}
void
init_eNB_proc
(
int
inst
)
{
...
...
@@ -588,8 +606,7 @@ void init_eNB_proc(int inst) {
PHY_VARS_eNB
*
eNB
;
eNB_proc_t
*
proc
;
eNB_rxtx_proc_t
*
proc_rxtx
;
pthread_attr_t
*
attr0
=
NULL
,
*
attr1
=
NULL
,
*
attr_prach
=
NULL
;
//*attr_td=NULL,*attr_te=NULL;
pthread_attr_t
*
attr0
=
NULL
,
*
attr1
=
NULL
,
*
attr_prach
=
NULL
,
*
attr_td
=
NULL
,
*
attr_te
=
NULL
;
#ifdef Rel14
pthread_attr_t
*
attr_prach_br
=
NULL
;
#endif
...
...
@@ -629,8 +646,8 @@ void init_eNB_proc(int inst) {
pthread_attr_init
(
&
proc
->
attr_prach
);
pthread_attr_init
(
&
proc
->
attr_asynch_rxtx
);
//
pthread_attr_init( &proc->attr_td);
//
pthread_attr_init( &proc->attr_te);
pthread_attr_init
(
&
proc
->
attr_td
);
pthread_attr_init
(
&
proc
->
attr_te
);
pthread_attr_init
(
&
proc_rxtx
[
0
].
attr_rxtx
);
pthread_attr_init
(
&
proc_rxtx
[
1
].
attr_rxtx
);
#ifdef Rel14
...
...
@@ -652,7 +669,8 @@ void init_eNB_proc(int inst) {
// attr_td = &proc->attr_td;
// attr_te = &proc->attr_te;
#endif
attr_td
=
&
proc
->
attr_td
;
attr_te
=
&
proc
->
attr_te
;
if
(
eNB
->
single_thread_flag
==
0
)
{
pthread_create
(
&
proc_rxtx
[
0
].
pthread_rxtx
,
attr0
,
eNB_thread_rxtx
,
&
proc_rxtx
[
0
]
);
pthread_create
(
&
proc_rxtx
[
1
].
pthread_rxtx
,
attr1
,
eNB_thread_rxtx
,
&
proc_rxtx
[
1
]
);
...
...
@@ -672,6 +690,12 @@ void init_eNB_proc(int inst) {
AssertFatal
(
proc
->
instance_cnt_prach
==
-
1
,
"instance_cnt_prach = %d
\n
"
,
proc
->
instance_cnt_prach
);
//////////////////////////////////////need to modified////////////////*****
init_te_thread
(
eNB
,
attr_te
);
//init_td_thread(eNB,attr_td);
if
(
opp_enabled
==
1
)
pthread_create
(
&
proc
->
coding_stats_thread
,
NULL
,
coding_stats_thread
,(
void
*
)
eNB
);
}
//for multiple CCs: setup master and slaves
...
...
@@ -695,6 +719,8 @@ void init_eNB_proc(int inst) {
pthread_mutex_init
(
&
sync_phy_proc
.
mutex_phy_proc_tx
,
NULL
);
pthread_cond_init
(
&
sync_phy_proc
.
cond_phy_proc_tx
,
NULL
);
sync_phy_proc
.
phy_proc_CC_id
=
0
;
}
...
...
@@ -927,8 +953,8 @@ void init_eNB(int single_thread_flag,int wait_for_sync) {
#endif
eNB
->
td
=
ulsch_decoding_data
;
//(
single_thread_flag==1) ? ulsch_decoding_data_2thread : ulsch_decoding_data
;
eNB
->
te
=
dlsch_encoding
;
//(single_thread_flag==1) ? dlsch_encoding_2threads : dlsch_encoding
;
eNB
->
td
=
ulsch_decoding_data
;
//(
get_nprocs()<=4) ? ulsch_decoding_data : ulsch_decoding_data_2thread
;
eNB
->
te
=
dlsch_encoding
_all
;
//(get_nprocs()<=4) ? dlsch_encoding : dlsch_encoding_2threads
;
LOG_I
(
PHY
,
"Registering with MAC interface module
\n
"
);
...
...
targets/RT/USER/lte-ru.c
View file @
5378c5ca
...
...
@@ -111,6 +111,7 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "T.h"
extern
volatile
int
oai_exit
;
extern
int
numerology
;
extern
void
phy_init_RU
(
RU_t
*
);
...
...
@@ -1193,8 +1194,10 @@ void fill_rf_config(RU_t *ru, char *rf_config_file) {
LTE_DL_FRAME_PARMS
*
fp
=
&
ru
->
frame_parms
;
openair0_config_t
*
cfg
=
&
ru
->
openair0_cfg
;
//printf("////////////////numerology in config = %d\n",numerology);
if
(
fp
->
N_RB_DL
==
100
)
{
if
(
numerology
==
0
){
if
(
fp
->
threequarter_fs
)
{
cfg
->
sample_rate
=
23.04e6
;
cfg
->
samples_per_frame
=
230400
;
...
...
@@ -1207,6 +1210,23 @@ void fill_rf_config(RU_t *ru, char *rf_config_file) {
cfg
->
tx_bw
=
10e6
;
cfg
->
rx_bw
=
10e6
;
}
}
else
if
(
numerology
==
1
){
cfg
->
sample_rate
=
61.44e6
;
cfg
->
samples_per_frame
=
307200
;
cfg
->
tx_bw
=
20e6
;
cfg
->
rx_bw
=
20e6
;
}
else
if
(
numerology
==
2
){
cfg
->
sample_rate
=
122.88e6
;
cfg
->
samples_per_frame
=
307200
;
cfg
->
tx_bw
=
40e6
;
cfg
->
rx_bw
=
40e6
;
}
else
{
printf
(
"Wrong input for numerology %d
\n
setting to 20MHz normal CP configuration"
,
numerology
);
cfg
->
sample_rate
=
30.72e6
;
cfg
->
samples_per_frame
=
307200
;
cfg
->
tx_bw
=
10e6
;
cfg
->
rx_bw
=
10e6
;
}
}
else
if
(
fp
->
N_RB_DL
==
50
)
{
cfg
->
sample_rate
=
15.36e6
;
cfg
->
samples_per_frame
=
153600
;
...
...
@@ -1895,7 +1915,7 @@ void init_RU(char *rf_config_file) {
eNB0
->
RU_list
[
eNB0
->
num_RU
++
]
=
ru
;
}
}
//
LOG_I(PHY,"Initializing RRU descriptor %d : (%s,%s,%d)\n",ru_id,ru_if_types[ru->if_south],eNB_timing[ru->if_timing],ru->function);
LOG_I
(
PHY
,
"Initializing RRU descriptor %d : (%s,%s,%d)
\n
"
,
ru_id
,
ru_if_types
[
ru
->
if_south
],
eNB_timing
[
ru
->
if_timing
],
ru
->
function
);
switch
(
ru
->
if_south
)
{
...
...
@@ -1945,8 +1965,8 @@ void init_RU(char *rf_config_file) {
}
else
if
(
ru
->
function
==
eNodeB_3GPP
)
{
ru
->
do_prach
=
0
;
// no prach processing in RU
ru
->
feprx
=
(
get_nprocs
()
<=
2
)
?
fep_full
:
ru_fep_full_2thread
;
// RX DFTs
ru
->
feptx_ofdm
=
(
get_nprocs
()
<=
2
)
?
feptx_ofdm
:
feptx_ofdm_2thread
;
// this is fep with idft and precoding
ru
->
feprx
=
(
get_nprocs
()
<=
4
)
?
fep_full
:
ru_fep_full_2thread
;
// RX DFTs
ru
->
feptx_ofdm
=
(
get_nprocs
()
<=
4
)
?
feptx_ofdm
:
feptx_ofdm_2thread
;
// this is fep with idft and precoding
ru
->
feptx_prec
=
feptx_prec
;
// this is fep with idft and precoding
ru
->
fh_north_in
=
NULL
;
// no incoming fronthaul from north
ru
->
fh_north_out
=
NULL
;
// no outgoing fronthaul to north
...
...
targets/RT/USER/lte-softmodem.c
View file @
5378c5ca
...
...
@@ -207,6 +207,8 @@ extern void print_opp_meas(void);
int
transmission_mode
=
1
;
int
numerology
=
1
;
/* struct for ethernet specific parameters given in eNB conf file */
...
...
@@ -751,6 +753,8 @@ void init_openair0() {
openair0_cfg
[
card
].
configFilename
=
NULL
;
if
(
frame_parms
[
0
]
->
N_RB_DL
==
100
)
{
if
(
numerology
==
0
)
{
if
(
frame_parms
[
0
]
->
threequarter_fs
)
{
openair0_cfg
[
card
].
sample_rate
=
23.04e6
;
openair0_cfg
[
card
].
samples_per_frame
=
230400
;
...
...
@@ -762,6 +766,22 @@ void init_openair0() {
openair0_cfg
[
card
].
tx_bw
=
10e6
;
openair0_cfg
[
card
].
rx_bw
=
10e6
;
}
}
else
if
(
numerology
==
1
)
{
openair0_cfg
[
card
].
sample_rate
=
61.44e6
;
openair0_cfg
[
card
].
samples_per_frame
=
307200
;
openair0_cfg
[
card
].
tx_bw
=
20e6
;
openair0_cfg
[
card
].
rx_bw
=
20e6
;
}
else
if
(
numerology
==
2
)
{
openair0_cfg
[
card
].
sample_rate
=
122.88e6
;
openair0_cfg
[
card
].
samples_per_frame
=
307200
;
openair0_cfg
[
card
].
tx_bw
=
20e6
;
openair0_cfg
[
card
].
rx_bw
=
20e6
;
}
else
{
printf
(
"Un supported numerology
\n
"
);
}
}
else
if
(
frame_parms
[
0
]
->
N_RB_DL
==
50
)
{
openair0_cfg
[
card
].
sample_rate
=
15.36e6
;
openair0_cfg
[
card
].
samples_per_frame
=
153600
;
...
...
targets/RT/USER/lte-softmodem.h
View file @
5378c5ca
...
...
@@ -83,6 +83,7 @@
#define CONFIG_HLP_TPORT "tracer port\n"
#define CONFIG_HLP_NOTWAIT "don't wait for tracer, start immediately\n"
#define CONFIG_HLP_TNOFORK "to ease debugging with gdb\n"
#define CONFIG_HLP_NUMEROLOGY "adding numerology for 5G\n"
/***************************************************************************************************************************************/
...
...
@@ -166,7 +167,8 @@ extern int16_t dlsch_demod_shift;
{"V" , CONFIG_HLP_VCD, PARAMFLAG_BOOL, iptr:&ouput_vcd, defintval:0, TYPE_INT, 0}, \
{"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, iptr:&opp_enabled, defintval:0, TYPE_INT, 0}, \
{"S" , CONFIG_HLP_MSLOTS, PARAMFLAG_BOOL, u8ptr:&exit_missed_slots, defintval:1, TYPE_UINT8, 0}, \
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0} \
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
{"n" , CONFIG_HLP_NUMEROLOGY, 0, iptr:&numerology, defintval:1, TYPE_INT, 0} \
}
#define CONFIG_HLP_FLOG "Enable online log \n"
...
...
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