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
spbro
OpenXG-RAN
Commits
f21211c2
Commit
f21211c2
authored
Sep 20, 2021
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed logging
parent
90029d4f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
16 deletions
+15
-16
executables/nr-ru.c
executables/nr-ru.c
+9
-12
openair1/PHY/NR_TRANSPORT/nr_dci.c
openair1/PHY/NR_TRANSPORT/nr_dci.c
+3
-3
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+3
-1
No files found.
executables/nr-ru.c
View file @
f21211c2
...
...
@@ -659,11 +659,11 @@ void rx_rf(RU_t *ru,int *frame,int *slot) {
proc
->
frame_rx
=
(
proc
->
timestamp_rx
/
(
fp
->
samples_per_subframe
*
10
))
&
1023
;
proc
->
tti_rx
=
fp
->
get_slot_from_timestamp
(
proc
->
timestamp_rx
,
fp
);
// synchronize first reception to frame 0 subframe 0
LOG_D
(
PHY
,
"RU %d/%d TS %llu
(off %d)
, frame %d, slot %d.%d / %d
\n
"
,
LOG_D
(
PHY
,
"RU %d/%d TS %llu , frame %d, slot %d.%d / %d
\n
"
,
ru
->
idx
,
0
,
(
unsigned
long
long
int
)
proc
->
timestamp_rx
,
(
int
)
ru
->
ts_offset
,
proc
->
frame_rx
,
proc
->
tti_rx
,
proc
->
tti_tx
,
fp
->
slots_per_frame
);
(
unsigned
long
long
int
)
(
proc
->
timestamp_rx
+
ru
->
ts_offset
)
,
proc
->
frame_rx
,
proc
->
tti_rx
,
proc
->
tti_tx
,
fp
->
slots_per_frame
);
// dump VCD output for first RU in list
if
(
ru
==
RC
.
ru
[
0
])
{
...
...
@@ -689,7 +689,7 @@ void rx_rf(RU_t *ru,int *frame,int *slot) {
}
//printf("timestamp_rx %lu, frame %d(%d), subframe %d(%d)\n",ru->timestamp_rx,proc->frame_rx,frame,proc->tti_rx,subframe);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS
,
proc
->
timestamp_rx
&
0xffffffff
);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS
,
(
proc
->
timestamp_rx
+
ru
->
ts_offset
)
&
0xffffffff
);
if
(
rxs
!=
samples_per_slot
)
{
//exit_fun( "problem receiving samples" );
...
...
@@ -745,9 +745,6 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
flags
=
3
;
// end of burst
}
// if this is the first TX, flags=2 => flags=2 (Start of burst), flags=1 => flags=2 (start of burst), flags=3 => flags = 4 (start and end of burst)
if
(
flags
!=
2
&&
proc
->
first_tx
==
1
)
flags
+=
1
;
if
(
fp
->
freq_range
==
nr_FR2
)
{
// the beam index is written in bits 8-10 of the flags
// bit 11 enables the gpio programming
...
...
@@ -778,7 +775,7 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
for
(
i
=
0
;
i
<
ru
->
nb_tx
;
i
++
)
txp
[
i
]
=
(
void
*
)
&
ru
->
common
.
txdata
[
i
][
fp
->
get_samples_slot_timestamp
(
slot
,
fp
,
0
)
-
sf_extension
];
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST
,
(
timestamp
-
ru
->
openair0_cfg
.
tx_sample_advance
)
&
0xffffffff
);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST
,
(
timestamp
+
ru
->
ts_offset
-
ru
->
openair0_cfg
.
tx_sample_advance
)
&
0xffffffff
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE
,
1
);
// prepare tx buffer pointers
txs
=
ru
->
rfdevice
.
trx_write_func
(
&
ru
->
rfdevice
,
...
...
@@ -788,7 +785,7 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
ru
->
nb_tx
,
flags
);
LOG_D
(
PHY
,
"[TXPATH] RU %d aa %d tx_rf, writing to TS %llu, frame %d, unwrapped_frame %d, slot %d, flags %d, siglen+sf_extension %d, returned %d, E %f
\n
"
,
ru
->
idx
,
i
,
(
long
long
unsigned
int
)
timestamp
,
frame
,
proc
->
frame_tx_unwrap
,
slot
,
flags
,
siglen
+
sf_extension
,
txs
,
10
*
log10
((
double
)
signal_energy
(
txp
[
0
],
siglen
+
sf_extension
)));
(
long
long
unsigned
int
)
(
timestamp
+
ru
->
ts_offset
-
ru
->
openair0_cfg
.
tx_sample_advance
-
sf_extension
)
,
frame
,
proc
->
frame_tx_unwrap
,
slot
,
flags
,
siglen
+
sf_extension
,
txs
,
10
*
log10
((
double
)
signal_energy
(
txp
[
0
],
siglen
+
sf_extension
)));
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE
,
0
);
//AssertFatal(txs == 0,"trx write function error %d\n", txs);
}
...
...
@@ -1303,7 +1300,7 @@ void *ru_thread( void *param ) {
}
sf_ahead
=
(
uint16_t
)
ceil
((
float
)
6
/
(
0x01
<<
fp
->
numerology_index
));
LOG_I
(
PHY
,
"Signaling main thread that RU %d is ready
\n
"
,
ru
->
idx
);
LOG_I
(
PHY
,
"Signaling main thread that RU %d is ready
, sf_ahead %d
\n
"
,
ru
->
idx
,
sf_ahead
);
pthread_mutex_lock
(
&
RC
.
ru_mutex
);
RC
.
ru_mask
&=
~
(
1
<<
ru
->
idx
);
pthread_cond_signal
(
&
RC
.
ru_cond
);
...
...
@@ -1356,7 +1353,7 @@ void *ru_thread( void *param ) {
if
(
ru
->
fh_south_in
)
ru
->
fh_south_in
(
ru
,
&
frame
,
&
slot
);
else
AssertFatal
(
1
==
0
,
"No fronthaul interface at south port"
);
if
(
initial_wait
==
1
&&
proc
->
frame_rx
<
10
00
&&
ru
->
fh_south_in
==
rx_rf
)
{
if
(
initial_wait
==
1
&&
proc
->
frame_rx
<
3
00
&&
ru
->
fh_south_in
==
rx_rf
)
{
if
(
proc
->
frame_rx
>
0
&&
((
proc
->
frame_rx
%
100
)
==
0
)
&&
proc
->
tti_rx
==
0
)
{
LOG_I
(
PHY
,
"delay processing to let RX stream settle, frame %d (trials %d)
\n
"
,
proc
->
frame_rx
,
ru
->
rx_fhaul
.
trials
);
print_meas
(
&
ru
->
rx_fhaul
,
"rx_fhaul"
,
NULL
,
NULL
);
...
...
@@ -1364,7 +1361,7 @@ void *ru_thread( void *param ) {
}
continue
;
}
if
(
proc
->
frame_rx
>=
8
00
)
{
if
(
proc
->
frame_rx
>=
3
00
)
{
initial_wait
=
0
;
opp_enabled
=
opp_enabled0
;
}
...
...
openair1/PHY/NR_TRANSPORT/nr_dci.c
View file @
f21211c2
...
...
@@ -97,12 +97,12 @@ void nr_generate_dci(PHY_VARS_gNB *gNB,
cset_start_symb
=
pdcch_pdu_rel15
->
StartSymbolIndex
;
cset_nsymb
=
pdcch_pdu_rel15
->
DurationSymbols
;
dci_idx
=
0
;
LOG_
D
(
PHY
,
"Coreset rb_offset %d, nb_rb %d BWP Start %d
\n
"
,
rb_offset
,
n_rb
,
pdcch_pdu_rel15
->
BWPStart
);
LOG_
D
(
PHY
,
"Coreset starting subcarrier %d on symbol %d (%d symbols)
\n
"
,
cset_start_sc
,
cset_start_symb
,
cset_nsymb
);
LOG_
I
(
PHY
,
"Coreset rb_offset %d, nb_rb %d BWP Start %d
\n
"
,
rb_offset
,
n_rb
,
pdcch_pdu_rel15
->
BWPStart
);
LOG_
I
(
PHY
,
"Coreset starting subcarrier %d on symbol %d (%d symbols)
\n
"
,
cset_start_sc
,
cset_start_symb
,
cset_nsymb
);
// DMRS length is per OFDM symbol
uint32_t
dmrs_length
=
n_rb
*
6
;
//2(QPSK)*3(per RB)*6(REG per CCE)
uint32_t
encoded_length
=
dci_pdu
->
AggregationLevel
*
108
;
//2(QPSK)*9(per RB)*6(REG per CCE)
if
(
dci_pdu
->
RNTI
!=
0xFFFF
)
LOG_D
(
PHY
,
"DL_DCI : rb_offset %d, nb_rb %d, DMRS length per symbol %d
\t
DCI encoded length %d (precoder_granularity %d,reg_mapping %d),Scrambling_Id %d,ScramblingRNTI %x,PayloadSizeBits %d
\n
"
,
if
(
1
/*dci_pdu->RNTI!=0xFFFF*/
)
LOG_I
(
PHY
,
"DL_DCI : rb_offset %d, nb_rb %d, DMRS length per symbol %d
\t
DCI encoded length %d (precoder_granularity %d,reg_mapping %d),Scrambling_Id %d,ScramblingRNTI %x,PayloadSizeBits %d
\n
"
,
rb_offset
,
n_rb
,
dmrs_length
,
encoded_length
,
pdcch_pdu_rel15
->
precoderGranularity
,
pdcch_pdu_rel15
->
CceRegMappingType
,
dci_pdu
->
ScramblingId
,
dci_pdu
->
ScramblingRNTI
,
dci_pdu
->
PayloadSizeBits
);
dmrs_length
+=
rb_offset
*
6
;
// To accommodate more DMRS symbols in case of rb offset
...
...
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
View file @
f21211c2
...
...
@@ -416,6 +416,7 @@ static int trx_usrp_write(openair0_device *device,
s
->
tx_md
.
start_of_burst
=
(
s
->
tx_count
==
0
)
?
true
:
first_packet_state
;
s
->
tx_md
.
end_of_burst
=
last_packet_state
;
s
->
tx_md
.
time_spec
=
uhd
::
time_spec_t
::
from_ticks
(
timestamp
,
s
->
sample_rate
);
s
->
tx_count
++
;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_BEAM_SWITCHING_GPIO
,
1
);
...
...
@@ -555,6 +556,7 @@ void *trx_usrp_write_thread(void * arg){
s
->
tx_md
.
start_of_burst
=
(
s
->
tx_count
==
0
)
?
true
:
first_packet
;
s
->
tx_md
.
end_of_burst
=
last_packet
;
s
->
tx_md
.
time_spec
=
uhd
::
time_spec_t
::
from_ticks
(
timestamp
,
s
->
sample_rate
);
LOG_D
(
PHY
,
"usrp_tx_write: tx_count %llu SoB %d, EoB %d, TS %llu
\n
"
,(
unsigned
long
long
)
s
->
tx_count
,
s
->
tx_md
.
start_of_burst
,
s
->
tx_md
.
end_of_burst
,(
unsigned
long
long
)
timestamp
);
s
->
tx_count
++
;
// bit 3 enables gpio (for backward compatibility)
...
...
@@ -940,7 +942,7 @@ extern "C" {
LOG_I
(
HW
,
"openair0_cfg[0].sdr_addrs == '%s'
\n
"
,
openair0_cfg
[
0
].
sdr_addrs
);
LOG_I
(
HW
,
"openair0_cfg[0].clock_source == '%d' (internal = %d, external = %d)
\n
"
,
openair0_cfg
[
0
].
clock_source
,
internal
,
external
);
usrp_state_t
*
s
;
int
choffset
=
0
;
int
choffset
=
1
;
if
(
device
->
priv
==
NULL
)
{
s
=
(
usrp_state_t
*
)
calloc
(
sizeof
(
usrp_state_t
),
1
);
...
...
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