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
2a9a038d
Commit
2a9a038d
authored
Jun 11, 2024
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improvements in RU beamforming handling procedures
parent
f3b6155f
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
217 additions
and
248 deletions
+217
-248
executables/nr-ru.c
executables/nr-ru.c
+28
-28
openair1/PHY/INIT/nr_init_ru.c
openair1/PHY/INIT/nr_init_ru.c
+47
-82
openair1/PHY/MODULATION/beamforming.c
openair1/PHY/MODULATION/beamforming.c
+16
-23
openair1/PHY/MODULATION/nr_modulation.h
openair1/PHY/MODULATION/nr_modulation.h
+9
-10
openair1/PHY/defs_RU.h
openair1/PHY/defs_RU.h
+1
-0
openair1/SCHED_NR/nr_ru_procedures.c
openair1/SCHED_NR/nr_ru_procedures.c
+111
-103
openair2/ENB_APP/enb_paramdef.h
openair2/ENB_APP/enb_paramdef.h
+1
-1
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+1
-1
radio/COMMON/common_lib.h
radio/COMMON/common_lib.h
+1
-0
radio/USRP/usrp_lib.cpp
radio/USRP/usrp_lib.cpp
+2
-0
No files found.
executables/nr-ru.c
View file @
2a9a038d
...
...
@@ -746,12 +746,12 @@ static radio_tx_gpio_flag_t get_gpio_flags(RU_t *ru, int slot)
return
flags_gpio
;
}
void
tx_rf
(
RU_t
*
ru
,
int
frame
,
int
slot
,
uint64_t
timestamp
)
{
void
tx_rf
(
RU_t
*
ru
,
int
frame
,
int
slot
,
uint64_t
timestamp
)
{
RU_proc_t
*
proc
=
&
ru
->
proc
;
NR_DL_FRAME_PARMS
*
fp
=
ru
->
nr_frame_parms
;
nfapi_nr_config_request_scf_t
*
cfg
=
&
ru
->
config
;
void
*
txp
[
ru
->
nb_tx
];
unsigned
int
txs
;
int
i
;
T
(
T_ENB_PHY_OUTPUT_SIGNAL
,
T_INT
(
0
),
...
...
@@ -807,7 +807,7 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
flags_burst
=
proc
->
first_tx
==
1
?
TX_BURST_START
:
TX_BURST_MIDDLE
;
}
if
(
fp
->
freq_range
==
FR2
)
if
(
ru
->
openair0_cfg
.
gpio_controller
!=
RU_GPIO_CONTROL_NONE
)
flags_gpio
=
get_gpio_flags
(
ru
,
slot
);
const
int
flags
=
flags_burst
|
(
flags_gpio
<<
4
);
...
...
@@ -825,8 +825,11 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST
,
(
timestamp
+
ru
->
ts_offset
)
&
0xffffffff
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE
,
1
);
// prepare tx buffer pointers
txs
=
ru
->
rfdevice
.
trx_write_func
(
&
ru
->
rfdevice
,
timestamp
+
ru
->
ts_offset
-
sf_extension
,
txp
,
siglen
+
sf_extension
,
ru
->
nb_tx
,
flags
);
uint32_t
txs
=
ru
->
rfdevice
.
trx_write_func
(
&
ru
->
rfdevice
,
timestamp
+
ru
->
ts_offset
-
sf_extension
,
txp
,
siglen
+
sf_extension
,
ru
->
nb_tx
,
flags
);
LOG_D
(
PHY
,
"[TXPATH] RU %d aa %d tx_rf, writing to TS %llu, %d.%d, unwrapped_frame %d, slot %d, flags %d, siglen+sf_extension %d, "
"returned %d, E %f
\n
"
,
...
...
@@ -1029,7 +1032,8 @@ void *ru_stats_thread(void *param) {
return
(
NULL
);
}
void
ru_tx_func
(
void
*
param
)
{
void
ru_tx_func
(
void
*
param
)
{
processingData_RU_t
*
info
=
(
processingData_RU_t
*
)
param
;
RU_t
*
ru
=
info
->
ru
;
NR_DL_FRAME_PARMS
*
fp
=
ru
->
nr_frame_parms
;
...
...
@@ -1631,7 +1635,8 @@ void init_precoding_weights(PHY_VARS_gNB *gNB) {
}
}*/
void
set_function_spec_param
(
RU_t
*
ru
)
{
void
set_function_spec_param
(
RU_t
*
ru
)
{
switch
(
ru
->
if_south
)
{
case
LOCAL_RF
:
// this is an RU with integrated RF (RRU, gNB)
reset_meas
(
&
ru
->
rx_fhaul
);
...
...
@@ -1780,20 +1785,19 @@ void init_NR_RU(configmodule_interface_t *cfg, char *rf_config_file)
}
}
gNB_RC
=
RC
.
gNB
[
0
];
gNB0
=
ru
->
gNB_list
[
0
];
fp
=
ru
->
nr_frame_parms
;
gNB_RC
=
RC
.
gNB
[
0
];
gNB0
=
ru
->
gNB_list
[
0
];
fp
=
ru
->
nr_frame_parms
;
LOG_D
(
PHY
,
"RU FUnction:%d ru->if_south:%d
\n
"
,
ru
->
function
,
ru
->
if_south
);
if
(
gNB0
)
{
if
((
ru
->
function
!=
NGFI_RRU_IF5
)
&&
(
ru
->
function
!=
NGFI_RRU_IF4p5
))
AssertFatal
(
gNB0
!=
NULL
,
"gNB0 is null!
\n
"
);
AssertFatal
(
gNB0
,
"gNB0 is null!
\n
"
);
if
(
gNB0
&&
gNB_RC
)
{
LOG_I
(
PHY
,
"Copying frame parms from gNB in RC to gNB %d in ru %d and frame_parms in ru
\n
"
,
gNB0
->
Mod_id
,
ru
->
idx
);
memset
((
void
*
)
fp
,
0
,
sizeof
(
NR_DL_FRAME_PARMS
));
memcpy
((
void
*
)
fp
,
&
gNB_RC
->
frame_parms
,
sizeof
(
NR_DL_FRAME_PARMS
));
memcpy
((
void
*
)
&
gNB0
->
frame_parms
,(
void
*
)
&
gNB_RC
->
frame_parms
,
sizeof
(
NR_DL_FRAME_PARMS
));
LOG_I
(
PHY
,
"Copying frame parms from gNB in RC to gNB %d in ru %d and frame_parms in ru
\n
"
,
gNB0
->
Mod_id
,
ru
->
idx
);
memcpy
((
void
*
)
fp
,
&
gNB_RC
->
frame_parms
,
sizeof
(
NR_DL_FRAME_PARMS
));
memcpy
((
void
*
)
&
gNB0
->
frame_parms
,
(
void
*
)
&
gNB_RC
->
frame_parms
,
sizeof
(
NR_DL_FRAME_PARMS
));
// attach all RU to all gNBs in its list/
LOG_D
(
PHY
,
"ru->num_gNB:%d gNB0->num_RU:%d
\n
"
,
ru
->
num_gNB
,
gNB0
->
num_RU
);
...
...
@@ -1858,18 +1862,17 @@ static void NRRCconfig_RU(configmodule_interface_t *cfg)
printf
(
"Set RU mask to %lx
\n
"
,
RC
.
ru_mask
);
for
(
int
j
=
0
;
j
<
RC
.
nb_RU
;
j
++
)
{
RC
.
ru
[
j
]
=
(
RU_t
*
)
malloc
(
sizeof
(
RU_t
));
memset
((
void
*
)
RC
.
ru
[
j
],
0
,
sizeof
(
RU_t
));
RC
.
ru
[
j
]
->
idx
=
j
;
RC
.
ru
[
j
]
->
nr_frame_parms
=
(
NR_DL_FRAME_PARMS
*
)
malloc
(
sizeof
(
NR_DL_FRAME_PARMS
));
RC
.
ru
[
j
]
->
frame_parms
=
(
LTE_DL_FRAME_PARMS
*
)
malloc
(
sizeof
(
LTE_DL_FRAME_PARMS
));
RC
.
ru
[
j
]
=
calloc
(
1
,
sizeof
(
*
RC
.
ru
[
j
]));
RC
.
ru
[
j
]
->
idx
=
j
;
RC
.
ru
[
j
]
->
nr_frame_parms
=
calloc
(
1
,
sizeof
(
*
RC
.
ru
[
j
]
->
nr_frame_parms
));
RC
.
ru
[
j
]
->
frame_parms
=
calloc
(
1
,
sizeof
(
*
RC
.
ru
[
j
]
->
frame_parms
));
printf
(
"Creating RC.ru[%d]:%p
\n
"
,
j
,
RC
.
ru
[
j
]);
RC
.
ru
[
j
]
->
if_timing
=
synch_to_ext_device
;
RC
.
ru
[
j
]
->
if_timing
=
synch_to_ext_device
;
if
(
RC
.
nb_nr_L1_inst
>
0
)
RC
.
ru
[
j
]
->
num_gNB
=
RUParamList
.
paramarray
[
j
][
RU_ENB_LIST_IDX
].
numelt
;
RC
.
ru
[
j
]
->
num_gNB
=
RUParamList
.
paramarray
[
j
][
RU_ENB_LIST_IDX
].
numelt
;
else
RC
.
ru
[
j
]
->
num_gNB
=
0
;
RC
.
ru
[
j
]
->
num_gNB
=
0
;
for
(
int
i
=
0
;
i
<
RC
.
ru
[
j
]
->
num_gNB
;
i
++
)
RC
.
ru
[
j
]
->
gNB_list
[
i
]
=
RC
.
gNB
[
RUParamList
.
paramarray
[
j
][
RU_ENB_LIST_IDX
].
iptr
[
i
]];
...
...
@@ -1890,10 +1893,8 @@ static void NRRCconfig_RU(configmodule_interface_t *cfg)
"bad GPIO controller in configuration file: '%s'
\n
"
,
*
(
RUParamList
.
paramarray
[
j
][
RU_GPIO_CONTROL
].
strptr
));
}
}
else
{
RC
.
ru
[
j
]
->
openair0_cfg
.
gpio_controller
=
RU_GPIO_CONTROL_GENERIC
;
LOG_I
(
PHY
,
"RU GPIO control set as 'generic'
\n
"
);
}
}
else
RC
.
ru
[
j
]
->
openair0_cfg
.
gpio_controller
=
RU_GPIO_CONTROL_NONE
;
if
(
config_isparamset
(
RUParamList
.
paramarray
[
j
],
RU_TX_SUBDEV
))
{
RC
.
ru
[
j
]
->
openair0_cfg
.
tx_subdev
=
strdup
(
*
(
RUParamList
.
paramarray
[
j
][
RU_TX_SUBDEV
].
strptr
));
...
...
@@ -2023,7 +2024,6 @@ static void NRRCconfig_RU(configmodule_interface_t *cfg)
RC
.
ru
[
j
]
->
att_rx
=
*
(
RUParamList
.
paramarray
[
j
][
RU_ATT_RX_IDX
].
uptr
);
RC
.
ru
[
j
]
->
if_frequency
=
*
(
RUParamList
.
paramarray
[
j
][
RU_IF_FREQUENCY
].
u64ptr
);
RC
.
ru
[
j
]
->
if_freq_offset
=
*
(
RUParamList
.
paramarray
[
j
][
RU_IF_FREQ_OFFSET
].
iptr
);
RC
.
ru
[
j
]
->
do_precoding
=
*
(
RUParamList
.
paramarray
[
j
][
RU_DO_PRECODING
].
iptr
);
RC
.
ru
[
j
]
->
sl_ahead
=
*
(
RUParamList
.
paramarray
[
j
][
RU_SL_AHEAD
].
iptr
);
RC
.
ru
[
j
]
->
num_bands
=
RUParamList
.
paramarray
[
j
][
RU_BAND_LIST_IDX
].
numelt
;
for
(
int
i
=
0
;
i
<
RC
.
ru
[
j
]
->
num_bands
;
i
++
)
...
...
openair1/PHY/INIT/nr_init_ru.c
View file @
2a9a038d
This diff is collapsed.
Click to expand it.
openair1/PHY/MODULATION/beamforming.c
View file @
2a9a038d
...
...
@@ -137,32 +137,25 @@ int beam_precoding_one_eNB(int32_t **txdataF,
}
int
nr_beam_precoding
(
c16_t
**
txdataF
,
c16_t
**
txdataF_BF
,
NR_DL_FRAME_PARMS
*
frame_parms
,
int32_t
***
beam_weights
,
int
slot
,
int
symbol
,
int
aa
,
int
nb_antenna_ports
,
int
offset
)
void
nr_beam_precoding
(
c16_t
**
txdataF
,
c16_t
**
txdataF_BF
,
NR_DL_FRAME_PARMS
*
frame_parms
,
int32_t
***
beam_weights
,
int
slot
,
int
symbol
,
int
aa
,
int
nb_antenna_ports
,
int
offset
)
{
uint8_t
p
;
// clear txdata_BF[aa][re] for each call of ue_spec_beamforming
memset
(
&
txdataF_BF
[
aa
][
symbol
*
frame_parms
->
ofdm_symbol_size
],
0
,
sizeof
(
c16_t
)
*
(
frame_parms
->
ofdm_symbol_size
));
for
(
p
=
0
;
p
<
nb_antenna_ports
;
p
++
)
{
//if ((frame_parms->L_ssb >> (63-p)) & 0x01) {
multadd_cpx_vector
((
int16_t
*
)
&
txdataF
[
p
][(
symbol
*
frame_parms
->
ofdm_symbol_size
)
+
offset
],
(
int16_t
*
)
beam_weights
[
p
][
aa
],
(
int16_t
*
)
&
txdataF_BF
[
aa
][
symbol
*
frame_parms
->
ofdm_symbol_size
],
0
,
frame_parms
->
ofdm_symbol_size
,
15
);
//}
for
(
int
p
=
0
;
p
<
nb_antenna_ports
;
p
++
)
{
multadd_cpx_vector
((
int16_t
*
)
&
txdataF
[
p
][(
symbol
*
frame_parms
->
ofdm_symbol_size
)
+
offset
],
(
int16_t
*
)
beam_weights
[
p
][
aa
],
(
int16_t
*
)
&
txdataF_BF
[
aa
][
symbol
*
frame_parms
->
ofdm_symbol_size
],
0
,
frame_parms
->
ofdm_symbol_size
,
15
);
}
return
0
;
}
openair1/PHY/MODULATION/nr_modulation.h
View file @
2a9a038d
...
...
@@ -95,16 +95,15 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms,
*/
void
nr_dft
(
c16_t
*
z
,
c16_t
*
d
,
uint32_t
Msc_PUSCH
);
int
nr_beam_precoding
(
c16_t
**
txdataF
,
c16_t
**
txdataF_BF
,
NR_DL_FRAME_PARMS
*
frame_parms
,
int32_t
***
beam_weights
,
int
slot
,
int
symbol
,
int
aa
,
int
nb_antenna_ports
,
int
offset
);
void
nr_beam_precoding
(
c16_t
**
txdataF
,
c16_t
**
txdataF_BF
,
NR_DL_FRAME_PARMS
*
frame_parms
,
int32_t
***
beam_weights
,
int
slot
,
int
symbol
,
int
aa
,
int
nb_antenna_ports
,
int
offset
);
void
apply_nr_rotation_TX
(
const
NR_DL_FRAME_PARMS
*
fp
,
c16_t
*
txdataF
,
...
...
openair1/PHY/defs_RU.h
View file @
2a9a038d
...
...
@@ -663,6 +663,7 @@ typedef struct RU_t_s {
/// structure for analyzing high-level RT measurements
rt_ru_profiling_t
rt_ru_profiling
;
void
*
scopeData
;
bool
analog_beamforming
;
}
RU_t
;
...
...
openair1/SCHED_NR/nr_ru_procedures.c
View file @
2a9a038d
This diff is collapsed.
Click to expand it.
openair2/ENB_APP/enb_paramdef.h
View file @
2a9a038d
...
...
@@ -169,7 +169,7 @@ typedef enum {
#define RU_NUM_INTERFACES 39
#define RU_HALF_SLOT_PARALLELIZATION 40
#define RU_RU_THREAD_CORE 41
#define RU_GPIO_CONTROL 42
#define RU_GPIO_CONTROL
42
/*-----------------------------------------------------------------------------------------------------------------------------------------*/
/* RU configuration parameters */
/* optname helpstr paramflags XXXptr defXXXval type numelt */
...
...
openair2/GNB_APP/gnb_config.c
View file @
2a9a038d
...
...
@@ -2441,7 +2441,7 @@ ngran_node_t get_node_type(void)
char
aprefix
[
MAX_OPTNAME_SIZE
*
2
+
8
];
sprintf
(
aprefix
,
"%s.[%i]"
,
GNB_CONFIG_STRING_GNB_LIST
,
0
);
config_getlist
(
config_get_if
(),
&
GNBE1ParamList
,
GNBE1Params
,
sizeofArray
(
GNBE1Params
),
aprefix
);
if
(
MacRLC_ParamList
.
numelt
>
0
)
{
if
(
MacRLC_ParamList
.
numelt
>
0
)
{
RC
.
nb_nr_macrlc_inst
=
MacRLC_ParamList
.
numelt
;
for
(
int
j
=
0
;
j
<
RC
.
nb_nr_macrlc_inst
;
j
++
)
{
if
(
strcmp
(
*
(
MacRLC_ParamList
.
paramarray
[
j
][
MACRLC_TRANSPORT_N_PREFERENCE_IDX
].
strptr
),
"f1"
)
==
0
)
{
...
...
radio/COMMON/common_lib.h
View file @
2a9a038d
...
...
@@ -174,6 +174,7 @@ typedef struct {
}
udp_ctx_t
;
typedef
enum
{
RU_GPIO_CONTROL_NONE
,
RU_GPIO_CONTROL_GENERIC
,
RU_GPIO_CONTROL_INTERDIGITAL
,
}
gpio_control_t
;
...
...
radio/USRP/usrp_lib.cpp
View file @
2a9a038d
...
...
@@ -313,6 +313,8 @@ static int trx_usrp_start(openair0_device *device) {
#endif
switch
(
device
->
openair0_cfg
->
gpio_controller
)
{
case
RU_GPIO_CONTROL_NONE
:
break
;
case
RU_GPIO_CONTROL_GENERIC
:
trx_usrp_start_generic_gpio
(
device
,
s
);
break
;
...
...
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