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
Michael Black
OpenXG-RAN
Commits
8314a264
Commit
8314a264
authored
Oct 18, 2017
by
matzakos
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'main/RU-RAU-split'
parents
2d50ccaf
2516216d
Changes
29
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
831 additions
and
578 deletions
+831
-578
cmake_targets/autotests/v2/actions/3276.txt
cmake_targets/autotests/v2/actions/3276.txt
+13
-0
cmake_targets/autotests/v2/actions/bandrich.txt
cmake_targets/autotests/v2/actions/bandrich.txt
+10
-0
common/utils/T/tracer/enb.c
common/utils/T/tracer/enb.c
+43
-27
openair1/PHY/INIT/lte_init.c
openair1/PHY/INIT/lte_init.c
+2
-0
openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
+2
-7
openair1/PHY/LTE_TRANSPORT/dci.c
openair1/PHY/LTE_TRANSPORT/dci.c
+7
-0
openair1/PHY/LTE_TRANSPORT/dci_tools.c
openair1/PHY/LTE_TRANSPORT/dci_tools.c
+2
-4
openair1/PHY/LTE_TRANSPORT/phich.c
openair1/PHY/LTE_TRANSPORT/phich.c
+5
-4
openair1/PHY/LTE_TRANSPORT/proto.h
openair1/PHY/LTE_TRANSPORT/proto.h
+3
-1
openair1/PHY/LTE_TRANSPORT/pucch.c
openair1/PHY/LTE_TRANSPORT/pucch.c
+1
-1
openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c
openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c
+27
-7
openair1/PHY/MODULATION/ofdm_mod.c
openair1/PHY/MODULATION/ofdm_mod.c
+19
-36
openair1/PHY/TOOLS/time_meas.c
openair1/PHY/TOOLS/time_meas.c
+1
-2
openair1/PHY/defs.h
openair1/PHY/defs.h
+17
-3
openair1/SCHED/fapi_l1.c
openair1/SCHED/fapi_l1.c
+1
-1
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+14
-6
openair1/SCHED/ru_procedures.c
openair1/SCHED/ru_procedures.c
+178
-12
openair2/LAYER2/MAC/eNB_scheduler.c
openair2/LAYER2/MAC/eNB_scheduler.c
+4
-2
openair2/LAYER2/MAC/eNB_scheduler_RA.c
openair2/LAYER2/MAC/eNB_scheduler_RA.c
+5
-5
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
+4
-3
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
+3
-0
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
+425
-444
openair2/PHY_INTERFACE/IF_Module.c
openair2/PHY_INTERFACE/IF_Module.c
+8
-0
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf
...TS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf
+1
-1
targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi.conf
...JECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi.conf
+1
-1
targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.conf
...JECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.conf
+1
-1
targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.lo.conf
...TS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.lo.conf
+1
-1
targets/RT/USER/lte-enb.c
targets/RT/USER/lte-enb.c
+0
-1
targets/RT/USER/lte-ru.c
targets/RT/USER/lte-ru.c
+33
-8
No files found.
cmake_targets/autotests/v2/actions/3276.txt
0 → 100644
View file @
8314a264
When running lsusb, if you have:
Bus 001 Device 002: ID 12d1:14fe Huawei Technologies Co., Ltd. Modem (Mass Storage Mode)
You need to run:
usb_modeswitch -v 12d1 -p 14fe -M '55534243123456780000000000000011062000000100000000000000000000'
After what, running lsusb should give:
Bus 001 Device 004: ID 12d1:1506 Huawei Technologies Co., Ltd. Modem/Networkcard
Values of 'Bus' and 'Device' may differ of course.
cmake_targets/autotests/v2/actions/bandrich.txt
View file @
8314a264
...
@@ -13,6 +13,16 @@ containing lines:
...
@@ -13,6 +13,16 @@ containing lines:
SUBSYSTEM=="tty", ENV{ID_VENDOR_ID}=="1a8d", ENV{ID_MODEL_ID}=="100d", ENV{ID_SERIAL_SHORT}=="357473040068155", ENV{ID_USB_INTERFACE_NUM}=="00", SYMLINK+="bandrich.data", MODE="0666"
SUBSYSTEM=="tty", ENV{ID_VENDOR_ID}=="1a8d", ENV{ID_MODEL_ID}=="100d", ENV{ID_SERIAL_SHORT}=="357473040068155", ENV{ID_USB_INTERFACE_NUM}=="00", SYMLINK+="bandrich.data", MODE="0666"
SUBSYSTEM=="tty", ENV{ID_VENDOR_ID}=="1a8d", ENV{ID_MODEL_ID}=="100d", ENV{ID_SERIAL_SHORT}=="357473040068155", ENV{ID_USB_INTERFACE_NUM}=="02", SYMLINK+="bandrich.control", MODE="0666"
SUBSYSTEM=="tty", ENV{ID_VENDOR_ID}=="1a8d", ENV{ID_MODEL_ID}=="100d", ENV{ID_SERIAL_SHORT}=="357473040068155", ENV{ID_USB_INTERFACE_NUM}=="02", SYMLINK+="bandrich.control", MODE="0666"
To avoid NetworkManager to play with the bandrich, add also the line:
ENV{ID_VENDOR_ID}=="1a8d", ENV{ID_MM_DEVICE_IGNORE}="1"
Maybe also add; , ENV{ID_MM_DEVICE_IGNORE}="1"
to the two other lines.
Then run: udevadm control --reload-rules
And: service network-manager restart
Change vendor_id/model_id/serial/interface num to match yours.
Change vendor_id/model_id/serial/interface num to match yours.
Use lsusb -v to find values.
Use lsusb -v to find values.
...
...
common/utils/T/tracer/enb.c
View file @
8314a264
...
@@ -31,7 +31,10 @@ void reset_ue_ids(void)
...
@@ -31,7 +31,10 @@ void reset_ue_ids(void)
int
i
;
int
i
;
printf
(
"resetting known UEs
\n
"
);
printf
(
"resetting known UEs
\n
"
);
for
(
i
=
0
;
i
<
65536
;
i
++
)
ue_id
[
i
]
=
-
1
;
for
(
i
=
0
;
i
<
65536
;
i
++
)
ue_id
[
i
]
=
-
1
;
next_ue_id
=
0
;
ue_id
[
65535
]
=
0
;
ue_id
[
65534
]
=
1
;
/* HACK: to be removed */
ue_id
[
2
]
=
2
;
/* this supposes RA RNTI = 2, very openair specific */
next_ue_id
=
3
;
}
}
int
ue_id_from_rnti
(
void
*
_priv
,
int
rnti
)
int
ue_id_from_rnti
(
void
*
_priv
,
int
rnti
)
...
@@ -94,6 +97,7 @@ typedef struct {
...
@@ -94,6 +97,7 @@ typedef struct {
enb_gui
*
e
;
enb_gui
*
e
;
int
ue
;
/* what UE is displayed in the UE specific views */
int
ue
;
/* what UE is displayed in the UE specific views */
void
*
database
;
void
*
database
;
int
nb_rb
;
}
enb_data
;
}
enb_data
;
void
is_on_changed
(
void
*
_d
)
void
is_on_changed
(
void
*
_d
)
...
@@ -121,27 +125,6 @@ connection_dies:
...
@@ -121,27 +125,6 @@ connection_dies:
if
(
pthread_mutex_unlock
(
&
d
->
lock
))
abort
();
if
(
pthread_mutex_unlock
(
&
d
->
lock
))
abort
();
}
}
void
usage
(
void
)
{
printf
(
"options:
\n
"
" -d <database file> this option is mandatory
\n
"
" -on <GROUP or ID> turn log ON for given GROUP or ID
\n
"
" -off <GROUP or ID> turn log OFF for given GROUP or ID
\n
"
" -ON turn all logs ON
\n
"
" -OFF turn all logs OFF
\n
"
" note: you may pass several -on/-off/-ON/-OFF,
\n
"
" they will be processed in order
\n
"
" by default, all is off
\n
"
" -ip <host> connect to given IP address (default %s)
\n
"
" -p <port> connect to given port (default %d)
\n
"
" -debug-gui activate GUI debug logs
\n
"
,
DEFAULT_REMOTE_IP
,
DEFAULT_REMOTE_PORT
);
exit
(
1
);
}
static
void
*
gui_thread
(
void
*
_g
)
static
void
*
gui_thread
(
void
*
_g
)
{
{
gui
*
g
=
_g
;
gui
*
g
=
_g
;
...
@@ -248,13 +231,15 @@ static void click(void *private, gui *g,
...
@@ -248,13 +231,15 @@ static void click(void *private, gui *g,
enb_data
*
ed
=
private
;
enb_data
*
ed
=
private
;
enb_gui
*
e
=
ed
->
e
;
enb_gui
*
e
=
ed
->
e
;
int
ue
=
ed
->
ue
;
int
ue
=
ed
->
ue
;
int
do_reset
=
0
;
if
(
button
!=
1
)
return
;
if
(
button
!=
1
)
return
;
if
(
w
==
e
->
prev_ue_button
)
{
ue
--
;
if
(
ue
<
0
)
ue
=
0
;
}
if
(
w
==
e
->
prev_ue_button
)
{
ue
--
;
if
(
ue
<
0
)
ue
=
0
;
}
if
(
w
==
e
->
next_ue_button
)
ue
++
;
if
(
w
==
e
->
next_ue_button
)
ue
++
;
if
(
w
==
e
->
current_ue_button
)
reset_ue_ids
()
;
if
(
w
==
e
->
current_ue_button
)
do_reset
=
1
;
if
(
pthread_mutex_lock
(
&
ed
->
lock
))
abort
();
if
(
pthread_mutex_lock
(
&
ed
->
lock
))
abort
();
if
(
do_reset
)
reset_ue_ids
();
if
(
ue
!=
ed
->
ue
)
{
if
(
ue
!=
ed
->
ue
)
{
set_current_ue
(
g
,
ed
,
ue
);
set_current_ue
(
g
,
ed
,
ue
);
ed
->
ue
=
ue
;
ed
->
ue
=
ue
;
...
@@ -314,14 +299,14 @@ static void enb_main_gui(enb_gui *e, gui *g, event_handler *h, void *database,
...
@@ -314,14 +299,14 @@ static void enb_main_gui(enb_gui *e, gui *g, event_handler *h, void *database,
input_signal_plot
=
new_xy_plot
(
g
,
256
,
55
,
"input signal"
,
20
);
input_signal_plot
=
new_xy_plot
(
g
,
256
,
55
,
"input signal"
,
20
);
widget_add_child
(
g
,
line
,
input_signal_plot
,
-
1
);
widget_add_child
(
g
,
line
,
input_signal_plot
,
-
1
);
xy_plot_set_range
(
g
,
input_signal_plot
,
0
,
7680
*
10
,
20
,
70
);
xy_plot_set_range
(
g
,
input_signal_plot
,
0
,
7680
*
10
*
ed
->
nb_rb
/
25
,
20
,
70
);
input_signal_log
=
new_framelog
(
h
,
database
,
input_signal_log
=
new_framelog
(
h
,
database
,
"ENB_PHY_INPUT_SIGNAL"
,
"subframe"
,
"rxdata"
);
"ENB_PHY_INPUT_SIGNAL"
,
"subframe"
,
"rxdata"
);
/* a skip value of 10 means to process 1 frame over 10, that is
/* a skip value of 10 means to process 1 frame over 10, that is
* more or less 10 frames per second
* more or less 10 frames per second
*/
*/
framelog_set_skip
(
input_signal_log
,
10
);
framelog_set_skip
(
input_signal_log
,
10
);
input_signal_view
=
new_view_xy
(
7680
*
10
,
10
,
input_signal_view
=
new_view_xy
(
7680
*
10
*
ed
->
nb_rb
/
25
,
10
,
g
,
input_signal_plot
,
new_color
(
g
,
"#0c0c72"
),
XY_LOOP_MODE
);
g
,
input_signal_plot
,
new_color
(
g
,
"#0c0c72"
),
XY_LOOP_MODE
);
logger_add_view
(
input_signal_log
,
input_signal_view
);
logger_add_view
(
input_signal_log
,
input_signal_view
);
...
@@ -639,7 +624,7 @@ static void enb_main_gui(enb_gui *e, gui *g, event_handler *h, void *database,
...
@@ -639,7 +624,7 @@ static void enb_main_gui(enb_gui *e, gui *g, event_handler *h, void *database,
container_set_child_growable
(
g
,
top_container
,
text
,
1
);
container_set_child_growable
(
g
,
top_container
,
text
,
1
);
e
->
legacy
=
new_view_textlist
(
10000
,
10
,
g
,
text
);
e
->
legacy
=
new_view_textlist
(
10000
,
10
,
g
,
text
);
set_current_ue
(
g
,
ed
,
0
);
set_current_ue
(
g
,
ed
,
ed
->
ue
);
register_notifier
(
g
,
"click"
,
e
->
current_ue_button
,
click
,
ed
);
register_notifier
(
g
,
"click"
,
e
->
current_ue_button
,
click
,
ed
);
register_notifier
(
g
,
"click"
,
e
->
prev_ue_button
,
click
,
ed
);
register_notifier
(
g
,
"click"
,
e
->
prev_ue_button
,
click
,
ed
);
register_notifier
(
g
,
"click"
,
e
->
next_ue_button
,
click
,
ed
);
register_notifier
(
g
,
"click"
,
e
->
next_ue_button
,
click
,
ed
);
...
@@ -661,6 +646,28 @@ void view_add_log(view *v, char *log, event_handler *h, void *database,
...
@@ -661,6 +646,28 @@ void view_add_log(view *v, char *log, event_handler *h, void *database,
on_off
(
database
,
log
,
is_on
,
1
);
on_off
(
database
,
log
,
is_on
,
1
);
}
}
void
usage
(
void
)
{
printf
(
"options:
\n
"
" -d <database file> this option is mandatory
\n
"
" -rb <RBs> setup for this number of RBs (default 25)
\n
"
" -on <GROUP or ID> turn log ON for given GROUP or ID
\n
"
" -off <GROUP or ID> turn log OFF for given GROUP or ID
\n
"
" -ON turn all logs ON
\n
"
" -OFF turn all logs OFF
\n
"
" note: you may pass several -on/-off/-ON/-OFF,
\n
"
" they will be processed in order
\n
"
" by default, all is off
\n
"
" -ip <host> connect to given IP address (default %s)
\n
"
" -p <port> connect to given port (default %d)
\n
"
" -debug-gui activate GUI debug logs
\n
"
,
DEFAULT_REMOTE_IP
,
DEFAULT_REMOTE_PORT
);
exit
(
1
);
}
int
main
(
int
n
,
char
**
v
)
int
main
(
int
n
,
char
**
v
)
{
{
extern
int
volatile
gui_logd
;
extern
int
volatile
gui_logd
;
...
@@ -681,6 +688,8 @@ int main(int n, char **v)
...
@@ -681,6 +688,8 @@ int main(int n, char **v)
reset_ue_ids
();
reset_ue_ids
();
enb_data
.
nb_rb
=
25
;
/* write on a socket fails if the other end is closed and we get SIGPIPE */
/* write on a socket fails if the other end is closed and we get SIGPIPE */
if
(
signal
(
SIGPIPE
,
SIG_IGN
)
==
SIG_ERR
)
abort
();
if
(
signal
(
SIGPIPE
,
SIG_IGN
)
==
SIG_ERR
)
abort
();
...
@@ -691,6 +700,8 @@ int main(int n, char **v)
...
@@ -691,6 +700,8 @@ int main(int n, char **v)
if
(
!
strcmp
(
v
[
i
],
"-h"
)
||
!
strcmp
(
v
[
i
],
"--help"
))
usage
();
if
(
!
strcmp
(
v
[
i
],
"-h"
)
||
!
strcmp
(
v
[
i
],
"--help"
))
usage
();
if
(
!
strcmp
(
v
[
i
],
"-d"
))
if
(
!
strcmp
(
v
[
i
],
"-d"
))
{
if
(
i
>
n
-
2
)
usage
();
database_filename
=
v
[
++
i
];
continue
;
}
{
if
(
i
>
n
-
2
)
usage
();
database_filename
=
v
[
++
i
];
continue
;
}
if
(
!
strcmp
(
v
[
i
],
"-rb"
))
{
if
(
i
>
n
-
2
)
usage
();
enb_data
.
nb_rb
=
atoi
(
v
[
++
i
]);
continue
;
}
if
(
!
strcmp
(
v
[
i
],
"-ip"
))
{
if
(
i
>
n
-
2
)
usage
();
ip
=
v
[
++
i
];
continue
;
}
if
(
!
strcmp
(
v
[
i
],
"-ip"
))
{
if
(
i
>
n
-
2
)
usage
();
ip
=
v
[
++
i
];
continue
;
}
if
(
!
strcmp
(
v
[
i
],
"-p"
))
if
(
!
strcmp
(
v
[
i
],
"-p"
))
{
if
(
i
>
n
-
2
)
usage
();
port
=
atoi
(
v
[
++
i
]);
continue
;
}
{
if
(
i
>
n
-
2
)
usage
();
port
=
atoi
(
v
[
++
i
]);
continue
;
}
...
@@ -706,6 +717,11 @@ int main(int n, char **v)
...
@@ -706,6 +717,11 @@ int main(int n, char **v)
usage
();
usage
();
}
}
switch
(
enb_data
.
nb_rb
)
{
case
25
:
case
50
:
case
100
:
break
;
default:
printf
(
"ERROR, bad value for -rb (%d)
\n
"
,
enb_data
.
nb_rb
);
exit
(
1
);
}
if
(
database_filename
==
NULL
)
{
if
(
database_filename
==
NULL
)
{
printf
(
"ERROR: provide a database file (-d)
\n
"
);
printf
(
"ERROR: provide a database file (-d)
\n
"
);
exit
(
1
);
exit
(
1
);
...
@@ -724,7 +740,7 @@ int main(int n, char **v)
...
@@ -724,7 +740,7 @@ int main(int n, char **v)
g
=
gui_init
();
g
=
gui_init
();
new_thread
(
gui_thread
,
g
);
new_thread
(
gui_thread
,
g
);
enb_data
.
ue
=
0
;
enb_data
.
ue
=
3
;
enb_data
.
e
=
&
eg
;
enb_data
.
e
=
&
eg
;
enb_data
.
database
=
database
;
enb_data
.
database
=
database
;
...
...
openair1/PHY/INIT/lte_init.c
View file @
8314a264
...
@@ -1868,6 +1868,8 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
...
@@ -1868,6 +1868,8 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
generate_ul_ref_sigs_rx
();
generate_ul_ref_sigs_rx
();
init_ulsch_power_LUT
();
// SRS
// SRS
for
(
UE_id
=
0
;
UE_id
<
NUMBER_OF_UE_MAX
;
UE_id
++
)
{
for
(
UE_id
=
0
;
UE_id
<
NUMBER_OF_UE_MAX
;
UE_id
++
)
{
srs_vars
[
UE_id
].
srs
=
(
int32_t
*
)
malloc16_clear
(
2
*
fp
->
ofdm_symbol_size
*
sizeof
(
int32_t
));
srs_vars
[
UE_id
].
srs
=
(
int32_t
*
)
malloc16_clear
(
2
*
fp
->
ofdm_symbol_size
*
sizeof
(
int32_t
));
...
...
openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
View file @
8314a264
...
@@ -267,33 +267,28 @@ int32_t temp_in_ifft_0[2048*2] __attribute__((aligned(32)));
...
@@ -267,33 +267,28 @@ int32_t temp_in_ifft_0[2048*2] __attribute__((aligned(32)));
#endif
#endif
}
}
// Convert to time domain for visualization
// Convert to time domain for visualization
memset
(
temp_in_ifft_0
,
0
,
frame_parms
->
ofdm_symbol_size
*
sizeof
(
int32_t
));
for
(
i
=
0
;
i
<
Msc_RS
;
i
++
)
for
(
i
=
0
;
i
<
Msc_RS
;
i
++
)
((
int32_t
*
)
temp_in_ifft_0
)[
i
]
=
ul_ch_estimates
[
aa
][
symbol_offset
+
i
];
((
int32_t
*
)
temp_in_ifft_0
)[
i
]
=
ul_ch_estimates
[
aa
][
symbol_offset
+
i
];
switch
(
frame_parms
->
N_RB_DL
)
{
switch
(
frame_parms
->
N_RB_DL
)
{
case
6
:
case
6
:
idft128
((
int16_t
*
)
temp_in_ifft_0
,
idft128
((
int16_t
*
)
temp_in_ifft_0
,
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
1
);
1
);
break
;
break
;
case
25
:
case
25
:
idft512
((
int16_t
*
)
temp_in_ifft_0
,
idft512
((
int16_t
*
)
temp_in_ifft_0
,
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
1
);
1
);
break
;
break
;
case
50
:
case
50
:
idft1024
((
int16_t
*
)
temp_in_ifft_0
,
idft1024
((
int16_t
*
)
temp_in_ifft_0
,
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
1
);
1
);
break
;
break
;
case
100
:
case
100
:
idft2048
((
int16_t
*
)
temp_in_ifft_0
,
idft2048
((
int16_t
*
)
temp_in_ifft_0
,
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
(
int16_t
*
)
ul_ch_estimates_time
[
aa
],
1
);
1
);
...
...
openair1/PHY/LTE_TRANSPORT/dci.c
View file @
8314a264
...
@@ -2257,11 +2257,18 @@ uint8_t generate_dci_top(uint8_t num_pdcch_symbols,
...
@@ -2257,11 +2257,18 @@ uint8_t generate_dci_top(uint8_t num_pdcch_symbols,
y
[
0
]
=
&
yseq0
[
0
];
y
[
0
]
=
&
yseq0
[
0
];
y
[
1
]
=
&
yseq1
[
0
];
y
[
1
]
=
&
yseq1
[
0
];
#if 0
// reset all bits to <NIL>, here we set <NIL> elements as 2
// reset all bits to <NIL>, here we set <NIL> elements as 2
// memset(e, 2, DCI_BITS_MAX);
// memset(e, 2, DCI_BITS_MAX);
// here we interpret NIL as a random QPSK sequence. That makes power estimation easier.
// here we interpret NIL as a random QPSK sequence. That makes power estimation easier.
for (i=0; i<DCI_BITS_MAX; i++)
for (i=0; i<DCI_BITS_MAX; i++)
e[i]=taus()&1;
e[i]=taus()&1;
#endif
/* clear all bits, the above code may generate too much false detections
* (not sure about this, to be checked somehow)
*/
memset
(
e
,
0
,
DCI_BITS_MAX
);
e_ptr
=
e
;
e_ptr
=
e
;
...
...
openair1/PHY/LTE_TRANSPORT/dci_tools.c
View file @
8314a264
...
@@ -6394,12 +6394,11 @@ uint8_t ul_subframe2pdcch_alloc_subframe(LTE_DL_FRAME_PARMS *frame_parms,uint8_t
...
@@ -6394,12 +6394,11 @@ uint8_t ul_subframe2pdcch_alloc_subframe(LTE_DL_FRAME_PARMS *frame_parms,uint8_t
return
(
9
);
return
(
9
);
else
else
return
((
n
+
6
)
%
10
);
return
((
n
+
6
)
%
10
);
}
}
uint32_t
pdcch_alloc2ul_frame
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint32_t
frame
,
uint8_t
n
)
uint32_t
pdcch_alloc2ul_frame
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint32_t
frame
,
uint8_t
n
)
{
{
uint32_t
ul_frame
=
255
;
uint32_t
ul_frame
;
if
((
frame_parms
->
frame_type
==
TDD
)
&&
if
((
frame_parms
->
frame_type
==
TDD
)
&&
(
frame_parms
->
tdd_config
==
1
)
&&
(
frame_parms
->
tdd_config
==
1
)
&&
...
@@ -6417,8 +6416,7 @@ uint32_t pdcch_alloc2ul_frame(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame, ui
...
@@ -6417,8 +6416,7 @@ uint32_t pdcch_alloc2ul_frame(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame, ui
ul_frame
=
(
frame
+
(
n
>=
6
?
1
:
0
));
ul_frame
=
(
frame
+
(
n
>=
6
?
1
:
0
));
LOG_D
(
PHY
,
"frame %d subframe %d: PUSCH frame = %d
\n
"
,
frame
,
n
,
ul_frame
);
LOG_D
(
PHY
,
"frame %d subframe %d: PUSCH frame = %d
\n
"
,
frame
,
n
,
ul_frame
);
return
ul_frame
;
return
ul_frame
%
1024
;
}
}
int32_t
pmi_convert_rank1_from_rank2
(
uint16_t
pmi_alloc
,
int
tpmi
,
int
nb_rb
)
int32_t
pmi_convert_rank1_from_rank2
(
uint16_t
pmi_alloc
,
int
tpmi
,
int
nb_rb
)
...
...
openair1/PHY/LTE_TRANSPORT/phich.c
View file @
8314a264
...
@@ -151,18 +151,19 @@ unsigned char subframe2_ul_harq(LTE_DL_FRAME_PARMS *frame_parms,unsigned char su
...
@@ -151,18 +151,19 @@ unsigned char subframe2_ul_harq(LTE_DL_FRAME_PARMS *frame_parms,unsigned char su
return
(
0
);
return
(
0
);
}
}
uint8_t
phich_frame2_pusch_frame
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
frame_t
frame
,
uint8_
t
subframe
)
int
phich_frame2_pusch_frame
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
int
frame
,
in
t
subframe
)
{
{
uint8_t
pusch_frame
=
255
;
int
pusch_frame
;
if
(
frame_parms
->
frame_type
==
FDD
)
{
if
(
frame_parms
->
frame_type
==
FDD
)
{
pusch_frame
=
((
subframe
<
4
)
?
(
frame
-
1
)
:
frame
)
;
pusch_frame
=
subframe
<
4
?
frame
+
1024
-
1
:
frame
;
}
else
{
}
else
{
// Note this is not true, but it doesn't matter, the frame number is irrelevant for TDD!
// Note this is not true, but it doesn't matter, the frame number is irrelevant for TDD!
pusch_frame
=
(
frame
);
pusch_frame
=
(
frame
);
}
}
LOG_D
(
PHY
,
"frame %d subframe %d: PUSCH frame = %d
\n
"
,
frame
,
subframe
,
pusch_frame
);
LOG_D
(
PHY
,
"frame %d subframe %d: PUSCH frame = %d
\n
"
,
frame
,
subframe
,
pusch_frame
);
return
pusch_frame
;
return
pusch_frame
%
1024
;
}
}
uint8_t
phich_subframe2_pusch_subframe
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
subframe
)
uint8_t
phich_subframe2_pusch_subframe
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
subframe
)
...
...
openair1/PHY/LTE_TRANSPORT/proto.h
View file @
8314a264
...
@@ -1950,7 +1950,7 @@ uint8_t phich_subframe2_pusch_subframe(LTE_DL_FRAME_PARMS *frame_parms,uint8_t s
...
@@ -1950,7 +1950,7 @@ uint8_t phich_subframe2_pusch_subframe(LTE_DL_FRAME_PARMS *frame_parms,uint8_t s
@param subframe Subframe of received/transmitted PHICH
@param subframe Subframe of received/transmitted PHICH
@returns frame of PUSCH transmission
@returns frame of PUSCH transmission
*/
*/
uint8_t
phich_frame2_pusch_frame
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
frame_t
frame
,
uint8_
t
subframe
);
int
phich_frame2_pusch_frame
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
int
frame
,
in
t
subframe
);
void
print_CQI
(
void
*
o
,
UCI_format_t
uci_format
,
uint8_t
eNB_id
,
int
N_RB_DL
);
void
print_CQI
(
void
*
o
,
UCI_format_t
uci_format
,
uint8_t
eNB_id
,
int
N_RB_DL
);
...
@@ -2109,6 +2109,8 @@ int32_t rx_pucch_emul(PHY_VARS_eNB *phy_vars_eNB,
...
@@ -2109,6 +2109,8 @@ int32_t rx_pucch_emul(PHY_VARS_eNB *phy_vars_eNB,
uint8_t
*
payload
);
uint8_t
*
payload
);
void
init_ulsch_power_LUT
(
void
);
/*!
/*!
\brief Check for PRACH TXop in subframe
\brief Check for PRACH TXop in subframe
@param frame_parms Pointer to LTE_DL_FRAME_PARMS
@param frame_parms Pointer to LTE_DL_FRAME_PARMS
...
...
openair1/PHY/LTE_TRANSPORT/pucch.c
View file @
8314a264
...
@@ -2420,7 +2420,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
...
@@ -2420,7 +2420,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
if
(
fmt
==
pucch_format1b
)
if
(
fmt
==
pucch_format1b
)
*
(
1
+
payload
)
=
(
stat_im
<
0
)
?
1
:
2
;
*
(
1
+
payload
)
=
(
stat_im
<
0
)
?
1
:
2
;
}
else
{
// insufficient energy on PUCCH so NAK
}
else
{
// insufficient energy on PUCCH so NAK
LOG_
D
(
PHY
,
"PUCCH 1a/b: subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d
\n
"
,
subframe
,
sigma2_dB
,
dB_fixed
(
stat_max
),
pucch1_thres
);
LOG_
I
(
PHY
,
"PUCCH 1a/b: subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d
\n
"
,
subframe
,
sigma2_dB
,
dB_fixed
(
stat_max
),
pucch1_thres
);
*
payload
=
4
;
// DTX
*
payload
=
4
;
// DTX
((
int16_t
*
)
&
eNB
->
pucch1ab_stats
[
UE_id
][(
subframe
<<
10
)
+
(
eNB
->
pucch1ab_stats_cnt
[
UE_id
][
subframe
])])[
0
]
=
(
int16_t
)(
stat_re
);
((
int16_t
*
)
&
eNB
->
pucch1ab_stats
[
UE_id
][(
subframe
<<
10
)
+
(
eNB
->
pucch1ab_stats_cnt
[
UE_id
][
subframe
])])[
0
]
=
(
int16_t
)(
stat_re
);
((
int16_t
*
)
&
eNB
->
pucch1ab_stats
[
UE_id
][(
subframe
<<
10
)
+
(
eNB
->
pucch1ab_stats_cnt
[
UE_id
][
subframe
])])[
1
]
=
(
int16_t
)(
stat_im
);
((
int16_t
*
)
&
eNB
->
pucch1ab_stats
[
UE_id
][(
subframe
<<
10
)
+
(
eNB
->
pucch1ab_stats_cnt
[
UE_id
][
subframe
])])[
1
]
=
(
int16_t
)(
stat_im
);
...
...
openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c
View file @
8314a264
...
@@ -1102,7 +1102,15 @@ void ulsch_channel_level(int32_t **drs_ch_estimates_ext,
...
@@ -1102,7 +1102,15 @@ void ulsch_channel_level(int32_t **drs_ch_estimates_ext,
#endif
#endif
}
}
int
ulsch_power_LUT
[
750
];
void
init_ulsch_power_LUT
()
{
int
i
;
for
(
i
=
0
;
i
<
750
;
i
++
)
ulsch_power_LUT
[
i
]
=
(
int
)
ceil
((
pow
(
2
.
0
,(
double
)
i
/
100
)
-
1
.
0
));
}
void
rx_ulsch
(
PHY_VARS_eNB
*
eNB
,
void
rx_ulsch
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
eNB_rxtx_proc_t
*
proc
,
...
@@ -1164,16 +1172,28 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
...
@@ -1164,16 +1172,28 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
l
/
(
frame_parms
->
symbols_per_tti
/
2
));
l
/
(
frame_parms
->
symbols_per_tti
/
2
));
}
}
int
correction_factor
=
1
;
int
deltaMCS
=
1
;
int
MPR_times_100Ks
;
if
(
deltaMCS
==
1
)
{
// Note we're using TBS instead of sumKr, since didn't run segmentation yet!
MPR_times_100Ks
=
500
*
ulsch
[
UE_id
]
->
harq_processes
[
harq_pid
]
->
TBS
/
(
ulsch
[
UE_id
]
->
harq_processes
[
harq_pid
]
->
nb_rb
*
12
*
4
*
ulsch
[
UE_id
]
->
harq_processes
[
harq_pid
]
->
Nsymb_pusch
);
AssertFatal
(
MPR_times_100Ks
<
750
&&
MPR_times_100Ks
>=
0
,
"Impossible value for MPR_times_100Ks %d (TBS %d,Nre %d)
\n
"
,
MPR_times_100Ks
,
ulsch
[
UE_id
]
->
harq_processes
[
harq_pid
]
->
TBS
,
(
ulsch
[
UE_id
]
->
harq_processes
[
harq_pid
]
->
nb_rb
*
12
*
4
*
ulsch
[
UE_id
]
->
harq_processes
[
harq_pid
]
->
Nsymb_pusch
));
if
(
MPR_times_100Ks
>
0
)
correction_factor
=
ulsch_power_LUT
[
MPR_times_100Ks
];
}
for
(
i
=
0
;
i
<
frame_parms
->
nb_antennas_rx
;
i
++
)
{
for
(
i
=
0
;
i
<
frame_parms
->
nb_antennas_rx
;
i
++
)
{
pusch_vars
->
ulsch_power
[
i
]
=
signal_energy_nodc
(
pusch_vars
->
drs_ch_estimates
[
i
],
pusch_vars
->
ulsch_power
[
i
]
=
signal_energy_nodc
(
pusch_vars
->
drs_ch_estimates
[
i
],
ulsch
[
UE_id
]
->
harq_processes
[
harq_pid
]
->
nb_rb
*
12
);
ulsch
[
UE_id
]
->
harq_processes
[
harq_pid
]
->
nb_rb
*
12
)
/
correction_factor
;
/* printf("%4.4d.%d power harq_pid %d rb %2.2d TBS %2.2d (MPR_times_Ks %d correction %d) power %d dBtimes10\n", proc->frame_rx, proc->subframe_rx, harq_pid, ulsch[UE_id]->harq_processes[harq_pid]->nb_rb, ulsch[UE_id]->harq_processes[harq_pid]->TBS,MPR_times_100Ks,correction_factor,dB_fixed_times10(pusch_vars->ulsch_power[i]));
#ifdef LOCALIZATION
*/
pusch_vars
->
subcarrier_power
=
(
int32_t
*
)
malloc
(
ulsch
[
UE_id
]
->
harq_processes
[
harq_pid
]
->
nb_rb
*
12
*
sizeof
(
int32_t
));
pusch_vars
->
active_subcarrier
=
subcarrier_energy
(
pusch_vars
->
drs_ch_estimates
[
i
],
ulsch
[
UE_id
]
->
harq_processes
[
harq_pid
]
->
nb_rb
*
12
,
pusch_vars
->
subcarrier_power
,
rx_power_correction
);
#endif
}
}
...
...
openair1/PHY/MODULATION/ofdm_mod.c
View file @
8314a264
...
@@ -33,47 +33,29 @@ This section deals with basic functions for OFDM Modulation.
...
@@ -33,47 +33,29 @@ This section deals with basic functions for OFDM Modulation.
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
//static short temp2[2048*4] __attribute__((aligned(16)));
//#define DEBUG_OFDM_MOD
//#define DEBUG_OFDM_MOD
void
normal_prefix_mod
(
int32_t
*
txdataF
,
int32_t
*
txdata
,
uint8_t
nsymb
,
LTE_DL_FRAME_PARMS
*
frame_parms
)
void
normal_prefix_mod
(
int32_t
*
txdataF
,
int32_t
*
txdata
,
uint8_t
nsymb
,
LTE_DL_FRAME_PARMS
*
frame_parms
)
{
{
uint8_t
i
;
int
short_offset
=
0
;
if
((
2
*
nsymb
)
<
frame_parms
->
symbols_per_tti
)
short_offset
=
1
;
// printf("nsymb %d\n",nsymb);
for
(
i
=
0
;
i
<
((
short_offset
)
+
2
*
nsymb
/
frame_parms
->
symbols_per_tti
);
i
++
)
{
#ifdef DEBUG_OFDM_MOD
printf
(
"slot i %d (txdata offset %d, txoutput %p)
\n
"
,
i
,(
i
*
(
frame_parms
->
samples_per_tti
>>
1
)),
txdata
+
(
i
*
(
frame_parms
->
samples_per_tti
>>
1
)));
#endif
PHY_ofdm_mod
(
txdataF
+
(
i
*
frame_parms
->
ofdm_symbol_size
*
frame_parms
->
symbols_per_tti
>>
1
)
,
// input
PHY_ofdm_mod
(
txdataF
,
// input
txdata
+
(
i
*
frame_parms
->
samples_per_tti
>>
1
)
,
// output
txdata
,
// output
frame_parms
->
ofdm_symbol_size
,
frame_parms
->
ofdm_symbol_size
,
1
,
// number of symbols
1
,
// number of symbols
frame_parms
->
nb_prefix_samples0
,
// number of prefix samples
frame_parms
->
nb_prefix_samples0
,
// number of prefix samples
CYCLIC_PREFIX
);
CYCLIC_PREFIX
);
#ifdef DEBUG_OFDM_MOD
PHY_ofdm_mod
(
txdataF
+
frame_parms
->
ofdm_symbol_size
,
// input
printf
(
"slot i %d (txdata offset %d)
\n
"
,
i
,
OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES0
+
(
i
*
frame_parms
->
samples_per_tti
>>
1
));
txdata
+
OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES0
,
// output
#endif
PHY_ofdm_mod
(
txdataF
+
frame_parms
->
ofdm_symbol_size
+
(
i
*
frame_parms
->
ofdm_symbol_size
*
(
frame_parms
->
symbols_per_tti
>>
1
)),
// input
txdata
+
OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES0
+
(
i
*
(
frame_parms
->
samples_per_tti
>>
1
)),
// output
frame_parms
->
ofdm_symbol_size
,
frame_parms
->
ofdm_symbol_size
,
(
short_offset
==
1
)
?
1
:
(
frame_parms
->
symbols_per_tti
>>
1
)
-
1
,
//6, // number of symbols
nsymb
-
1
,
frame_parms
->
nb_prefix_samples
,
// number of prefix samples
frame_parms
->
nb_prefix_samples
,
// number of prefix samples
CYCLIC_PREFIX
);
CYCLIC_PREFIX
);
}
}
}
void
PHY_ofdm_mod
(
int
*
input
,
/// pointer to complex input
void
PHY_ofdm_mod
(
int
*
input
,
/// pointer to complex input
...
@@ -85,7 +67,7 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input
...
@@ -85,7 +67,7 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input
)
)
{
{
s
tatic
s
hort
temp
[
2048
*
4
]
__attribute__
((
aligned
(
32
)));
short
temp
[
2048
*
4
]
__attribute__
((
aligned
(
32
)));
unsigned
short
i
,
j
;
unsigned
short
i
,
j
;
short
k
;
short
k
;
...
@@ -165,9 +147,10 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input
...
@@ -165,9 +147,10 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input
if
(
fftsize
==
128
)
if
(
fftsize
==
128
)
#endif
#endif
{
{
for
(
j
=
0
;
j
<
fftsize
;
j
++
)
{
/*
for (j=0; j<fftsize ; j++) {
output_ptr[j] = temp_ptr[j];
output_ptr[j] = temp_ptr[j];
}
}*/
memcpy
((
void
*
)
output_ptr
,(
void
*
)
temp_ptr
,
fftsize
<<
2
);
}
}
j
=
fftsize
;
j
=
fftsize
;
...
...
openair1/PHY/TOOLS/time_meas.c
View file @
8314a264
...
@@ -83,9 +83,8 @@ void print_meas(time_stats_t *ts, const char* name, time_stats_t * total_exec_ti
...
@@ -83,9 +83,8 @@ void print_meas(time_stats_t *ts, const char* name, time_stats_t * total_exec_ti
//printf("%20s: total: %10.3f ms, average: %10.3f us (%10d trials)\n", name, ts->diff/cpu_freq_GHz/1000000.0, ts->diff/ts->trials/cpu_freq_GHz/1000.0, ts->trials);
//printf("%20s: total: %10.3f ms, average: %10.3f us (%10d trials)\n", name, ts->diff/cpu_freq_GHz/1000000.0, ts->diff/ts->trials/cpu_freq_GHz/1000.0, ts->trials);
if
((
total_exec_time
==
NULL
)
||
(
sf_exec_time
==
NULL
))
{
if
((
total_exec_time
==
NULL
)
||
(
sf_exec_time
==
NULL
))
{
fprintf
(
stderr
,
"%25s: %15.3f
ms ; %15.3f
us; %15d;
\n
"
,
fprintf
(
stderr
,
"%25s: %15.3f us; %15d;
\n
"
,
name
,
name
,
(
ts
->
diff
/
cpu_freq_GHz
/
1000000
.
0
),
(
ts
->
diff
/
ts
->
trials
/
cpu_freq_GHz
/
1000
.
0
),
(
ts
->
diff
/
ts
->
trials
/
cpu_freq_GHz
/
1000
.
0
),
ts
->
trials
);
ts
->
trials
);
}
else
{
}
else
{
...
...
openair1/PHY/defs.h
View file @
8314a264
...
@@ -331,6 +331,8 @@ typedef struct RU_proc_t_s {
...
@@ -331,6 +331,8 @@ typedef struct RU_proc_t_s {
int
instance_cnt_asynch_rxtx
;
int
instance_cnt_asynch_rxtx
;
/// \internal This variable is protected by \ref mutex_fep
/// \internal This variable is protected by \ref mutex_fep
int
instance_cnt_fep
;
int
instance_cnt_fep
;
/// \internal This variable is protected by \ref mutex_fep
int
instance_cnt_feptx
;
/// pthread structure for RU FH processing thread
/// pthread structure for RU FH processing thread
pthread_t
pthread_FH
;
pthread_t
pthread_FH
;
/// pthread structure for RU prach processing thread
/// pthread structure for RU prach processing thread
...
@@ -341,8 +343,10 @@ typedef struct RU_proc_t_s {
...
@@ -341,8 +343,10 @@ typedef struct RU_proc_t_s {
#endif
#endif
/// pthread struct for RU synch thread
/// pthread struct for RU synch thread
pthread_t
pthread_synch
;
pthread_t
pthread_synch
;
/// pthread struct for RU RX FEP thread
/// pthread struct for RU RX FEP
worker
thread
pthread_t
pthread_fep
;
pthread_t
pthread_fep
;
/// pthread struct for RU RX FEPTX worker thread
pthread_t
pthread_feptx
;
/// pthread structure for asychronous RX/TX processing thread
/// pthread structure for asychronous RX/TX processing thread
pthread_t
pthread_asynch_rxtx
;
pthread_t
pthread_asynch_rxtx
;
/// flag to indicate first RX acquisition
/// flag to indicate first RX acquisition
...
@@ -361,8 +365,10 @@ typedef struct RU_proc_t_s {
...
@@ -361,8 +365,10 @@ typedef struct RU_proc_t_s {
pthread_attr_t
attr_synch
;
pthread_attr_t
attr_synch
;
/// pthread attributes for asynchronous RX thread
/// pthread attributes for asynchronous RX thread
pthread_attr_t
attr_asynch_rxtx
;
pthread_attr_t
attr_asynch_rxtx
;
/// pthread attributes for
parallel
fep thread
/// pthread attributes for
worker
fep thread
pthread_attr_t
attr_fep
;
pthread_attr_t
attr_fep
;
/// pthread attributes for worker feptx thread
pthread_attr_t
attr_feptx
;
/// scheduling parameters for RU FH thread
/// scheduling parameters for RU FH thread
struct
sched_param
sched_param_FH
;
struct
sched_param
sched_param_FH
;
/// scheduling parameters for RU prach thread
/// scheduling parameters for RU prach thread
...
@@ -389,6 +395,8 @@ typedef struct RU_proc_t_s {
...
@@ -389,6 +395,8 @@ typedef struct RU_proc_t_s {
pthread_cond_t
cond_asynch_rxtx
;
pthread_cond_t
cond_asynch_rxtx
;
/// condition varaible for RU RX FEP thread
/// condition varaible for RU RX FEP thread
pthread_cond_t
cond_fep
;
pthread_cond_t
cond_fep
;
/// condition varaible for RU RX FEPTX thread
pthread_cond_t
cond_feptx
;
/// condition variable for eNB signal
/// condition variable for eNB signal
pthread_cond_t
cond_eNBs
;
pthread_cond_t
cond_eNBs
;
/// mutex for RU FH
/// mutex for RU FH
...
@@ -405,8 +413,10 @@ typedef struct RU_proc_t_s {
...
@@ -405,8 +413,10 @@ typedef struct RU_proc_t_s {
pthread_mutex_t
mutex_eNBs
;
pthread_mutex_t
mutex_eNBs
;
/// mutex for asynch RX/TX thread
/// mutex for asynch RX/TX thread
pthread_mutex_t
mutex_asynch_rxtx
;
pthread_mutex_t
mutex_asynch_rxtx
;
/// mutex for fep RX
/// mutex for fep RX
worker thread
pthread_mutex_t
mutex_fep
;
pthread_mutex_t
mutex_fep
;
/// mutex for fep TX worker thread
pthread_mutex_t
mutex_feptx
;
/// symbol mask for IF4p5 reception per subframe
/// symbol mask for IF4p5 reception per subframe
uint32_t
symbol_mask
[
10
];
uint32_t
symbol_mask
[
10
];
/// number of slave threads
/// number of slave threads
...
@@ -741,6 +751,8 @@ typedef struct RU_t_s{
...
@@ -741,6 +751,8 @@ typedef struct RU_t_s{
void
(
*
eNB_top
)(
struct
PHY_VARS_eNB_s
*
eNB
,
int
frame_rx
,
int
subframe_rx
,
char
*
string
);
void
(
*
eNB_top
)(
struct
PHY_VARS_eNB_s
*
eNB
,
int
frame_rx
,
int
subframe_rx
,
char
*
string
);
/// Timing statistics
/// Timing statistics
time_stats_t
ofdm_demod_stats
;
time_stats_t
ofdm_demod_stats
;
/// Timing statistics (TX)
time_stats_t
ofdm_mod_stats
;
/// RX and TX buffers for precoder output
/// RX and TX buffers for precoder output
RU_COMMON
common
;
RU_COMMON
common
;
/// beamforming weight vectors per eNB
/// beamforming weight vectors per eNB
...
@@ -756,6 +768,8 @@ typedef struct RU_t_s{
...
@@ -756,6 +768,8 @@ typedef struct RU_t_s{
openair0_timestamp
ts_offset
;
openair0_timestamp
ts_offset
;
/// process scheduling variables
/// process scheduling variables
RU_proc_t
proc
;
RU_proc_t
proc
;
/// stats thread pthread descriptor
pthread_t
ru_stats_thread
;
}
RU_t
;
}
RU_t
;
...
...
openair1/SCHED/fapi_l1.c
View file @
8314a264
...
@@ -587,7 +587,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
...
@@ -587,7 +587,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
ul_frame
=
pdcch_alloc2ul_frame
(
fp
,
frame
,
subframe
);
ul_frame
=
pdcch_alloc2ul_frame
(
fp
,
frame
,
subframe
);
AssertFatal
(
proc
->
subframe_tx
==
subframe
,
"Current subframe %d != NFAPI subframe %d
\n
"
,
proc
->
subframe_tx
,
subframe
);
AssertFatal
(
proc
->
subframe_tx
==
subframe
,
"Current subframe %d != NFAPI subframe %d
\n
"
,
proc
->
subframe_tx
,
subframe
);
AssertFatal
(
proc
->
subframe_tx
==
sub
frame
,
"Current frame %d != NFAPI frame %d
\n
"
,
proc
->
frame_tx
,
frame
);
AssertFatal
(
proc
->
frame_tx
==
frame
,
"Current frame %d != NFAPI frame %d
\n
"
,
proc
->
frame_tx
,
frame
);
uint8_t
number_dl_pdu
=
DL_req
->
dl_config_request_body
.
number_pdu
;
uint8_t
number_dl_pdu
=
DL_req
->
dl_config_request_body
.
number_pdu
;
uint8_t
number_hi_dci0_pdu
=
HI_DCI0_req
->
hi_dci0_request_body
.
number_of_dci
+
HI_DCI0_req
->
hi_dci0_request_body
.
number_of_hi
;
uint8_t
number_hi_dci0_pdu
=
HI_DCI0_req
->
hi_dci0_request_body
.
number_of_dci
+
HI_DCI0_req
->
hi_dci0_request_body
.
number_of_hi
;
...
...
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
8314a264
...
@@ -900,7 +900,7 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
...
@@ -900,7 +900,7 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
frame
,
subframe
,
frame
,
subframe
,
pucch_b0b1
[
0
][
0
],
metric
[
0
]);
pucch_b0b1
[
0
][
0
],
metric
[
0
]);
uci
->
stat
=
metric
[
0
];
fill_uci_harq_indication
(
eNB
,
uci
,
frame
,
subframe
,
pucch_b0b1
[
0
],
0
,
0xffff
);
fill_uci_harq_indication
(
eNB
,
uci
,
frame
,
subframe
,
pucch_b0b1
[
0
],
0
,
0xffff
);
}
}
...
@@ -971,6 +971,7 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
...
@@ -971,6 +971,7 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
else
if
(
pucch_b0b1
[
1
][
0
]
!=
1
&&
pucch_b0b1
[
1
][
1
]
!=
1
)
{
// 0 ACKs, or at least one DL assignment missed
else
if
(
pucch_b0b1
[
1
][
0
]
!=
1
&&
pucch_b0b1
[
1
][
1
]
!=
1
)
{
// 0 ACKs, or at least one DL assignment missed
harq_ack
[
0
]
=
0
;
harq_ack
[
0
]
=
0
;
}
}
uci
->
stat
=
metric
[
0
];
fill_uci_harq_indication
(
eNB
,
uci
,
frame
,
subframe
,
harq_ack
,
2
,
0xffff
);
// special_bundling mode
fill_uci_harq_indication
(
eNB
,
uci
,
frame
,
subframe
,
harq_ack
,
2
,
0xffff
);
// special_bundling mode
}
}
else
if
((
uci
->
tdd_bundling
==
0
)
&&
(
uci
->
num_pucch_resources
==
2
)){
// multiplexing + no SR, implement Table 10.1.3-5 (Rel14) for multiplexing with M=2
else
if
((
uci
->
tdd_bundling
==
0
)
&&
(
uci
->
num_pucch_resources
==
2
)){
// multiplexing + no SR, implement Table 10.1.3-5 (Rel14) for multiplexing with M=2
...
@@ -1012,6 +1013,7 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
...
@@ -1012,6 +1013,7 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
}
}
}
}
}
}
uci
->
stat
=
max
(
metric
[
0
],
metric
[
1
]);
fill_uci_harq_indication
(
eNB
,
uci
,
frame
,
subframe
,
harq_ack
,
1
,
tdd_multiplexing_mask
);
// multiplexing mode
fill_uci_harq_indication
(
eNB
,
uci
,
frame
,
subframe
,
harq_ack
,
1
,
tdd_multiplexing_mask
);
// multiplexing mode
}
//else if ((uci->tdd_bundling == 0) && (res==2))
}
//else if ((uci->tdd_bundling == 0) && (res==2))
else
if
((
uci
->
tdd_bundling
==
0
)
&&
(
uci
->
num_pucch_resources
==
3
)){
// multiplexing + no SR, implement Table 10.1.3-6 (Rel14) for multiplexing with M=3
else
if
((
uci
->
tdd_bundling
==
0
)
&&
(
uci
->
num_pucch_resources
==
3
)){
// multiplexing + no SR, implement Table 10.1.3-6 (Rel14) for multiplexing with M=3
...
@@ -1092,8 +1094,9 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
...
@@ -1092,8 +1094,9 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
tdd_multiplexing_mask
=
0x4
;
tdd_multiplexing_mask
=
0x4
;
}
}
}
}
}
uci
->
stat
=
max_metric
;
fill_uci_harq_indication
(
eNB
,
uci
,
frame
,
subframe
,
harq_ack
,
1
,
tdd_multiplexing_mask
);
// multiplexing mode
fill_uci_harq_indication
(
eNB
,
uci
,
frame
,
subframe
,
harq_ack
,
1
,
tdd_multiplexing_mask
);
// multiplexing mode
}
}
//else if ((uci->tdd_bundling == 0) && (res==3))
}
//else if ((uci->tdd_bundling == 0) && (res==3))
else
if
((
uci
->
tdd_bundling
==
0
)
&&
(
uci
->
num_pucch_resources
==
4
)){
// multiplexing + no SR, implement Table 10.1.3-7 (Rel14) for multiplexing with M=4
else
if
((
uci
->
tdd_bundling
==
0
)
&&
(
uci
->
num_pucch_resources
==
4
)){
// multiplexing + no SR, implement Table 10.1.3-7 (Rel14) for multiplexing with M=4
if
(
pucch_b0b1
[
0
][
0
]
==
4
||
if
(
pucch_b0b1
[
0
][
0
]
==
4
||
...
@@ -1229,11 +1232,13 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
...
@@ -1229,11 +1232,13 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
}
}
}
}
}
}
uci
->
stat
=
max_metric
;
fill_uci_harq_indication
(
eNB
,
uci
,
frame
,
subframe
,
harq_ack
,
1
,
tdd_multiplexing_mask
);
// multiplexing mode
fill_uci_harq_indication
(
eNB
,
uci
,
frame
,
subframe
,
harq_ack
,
1
,
tdd_multiplexing_mask
);
// multiplexing mode
}
// else if ((uci->tdd_bundling == 0) && (res==4))
}
// else if ((uci->tdd_bundling == 0) && (res==4))
else
{
// bundling
else
{
// bundling
harq_ack
[
0
]
=
pucch_b0b1
[
0
][
0
];
harq_ack
[
0
]
=
pucch_b0b1
[
0
][
0
];
harq_ack
[
1
]
=
pucch_b0b1
[
0
][
1
];
harq_ack
[
1
]
=
pucch_b0b1
[
0
][
1
];
uci
->
stat
=
metric
[
0
];
fill_uci_harq_indication
(
eNB
,
uci
,
frame
,
subframe
,
harq_ack
,
0
,
0xffff
);
// special_bundling mode
fill_uci_harq_indication
(
eNB
,
uci
,
frame
,
subframe
,
harq_ack
,
0
,
0xffff
);
// special_bundling mode
}
}
...
@@ -1389,10 +1394,12 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
...
@@ -1389,10 +1394,12 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
ulsch
->
Mlimit
,
ulsch
->
Mlimit
,
ulsch_harq
->
o_ACK
[
0
],
ulsch_harq
->
o_ACK
[
0
],
ulsch_harq
->
o_ACK
[
1
]);
ulsch_harq
->
o_ACK
[
1
]);
if
(
ulsch_harq
->
round
>=
3
)
{
/*if (dB_fixed_times10(eNB->pusch_vars[i]->ulsch_power[0]) > 300) {
ulsch_harq
->
status
=
SCH_IDLE
;
dump_ulsch(eNB,frame,subframe,i); exit(-1);
ulsch_harq
->
handled
=
0
;
} */
ulsch
->
harq_mask
&=
~
(
1
<<
harq_pid
);
ulsch_harq
->
round
=
0
;
}
#if defined(MESSAGE_CHART_GENERATOR_PHY)
#if defined(MESSAGE_CHART_GENERATOR_PHY)
MSC_LOG_RX_DISCARDED_MESSAGE
(
MSC_LOG_RX_DISCARDED_MESSAGE
(
MSC_PHY_ENB
,
MSC_PHY_UE
,
MSC_PHY_ENB
,
MSC_PHY_UE
,
...
@@ -1763,6 +1770,7 @@ void fill_uci_harq_indication(PHY_VARS_eNB *eNB,
...
@@ -1763,6 +1770,7 @@ void fill_uci_harq_indication(PHY_VARS_eNB *eNB,
// estimate UL_CQI for MAC (from antenna port 0 only)
// estimate UL_CQI for MAC (from antenna port 0 only)
int
SNRtimes10
=
dB_fixed_times10
(
uci
->
stat
)
-
200
;
//(10*eNB->measurements.n0_power_dB[0]);
int
SNRtimes10
=
dB_fixed_times10
(
uci
->
stat
)
-
200
;
//(10*eNB->measurements.n0_power_dB[0]);
if
(
SNRtimes10
<
-
100
)
LOG_I
(
PHY
,
"uci->stat %d
\n
"
,
uci
->
stat
);
if
(
SNRtimes10
<
-
640
)
pdu
->
ul_cqi_information
.
ul_cqi
=
0
;
if
(
SNRtimes10
<
-
640
)
pdu
->
ul_cqi_information
.
ul_cqi
=
0
;
else
if
(
SNRtimes10
>
635
)
pdu
->
ul_cqi_information
.
ul_cqi
=
255
;
else
if
(
SNRtimes10
>
635
)
pdu
->
ul_cqi_information
.
ul_cqi
=
255
;
...
...
openair1/SCHED/ru_procedures.c
View file @
8314a264
...
@@ -54,10 +54,162 @@
...
@@ -54,10 +54,162 @@
#include <time.h>
#include <time.h>
#include "targets/RT/USER/rt_wrapper.h"
// RU OFDM Modulator, used in IF4p5 RRU, RCC/RAU with IF5, eNodeB
// RU OFDM Modulator, used in IF4p5 RRU, RCC/RAU with IF5, eNodeB
extern
openair0_config_t
openair0_cfg
[
MAX_CARDS
];
extern
openair0_config_t
openair0_cfg
[
MAX_CARDS
];
extern
int
oai_exit
;
void
feptx0
(
RU_t
*
ru
,
int
slot
)
{
LTE_DL_FRAME_PARMS
*
fp
=
&
ru
->
frame_parms
;
//int dummy_tx_b[7680*2] __attribute__((aligned(32)));
unsigned
int
aa
,
slot_offset
;
int
i
,
j
,
tx_offset
;
int
slot_sizeF
=
(
fp
->
ofdm_symbol_size
)
*
((
fp
->
Ncp
==
1
)
?
6
:
7
);
int
len
,
len2
;
int16_t
*
txdata
;
int
subframe
=
ru
->
proc
.
subframe_tx
;
slot_offset
=
subframe
*
fp
->
samples_per_tti
+
(
slot
*
(
fp
->
samples_per_tti
>>
1
));
// LOG_D(HW,"Frame %d: Generating slot %d\n",frame,next_slot);
for
(
aa
=
0
;
aa
<
ru
->
nb_tx
;
aa
++
)
{
if
(
fp
->
Ncp
==
EXTENDED
)
PHY_ofdm_mod
(
&
ru
->
common
.
txdataF_BF
[
aa
][
slot
*
slot_sizeF
],
(
int
*
)
&
ru
->
common
.
txdata
[
aa
][
slot_offset
],
fp
->
ofdm_symbol_size
,
6
,
fp
->
nb_prefix_samples
,
CYCLIC_PREFIX
);
else
normal_prefix_mod
(
&
ru
->
common
.
txdataF_BF
[
aa
][
slot
*
slot_sizeF
],
(
int
*
)
&
ru
->
common
.
txdata
[
aa
][
slot_offset
],
7
,
fp
);
/*
len = fp->samples_per_tti>>1;
if ((slot_offset+len)>(LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*fp->samples_per_tti)) {
tx_offset = (int)slot_offset;
txdata = (int16_t*)&ru->common.txdata[aa][tx_offset];
len2 = -tx_offset+LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*fp->samples_per_tti;
for (i=0; i<(len2<<1); i++) {
txdata[i] = ((int16_t*)dummy_tx_b)[i];
}
txdata = (int16_t*)&ru->common.txdata[aa][0];
for (j=0; i<(len<<1); i++,j++) {
txdata[j++] = ((int16_t*)dummy_tx_b)[i];
}
}
else {
tx_offset = (int)slot_offset;
txdata = (int16_t*)&ru->common.txdata[aa][tx_offset];
memcpy((void*)txdata,(void*)dummy_tx_b,len<<2);
}
*/
// TDD: turn on tx switch N_TA_offset before by setting buffer in these samples to 0
if
((
slot
==
0
)
&&
(
fp
->
frame_type
==
TDD
)
&&
((
fp
->
tdd_config
==
0
)
||
(
fp
->
tdd_config
==
1
)
||
(
fp
->
tdd_config
==
2
)
||
(
fp
->
tdd_config
==
6
))
&&
((
subframe
==
0
)
||
(
subframe
==
5
)))
{
for
(
i
=
0
;
i
<
ru
->
N_TA_offset
;
i
++
)
{
tx_offset
=
(
int
)
slot_offset
+
i
-
ru
->
N_TA_offset
/
2
;
if
(
tx_offset
<
0
)
tx_offset
+=
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
*
fp
->
samples_per_tti
;
if
(
tx_offset
>=
(
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
*
fp
->
samples_per_tti
))
tx_offset
-=
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
*
fp
->
samples_per_tti
;
ru
->
common
.
txdata
[
aa
][
tx_offset
]
=
0x00000000
;
}
}
}
}
static
void
*
feptx_thread
(
void
*
param
)
{
RU_t
*
ru
=
(
RU_t
*
)
param
;
RU_proc_t
*
proc
=
&
ru
->
proc
;
thread_top_init
(
"feptx_thread"
,
0
,
870000
,
1000000
,
1000000
);
while
(
!
oai_exit
)
{
if
(
wait_on_condition
(
&
proc
->
mutex_feptx
,
&
proc
->
cond_feptx
,
&
proc
->
instance_cnt_feptx
,
"feptx thread"
)
<
0
)
break
;
feptx0
(
ru
,
1
);
if
(
release_thread
(
&
proc
->
mutex_feptx
,
&
proc
->
instance_cnt_feptx
,
"feptx thread"
)
<
0
)
break
;
if
(
pthread_cond_signal
(
&
proc
->
cond_feptx
)
!=
0
)
{
printf
(
"[eNB] ERROR pthread_cond_signal for feptx thread exit
\n
"
);
exit_fun
(
"ERROR pthread_cond_signal"
);
return
NULL
;
}
}
return
(
NULL
);
}
void
feptx_ofdm_2thread
(
RU_t
*
ru
)
{
LTE_DL_FRAME_PARMS
*
fp
=&
ru
->
frame_parms
;
RU_proc_t
*
proc
=
&
ru
->
proc
;
struct
timespec
wait
;
int
subframe
=
ru
->
proc
.
subframe_tx
;
wait
.
tv_sec
=
0
;
wait
.
tv_nsec
=
5000000L
;
start_meas
(
&
ru
->
ofdm_mod_stats
);
if
(
subframe_select
(
fp
,
subframe
)
==
SF_UL
)
return
;
if
(
subframe_select
(
fp
,
subframe
)
==
SF_DL
)
{
// If this is not an S-subframe
if
(
pthread_mutex_timedlock
(
&
proc
->
mutex_feptx
,
&
wait
)
!=
0
)
{
printf
(
"[RU] ERROR pthread_mutex_lock for feptx thread (IC %d)
\n
"
,
proc
->
instance_cnt_feptx
);
exit_fun
(
"error locking mutex_feptx"
);
return
;
}
if
(
proc
->
instance_cnt_feptx
==
0
)
{
printf
(
"[RU] FEPtx thread busy
\n
"
);
exit_fun
(
"FEPtx thread busy"
);
pthread_mutex_unlock
(
&
proc
->
mutex_feptx
);
return
;
}
++
proc
->
instance_cnt_feptx
;
if
(
pthread_cond_signal
(
&
proc
->
cond_feptx
)
!=
0
)
{
printf
(
"[RU] ERROR pthread_cond_signal for feptx thread
\n
"
);
exit_fun
(
"ERROR pthread_cond_signal"
);
return
;
}
pthread_mutex_unlock
(
&
proc
->
mutex_feptx
);
}
// call first slot in this thread
feptx0
(
ru
,
0
);
wait_on_busy_condition
(
&
proc
->
mutex_feptx
,
&
proc
->
cond_feptx
,
&
proc
->
instance_cnt_feptx
,
"feptx thread"
);
stop_meas
(
&
ru
->
ofdm_mod_stats
);
}
void
feptx_ofdm
(
RU_t
*
ru
)
{
void
feptx_ofdm
(
RU_t
*
ru
)
{
LTE_DL_FRAME_PARMS
*
fp
=&
ru
->
frame_parms
;
LTE_DL_FRAME_PARMS
*
fp
=&
ru
->
frame_parms
;
...
@@ -83,6 +235,8 @@ void feptx_ofdm(RU_t *ru) {
...
@@ -83,6 +235,8 @@ void feptx_ofdm(RU_t *ru) {
((
subframe_select
(
fp
,
subframe
)
==
SF_S
)))
{
((
subframe_select
(
fp
,
subframe
)
==
SF_S
)))
{
// LOG_D(HW,"Frame %d: Generating slot %d\n",frame,next_slot);
// LOG_D(HW,"Frame %d: Generating slot %d\n",frame,next_slot);
start_meas
(
&
ru
->
ofdm_mod_stats
);
for
(
aa
=
0
;
aa
<
ru
->
nb_tx
;
aa
++
)
{
for
(
aa
=
0
;
aa
<
ru
->
nb_tx
;
aa
++
)
{
if
(
fp
->
Ncp
==
EXTENDED
)
{
if
(
fp
->
Ncp
==
EXTENDED
)
{
PHY_ofdm_mod
(
&
ru
->
common
.
txdataF_BF
[
aa
][
0
],
PHY_ofdm_mod
(
&
ru
->
common
.
txdataF_BF
[
aa
][
0
],
...
@@ -167,11 +321,12 @@ void feptx_ofdm(RU_t *ru) {
...
@@ -167,11 +321,12 @@ void feptx_ofdm(RU_t *ru) {
}
}
}
}
*/
*/
if
((((
fp
->
tdd_config
==
0
)
||
if
((
fp
->
frame_type
==
TDD
)
&&
((
fp
->
tdd_config
==
0
)
||
(
fp
->
tdd_config
==
1
)
||
(
fp
->
tdd_config
==
1
)
||
(
fp
->
tdd_config
==
2
)
||
(
fp
->
tdd_config
==
2
)
||
(
fp
->
tdd_config
==
6
))
&&
(
fp
->
tdd_config
==
6
))
&&
(
subframe
==
0
))
||
(
subframe
==
5
))
{
((
subframe
==
0
)
||
(
subframe
==
5
)
))
{
// turn on tx switch N_TA_offset before
// turn on tx switch N_TA_offset before
//LOG_D(HW,"subframe %d, time to switch to tx (N_TA_offset %d, slot_offset %d) \n",subframe,ru->N_TA_offset,slot_offset);
//LOG_D(HW,"subframe %d, time to switch to tx (N_TA_offset %d, slot_offset %d) \n",subframe,ru->N_TA_offset,slot_offset);
for
(
i
=
0
;
i
<
ru
->
N_TA_offset
;
i
++
)
{
for
(
i
=
0
;
i
<
ru
->
N_TA_offset
;
i
++
)
{
...
@@ -185,6 +340,7 @@ void feptx_ofdm(RU_t *ru) {
...
@@ -185,6 +340,7 @@ void feptx_ofdm(RU_t *ru) {
ru
->
common
.
txdata
[
aa
][
tx_offset
]
=
0x00000000
;
ru
->
common
.
txdata
[
aa
][
tx_offset
]
=
0x00000000
;
}
}
}
}
stop_meas
(
&
ru
->
ofdm_mod_stats
);
LOG_D
(
PHY
,
"feptx_ofdm (TXPATH): frame %d, subframe %d: txp (time %p) %d dB, txp (freq) %d dB
\n
"
,
LOG_D
(
PHY
,
"feptx_ofdm (TXPATH): frame %d, subframe %d: txp (time %p) %d dB, txp (freq) %d dB
\n
"
,
ru
->
proc
.
frame_tx
,
subframe
,
txdata
,
dB_fixed
(
signal_energy
((
int32_t
*
)
txdata
,
fp
->
samples_per_tti
)),
ru
->
proc
.
frame_tx
,
subframe
,
txdata
,
dB_fixed
(
signal_energy
((
int32_t
*
)
txdata
,
fp
->
samples_per_tti
)),
dB_fixed
(
signal_energy_nodc
(
ru
->
common
.
txdataF_BF
[
aa
],
2
*
slot_sizeF
)));
dB_fixed
(
signal_energy_nodc
(
ru
->
common
.
txdataF_BF
[
aa
],
2
*
slot_sizeF
)));
...
@@ -234,11 +390,6 @@ void feptx_prec(RU_t *ru) {
...
@@ -234,11 +390,6 @@ void feptx_prec(RU_t *ru) {
}
}
}
}
typedef
struct
{
RU_t
*
ru
;
int
slot
;
}
fep_task
;
void
fep0
(
RU_t
*
ru
,
int
slot
)
{
void
fep0
(
RU_t
*
ru
,
int
slot
)
{
RU_proc_t
*
proc
=
&
ru
->
proc
;
RU_proc_t
*
proc
=
&
ru
->
proc
;
...
@@ -259,12 +410,13 @@ void fep0(RU_t *ru,int slot) {
...
@@ -259,12 +410,13 @@ void fep0(RU_t *ru,int slot) {
extern
int
oai_exit
;
static
void
*
fep_thread
(
void
*
param
)
{
static
void
*
fep_thread
(
void
*
param
)
{
RU_t
*
ru
=
(
RU_t
*
)
param
;
RU_t
*
ru
=
(
RU_t
*
)
param
;
RU_proc_t
*
proc
=
&
ru
->
proc
;
RU_proc_t
*
proc
=
&
ru
->
proc
;
thread_top_init
(
"fep_thread"
,
0
,
870000
,
1000000
,
1000000
);
while
(
!
oai_exit
)
{
while
(
!
oai_exit
)
{
if
(
wait_on_condition
(
&
proc
->
mutex_fep
,
&
proc
->
cond_fep
,
&
proc
->
instance_cnt_fep
,
"fep thread"
)
<
0
)
break
;
if
(
wait_on_condition
(
&
proc
->
mutex_fep
,
&
proc
->
cond_fep
,
&
proc
->
instance_cnt_fep
,
"fep thread"
)
<
0
)
break
;
...
@@ -283,6 +435,20 @@ static void *fep_thread(void *param) {
...
@@ -283,6 +435,20 @@ static void *fep_thread(void *param) {
return
(
NULL
);
return
(
NULL
);
}
}
void
init_feptx_thread
(
RU_t
*
ru
,
pthread_attr_t
*
attr_feptx
)
{
RU_proc_t
*
proc
=
&
ru
->
proc
;
proc
->
instance_cnt_feptx
=
-
1
;
pthread_mutex_init
(
&
proc
->
mutex_feptx
,
NULL
);
pthread_cond_init
(
&
proc
->
cond_feptx
,
NULL
);
pthread_create
(
&
proc
->
pthread_feptx
,
attr_feptx
,
feptx_thread
,
(
void
*
)
ru
);
}
void
init_fep_thread
(
RU_t
*
ru
,
pthread_attr_t
*
attr_fep
)
{
void
init_fep_thread
(
RU_t
*
ru
,
pthread_attr_t
*
attr_fep
)
{
RU_proc_t
*
proc
=
&
ru
->
proc
;
RU_proc_t
*
proc
=
&
ru
->
proc
;
...
...
openair2/LAYER2/MAC/eNB_scheduler.c
View file @
8314a264
...
@@ -476,10 +476,12 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP, sub_frame
...
@@ -476,10 +476,12 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP, sub_frame
CC_id
=
UE_PCCID
(
module_idP
,
i
);
CC_id
=
UE_PCCID
(
module_idP
,
i
);
if
((
frameP
==
0
)
&&
(
subframeP
==
0
))
{
if
((
frameP
==
0
)
&&
(
subframeP
==
0
))
{
LOG_
D
(
MAC
,
"UE rnti %x : %s, PHR %d dB CQI
%d
\n
"
,
rnti
,
LOG_
I
(
MAC
,
"UE rnti %x : %s, PHR %d dB DL CQI %d PUSCH SNR %d PUCCH SNR
%d
\n
"
,
rnti
,
UE_list
->
UE_sched_ctrl
[
i
].
ul_out_of_sync
==
0
?
"in synch"
:
"out of sync"
,
UE_list
->
UE_sched_ctrl
[
i
].
ul_out_of_sync
==
0
?
"in synch"
:
"out of sync"
,
UE_list
->
UE_template
[
CC_id
][
i
].
phr_info
,
UE_list
->
UE_template
[
CC_id
][
i
].
phr_info
,
UE_list
->
UE_sched_ctrl
[
i
].
dl_cqi
[
CC_id
]);
UE_list
->
UE_sched_ctrl
[
i
].
dl_cqi
[
CC_id
],
(
UE_list
->
UE_sched_ctrl
[
i
].
pusch_snr
[
CC_id
]
-
128
)
/
2
,
(
UE_list
->
UE_sched_ctrl
[
i
].
pucch1_snr
[
CC_id
]
-
128
)
/
2
);
}
}
RC
.
eNB
[
module_idP
][
CC_id
]
->
pusch_stats_bsr
[
i
][(
frameP
*
10
)
+
subframeP
]
=-
63
;
RC
.
eNB
[
module_idP
][
CC_id
]
->
pusch_stats_bsr
[
i
][(
frameP
*
10
)
+
subframeP
]
=-
63
;
...
...
openair2/LAYER2/MAC/eNB_scheduler_RA.c
View file @
8314a264
...
@@ -388,7 +388,7 @@ void generate_Msg2(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t
...
@@ -388,7 +388,7 @@ void generate_Msg2(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t
{
{
if
((
RA_template
->
Msg2_frame
==
frameP
)
&&
(
RA_template
->
Msg2_subframe
==
subframeP
))
{
if
((
RA_template
->
Msg2_frame
==
frameP
)
&&
(
RA_template
->
Msg2_subframe
==
subframeP
))
{
LOG_
I
(
MAC
,
"[eNB %d] CC_id %d Frame %d, subframeP %d: Generating RAR DCI, RA_active %d format 1A (%d,%d))
\n
"
,
LOG_
D
(
MAC
,
"[eNB %d] CC_id %d Frame %d, subframeP %d: Generating RAR DCI, RA_active %d format 1A (%d,%d))
\n
"
,
module_idP
,
CC_idP
,
frameP
,
subframeP
,
module_idP
,
CC_idP
,
frameP
,
subframeP
,
RA_template
->
RA_active
,
RA_template
->
RA_active
,
...
@@ -860,7 +860,7 @@ void generate_Msg4(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t
...
@@ -860,7 +860,7 @@ void generate_Msg4(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t
1
,
// ndi
1
,
// ndi
0
,
// rv
0
,
// rv
0
);
// vrb_flag
0
);
// vrb_flag
LOG_
I
(
MAC
,
"Frame %d, subframe %d: Msg4 DCI pdu_num %d (rnti %x,rnti_type %d,harq_pid %d, resource_block_coding (%p) %d
\n
"
,
LOG_
D
(
MAC
,
"Frame %d, subframe %d: Msg4 DCI pdu_num %d (rnti %x,rnti_type %d,harq_pid %d, resource_block_coding (%p) %d
\n
"
,
frameP
,
frameP
,
subframeP
,
subframeP
,
dl_req
->
number_pdu
,
dl_req
->
number_pdu
,
...
@@ -947,7 +947,7 @@ void generate_Msg4(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t
...
@@ -947,7 +947,7 @@ void generate_Msg4(module_id_t module_idP,int CC_idP,frame_t frameP,sub_frame_t
(
cc
->
p_eNB
==
1
)
?
1
:
2
,
// transmission mode
(
cc
->
p_eNB
==
1
)
?
1
:
2
,
// transmission mode
1
,
// num_bf_prb_per_subband
1
,
// num_bf_prb_per_subband
1
);
// num_bf_vector
1
);
// num_bf_vector
LOG_
I
(
MAC
,
"Filled DLSCH config, pdu number %d, non-dci pdu_index %d
\n
"
,
dl_req
->
number_pdu
,
eNB
->
pdu_index
[
CC_idP
]);
LOG_
D
(
MAC
,
"Filled DLSCH config, pdu number %d, non-dci pdu_index %d
\n
"
,
dl_req
->
number_pdu
,
eNB
->
pdu_index
[
CC_idP
]);
// DL request
// DL request
eNB
->
TX_req
[
CC_idP
].
sfn_sf
=
fill_nfapi_tx_req
(
&
eNB
->
TX_req
[
CC_idP
].
tx_request_body
,
eNB
->
TX_req
[
CC_idP
].
sfn_sf
=
fill_nfapi_tx_req
(
&
eNB
->
TX_req
[
CC_idP
].
tx_request_body
,
...
@@ -1082,7 +1082,7 @@ void check_Msg4_retransmission(module_id_t module_idP,int CC_idP,frame_t frameP,
...
@@ -1082,7 +1082,7 @@ void check_Msg4_retransmission(module_id_t module_idP,int CC_idP,frame_t frameP,
dl_req
->
number_dci
++
;
dl_req
->
number_dci
++
;
dl_req
->
number_pdu
++
;
dl_req
->
number_pdu
++
;
LOG_
I
(
MAC
,
"msg4 retransmission for rnti %x (round %d) fsf %d/%d
\n
"
,
RA_template
->
rnti
,
round
,
frameP
,
subframeP
);
LOG_
D
(
MAC
,
"msg4 retransmission for rnti %x (round %d) fsf %d/%d
\n
"
,
RA_template
->
rnti
,
round
,
frameP
,
subframeP
);
// DLSCH Config
// DLSCH Config
fill_nfapi_dlsch_config
(
eNB
,
fill_nfapi_dlsch_config
(
eNB
,
dl_req
,
dl_req
,
...
@@ -1164,7 +1164,7 @@ void schedule_RA(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP)
...
@@ -1164,7 +1164,7 @@ void schedule_RA(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP)
if
(
RA_template
->
RA_active
==
TRUE
)
{
if
(
RA_template
->
RA_active
==
TRUE
)
{
LOG_
I
(
MAC
,
"[eNB %d][RAPROC] Frame %d, Subframe %d : CC_id %d RA %d is active (generate RAR %d, generate_Msg4 %d, wait_ack_Msg4 %d, rnti %x)
\n
"
,
LOG_
D
(
MAC
,
"[eNB %d][RAPROC] Frame %d, Subframe %d : CC_id %d RA %d is active (generate RAR %d, generate_Msg4 %d, wait_ack_Msg4 %d, rnti %x)
\n
"
,
module_idP
,
frameP
,
subframeP
,
CC_id
,
i
,
RA_template
->
generate_rar
,
RA_template
->
generate_Msg4
,
RA_template
->
wait_ack_Msg4
,
RA_template
->
rnti
);
module_idP
,
frameP
,
subframeP
,
CC_id
,
i
,
RA_template
->
generate_rar
,
RA_template
->
generate_Msg4
,
RA_template
->
wait_ack_Msg4
,
RA_template
->
rnti
);
if
(
RA_template
->
generate_rar
==
1
)
generate_Msg2
(
module_idP
,
CC_id
,
frameP
,
subframeP
,
RA_template
);
if
(
RA_template
->
generate_rar
==
1
)
generate_Msg2
(
module_idP
,
CC_id
,
frameP
,
subframeP
,
RA_template
);
...
...
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
View file @
8314a264
...
@@ -1181,8 +1181,9 @@ schedule_ue_spec(
...
@@ -1181,8 +1181,9 @@ schedule_ue_spec(
// this is the normalized RX power
// this is the normalized RX power
eNB_UE_stats
=
&
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
];
eNB_UE_stats
=
&
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
];
/* TODO: fix how we deal with power, unit is not dBm, it's special from nfapi */
normalized_rx_power
=
ue_sched_ctl
->
pucch1_snr
[
CC_id
];
normalized_rx_power
=
ue_sched_ctl
->
pucch1_snr
[
CC_id
];
target_rx_power
=
20
;
target_rx_power
=
20
8
;
// this assumes accumulated tpc
// this assumes accumulated tpc
// make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out
// make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out
...
@@ -1195,10 +1196,10 @@ schedule_ue_spec(
...
@@ -1195,10 +1196,10 @@ schedule_ue_spec(
UE_list
->
UE_template
[
CC_id
][
UE_id
].
pucch_tpc_tx_frame
=
frameP
;
UE_list
->
UE_template
[
CC_id
][
UE_id
].
pucch_tpc_tx_frame
=
frameP
;
UE_list
->
UE_template
[
CC_id
][
UE_id
].
pucch_tpc_tx_subframe
=
subframeP
;
UE_list
->
UE_template
[
CC_id
][
UE_id
].
pucch_tpc_tx_subframe
=
subframeP
;
if
(
normalized_rx_power
>
(
target_rx_power
+
1
))
{
if
(
normalized_rx_power
>
(
target_rx_power
+
4
))
{
tpc
=
0
;
//-1
tpc
=
0
;
//-1
tpc_accumulated
--
;
tpc_accumulated
--
;
}
else
if
(
normalized_rx_power
<
(
target_rx_power
-
1
))
{
}
else
if
(
normalized_rx_power
<
(
target_rx_power
-
4
))
{
tpc
=
2
;
//+1
tpc
=
2
;
//+1
tpc_accumulated
++
;
tpc_accumulated
++
;
}
else
{
}
else
{
...
...
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
View file @
8314a264
...
@@ -3606,8 +3606,11 @@ void SR_indication(module_id_t mod_idP, int cc_idP, frame_t frameP, sub_frame_t
...
@@ -3606,8 +3606,11 @@ void SR_indication(module_id_t mod_idP, int cc_idP, frame_t frameP, sub_frame_t
UE_sched_ctrl
*
sched_ctl
=
&
UE_list
->
UE_sched_ctrl
[
UE_id
];
UE_sched_ctrl
*
sched_ctl
=
&
UE_list
->
UE_sched_ctrl
[
UE_id
];
#if 0
/* for the moment don't use ul_cqi from SR, value is too different from harq */
sched_ctl->pucch1_snr[cc_idP] = ul_cqi;
sched_ctl->pucch1_snr[cc_idP] = ul_cqi;
sched_ctl->pucch1_cqi_update[cc_idP] = 1;
sched_ctl->pucch1_cqi_update[cc_idP] = 1;
#endif
UE_list
->
UE_template
[
cc_idP
][
UE_id
].
ul_SR
=
1
;
UE_list
->
UE_template
[
cc_idP
][
UE_id
].
ul_SR
=
1
;
UE_list
->
UE_template
[
cc_idP
][
UE_id
].
ul_active
=
TRUE
;
UE_list
->
UE_template
[
cc_idP
][
UE_id
].
ul_active
=
TRUE
;
...
...
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
View file @
8314a264
This diff is collapsed.
Click to expand it.
openair2/PHY_INTERFACE/IF_Module.c
View file @
8314a264
...
@@ -366,6 +366,14 @@ static void dump_dl(Sched_Rsp_t *d)
...
@@ -366,6 +366,14 @@ static void dump_dl(Sched_Rsp_t *d)
A
(
"XXXX up tpc_bitmap %d
\n
"
,
q
->
tpc_bitmap
);
A
(
"XXXX up tpc_bitmap %d
\n
"
,
q
->
tpc_bitmap
);
A
(
"XXXX up transmission_power %d
\n
"
,
q
->
transmission_power
);
A
(
"XXXX up transmission_power %d
\n
"
,
q
->
transmission_power
);
}
}
if
(
p
->
pdu_type
==
NFAPI_HI_DCI0_HI_PDU_TYPE
)
{
nfapi_hi_dci0_hi_pdu_rel8_t
*
q
=
&
p
->
hi_pdu
.
hi_pdu_rel8
;
A
(
"XXXX up rb start %d
\n
"
,
q
->
resource_block_start
);
A
(
"XXXX up cs2_drms %d
\n
"
,
q
->
cyclic_shift_2_for_drms
);
A
(
"XXXX up ack %d
\n
"
,
q
->
hi_value
);
A
(
"XXXX up i_phich %d
\n
"
,
q
->
i_phich
);
A
(
"XXXX up power %d
\n
"
,
q
->
transmission_power
);
}
}
}
}
}
...
...
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf
View file @
8314a264
...
@@ -50,7 +50,7 @@ eNBs =
...
@@ -50,7 +50,7 @@ eNBs =
prach_zero_correlation
=
1
;
prach_zero_correlation
=
1
;
prach_freq_offset
=
2
;
prach_freq_offset
=
2
;
pucch_delta_shift
=
1
;
pucch_delta_shift
=
1
;
pucch_nRB_CQI
=
1
;
pucch_nRB_CQI
=
0
;
pucch_nCS_AN
=
0
;
pucch_nCS_AN
=
0
;
pucch_n1_AN
=
32
;
pucch_n1_AN
=
32
;
pdsch_referenceSignalPower
= -
27
;
pdsch_referenceSignalPower
= -
27
;
...
...
targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.50PRB.nfapi.conf
View file @
8314a264
...
@@ -50,7 +50,7 @@ eNBs =
...
@@ -50,7 +50,7 @@ eNBs =
prach_zero_correlation
=
1
;
prach_zero_correlation
=
1
;
prach_freq_offset
=
2
;
prach_freq_offset
=
2
;
pucch_delta_shift
=
1
;
pucch_delta_shift
=
1
;
pucch_nRB_CQI
=
1
;
pucch_nRB_CQI
=
0
;
pucch_nCS_AN
=
0
;
pucch_nCS_AN
=
0
;
pucch_n1_AN
=
32
;
pucch_n1_AN
=
32
;
pdsch_referenceSignalPower
= -
27
;
pdsch_referenceSignalPower
= -
27
;
...
...
targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.conf
View file @
8314a264
...
@@ -53,7 +53,7 @@ eNBs =
...
@@ -53,7 +53,7 @@ eNBs =
prach_zero_correlation
=
1
;
prach_zero_correlation
=
1
;
prach_freq_offset
=
2
;
prach_freq_offset
=
2
;
pucch_delta_shift
=
1
;
pucch_delta_shift
=
1
;
pucch_nRB_CQI
=
1
;
pucch_nRB_CQI
=
0
;
pucch_nCS_AN
=
0
;
pucch_nCS_AN
=
0
;
pucch_n1_AN
=
32
;
pucch_n1_AN
=
32
;
pdsch_referenceSignalPower
= -
27
;
pdsch_referenceSignalPower
= -
27
;
...
...
targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.lo.conf
View file @
8314a264
...
@@ -53,7 +53,7 @@ eNBs =
...
@@ -53,7 +53,7 @@ eNBs =
prach_zero_correlation
=
1
;
prach_zero_correlation
=
1
;
prach_freq_offset
=
2
;
prach_freq_offset
=
2
;
pucch_delta_shift
=
1
;
pucch_delta_shift
=
1
;
pucch_nRB_CQI
=
1
;
pucch_nRB_CQI
=
0
;
pucch_nCS_AN
=
0
;
pucch_nCS_AN
=
0
;
pucch_n1_AN
=
32
;
pucch_n1_AN
=
32
;
pdsch_referenceSignalPower
= -
27
;
pdsch_referenceSignalPower
= -
27
;
...
...
targets/RT/USER/lte-enb.c
View file @
8314a264
...
@@ -579,7 +579,6 @@ static void* eNB_thread_prach_br( void* param ) {
...
@@ -579,7 +579,6 @@ static void* eNB_thread_prach_br( void* param ) {
#endif
#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_td_thread
(
PHY_VARS_eNB
*
,
pthread_attr_t
*
);
extern
void
init_te_thread
(
PHY_VARS_eNB
*
,
pthread_attr_t
*
);
extern
void
init_te_thread
(
PHY_VARS_eNB
*
,
pthread_attr_t
*
);
...
...
targets/RT/USER/lte-ru.c
View file @
8314a264
...
@@ -1323,6 +1323,22 @@ int setup_RU_buffers(RU_t *ru) {
...
@@ -1323,6 +1323,22 @@ int setup_RU_buffers(RU_t *ru) {
return
(
0
);
return
(
0
);
}
}
static
void
*
ru_stats_thread
(
void
*
param
)
{
RU_t
*
ru
=
(
RU_t
*
)
param
;
wait_sync
(
"ru_stats_thread"
);
while
(
!
oai_exit
)
{
sleep
(
1
);
if
(
opp_enabled
==
1
)
{
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
);
}
}
return
(
NULL
);
}
static
void
*
ru_thread
(
void
*
param
)
{
static
void
*
ru_thread
(
void
*
param
)
{
static
int
ru_thread_status
;
static
int
ru_thread_status
;
...
@@ -1462,6 +1478,7 @@ static void* ru_thread( void* param ) {
...
@@ -1462,6 +1478,7 @@ static void* ru_thread( void* param ) {
if
((
ru
->
fh_north_asynch_in
==
NULL
)
&&
(
ru
->
fh_south_out
))
ru
->
fh_south_out
(
ru
);
if
((
ru
->
fh_north_asynch_in
==
NULL
)
&&
(
ru
->
fh_south_out
))
ru
->
fh_south_out
(
ru
);
if
(
ru
->
fh_north_out
)
ru
->
fh_north_out
(
ru
);
if
(
ru
->
fh_north_out
)
ru
->
fh_north_out
(
ru
);
}
}
...
@@ -1563,9 +1580,12 @@ int start_rf(RU_t *ru) {
...
@@ -1563,9 +1580,12 @@ int start_rf(RU_t *ru) {
}
}
extern
void
fep_full
(
RU_t
*
ru
);
extern
void
fep_full
(
RU_t
*
ru
);
extern
void
fep_full_2thread
(
RU_t
*
ru
);
extern
void
ru_
fep_full_2thread
(
RU_t
*
ru
);
extern
void
feptx_ofdm
(
RU_t
*
ru
);
extern
void
feptx_ofdm
(
RU_t
*
ru
);
extern
void
feptx_ofdm_2thread
(
RU_t
*
ru
);
extern
void
feptx_prec
(
RU_t
*
ru
);
extern
void
feptx_prec
(
RU_t
*
ru
);
extern
void
init_fep_thread
(
RU_t
*
ru
,
pthread_attr_t
*
attr
);
extern
void
init_feptx_thread
(
RU_t
*
ru
,
pthread_attr_t
*
attr
);
void
init_RU_proc
(
RU_t
*
ru
)
{
void
init_RU_proc
(
RU_t
*
ru
)
{
...
@@ -1649,6 +1669,11 @@ void init_RU_proc(RU_t *ru) {
...
@@ -1649,6 +1669,11 @@ void init_RU_proc(RU_t *ru) {
}
}
if
(
get_nprocs
()
>=
2
)
{
if
(
ru
->
feprx
)
init_fep_thread
(
ru
,
NULL
);
if
(
ru
->
feptx_ofdm
)
init_feptx_thread
(
ru
,
NULL
);
}
if
(
opp_enabled
==
1
)
pthread_create
(
&
ru
->
ru_stats_thread
,
NULL
,
ru_stats_thread
,(
void
*
)
ru
);
}
}
...
@@ -1902,8 +1927,8 @@ void init_RU(char *rf_config_file) {
...
@@ -1902,8 +1927,8 @@ void init_RU(char *rf_config_file) {
ru
->
fh_north_out
=
fh_if4p5_north_out
;
// send_IF4p5 on reception
ru
->
fh_north_out
=
fh_if4p5_north_out
;
// send_IF4p5 on reception
ru
->
fh_south_out
=
tx_rf
;
// send output to RF
ru
->
fh_south_out
=
tx_rf
;
// send output to RF
ru
->
fh_north_asynch_in
=
fh_if4p5_north_asynch_in
;
// TX packets come asynchronously
ru
->
fh_north_asynch_in
=
fh_if4p5_north_asynch_in
;
// TX packets come asynchronously
ru
->
feprx
=
fep_full
;
// RX DFTs
ru
->
feprx
=
(
get_nprocs
()
<=
4
)
?
fep_full
:
ru_fep_full_2thread
;
// RX DFTs
ru
->
feptx_ofdm
=
feptx_ofdm
;
// this is fep with idft only (no precoding in RRU)
ru
->
feptx_ofdm
=
(
get_nprocs
()
<=
4
)
?
feptx_ofdm
:
feptx_ofdm_2thread
;
// this is fep with idft only (no precoding in RRU)
ru
->
feptx_prec
=
NULL
;
ru
->
feptx_prec
=
NULL
;
ru
->
start_if
=
start_if
;
// need to start the if interface for if4p5
ru
->
start_if
=
start_if
;
// need to start the if interface for if4p5
ru
->
ifdevice
.
host_type
=
RRU_HOST
;
ru
->
ifdevice
.
host_type
=
RRU_HOST
;
...
@@ -1920,8 +1945,8 @@ void init_RU(char *rf_config_file) {
...
@@ -1920,8 +1945,8 @@ void init_RU(char *rf_config_file) {
}
}
else
if
(
ru
->
function
==
eNodeB_3GPP
)
{
else
if
(
ru
->
function
==
eNodeB_3GPP
)
{
ru
->
do_prach
=
0
;
// no prach processing in RU
ru
->
do_prach
=
0
;
// no prach processing in RU
ru
->
feprx
=
fep_full
;
// RX DFTs
ru
->
feprx
=
(
get_nprocs
()
<=
2
)
?
fep_full
:
ru_fep_full_2thread
;
// RX DFTs
ru
->
feptx_ofdm
=
feptx_ofdm
;
// this is fep with idft and precoding
ru
->
feptx_ofdm
=
(
get_nprocs
()
<=
2
)
?
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
->
feptx_prec
=
feptx_prec
;
// this is fep with idft and precoding
ru
->
fh_north_in
=
NULL
;
// no incoming fronthaul from north
ru
->
fh_north_in
=
NULL
;
// no incoming fronthaul from north
ru
->
fh_north_out
=
NULL
;
// no outgoing fronthaul to north
ru
->
fh_north_out
=
NULL
;
// no outgoing fronthaul to north
...
@@ -1948,9 +1973,9 @@ void init_RU(char *rf_config_file) {
...
@@ -1948,9 +1973,9 @@ void init_RU(char *rf_config_file) {
case
REMOTE_IF5
:
// the remote unit is IF5 RRU
case
REMOTE_IF5
:
// the remote unit is IF5 RRU
ru
->
do_prach
=
0
;
ru
->
do_prach
=
0
;
ru
->
feprx
=
fep_full
;
// this is frequency-shift + DFTs
ru
->
feprx
=
(
get_nprocs
()
<=
2
)
?
fep_full
:
fep_full
;
// this is frequency-shift + DFTs
ru
->
feptx_prec
=
feptx_prec
;
// need to do transmit Precoding + IDFTs
ru
->
feptx_prec
=
feptx_prec
;
// need to do transmit Precoding + IDFTs
ru
->
feptx_ofdm
=
feptx_ofdm
;
// need to do transmit Precoding + IDFTs
ru
->
feptx_ofdm
=
(
get_nprocs
()
<=
2
)
?
feptx_ofdm
:
feptx_ofdm_2thread
;
// need to do transmit Precoding + IDFTs
if
(
ru
->
if_timing
==
synch_to_other
)
{
if
(
ru
->
if_timing
==
synch_to_other
)
{
ru
->
fh_south_in
=
fh_slave_south_in
;
// synchronize to master
ru
->
fh_south_in
=
fh_slave_south_in
;
// synchronize to master
ru
->
fh_south_out
=
fh_if5_mobipass_south_out
;
// use send_IF5 for mobipass
ru
->
fh_south_out
=
fh_if5_mobipass_south_out
;
// use send_IF5 for mobipass
...
...
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