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
wangjie
OpenXG-RAN
Commits
8b92c531
Commit
8b92c531
authored
Nov 03, 2020
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modifications for eCPRI radio units, increased averaging in eNodeB subband I0 measurements
parent
6c414a80
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
50 deletions
+38
-50
openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c
openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c
+18
-20
openair1/PHY/LTE_TRANSPORT/if5_tools.c
openair1/PHY/LTE_TRANSPORT/if5_tools.c
+2
-2
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+1
-1
targets/ARCH/COMMON/common_lib.h
targets/ARCH/COMMON/common_lib.h
+0
-12
targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c
targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c
+8
-10
targets/RT/USER/lte-ru.c
targets/RT/USER/lte-ru.c
+9
-5
No files found.
openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c
View file @
8b92c531
...
...
@@ -78,12 +78,14 @@ void lte_eNB_I0_measurements(PHY_VARS_eNB *eNB,
for
(
rb
=
0
;
rb
<
frame_parms
->
N_RB_UL
;
rb
++
)
{
n0_power_tot
=
0
;
int
offset0
=
(
frame_parms
->
first_carrier_offset
+
(
rb
*
12
))
%
frame_parms
->
ofdm_symbol_size
;
if
((
rb_mask
[
rb
>>
5
]
&
(
1
<<
(
rb
&
31
)))
==
0
)
{
// check that rb was not used in this subframe
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
=
(
frame_parms
->
first_carrier_offset
+
(
rb
*
12
))
%
frame_parms
->
ofdm_symbol_size
;
offset
+=
(
7
*
frame_parms
->
ofdm_symbol_size
);
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
...
...
@@ -91,22 +93,18 @@ void lte_eNB_I0_measurements(PHY_VARS_eNB *eNB,
(
rb
==
(
frame_parms
->
N_RB_UL
>>
1
)))
{
len
=
6
;
}
if
(
clear
==
1
)
measurements
->
n0_subband_power
[
aarx
][
rb
]
=
0
;
AssertFatal
(
ul_ch
,
"RX signal buffer (freq) problem"
);
measurements
->
n0_subband_power
[
aarx
][
rb
]
=
signal_energy_nodc
(
ul_ch
,
len
);
//((k1*(signal_energy_nodc(ul_ch,len)))
// + (k2*measurements->n0_subband_power[aarx][rb]));
measurements
->
n0_subband_power
[
aarx
][
rb
]
+=
signal_energy_nodc
(
ul_ch
,
len
);
}
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
]);
// printf("subframe %d (%d): eNB %d, aarx %d, rb %d len %d: energy %d (%d dB)\n",subframe,offset,eNB_id,aarx,rb,len,signal_energy_nodc(ul_ch,len),
// measurements->n0_subband_power_dB[aarx][rb]);
n0_power_tot
+=
measurements
->
n0_subband_power
[
aarx
][
rb
];
}
}
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
);
...
...
openair1/PHY/LTE_TRANSPORT/if5_tools.c
View file @
8b92c531
...
...
@@ -1314,7 +1314,7 @@ void send_IF5(RU_t *ru, openair0_timestamp proc_timestamp, int subframe, uint8_t
void
recv_IF5
(
RU_t
*
ru
,
openair0_timestamp
*
proc_timestamp
,
int
subframe
,
uint16_t
packet_type
)
{
LTE_DL_FRAME_PARMS
*
fp
=
ru
->
frame_parms
;
int32_t
*
txp
[
fp
->
nb_antennas_tx
],
*
rxp
[
fp
->
nb_antennas
_rx
];
int32_t
*
txp
[
ru
->
nb_tx
],
*
rxp
[
ru
->
nb
_rx
];
uint16_t
packet_id
=
0
,
i
=
0
,
element_id
=
0
;
#ifdef DEBUG_UL_MOBIPASS
...
...
@@ -1447,7 +1447,7 @@ void recv_IF5(RU_t *ru, openair0_timestamp *proc_timestamp, int subframe, uint16
(
void
*
)
temp_rx
,
spp_eth
,
&
aid
);
//LOG_I(PHY,"Received packet %d: aid %d, TS %lld\n",packet_id,aid,(unsigned long long)timestamp[packet_id]
);
LOG_D
(
PHY
,
"subframe %d: Received packet %d: aid %d, TS %llu, oldTS %llu, diff %lld
\n
"
,
subframe
,
packet_id
,
aid
,(
unsigned
long
long
)
timestamp
[
packet_id
],(
unsigned
long
long
)
oldTS
,(
unsigned
long
long
)(
timestamp
[
packet_id
]
-
timestamp
[
0
])
);
if
(
aid
==
0
)
{
if
(
firstTS
==
1
)
firstTS
=
0
;
else
if
(
oldTS
+
256
!=
timestamp
[
packet_id
])
{
...
...
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
8b92c531
...
...
@@ -2133,7 +2133,7 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
lte_eNB_I0_measurements
(
eNB
,
subframe
,
0
,
eNB
->
first_run_I0_measurements
);
int
min_I0
=
1000
,
max_I0
=
0
;
if
((
frame
==
0
)
&&
(
subframe
==
4
))
{
if
((
frame
==
0
)
&&
(
subframe
==
3
))
{
for
(
int
i
=
0
;
i
<
eNB
->
frame_parms
.
N_RB_UL
;
i
++
)
{
if
(
i
==
(
eNB
->
frame_parms
.
N_RB_UL
>>
1
)
-
1
)
i
+=
2
;
...
...
targets/ARCH/COMMON/common_lib.h
View file @
8b92c531
...
...
@@ -41,13 +41,9 @@
#define OAI_RF_LIBNAME "oai_device"
/* name of shared library implementing the transport */
#define OAI_TP_LIBNAME "oai_transpro"
<<<<<<<
HEAD
/* name of shared library implementing a third-party transport */
#define OAI_THIRDPARTY_TP_LIBNAME "thirdparty_transpro"
/* name of shared library implementing the basic/rf simulator */
=======
/* name of shared library implementing the rf simulator */
>>>>>>>
origin
/
develop
#define OAI_RFSIM_LIBNAME "rfsimulator"
/* name of shared library implementing the basic simulator */
#define OAI_BASICSIM_LIBNAME "tcp_bridge_oai"
...
...
@@ -57,14 +53,9 @@
/* flags for BBU to determine whether the attached radio head is local or remote */
#define RAU_LOCAL_RADIO_HEAD 0
#define RAU_REMOTE_RADIO_HEAD 1
<<<<<<<
HEAD
#define RAU_REMOTE_THIRDPARTY_RADIO_HEAD 2
=======
#define MAX_WRITE_THREAD_PACKAGE 10
#define MAX_WRITE_THREAD_BUFFER_SIZE 8
>>>>>>>
origin
/
develop
#ifndef MAX_CARDS
#define MAX_CARDS 8
#endif
...
...
@@ -465,7 +456,6 @@ struct openair0_device_t {
*/
void
(
*
configure_rru
)(
int
idx
,
void
*
arg
);
<<<<<<<
HEAD
/*! \brief Pointer to generic RRU private information
*/
...
...
@@ -485,7 +475,6 @@ struct openair0_device_t {
*/
int
(
*
thirdparty_startstreaming
)(
openair0_device
*
device
);
=======
/*! \brief RRU Configuration callback
* \param idx RU index
* \param arg pointer to capabilities or configuration
...
...
@@ -496,7 +485,6 @@ struct openair0_device_t {
* \return a pointer to the parameter
*/
void
*
(
*
get_internal_parameter
)(
char
*
id
);
>>>>>>>
origin
/
develop
};
/* type of device init function, implemented in shared lib */
...
...
targets/ARCH/ETHERNET/USERSPACE/LIB/eth_udp.c
View file @
8b92c531
...
...
@@ -298,7 +298,7 @@ int trx_eth_write_udp(openair0_device *device, openair0_timestamp timestamp, voi
#endif
// bring
R
X data into 12 LSBs for softmodem RX
// bring
T
X data into 12 LSBs for softmodem RX
for
(
int
j
=
0
;
j
<
nsamps2
;
j
++
)
{
#if defined(__x86_64__) || defined(__i386__)
#ifdef __AVX2__
...
...
@@ -332,7 +332,7 @@ int trx_eth_write_udp(openair0_device *device, openair0_timestamp timestamp, voi
// ECPRI PC_ID (2 bytes)
*
(
uint16_t
*
)(
buff2
+
4
)
=
cc
;
// OAI modified SEQ_ID (4 bytes)
*
(
uint64_t
*
)(
buff2
+
6
)
=
((
uint64_t
)
timestamp
)
*
3
;
*
(
uint64_t
*
)(
buff2
+
6
)
=
((
uint64_t
)
timestamp
)
*
6
;
/*
printf("ECPRI TX (REV %x, MessType %d, Payload size %d, PC_ID %d, TS %llu\n",
...
...
@@ -466,7 +466,7 @@ int trx_eth_read_udp(openair0_device *device, openair0_timestamp *timestamp, voi
/* store the timestamp value from packet's header */
*
timestamp
=
*
(
openair0_timestamp
*
)(
temp_rx0
+
ECPRICOMMON_BYTES
+
ECPRIPCID_BYTES
);
// convert TS to samples, /3 for 30.72 Ms/s, /6 for 15.36 Ms/s, /12 for 7.68 Ms/s, etc.
*
timestamp
=
*
timestamp
/
3
;
*
timestamp
=
*
timestamp
/
6
;
// handle 1.4,3,5,10,15 MHz cases
*
cc
=
*
(
uint16_t
*
)(
temp_rx0
+
ECPRICOMMON_BYTES
);
}
...
...
@@ -478,14 +478,12 @@ int trx_eth_read_udp(openair0_device *device, openair0_timestamp *timestamp, voi
for
(
int
j
=
1
;
j
<
nsamps2
;
j
++
)
{
#if defined(__x86_64__) || defined(__i386__)
#ifdef __AVX2__
// LOG_I(PHY,"((__m256i *)buff)[%d-1] = %p, temp_rx[%d] = %p\n",
// j,&((__m256i *)buff)[j-1],j,&temp_rx[j]);
((
__m256i
*
)
buff
)[
j
-
1
]
=
_mm256_srai_epi16
(
temp_rx
[
j
],
4
);
((
__m256i
*
)
buff
)[
j
-
1
]
=
_mm256_srai_epi16
(
temp_rx
[
j
],
2
);
#else
((
__m128i
*
)
buff
)[
j
-
1
]
=
_mm_srai_epi16
(
temp_rx
[
j
],
4
);
((
__m128i
*
)
buff
)[
j
-
1
]
=
_mm_srai_epi16
(
temp_rx
[
j
],
2
);
#endif
#elif defined(__arm__)
((
int16x8_t
*
)
buff
)[
j
]
=
vshrq_n_s16
(
temp_rx
[
i
][
j
],
4
);
((
int16x8_t
*
)
buff
)[
j
]
=
vshrq_n_s16
(
temp_rx
[
i
][
j
],
2
);
#endif
}
...
...
targets/RT/USER/lte-ru.c
View file @
8b92c531
...
...
@@ -141,6 +141,8 @@ extern uint16_t sf_ahead;
static
inline
void
fh_if5_south_out
(
RU_t
*
ru
,
int
frame
,
int
subframe
,
uint64_t
timestamp
)
{
if
(
ru
==
RC
.
ru
[
0
])
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST
,
ru
->
proc
.
timestamp_tx
&
0xffffffff
);
ru
->
south_out_cnt
++
;
send_IF5
(
ru
,
timestamp
,
subframe
,
&
ru
->
seqno
,
IF5_RRH_GW_DL
);
}
...
...
@@ -183,7 +185,6 @@ void fh_if5_south_in(RU_t *ru,
recv_IF5
(
ru
,
&
proc
->
timestamp_rx
,
*
subframe
,
IF5_RRH_GW_UL
);
proc
->
frame_rx
=
(
proc
->
timestamp_rx
/
(
fp
->
samples_per_tti
*
10
))
&
1023
;
proc
->
tti_rx
=
(
proc
->
timestamp_rx
/
fp
->
samples_per_tti
)
%
10
;
//LOG_I(PHY,"%d.%d (TS %llu) => %d.%d\n",*frame,*subframe,(unsigned long long)proc->timestamp_rx,proc->frame_rx,proc->tti_rx);
if
(
proc
->
first_rx
==
0
)
{
if
(
proc
->
tti_rx
!=
*
subframe
)
{
...
...
@@ -1626,8 +1627,6 @@ static void *ru_thread( void *param ) {
LOG_I
(
PHY
,
"Starting RU %d (%s,%s),
\n
"
,
ru
->
idx
,
NB_functions
[
ru
->
function
],
NB_timing
[
ru
->
if_timing
]);
if
(
get_softmodem_params
()
->
emulate_rf
)
{
fill_rf_config
(
ru
,
ru
->
rf_config_file
);
init_frame_parms
(
ru
->
frame_parms
,
1
);
phy_init_RU
(
ru
);
if
(
setup_RU_buffers
(
ru
)
!=
0
)
{
...
...
@@ -1643,12 +1642,14 @@ static void *ru_thread( void *param ) {
ru
->
state
=
RU_RUN
;
}
else
if
(
ru
->
has_ctrl_prt
==
0
)
{
// There is no control port: start everything here
LOG_I
(
PHY
,
"RU %d has not ctrl port
\n
"
,
ru
->
idx
);
if
(
ru
->
if_south
==
LOCAL_RF
)
openair0_device_load
(
&
ru
->
rfdevice
,
&
ru
->
openair0_cfg
);
LOG_I
(
PHY
,
"RU %d has no OAI ctrl port
\n
"
,
ru
->
idx
);
fill_rf_config
(
ru
,
ru
->
rf_config_file
);
init_frame_parms
(
ru
->
frame_parms
,
1
);
ru
->
frame_parms
->
nb_antennas_rx
=
ru
->
nb_rx
;
if
(
ru
->
if_south
==
LOCAL_RF
)
openair0_device_load
(
&
ru
->
rfdevice
,
&
ru
->
openair0_cfg
);
phy_init_RU
(
ru
);
...
...
@@ -2497,6 +2498,9 @@ void init_precoding_weights(PHY_VARS_eNB *eNB) {
void
set_function_spec_param
(
RU_t
*
ru
)
{
int
ret
;
fill_rf_config
(
ru
,
ru
->
rf_config_file
);
init_frame_parms
(
ru
->
frame_parms
,
1
);
switch
(
ru
->
if_south
)
{
case
LOCAL_RF
:
// this is an RU with integrated RF (RRU, eNB)
if
(
ru
->
function
==
NGFI_RRU_IF5
)
{
// IF5 RRU
...
...
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