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
82c32481
Commit
82c32481
authored
Dec 25, 2020
by
xuyue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RU_L1 Time Statistics
parent
e6860f94
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
167 additions
and
23 deletions
+167
-23
common/utils/LOG/vcd_signal_dumper.c
common/utils/LOG/vcd_signal_dumper.c
+17
-0
common/utils/LOG/vcd_signal_dumper.h
common/utils/LOG/vcd_signal_dumper.h
+21
-1
common/utils/T/T_defs.h
common/utils/T/T_defs.h
+1
-1
common/utils/T/T_messages.txt
common/utils/T/T_messages.txt
+85
-1
executables/nr-gnb.c
executables/nr-gnb.c
+17
-9
executables/nr-ru.c
executables/nr-ru.c
+26
-11
No files found.
common/utils/LOG/vcd_signal_dumper.c
View file @
82c32481
...
...
@@ -540,6 +540,23 @@ const char* eurecomFunctionsNames[] = {
"pss_synchro_nr"
,
"pss_search_time_nr"
,
"nr_initial_ue_sync"
,
"zz_00_ru_rx"
,
"zz_01_ru_rx_process1_fh_south_in"
,
"zz_02_ru_rx_process2_front_end"
,
"zz_03_ru_rx_process3_prach"
,
"zz_04_ru_rx_process4_wakeup_gnb_l1s"
,
"zz_30_ru_tx"
,
"zz_31_ru_tx_process1_front_end"
,
"zz_32_ru_tx_process2_ofdm"
,
"zz_33_ru_tx_process3_fh_south_out"
,
"zz_10_l1_rx"
,
"zz_11_l1_rx_process1_indication"
,
"zz_12_l1_rx_process2_prach"
,
"zz_13_l1_rx_process3_phy_procedure"
,
"zz_14_l1_rx_process4_wakeup_tx"
,
"zz_20_l1_tx"
,
"zz_21_l1_tx_process1_phy_procedure"
,
"zz_22_l1_tx_process2_wakeup_txfh"
,
"beam_switching_gpio"
};
...
...
common/utils/LOG/vcd_signal_dumper.h
View file @
82c32481
...
...
@@ -532,10 +532,29 @@ typedef enum {
VCD_SIGNAL_DUMPER_FUNCTIONS_PSS_SYNCHRO_NR
,
VCD_SIGNAL_DUMPER_FUNCTIONS_PSS_SEARCH_TIME_NR
,
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_INITIAL_UE_SYNC
,
VCD_SIGNAL_DUMPER_FUNCTIONS_BEAM_SWITCHING_GPIO
,
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_RX
,
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_RX_PROCESS1_FH_SOUTH_IN
,
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_RX_PROCESS2_FRONT_END
,
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_RX_PROCESS3_PRACH
,
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_RX_PROCESS4_WAKEUP_GNB_L1S
,
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_TX
,
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_TX_PROCESS1_FRONT_END
,
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_TX_PROCESS2_OFDM
,
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_TX_PROCESS3_FH_SOUTH_OUT
,
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_RX
,
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_RX_PROCESS1_INDICATION
,
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_RX_PROCESS2_PRACH
,
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_RX_PROCESS3_PHY_PROCEDURE
,
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_RX_PROCESS4_WAKEUP_TX
,
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_TX
,
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_TX_PROCESS1_PHY_PROCEDURE
,
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_TX_PROCESS2_WAKEUP_TXFH
,
VCD_SIGNAL_DUMPER_FUNCTIONS_BEAM_SWITCHING_GPIO
,
VCD_SIGNAL_DUMPER_FUNCTIONS_END
}
vcd_signal_dump_functions
;
typedef
enum
{
...
...
@@ -544,6 +563,7 @@ typedef enum {
VCD_SIGNAL_DUMPER_MODULE_VARIABLES
,
VCD_SIGNAL_DUMPER_MODULE_FUNCTIONS
,
// VCD_SIGNAL_DUMPER_MODULE_UE_PROCEDURES_FUNCTIONS,
}
vcd_signal_dumper_modules
;
typedef
enum
{
...
...
common/utils/T/T_defs.h
View file @
82c32481
...
...
@@ -73,7 +73,7 @@ typedef struct {
}
T_cache_t
;
/* number of VCD functions (to be kept up to date! see in T_messages.txt) */
#define VCD_NUM_FUNCTIONS (2
69
)
#define VCD_NUM_FUNCTIONS (2
86
)
/* number of VCD variables (to be kept up to date! see in T_messages.txt) */
#define VCD_NUM_VARIABLES (187)
...
...
common/utils/T/T_messages.txt
View file @
82c32481
...
...
@@ -3527,9 +3527,93 @@ ID = VCD_FUNCTION_NR_INITIAL_UE_SYNC
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = nr_initial_ue_sync
ID = VCD_FUNCTION_ZZ_RU_RX
DESC = VCD function ZZ_RU_RX
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = zz_00_ru_rx
ID = VCD_FUNCTION_ZZ_RU_RX_PROCESS1_FH_SOUTH_IN
DESC = VCD function ZZ_RU_RX_PROCESS1_FH_SOUTH_IN
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = zz_01_ru_rx_process1_fh_south_in
ID = VCD_FUNCTION_ZZ_RU_RX_PROCESS2_FRONT_END
DESC = VCD function ZZ_RU_RX_PROCESS2_FRONT_END
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = zz_02_ru_rx_process2_front_end
ID = VCD_FUNCTION_ZZ_RU_RX_PROCESS3_PRACH
DESC = VCD function ZZ_RU_RX_PROCESS3_PRACH
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = zz_03_ru_rx_process3_prach
ID = VCD_FUNCTION_ZZ_RU_RX_PROCESS4_WAKEUP_GNB_L1S
DESC = VCD function ZZ_RU_RX_PROCESS4_WAKEUP_GNB_L1S
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = zz_04_ru_rx_process4_wakeup_gnb_l1s
ID = VCD_FUNCTION_ZZ_RU_TX
DESC = VCD function ZZ_RU_TX
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = zz_30_ru_tx
ID = VCD_FUNCTION_ZZ_RU_TX_PROCESS1_FRONT_END
DESC = VCD function ZZ_RU_TX_PROCESS1_FRONT_END
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = zz_31_ru_tx_process1_front_end
ID = VCD_FUNCTION_ZZ_RU_TX_PROCESS2_OFDM
DESC = VCD function ZZ_RU_TX_PROCESS2_OFDM
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = zz_32_ru_tx_process2_ofdm
ID = VCD_FUNCTION_ZZ_RU_TX_PROCESS3_FH_SOUTH_OUT
DESC = VCD function ZZ_RU_TX_PROCESS3_FH_SOUTH_OUT
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = zz_33_ru_tx_process3_fh_south_out
ID = VCD_FUNCTION_ZZ_L1_RX
DESC = VCD function ZZ_L1_RX
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = zz_10_l1_rx
ID = VCD_FUNCTION_ZZ_L1_RX_PROCESS1_INDICATION
DESC = VCD function ZZ_L1_RX_PROCESS1_INDICATION
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = zz_11_l1_rx_process1_indication
ID = VCD_FUNCTION_ZZ_L1_RX_PROCESS2_PRACH
DESC = VCD function ZZ_L1_RX_PROCESS2_PRACH
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = zz_12_l1_rx_process2_prach
ID = VCD_FUNCTION_ZZ_L1_RX_PROCESS3_PHY_PROCEDURE
DESC = VCD function ZZ_L1_RX_PROCESS3_PHY_PROCEDURE
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = zz_13_l1_rx_process3_phy_procedure
ID = VCD_FUNCTION_ZZ_L1_RX_PROCESS4_WAKEUP_TX
DESC = VCD function ZZ_L1_RX_PROCESS4_WAKEUP_TX
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = zz_14_l1_rx_process4_wakeup_tx
ID = VCD_FUNCTION_ZZ_L1_TX
DESC = VCD function ZZ_L1_TX
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = zz_20_l1_tx
ID = VCD_FUNCTION_ZZ_L1_TX_PROCESS1_PHY_PROCEDURE
DESC = VCD function ZZ_L1_TX_PROCESS1_PHY_PROCEDURE
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = zz_21_l1_tx_process1_phy_procedure
ID = VCD_FUNCTION_ZZ_L1_TX_PROCESS2_WAKEUP_TXFH
DESC = VCD function ZZ_L1_TX_PROCESS2_WAKEUP_TXFH
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = zz_22_l1_tx_process2_wakeup_txfh
ID = VCD_FUNCTION_BEAM_SWITCHING_GPIO
DESC = VCD function BEAM_SWITCHING_GPIO
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = beam_switching_gpio
executables/nr-gnb.c
View file @
82c32481
...
...
@@ -246,7 +246,9 @@ static inline int rxtx(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int frame_t
gNB
->
UL_INFO
.
slot
=
slot_rx
;
gNB
->
UL_INFO
.
module_id
=
gNB
->
Mod_id
;
gNB
->
UL_INFO
.
CC_id
=
gNB
->
CC_id
;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_RX_PROCESS1_INDICATION
,
1
);
gNB
->
if_inst
->
NR_UL_indication
(
&
gNB
->
UL_INFO
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_RX_PROCESS1_INDICATION
,
0
);
pthread_mutex_unlock
(
&
gNB
->
UL_INFO_mutex
);
// RX processing
...
...
@@ -256,10 +258,10 @@ static inline int rxtx(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int frame_t
if
(
rx_slot_type
==
NR_UPLINK_SLOT
||
rx_slot_type
==
NR_MIXED_SLOT
)
{
// UE-specific RX processing for subframe n
// TODO: check if this is correct for PARALLEL_RU_L1_TRX_SPLIT
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_RX_PROCESS2_PRACH
,
1
);
// Do PRACH RU processing
L1_nr_prach_procedures
(
gNB
,
frame_rx
,
slot_rx
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_RX_PROCESS2_PRACH
,
0
);
//apply the rx signal rotation here
apply_nr_rotation_ul
(
&
gNB
->
frame_parms
,
gNB
->
common_vars
.
rxdataF
[
0
],
...
...
@@ -267,8 +269,9 @@ static inline int rxtx(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int frame_t
0
,
gNB
->
frame_parms
.
Ncp
==
EXTENDED
?
12
:
14
,
gNB
->
frame_parms
.
ofdm_symbol_size
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_RX_PROCESS3_PHY_PROCEDURE
,
1
);
phy_procedures_gNB_uespec_RX
(
gNB
,
frame_rx
,
slot_rx
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_RX_PROCESS3_PHY_PROCEDURE
,
0
);
}
if
(
oai_exit
)
return
(
-
1
);
...
...
@@ -281,7 +284,7 @@ static inline int rxtx(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int frame_t
if
(
tx_slot_type
==
NR_DOWNLINK_SLOT
||
tx_slot_type
==
NR_MIXED_SLOT
)
{
if
(
get_thread_parallel_conf
()
!=
PARALLEL_RU_L1_TRX_SPLIT
)
{
if
(
get_thread_parallel_conf
()
!=
PARALLEL_RU_L1_TRX_SPLIT
)
{
phy_procedures_gNB_TX
(
gNB
,
frame_tx
,
slot_tx
,
1
);
}
}
...
...
@@ -343,7 +346,7 @@ static void *gNB_L1_thread_tx(void *param) {
if
(
wait_on_condition
(
&
L1_proc_tx
->
mutex
,
&
L1_proc_tx
->
cond
,
&
L1_proc_tx
->
instance_cnt
,
thread_name
)
<
0
)
break
;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PROC_RXTX1
,
1
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_TX
,
1
);
if
(
oai_exit
)
break
;
// *****************************************
...
...
@@ -356,8 +359,9 @@ static void *gNB_L1_thread_tx(void *param) {
uint64_t
timestamp_tx
=
L1_proc_tx
->
timestamp_tx
;
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_SLOT_NUMBER_TX1_GNB
,
slot_tx
);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX1_GNB
,
frame_tx
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_TX_PROCESS1_PHY_PROCEDURE
,
1
);
phy_procedures_gNB_TX
(
gNB
,
frame_tx
,
slot_tx
,
1
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_TX_PROCESS1_PHY_PROCEDURE
,
0
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_WAKEUP_TXFH
,
1
);
pthread_mutex_lock
(
&
L1_proc_tx
->
mutex
);
L1_proc_tx
->
instance_cnt
=
-
1
;
...
...
@@ -368,10 +372,12 @@ static void *gNB_L1_thread_tx(void *param) {
exit_fun
(
"ERROR pthread_cond_signal"
);
}
pthread_mutex_unlock
(
&
L1_proc_tx
->
mutex
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_TX_PROCESS2_WAKEUP_TXFH
,
1
);
wakeup_txfh
(
gNB
,
L1_proc_tx
,
frame_tx
,
slot_tx
,
timestamp_tx
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_TX_PROCESS2_WAKEUP_TXFH
,
0
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_WAKEUP_TXFH
,
0
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PROC_RXTX1
,
0
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_TX
,
0
);
}
return
0
;
...
...
@@ -415,15 +421,17 @@ static void *gNB_L1_thread( void *param ) {
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_GNB
,
frame_rx
);
if
(
oai_exit
)
break
;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_RX
,
1
);
if
(
gNB
->
CC_id
==
0
)
{
if
(
rxtx
(
gNB
,
frame_rx
,
slot_rx
,
frame_tx
,
slot_tx
,
thread_name
)
<
0
)
break
;
}
if
(
release_thread
(
&
L1_proc
->
mutex
,
&
L1_proc
->
instance_cnt
,
thread_name
)
<
0
)
break
;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_RX_PROCESS4_WAKEUP_TX
,
1
);
if
(
get_thread_parallel_conf
()
==
PARALLEL_RU_L1_TRX_SPLIT
)
wakeup_tx
(
gNB
,
frame_rx
,
slot_rx
,
frame_tx
,
slot_tx
,
timestamp_tx
);
else
if
(
get_thread_parallel_conf
()
==
PARALLEL_RU_L1_SPLIT
)
wakeup_txfh
(
gNB
,
L1_proc
,
frame_tx
,
slot_tx
,
timestamp_tx
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_RX_PROCESS4_WAKEUP_TX
,
0
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_L1_RX
,
0
);
}
// while !oai_exit
LOG_D
(
PHY
,
" *** Exiting gNB thread RXn_TXnp4
\n
"
);
...
...
executables/nr-ru.c
View file @
82c32481
...
...
@@ -1313,16 +1313,17 @@ void *ru_thread_tx( void *param ) {
wait_on_condition
(
&
proc
->
mutex_FH1
,
&
proc
->
cond_FH1
,
&
proc
->
instance_cnt_FH1
,
"ru_thread_tx"
);
printf
(
"ru_thread_tx ready
\n
"
);
while
(
!
oai_exit
)
{
LOG_D
(
PHY
,
"ru_thread_tx: Waiting for TX processing
\n
"
);
// wait until eNBs are finished subframe RX n and TX n+4
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_RU_TX_WAIT
,
1
);
wait_on_condition
(
&
proc
->
mutex_gNBs
,
&
proc
->
cond_gNBs
,
&
proc
->
instance_cnt_gNBs
,
"ru_thread_tx"
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_RU_TX_WAIT
,
0
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_TX
,
1
);
ret
=
pthread_mutex_lock
(
&
proc
->
mutex_gNBs
);
AssertFatal
(
ret
==
0
,
"mutex_lock return %d
\n
"
,
ret
);
int
frame_tx
=
proc
->
frame_tx
;
...
...
@@ -1337,12 +1338,17 @@ void *ru_thread_tx( void *param ) {
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU
,
frame_tx
);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX0_RU
,
tti_tx
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_TX_PROCESS1_FRONT_END
,
1
);
// do TX front-end processing if needed (precoding and/or IDFTs)
if
(
ru
->
feptx_prec
)
ru
->
feptx_prec
(
ru
,
frame_tx
,
tti_tx
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_TX_PROCESS1_FRONT_END
,
0
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_TX_PROCESS2_OFDM
,
1
);
// do OFDM with/without TX front-end processing if needed
if
((
ru
->
fh_north_asynch_in
==
NULL
)
&&
(
ru
->
feptx_ofdm
))
ru
->
feptx_ofdm
(
ru
,
frame_tx
,
tti_tx
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_TX_PROCESS2_OFDM
,
0
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_TX_PROCESS3_FH_SOUTH_OUT
,
1
);
if
(
!
emulate_rf
)
{
// do outgoing fronthaul (south) if needed
if
((
ru
->
fh_north_asynch_in
==
NULL
)
&&
(
ru
->
fh_south_out
))
ru
->
fh_south_out
(
ru
,
frame_tx
,
tti_tx
,
timestamp_tx
);
...
...
@@ -1382,8 +1388,9 @@ void *ru_thread_tx( void *param ) {
}
//for (i=0; i<ru->nb_tx; i++)
}
//if(proc->frame_tx == print_frame)
}
//else emulate_rf
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_TX_PROCESS3_FH_SOUTH_OUT
,
0
);
release_thread
(
&
proc
->
mutex_gNBs
,
&
proc
->
instance_cnt_gNBs
,
"ru_thread_tx"
);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX1_UE
,
proc
->
instance_cnt_gNBs
);
for
(
i
=
0
;
i
<
ru
->
num_gNB
;
i
++
)
{
...
...
@@ -1424,6 +1431,7 @@ void *ru_thread_tx( void *param ) {
AssertFatal
(
ret
==
0
,
"mutex_unlock returns %d
\n
"
,
ret
);
}
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_TX
,
0
);
}
release_thread
(
&
proc
->
mutex_FH1
,
&
proc
->
instance_cnt_FH1
,
"ru_thread_tx"
);
...
...
@@ -1538,9 +1546,11 @@ void *ru_thread( void *param ) {
proc
->
instance_cnt_FH1
=
0
;
pthread_mutex_unlock
(
&
proc
->
mutex_FH1
);
pthread_cond_signal
(
&
proc
->
cond_FH1
);
// This is a forever while loop, it loops over subframes which are scheduled by incoming samples from HW devices
while
(
!
oai_exit
)
{
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_RX
,
1
);
// these are local subframe/frame counters to check that we are in synch with the fronthaul timing.
// They are set on the first rx/tx in the underly FH routines.
if
(
slot
==
(
fp
->
slots_per_frame
-
1
))
{
...
...
@@ -1551,10 +1561,12 @@ void *ru_thread( void *param ) {
slot
++
;
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_RX_PROCESS1_FH_SOUTH_IN
,
1
);
// synchronization on input FH interface, acquire signals/data and block
LOG_D
(
PHY
,
"[RU_thread] read data: frame_rx = %d, tti_rx = %d
\n
"
,
frame
,
slot
);
if
(
ru
->
fh_south_in
)
ru
->
fh_south_in
(
ru
,
&
frame
,
&
slot
);
else
AssertFatal
(
1
==
0
,
"No fronthaul interface at south port"
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_RX_PROCESS1_FH_SOUTH_IN
,
0
);
LOG_D
(
PHY
,
"AFTER fh_south_in - SFN/SL:%d%d RU->proc[RX:%d.%d TX:%d.%d] RC.gNB[0]:[RX:%d%d TX(SFN):%d]
\n
"
,
frame
,
slot
,
...
...
@@ -1575,10 +1587,11 @@ void *ru_thread( void *param ) {
// adjust for timing offset between RU
//printf("~~~~~~~~~~~~~~~~~~~~~~~~~~%d.%d in ru_thread is in process\n", proc->frame_rx, proc->tti_rx);
if
(
ru
->
idx
!=
0
)
proc
->
frame_tx
=
(
proc
->
frame_tx
+
proc
->
frame_offset
)
&
1023
;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_RX_PROCESS2_FRONT_END
,
1
);
// do RX front-end processing (frequency-shift, dft) if needed
int
slot_type
=
nr_slot_select
(
cfg
,
proc
->
frame_rx
,
proc
->
tti_rx
);
if
(
slot_type
==
NR_UPLINK_SLOT
||
slot_type
==
NR_MIXED_SLOT
)
{
//if (proc->tti_rx==8) {
...
...
@@ -1592,9 +1605,9 @@ void *ru_thread( void *param ) {
for
(
aa
=
0
;
aa
<
ru
->
nb_rx
;
aa
++
)
memcpy
((
void
*
)
RC
.
gNB
[
0
]
->
common_vars
.
rxdataF
[
aa
],
(
void
*
)
ru
->
common
.
rxdataF
[
aa
],
fp
->
symbols_per_slot
*
fp
->
ofdm_symbol_size
*
sizeof
(
int32_t
));
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_RX_PROCESS2_FRONT_END
,
0
);
// Do PRACH RU processing
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_RX_PROCESS3_PRACH
,
1
);
int
prach_id
=
find_nr_prach_ru
(
ru
,
proc
->
frame_rx
,
proc
->
tti_rx
,
SEARCH_EXIST
);
uint8_t
prachStartSymbol
,
N_dur
;
if
(
prach_id
>=
0
)
{
...
...
@@ -1626,14 +1639,15 @@ void *ru_thread( void *param ) {
}
free_nr_ru_prach_entry
(
ru
,
prach_id
);
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_RX_PROCESS3_PRACH
,
0
);
}
}
// At this point, all information for subframe has been received on FH interface
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_RX_PROCESS4_WAKEUP_GNB_L1S
,
1
);
// wakeup all gNB processes waiting for this RU
if
(
ru
->
num_gNB
>
0
)
wakeup_gNB_L1s
(
ru
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_RX_PROCESS4_WAKEUP_GNB_L1S
,
0
);
if
(
get_thread_parallel_conf
()
==
PARALLEL_SINGLE_THREAD
||
ru
->
num_gNB
==
0
)
{
// do TX front-end processing if needed (precoding and/or IDFTs)
if
(
ru
->
feptx_prec
)
ru
->
feptx_prec
(
ru
,
proc
->
frame_tx
,
proc
->
tti_tx
);
...
...
@@ -1674,10 +1688,11 @@ void *ru_thread( void *param ) {
proc
->
emulate_rf_busy
=
0
;
}
//if(get_thread_parallel_conf() == PARALLEL_SINGLE_THREAD)
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ZZ_RU_RX
,
0
);
}
printf
(
"Exiting ru_thread
\n
"
);
if
(
ru
->
stop_rf
!=
NULL
)
{
if
(
ru
->
stop_rf
(
ru
)
!=
0
)
LOG_E
(
HW
,
"Could not stop the RF device
\n
"
);
...
...
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