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
cc4a0c74
Commit
cc4a0c74
authored
Mar 05, 2020
by
WANG Tsu-Han
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding debug message
parent
bd672c5f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
44 additions
and
14 deletions
+44
-14
common/utils/LOG/vcd_signal_dumper.c
common/utils/LOG/vcd_signal_dumper.c
+4
-1
common/utils/LOG/vcd_signal_dumper.h
common/utils/LOG/vcd_signal_dumper.h
+3
-0
common/utils/T/T_defs.h
common/utils/T/T_defs.h
+2
-2
common/utils/T/T_messages.txt
common/utils/T/T_messages.txt
+10
-0
executables/nr-ru.c
executables/nr-ru.c
+2
-0
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+10
-2
targets/RT/USER/gNB_usrp.gtkw
targets/RT/USER/gNB_usrp.gtkw
+13
-9
No files found.
common/utils/LOG/vcd_signal_dumper.c
View file @
cc4a0c74
...
...
@@ -248,7 +248,8 @@ const char* eurecomVariablesNames[] = {
"slot_number_TX1_gNB"
,
"slot_number_RX0_gNB"
,
"slot_number_RX1_gNB"
,
"ru_tx_ofdm_mask"
"ru_tx_ofdm_mask"
,
"usrp_send_return"
};
const
char
*
eurecomFunctionsNames
[]
=
{
...
...
@@ -282,6 +283,8 @@ const char* eurecomFunctionsNames[] = {
"lock_mutex_ru"
,
"lock_mutex_ru1"
,
"lock_mutex_ru2"
,
/* uhd signals */
"trx_write_thread"
,
/* simulation signals */
"do_DL_sig"
,
"do_UL_sig"
,
...
...
common/utils/LOG/vcd_signal_dumper.h
View file @
cc4a0c74
...
...
@@ -226,6 +226,7 @@ typedef enum {
VCD_SIGNAL_DUMPER_VARIABLES_SLOT_NUMBER_RX0_GNB
,
VCD_SIGNAL_DUMPER_VARIABLES_SLOT_NUMBER_RX1_GNB
,
VCD_SIGNAL_DUMPER_VARIABLES_RU_TX_OFDM_MASK
,
VCD_SIGNAL_DUMPER_VARIABLES_USRP_SEND_RETURN
,
VCD_SIGNAL_DUMPER_VARIABLES_END
...
...
@@ -262,6 +263,8 @@ typedef enum {
VCD_SIGNAL_DUMPER_FUNCTIONS_LOCK_MUTEX_RU
,
VCD_SIGNAL_DUMPER_FUNCTIONS_LOCK_MUTEX_RU1
,
VCD_SIGNAL_DUMPER_FUNCTIONS_LOCK_MUTEX_RU2
,
/* uhd signals */
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_THREAD
,
/* SIMULATION signals */
VCD_SIGNAL_DUMPER_FUNCTIONS_SIM_DO_DL_SIGNAL
,
VCD_SIGNAL_DUMPER_FUNCTIONS_SIM_DO_UL_SIGNAL
,
...
...
common/utils/T/T_defs.h
View file @
cc4a0c74
...
...
@@ -73,10 +73,10 @@ typedef struct {
}
T_cache_t
;
/* number of VCD functions (to be kept up to date! see in T_messages.txt) */
#define VCD_NUM_FUNCTIONS (24
7
)
#define VCD_NUM_FUNCTIONS (24
8
)
/* number of VCD variables (to be kept up to date! see in T_messages.txt) */
#define VCD_NUM_VARIABLES (18
6
)
#define VCD_NUM_VARIABLES (18
7
)
/* first VCD function (to be kept up to date! see in T_messages.txt) */
#define VCD_FIRST_FUNCTION ((uintptr_t)T_VCD_FUNCTION_RT_SLEEP)
...
...
common/utils/T/T_messages.txt
View file @
cc4a0c74
...
...
@@ -2138,6 +2138,11 @@ ID = VCD_VARIABLE_RU_TX_OFDM_MASK
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = ru_tx_ofdm_mask
ID = VCD_VARIABLE_USRP_SEND_RETURN
DESC = VCD variable USRP_SEND_RETURN
GROUP = ALL:VCD:ENB:VCD_VARIABLE
FORMAT = ulong,value
VCD_NAME = usrp_send_return
#functions
...
...
@@ -2286,6 +2291,11 @@ ID = VCD_FUNCTION_LOCK_MUTEX_RU2
GROUP = ALL:VCD:UE:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = lock_mutex_ru2
ID = VCD_FUNCTION_TRX_WRITE_THREAD
DESC = VCD function TRX_WRITE_THREAD
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = trx_write_thread
ID = VCD_FUNCTION_SIM_DO_DL_SIGNAL
DESC = VCD function SIM_DO_DL_SIGNAL
GROUP = ALL:VCD:ENB:VCD_FUNCTION
...
...
executables/nr-ru.c
View file @
cc4a0c74
...
...
@@ -735,6 +735,8 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
else
flags
=
4
;
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_TRX_WRITE_FLAGS
,
flags
);
/*
if (SF_type == SF_S) {
siglen = fp->dl_symbols_in_S_subframe*(fp->ofdm_symbol_size+fp->nb_prefix_samples0);
...
...
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
View file @
cc4a0c74
...
...
@@ -49,6 +49,8 @@
#include "common_lib.h"
#include "assertions.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include <sys/resource.h>
#include "usrp_lib.h"
...
...
@@ -443,7 +445,7 @@ static int trx_usrp_write(openair0_device *device, openair0_timestamp timestamp,
pthread_mutex_lock
(
&
write_thread
->
mutex_write
);
if
(
write_thread
->
count_write
>=
MAX_WRITE_THREAD_PACKAGE
){
LOG_W
(
HW
,
"Buffer overflow, resetting write package
\n
"
);
LOG_W
(
"Buffer overflow, count_write = %d, start = %d end = %d, resetting write package
\n
"
,
write_thread
->
count_write
,
write_thread
->
start
,
write_thread
->
end
);
write_thread
->
end
=
write_thread
->
start
;
write_thread
->
count_write
=
0
;
}
...
...
@@ -495,6 +497,7 @@ void *trx_usrp_write_thread(void * arg){
while
(
write_thread
->
count_write
==
0
)
{
pthread_cond_wait
(
&
write_thread
->
cond_write
,
&
write_thread
->
mutex_write
);
// this unlocks mutex_rxtx while waiting and then locks it again
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_THREAD
,
1
);
s
=
(
usrp_state_t
*
)
device
->
priv
;
start
=
write_thread
->
start
;
timestamp
=
write_package
[
start
].
timestamp
;
...
...
@@ -506,6 +509,9 @@ void *trx_usrp_write_thread(void * arg){
write_thread
->
start
=
(
write_thread
->
start
+
1
)
%
MAX_WRITE_THREAD_PACKAGE
;
write_thread
->
count_write
--
;
pthread_mutex_unlock
(
&
write_thread
->
mutex_write
);
if
(
write_thread
->
count_write
!=
0
){
LOG_W
(
HW
,
"count write = %d, start = %d, end = %d
\n
"
,
write_thread
->
count_write
,
write_thread
->
start
,
write_thread
->
end
);
}
#if defined(__x86_64) || defined(__i386__)
#ifdef __AVX2__
...
...
@@ -552,6 +558,8 @@ void *trx_usrp_write_thread(void * arg){
ret
=
(
int
)
s
->
tx_stream
->
send
(
buff_ptrs
,
nsamps
,
s
->
tx_md
);
}
else
ret
=
(
int
)
s
->
tx_stream
->
send
(
&
(((
int16_t
*
)
buff_tx
[
0
])[
0
]),
nsamps
,
s
->
tx_md
);
if
(
ret
!=
nsamps
)
LOG_E
(
HW
,
"[xmit] tx samples %d != %d
\n
"
,
ret
,
nsamps
);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_USRP_SEND_RETURN
,
ret
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_THREAD
,
0
);
if
(
0
)
break
;
}
...
...
@@ -567,7 +575,7 @@ int trx_write_init(openair0_device *device){
write_thread
->
start
=
0
;
write_thread
->
end
=
0
;
write_thread
->
count_write
=
0
;
write_thread
->
count_write
=
0
;
printf
(
"end of tx write thread
\n
"
);
pthread_create
(
&
write_thread
->
pthread_write
,
NULL
,
trx_usrp_write_thread
,(
void
*
)
device
);
...
...
targets/RT/USER/gNB_usrp.gtkw
View file @
cc4a0c74
[*]
[*] GTKWave Analyzer v3.3.61 (w)1999-2014 BSI
[*]
Tue Dec 17 15:31:51 2019
[*]
Wed Mar 4 14:05:43 2020
[*]
[dumpfile] "/tmp/gNB.vcd"
[dumpfile_mtime] "
Tue Dec 17 15:25:49 2019
"
[dumpfile_size]
6343431
[dumpfile] "/tmp/gNB
_trx_thread
.vcd"
[dumpfile_mtime] "
Wed Mar 4 14:05:10 2020
"
[dumpfile_size]
10750468
[savefile] "/home/wangts/openairinterface5g/targets/RT/USER/gNB_usrp.gtkw"
[timestart]
1517712
000
[size] 19
20 1018
[pos] -
9 -33
*-
19.276148 151835845
1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
[timestart]
31148700
000
[size] 19
16 1002
[pos] -
1 -25
*-
23.852516 -
1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
[sst_width] 386
[signals_width] 344
[sst_expanded] 1
[sst_vpaned_height] 26
7
[sst_vpaned_height] 26
2
@28
functions.trx_read
functions.trx_write_thread
@25
variables.trx_write_flags[63:0]
@28
functions.trx_write
@420
variables.frame_number_TX0_UE[63: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