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
wangwenhui
OpenXG-RAN
Commits
16422436
Commit
16422436
authored
Jan 18, 2019
by
magounak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
experimental changes v1
parent
43258a0e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
11 deletions
+42
-11
openair1/PHY/INIT/lte_init_ru.c
openair1/PHY/INIT/lte_init_ru.c
+10
-10
openair1/PHY/LTE_TRANSPORT/if4_tools.c
openair1/PHY/LTE_TRANSPORT/if4_tools.c
+29
-0
targets/RT/USER/ru_control.c
targets/RT/USER/ru_control.c
+3
-1
No files found.
openair1/PHY/INIT/lte_init_ru.c
View file @
16422436
...
@@ -45,9 +45,9 @@ int phy_init_RU(RU_t *ru) {
...
@@ -45,9 +45,9 @@ int phy_init_RU(RU_t *ru) {
LOG_I
(
PHY
,
"Initializing RU signal buffers (if_south %s) nb_tx %d
\n
"
,
ru_if_types
[
ru
->
if_south
],
ru
->
nb_tx
);
LOG_I
(
PHY
,
"Initializing RU signal buffers (if_south %s) nb_tx %d
\n
"
,
ru_if_types
[
ru
->
if_south
],
ru
->
nb_tx
);
if
(
ru
->
is_slave
==
1
)
{
//
if (ru->is_slave == 1) {
generate_ul_ref_sigs_rx
();
generate_ul_ref_sigs_rx
();
}
//
}
if
(
ru
->
if_south
<=
REMOTE_IF5
)
{
// this means REMOTE_IF5 or LOCAL_RF, so allocate memory for time-domain signals
if
(
ru
->
if_south
<=
REMOTE_IF5
)
{
// this means REMOTE_IF5 or LOCAL_RF, so allocate memory for time-domain signals
// Time-domain signals
// Time-domain signals
...
@@ -61,12 +61,12 @@ int phy_init_RU(RU_t *ru) {
...
@@ -61,12 +61,12 @@ int phy_init_RU(RU_t *ru) {
fp
->
samples_per_tti
*
10
*
sizeof
(
int32_t
));
fp
->
samples_per_tti
*
10
*
sizeof
(
int32_t
));
}
}
if
(
ru
->
is_slave
==
1
)
{
//
if (ru->is_slave == 1) {
calibration
->
drs_ch_estimates_time
=
(
int32_t
**
)
malloc16_clear
(
ru
->
nb_rx
*
sizeof
(
int32_t
*
));
calibration
->
drs_ch_estimates_time
=
(
int32_t
**
)
malloc16_clear
(
ru
->
nb_rx
*
sizeof
(
int32_t
*
));
for
(
i
=
0
;
i
<
ru
->
nb_rx
;
i
++
)
{
for
(
i
=
0
;
i
<
ru
->
nb_rx
;
i
++
)
{
calibration
->
drs_ch_estimates_time
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
2
*
sizeof
(
int32_t
)
*
fp
->
ofdm_symbol_size
);
calibration
->
drs_ch_estimates_time
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
2
*
sizeof
(
int32_t
)
*
fp
->
ofdm_symbol_size
);
}
}
}
//
}
for
(
i
=
0
;
i
<
ru
->
nb_rx
;
i
++
)
{
for
(
i
=
0
;
i
<
ru
->
nb_rx
;
i
++
)
{
...
@@ -105,7 +105,7 @@ int phy_init_RU(RU_t *ru) {
...
@@ -105,7 +105,7 @@ int phy_init_RU(RU_t *ru) {
LOG_I
(
PHY
,
"rxdataF[%d] %p for RU %d
\n
"
,
i
,
ru
->
common
.
rxdataF
[
i
],
ru
->
idx
);
LOG_I
(
PHY
,
"rxdataF[%d] %p for RU %d
\n
"
,
i
,
ru
->
common
.
rxdataF
[
i
],
ru
->
idx
);
}
}
if
(
ru
->
is_slave
==
1
)
{
//
if (ru->is_slave == 1) {
// allocate FFT output buffers after extraction (RX)
// allocate FFT output buffers after extraction (RX)
calibration
->
rxdataF_ext
=
(
int32_t
**
)
malloc16
(
2
*
sizeof
(
int32_t
*
));
calibration
->
rxdataF_ext
=
(
int32_t
**
)
malloc16
(
2
*
sizeof
(
int32_t
*
));
calibration
->
drs_ch_estimates
=
(
int32_t
**
)
malloc16
(
2
*
sizeof
(
int32_t
*
));
calibration
->
drs_ch_estimates
=
(
int32_t
**
)
malloc16
(
2
*
sizeof
(
int32_t
*
));
...
@@ -115,7 +115,7 @@ int phy_init_RU(RU_t *ru) {
...
@@ -115,7 +115,7 @@ int phy_init_RU(RU_t *ru) {
LOG_I
(
PHY
,
"rxdataF_ext[%d] %p for RU %d
\n
"
,
i
,
calibration
->
rxdataF_ext
[
i
],
ru
->
idx
);
LOG_I
(
PHY
,
"rxdataF_ext[%d] %p for RU %d
\n
"
,
i
,
calibration
->
rxdataF_ext
[
i
],
ru
->
idx
);
calibration
->
drs_ch_estimates
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
fp
->
N_RB_UL
*
12
*
fp
->
symbols_per_tti
);
calibration
->
drs_ch_estimates
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
sizeof
(
int32_t
)
*
fp
->
N_RB_UL
*
12
*
fp
->
symbols_per_tti
);
}
}
}
//
}
/* number of elements of an array X is computed as sizeof(X) / sizeof(X[0]) */
/* number of elements of an array X is computed as sizeof(X) / sizeof(X[0]) */
//AssertFatal(ru->nb_rx <= sizeof(ru->prach_rxsigF) / sizeof(ru->prach_rxsigF[0]),
//AssertFatal(ru->nb_rx <= sizeof(ru->prach_rxsigF) / sizeof(ru->prach_rxsigF[0]),
...
@@ -194,12 +194,12 @@ void phy_free_RU(RU_t *ru)
...
@@ -194,12 +194,12 @@ void phy_free_RU(RU_t *ru)
if
(
ru
->
if_south
<=
REMOTE_IF5
)
{
// this means REMOTE_IF5 or LOCAL_RF, so free memory for time-domain signals
if
(
ru
->
if_south
<=
REMOTE_IF5
)
{
// this means REMOTE_IF5 or LOCAL_RF, so free memory for time-domain signals
for
(
i
=
0
;
i
<
ru
->
nb_tx
;
i
++
)
free_and_zero
(
ru
->
common
.
txdata
[
i
]);
for
(
i
=
0
;
i
<
ru
->
nb_tx
;
i
++
)
free_and_zero
(
ru
->
common
.
txdata
[
i
]);
for
(
i
=
0
;
i
<
ru
->
nb_rx
;
i
++
)
free_and_zero
(
ru
->
common
.
rxdata
[
i
]);
for
(
i
=
0
;
i
<
ru
->
nb_rx
;
i
++
)
free_and_zero
(
ru
->
common
.
rxdata
[
i
]);
if
(
ru
->
is_slave
==
1
)
{
//
if (ru->is_slave == 1) {
for
(
i
=
0
;
i
<
ru
->
nb_rx
;
i
++
)
{
for
(
i
=
0
;
i
<
ru
->
nb_rx
;
i
++
)
{
free_and_zero
(
calibration
->
drs_ch_estimates_time
[
i
]);
free_and_zero
(
calibration
->
drs_ch_estimates_time
[
i
]);
}
}
free_and_zero
(
calibration
->
drs_ch_estimates_time
);
free_and_zero
(
calibration
->
drs_ch_estimates_time
);
}
//
}
free_and_zero
(
ru
->
common
.
txdata
);
free_and_zero
(
ru
->
common
.
txdata
);
free_and_zero
(
ru
->
common
.
rxdata
);
free_and_zero
(
ru
->
common
.
rxdata
);
}
// else: IF5 or local RF -> nothing to free()
}
// else: IF5 or local RF -> nothing to free()
...
@@ -215,14 +215,14 @@ void phy_free_RU(RU_t *ru)
...
@@ -215,14 +215,14 @@ void phy_free_RU(RU_t *ru)
// free FFT output buffers (RX)
// free FFT output buffers (RX)
for
(
i
=
0
;
i
<
ru
->
nb_rx
;
i
++
)
free_and_zero
(
ru
->
common
.
rxdataF
[
i
]);
for
(
i
=
0
;
i
<
ru
->
nb_rx
;
i
++
)
free_and_zero
(
ru
->
common
.
rxdataF
[
i
]);
free_and_zero
(
ru
->
common
.
rxdataF
);
free_and_zero
(
ru
->
common
.
rxdataF
);
if
(
ru
->
is_slave
==
1
)
{
//
if (ru->is_slave == 1) {
for
(
i
=
0
;
i
<
ru
->
nb_rx
;
i
++
)
{
for
(
i
=
0
;
i
<
ru
->
nb_rx
;
i
++
)
{
free_and_zero
(
calibration
->
rxdataF_ext
[
i
]);
free_and_zero
(
calibration
->
rxdataF_ext
[
i
]);
free_and_zero
(
calibration
->
drs_ch_estimates
[
i
]);
free_and_zero
(
calibration
->
drs_ch_estimates
[
i
]);
}
}
free_and_zero
(
calibration
->
rxdataF_ext
);
free_and_zero
(
calibration
->
rxdataF_ext
);
free_and_zero
(
calibration
->
drs_ch_estimates
);
free_and_zero
(
calibration
->
drs_ch_estimates
);
}
//
}
for
(
i
=
0
;
i
<
ru
->
nb_rx
;
i
++
)
{
for
(
i
=
0
;
i
<
ru
->
nb_rx
;
i
++
)
{
free_and_zero
(
ru
->
prach_rxsigF
[
i
]);
free_and_zero
(
ru
->
prach_rxsigF
[
i
]);
...
...
openair1/PHY/LTE_TRANSPORT/if4_tools.c
View file @
16422436
...
@@ -434,6 +434,35 @@ void recv_IF4p5(RU_t *ru, int *frame, int *subframe, uint16_t *packet_type, uint
...
@@ -434,6 +434,35 @@ void recv_IF4p5(RU_t *ru, int *frame, int *subframe, uint16_t *packet_type, uint
signal_energy
((
int
*
)
&
rxdataF
[
antenna_id
][
blockoffsetF
],
db_halflength
)));
signal_energy
((
int
*
)
&
rxdataF
[
antenna_id
][
blockoffsetF
],
db_halflength
)));
}
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_DECOMPR_IF
,
0
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_DECOMPR_IF
,
0
);
}
else
if
(
*
packet_type
==
IF4p5_PULCALIB
)
{
db_fulllength
/=
ru
->
nb_rx
;
db_halflength
/=
ru
->
nb_rx
;
*
symbol_number
=
((
packet_header
->
frame_status
)
>>
26
)
&
0x000f
;
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_RECV_IF4_SYMBOL
,
*
symbol_number
);
if
(
ru
->
idx
==
0
)
LOG_D
(
PHY
,
"UL_IF4p5: RU %d : frame %d, subframe %d, symbol %d
\n
"
,
ru
->
idx
,
*
frame
,
*
subframe
,
*
symbol_number
);
slotoffsetF
=
(
*
symbol_number
)
*
(
fp
->
ofdm_symbol_size
);
blockoffsetF
=
slotoffsetF
+
fp
->
ofdm_symbol_size
-
db_halflength
;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_DECOMPR_IF
,
1
);
for
(
int
antenna_id
=
0
;
antenna_id
<
ru
->
nb_rx
;
antenna_id
++
)
{
for
(
element_id
=
0
;
element_id
<
db_halflength
;
element_id
++
)
{
i
=
(
uint16_t
*
)
&
rxdataF
[
antenna_id
][
blockoffsetF
+
element_id
];
*
i
=
alaw2lin_if4p5
[
(
data_block
[
element_id
]
&
0xff
)
];
*
(
i
+
1
)
=
alaw2lin_if4p5
[
(
data_block
[
element_id
]
>>
8
)
];
i
=
(
uint16_t
*
)
&
rxdataF
[
antenna_id
][
slotoffsetF
+
element_id
];
*
i
=
alaw2lin_if4p5
[
(
data_block
[
element_id
+
db_halflength
]
&
0xff
)
];
*
(
i
+
1
)
=
alaw2lin_if4p5
[
(
data_block
[
element_id
+
db_halflength
]
>>
8
)
];
//if (element_id==0) LOG_I(PHY,"recv_if4p5: symbol %d rxdata0 = (%u,%u)\n",*symbol_number,*i,*(i+1));
}
LOG_D
(
PHY
,
"PULCALIB_IF4p5: CC_id %d : frame %d, subframe %d (symbol %d)=> %d dB
\n
"
,
ru
->
idx
,
*
frame
,
*
subframe
,
*
symbol_number
,
dB_fixed
(
signal_energy
((
int
*
)
&
rxdataF
[
antenna_id
][
slotoffsetF
],
db_halflength
)
+
signal_energy
((
int
*
)
&
rxdataF
[
antenna_id
][
blockoffsetF
],
db_halflength
)));
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_DECOMPR_IF
,
0
);
}
else
if
(
*
packet_type
>=
IF4p5_PRACH
&&
}
else
if
(
*
packet_type
>=
IF4p5_PRACH
&&
*
packet_type
<=
IF4p5_PRACH
+
4
)
{
*
packet_type
<=
IF4p5_PRACH
+
4
)
{
...
...
targets/RT/USER/ru_control.c
View file @
16422436
...
@@ -336,7 +336,9 @@ int connect_rau(RU_t *ru) {
...
@@ -336,7 +336,9 @@ int connect_rau(RU_t *ru) {
LOG_I
(
PHY
,
"Waiting for configuration from RAU
\n
"
);
LOG_I
(
PHY
,
"Waiting for configuration from RAU
\n
"
);
}
}
else
{
else
{
LOG_I
(
PHY
,
"Configuration received from RAU (num_bands %d,band0 %d,txfreq %u,rxfreq %u,att_tx %d,att_rx %d,N_RB_DL %d,N_RB_UL %d,3/4FS %d, prach_FO %d, prach_CI %d)
\n
"
,
LOG_I
(
PHY
,
"Configuration received from RAU (RRU p %d,RRU tag %d,num_bands %d,band0 %d,txfreq %u,rxfreq %u,att_tx %d,att_rx %d,N_RB_DL %d,N_RB_UL %d,3/4FS %d, prach_FO %d, prach_CI %d)
\n
"
,
((
RRU_config_t
*
)
&
rru_config_msg
.
msg
[
0
])
->
p
,
((
RRU_config_t
*
)
&
rru_config_msg
.
msg
[
0
])
->
tag
,
((
RRU_config_t
*
)
&
rru_config_msg
.
msg
[
0
])
->
num_bands
,
((
RRU_config_t
*
)
&
rru_config_msg
.
msg
[
0
])
->
num_bands
,
((
RRU_config_t
*
)
&
rru_config_msg
.
msg
[
0
])
->
band_list
[
0
],
((
RRU_config_t
*
)
&
rru_config_msg
.
msg
[
0
])
->
band_list
[
0
],
((
RRU_config_t
*
)
&
rru_config_msg
.
msg
[
0
])
->
tx_freq
[
0
],
((
RRU_config_t
*
)
&
rru_config_msg
.
msg
[
0
])
->
tx_freq
[
0
],
...
...
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