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
alex037yang
OpenXG-RAN
Commits
3858af32
Commit
3858af32
authored
Jan 22, 2021
by
Sakthivel Velumani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Write to USRP only when needed in TDD
parent
951fdfef
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
10 deletions
+23
-10
executables/nr-ue.c
executables/nr-ue.c
+23
-10
No files found.
executables/nr-ue.c
View file @
3858af32
...
@@ -705,8 +705,7 @@ void *UE_thread(void *arg) {
...
@@ -705,8 +705,7 @@ void *UE_thread(void *arg) {
UE
->
rx_offset_diff
=
computeSamplesShift
(
UE
);
UE
->
rx_offset_diff
=
computeSamplesShift
(
UE
);
readBlockSize
=
get_readBlockSize
(
slot_nr
,
&
UE
->
frame_parms
)
-
readBlockSize
=
get_readBlockSize
(
slot_nr
,
&
UE
->
frame_parms
)
-
UE
->
rx_offset_diff
;
UE
->
rx_offset_diff
;
writeBlockSize
=
UE
->
frame_parms
.
get_samples_per_slot
((
slot_nr
+
DURATION_RX_TO_TX
-
RX_NB_TH
)
%
nb_slot_frame
,
&
UE
->
frame_parms
)
-
writeBlockSize
=
UE
->
frame_parms
.
get_samples_per_slot
((
slot_nr
+
DURATION_RX_TO_TX
-
RX_NB_TH
)
%
nb_slot_frame
,
&
UE
->
frame_parms
)
-
UE
->
rx_offset_diff
;
UE
->
rx_offset_diff
;
}
}
AssertFatal
(
readBlockSize
==
AssertFatal
(
readBlockSize
==
...
@@ -765,13 +764,27 @@ void *UE_thread(void *arg) {
...
@@ -765,13 +764,27 @@ void *UE_thread(void *arg) {
timing_advance
=
UE
->
timing_advance
;
timing_advance
=
UE
->
timing_advance
;
}
}
int
flags
=
0
;
int
slot_tx_usrp
=
slot_nr
+
DURATION_RX_TO_TX
-
RX_NB_TH
;
uint8_t
tdd_period
=
mac
->
phy_config
.
config_req
.
tdd_table
.
tdd_period_in_slots
;
uint8_t
num_UL_slots
=
mac
->
scc
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
nrofUplinkSlots
+
(
mac
->
scc
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
nrofUplinkSymbols
!=
0
);
uint8_t
first_tx_slot
=
tdd_period
-
num_UL_slots
;
if
(
slot_tx_usrp
%
tdd_period
==
first_tx_slot
)
flags
=
2
;
else
if
(
slot_tx_usrp
%
tdd_period
==
first_tx_slot
+
num_UL_slots
-
1
)
flags
=
3
;
else
if
(
slot_tx_usrp
%
tdd_period
>
first_tx_slot
)
flags
=
1
;
if
(
flags
||
IS_SOFTMODEM_RFSIM
)
AssertFatal
(
writeBlockSize
==
AssertFatal
(
writeBlockSize
==
UE
->
rfdevice
.
trx_write_func
(
&
UE
->
rfdevice
,
UE
->
rfdevice
.
trx_write_func
(
&
UE
->
rfdevice
,
writeTimestamp
,
writeTimestamp
,
txp
,
txp
,
writeBlockSize
,
writeBlockSize
,
UE
->
frame_parms
.
nb_antennas_tx
,
UE
->
frame_parms
.
nb_antennas_tx
,
1
),
""
);
flags
),
""
);
for
(
int
i
=
0
;
i
<
UE
->
frame_parms
.
nb_antennas_tx
;
i
++
)
for
(
int
i
=
0
;
i
<
UE
->
frame_parms
.
nb_antennas_tx
;
i
++
)
memset
(
txp
[
i
],
0
,
writeBlockSize
);
memset
(
txp
[
i
],
0
,
writeBlockSize
);
...
@@ -780,7 +793,7 @@ void *UE_thread(void *arg) {
...
@@ -780,7 +793,7 @@ void *UE_thread(void *arg) {
msgToPush
->
key
=
slot_nr
;
msgToPush
->
key
=
slot_nr
;
pushTpool
(
&
(
get_nrUE_params
()
->
Tpool
),
msgToPush
);
pushTpool
(
&
(
get_nrUE_params
()
->
Tpool
),
msgToPush
);
if
(
IS_SOFTMODEM_RFSIM
||
IS_SOFTMODEM_NOS1
)
{
//getenv("RFSIMULATOR")
if
(
IS_SOFTMODEM_RFSIM
)
{
//getenv("RFSIMULATOR")
// FixMe: Wait previous thread is done, because race conditions seems too bad
// FixMe: Wait previous thread is done, because race conditions seems too bad
// in case of actual RF board, the overlap between threads mitigate the issue
// in case of actual RF board, the overlap between threads mitigate the issue
// We must receive one message, that proves the slot processing is done
// We must receive one message, that proves the slot processing is done
...
...
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