Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zzha zzha
OpenXG-RAN
Commits
131ad538
Commit
131ad538
authored
Aug 30, 2019
by
Wang Tsu-Han
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding precoding into feptx thread and having 2 threads per antenna
parent
21fa809c
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
283 additions
and
103 deletions
+283
-103
executables/nr-ru.c
executables/nr-ru.c
+8
-3
openair1/PHY/INIT/nr_init_ru.c
openair1/PHY/INIT/nr_init_ru.c
+4
-0
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+0
-1
openair1/PHY/defs_RU.h
openair1/PHY/defs_RU.h
+45
-11
openair1/SCHED_NR/nr_ru_procedures.c
openair1/SCHED_NR/nr_ru_procedures.c
+221
-85
openair1/SCHED_NR/sched_nr.h
openair1/SCHED_NR/sched_nr.h
+3
-1
targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf
.../GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf
+2
-2
No files found.
executables/nr-ru.c
View file @
131ad538
...
...
@@ -1213,6 +1213,10 @@ static void *ru_stats_thread(void *param) {
sleep
(
1
);
if
(
opp_enabled
==
1
)
{
if
(
ru
->
feptx_prec
)
{
print_meas
(
&
ru
->
total_precoding_stats
,
"feptx_prec"
,
NULL
,
NULL
);
}
if
(
ru
->
feprx
)
print_meas
(
&
ru
->
ofdm_demod_stats
,
"feprx"
,
NULL
,
NULL
);
if
(
ru
->
feptx_ofdm
)
print_meas
(
&
ru
->
ofdm_mod_stats
,
"feptx_ofdm"
,
NULL
,
NULL
);
...
...
@@ -1273,7 +1277,7 @@ static void *ru_thread_tx( void *param ) {
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX0_RU
,
tti_tx
);
// do TX front-end processing if needed (precoding and/or IDFTs)
if
(
ru
->
feptx_prec
)
ru
->
feptx_prec
(
ru
,
frame_tx
,
tti_tx
);
//
if (ru->feptx_prec) ru->feptx_prec(ru,frame_tx,tti_tx);
// do OFDM if needed
if
((
ru
->
fh_north_asynch_in
==
NULL
)
&&
(
ru
->
feptx_ofdm
))
ru
->
feptx_ofdm
(
ru
,
frame_tx
,
tti_tx
);
...
...
@@ -1488,7 +1492,7 @@ static void *ru_thread( void *param ) {
if
(
get_thread_parallel_conf
()
==
PARALLEL_SINGLE_THREAD
||
ru
->
num_gNB
==
0
)
{
// do TX front-end processing if needed (precoding and/or IDFTs)
if
(
ru
->
feptx_prec
)
ru
->
feptx_prec
(
ru
,
proc
->
frame_tx
,
proc
->
tti_tx
);
//
if (ru->feptx_prec) ru->feptx_prec(ru,proc->frame_tx,proc->tti_tx);
// do OFDM if needed
if
((
ru
->
fh_north_asynch_in
==
NULL
)
&&
(
ru
->
feptx_ofdm
))
ru
->
feptx_ofdm
(
ru
,
proc
->
frame_tx
,
proc
->
tti_tx
);
...
...
@@ -1704,6 +1708,7 @@ void init_RU_proc(RU_t *ru) {
if
(
ru
->
feprx
)
init_fep_thread
(
ru
);
if
(
ru
->
feptx_ofdm
)
nr_init_feptx_thread
(
ru
);
//if (ru->feptx_prec) nr_init_feptx_prec_thread(ru);
}
if
(
opp_enabled
==
1
)
threadCreate
(
&
ru
->
ru_stats_thread
,
ru_stats_thread
,(
void
*
)
ru
,
"emulateRF"
,
-
1
,
OAI_PRIORITY_RT_LOW
);
...
...
@@ -2018,7 +2023,7 @@ void set_function_spec_param(RU_t *ru) {
ru
->
do_prach
=
0
;
// no prach processing in RU
ru
->
feprx
=
(
get_thread_worker_conf
()
==
WORKER_ENABLE
)
?
ru_fep_full_2thread
:
fep_full
;
// RX DFTs
ru
->
feptx_ofdm
=
(
get_thread_worker_conf
()
==
WORKER_ENABLE
)
?
nr_feptx_ofdm_2thread
:
nr_feptx_ofdm
;
// this is fep with idft and precoding
ru
->
feptx_prec
=
nr_feptx_prec
;
// this is fep with idft and precoding
ru
->
feptx_prec
=
nr_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
ru
->
nr_start_if
=
NULL
;
// no if interface
...
...
openair1/PHY/INIT/nr_init_ru.c
View file @
131ad538
...
...
@@ -74,6 +74,10 @@ int nr_phy_init_RU(RU_t *ru) {
}
// allocate precoding input buffers (TX)
ru
->
common
.
txdataF
=
(
int32_t
**
)
malloc16
(
15
*
sizeof
(
int32_t
*
));
for
(
i
=
0
;
i
<
15
;
++
i
)
ru
->
common
.
txdataF
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
fp
->
samples_per_frame_wCP
*
sizeof
(
int32_t
));
// [hna] samples_per_frame without CP
// allocate IFFT input buffers (TX)
ru
->
common
.
txdataF_BF
=
(
int32_t
**
)
malloc16
(
ru
->
nb_tx
*
sizeof
(
int32_t
*
));
LOG_I
(
PHY
,
"[INIT] common.txdata_BF= %p (%lu bytes)
\n
"
,
ru
->
common
.
txdataF_BF
,
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
131ad538
...
...
@@ -205,7 +205,6 @@ for (int i=0; i<n_dmrs>>4; i++) {
printf
(
"PDSCH resource mapping started (start SC %d
\t
start symbol %d
\t
N_PRB %d
\t
nb_symbols %d)
\n
"
,
start_sc
,
rel15
->
start_symbol
,
rel15
->
n_prb
,
rel15
->
nb_symbols
);
#endif
for
(
int
ap
=
0
;
ap
<
rel15
->
nb_layers
;
ap
++
)
{
// DMRS params for this ap
...
...
openair1/PHY/defs_RU.h
View file @
131ad538
...
...
@@ -103,6 +103,10 @@ typedef struct {
/// - first index: tx antenna [0..nb_antennas_tx[
/// - second index: sample [0..]
int32_t
**
txdataF_BF
;
/// \brief holds the transmit data before beamforming in the frequency domain.
/// - first index: tx antenna [0..nb_antennas_tx[
/// - second index: sample [0..]
int32_t
**
txdataF
;
/// \brief holds the transmit data before beamforming for epdcch/mpdcch
/// - first index : tx antenna [0..nb_epdcch_antenna_ports[
/// - second index: sampl [0..]
...
...
@@ -146,6 +150,41 @@ typedef struct {
}
RU_CALIBRATION
;
typedef
struct
RU_prec_t_s
{
/// \internal This variable is protected by \ref mutex_feptx_prec
int
instance_cnt_feptx_prec
;
/// pthread struct for RU TX FEP PREC worker thread
pthread_t
pthread_feptx_prec
;
/// pthread attributes for worker feptx prec thread
pthread_attr_t
attr_feptx_prec
;
/// condition varible for RU TX FEP PREC thread
pthread_cond_t
cond_feptx_prec
;
/// mutex for fep PREC TX worker thread
pthread_mutex_t
mutex_feptx_prec
;
int
symbol
;
int
p
;
//logical
int
aa
;
//physical MAX nb_tx
struct
RU_t_s
*
ru
;
int
index
;
}
RU_prec_t
;
typedef
struct
RU_feptx_t_s
{
/// \internal This variable is protected by \ref mutex_feptx_prec
int
instance_cnt_feptx
;
/// pthread struct for RU TX FEP PREC worker thread
pthread_t
pthread_feptx
;
/// pthread attributes for worker feptx prec thread
pthread_attr_t
attr_feptx
;
/// condition varible for RU TX FEP PREC thread
pthread_cond_t
cond_feptx
;
/// mutex for fep PREC TX worker thread
pthread_mutex_t
mutex_feptx
;
struct
RU_t_s
*
ru
;
int
aa
;
//physical MAX nb_tx
int
half_slot
;
//first or second half of a slot
int
slot
;
//current slot
}
RU_feptx_t
;
typedef
struct
RU_proc_t_s
{
/// Pointer to associated RU descriptor
struct
RU_t_s
*
ru
;
...
...
@@ -205,8 +244,6 @@ typedef struct RU_proc_t_s {
int
instance_cnt_asynch_rxtx
;
/// \internal This variable is protected by \ref mutex_fep
int
instance_cnt_fep
;
/// \internal This variable is protected by \ref mutex_feptx
int
instance_cnt_feptx
;
/// \internal This variable is protected by \ref mutex_ru_thread
int
instance_cnt_ru
;
/// This varible is protected by \ref mutex_emulatedRF
...
...
@@ -226,8 +263,6 @@ typedef struct RU_proc_t_s {
pthread_t
pthread_synch
;
/// pthread struct for RU RX FEP worker thread
pthread_t
pthread_fep
;
/// pthread struct for RU TX FEP worker thread
pthread_t
pthread_feptx
;
/// pthread struct for emulated RF
pthread_t
pthread_emulateRF
;
/// pthread structure for asychronous RX/TX processing thread
...
...
@@ -253,8 +288,6 @@ typedef struct RU_proc_t_s {
pthread_attr_t
attr_asynch_rxtx
;
/// pthread attributes for worker fep thread
pthread_attr_t
attr_fep
;
/// pthread attributes for worker feptx thread
pthread_attr_t
attr_feptx
;
/// pthread attributes for emulated RF
pthread_attr_t
attr_emulateRF
;
/// scheduling parameters for RU FH thread
...
...
@@ -285,8 +318,6 @@ typedef struct RU_proc_t_s {
pthread_cond_t
cond_asynch_rxtx
;
/// condition varible for RU RX FEP thread
pthread_cond_t
cond_fep
;
/// condition varible for RU TX FEP thread
pthread_cond_t
cond_feptx
;
/// condition varible for emulated RF
pthread_cond_t
cond_emulateRF
;
/// condition variable for eNB signal
...
...
@@ -314,8 +345,6 @@ typedef struct RU_proc_t_s {
pthread_mutex_t
mutex_asynch_rxtx
;
/// mutex for fep RX worker thread
pthread_mutex_t
mutex_fep
;
/// mutex for fep TX worker thread
pthread_mutex_t
mutex_feptx
;
/// mutex for ru_thread
pthread_mutex_t
mutex_ru
;
/// mutex for emulated RF thread
...
...
@@ -360,8 +389,11 @@ typedef struct RU_proc_t_s {
int
ru_rx_ready
;
int
ru_tx_ready
;
int
emulate_rf_busy
;
}
RU_proc_t
;
RU_prec_t
prec
[
16
];
/// structure for feptx thread
RU_feptx_t
feptx
[
16
];
}
RU_proc_t
;
typedef
enum
{
LOCAL_RF
=
0
,
...
...
@@ -518,6 +550,8 @@ typedef struct RU_t_s{
void
(
*
eNB_top
)(
struct
PHY_VARS_eNB_s
*
eNB
,
int
frame_rx
,
int
subframe_rx
,
char
*
string
,
struct
RU_t_s
*
ru
);
void
(
*
gNB_top
)(
struct
PHY_VARS_gNB_s
*
gNB
,
int
frame_rx
,
int
slot_rx
,
char
*
string
,
struct
RU_t_s
*
ru
);
/// Timing statistics (TX)
time_stats_t
total_precoding_stats
;
/// Timing statistics
time_stats_t
ofdm_demod_stats
;
/// Timing statistics (TX)
...
...
openair1/SCHED_NR/nr_ru_procedures.c
View file @
131ad538
This diff is collapsed.
Click to expand it.
openair1/SCHED_NR/sched_nr.h
View file @
131ad538
...
...
@@ -42,10 +42,12 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, gNB_L1_rxtx_proc_t *proc, u
void
nr_common_signal_procedures
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
);
void
nr_feptx_ofdm
(
RU_t
*
ru
,
int
frame_tx
,
int
tti_tx
);
void
nr_feptx_ofdm_2thread
(
RU_t
*
ru
,
int
frame_tx
,
int
tti_tx
);
void
nr_feptx0
(
RU_t
*
ru
,
int
tti_tx
,
int
first_symbol
,
int
num_symbols
);
void
nr_feptx0
(
RU_t
*
ru
,
int
tti_tx
,
int
first_symbol
,
int
num_symbols
,
int
aa
);
void
nr_init_feptx_thread
(
RU_t
*
ru
);
void
fep_full
(
RU_t
*
ru
,
int
slot
);
void
nr_feptx_prec
(
RU_t
*
ru
,
int
frame_tx
,
int
tti_tx
);
void
nr_init_feptx_prec_thread
(
RU_t
*
ru
);
void
nr_feptx_prec_control
(
RU_t
*
ru
,
int
frame
,
int
tti_tx
);
int
nr_phy_init_RU
(
RU_t
*
ru
);
void
nr_configure_css_dci_initial
(
nfapi_nr_dl_config_pdcch_parameters_rel15_t
*
pdcch_params
,
...
...
targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf
View file @
131ad538
...
...
@@ -246,7 +246,7 @@ L1s = (
RUs
= (
{
local_rf
=
"yes"
nb_tx
=
1
nb_tx
=
8
nb_rx
=
1
att_tx
=
0
att_rx
=
0
;
...
...
@@ -264,7 +264,7 @@ THREAD_STRUCT = (
#three config for level of parallelism "PARALLEL_SINGLE_THREAD", "PARALLEL_RU_L1_SPLIT", or "PARALLEL_RU_L1_TRX_SPLIT"
parallel_config
=
"PARALLEL_RU_L1_TRX_SPLIT"
;
#two option for worker "WORKER_DISABLE" or "WORKER_ENABLE"
worker_config
=
"WORKER_
DIS
ABLE"
;
worker_config
=
"WORKER_
EN
ABLE"
;
}
);
...
...
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