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
72460cec
Commit
72460cec
authored
Jan 12, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use TX Burst enum consistently
- By convention, enums are uppercase in C - Use it everywhere
parent
faba9ac2
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
38 additions
and
37 deletions
+38
-37
executables/lte-ru.c
executables/lte-ru.c
+8
-7
executables/main-ocp.c
executables/main-ocp.c
+4
-3
executables/nr-ru.c
executables/nr-ru.c
+7
-10
executables/nr-ue.c
executables/nr-ue.c
+5
-5
radio/COMMON/common_lib.h
radio/COMMON/common_lib.h
+7
-5
radio/IRIS/USERSPACE/LIB/iris_lib.cpp
radio/IRIS/USERSPACE/LIB/iris_lib.cpp
+2
-2
radio/USRP/USERSPACE/LIB/usrp_lib.cpp
radio/USRP/USERSPACE/LIB/usrp_lib.cpp
+5
-5
No files found.
executables/lte-ru.c
View file @
72460cec
...
...
@@ -742,7 +742,8 @@ void tx_rf(RU_t *ru,
if
((
SF_type
==
SF_DL
)
||
(
SF_type
==
SF_S
)
)
{
int
siglen
=
fp
->
samples_per_tti
,
flags
=
1
;
int
siglen
=
fp
->
samples_per_tti
;
radio_tx_burst_flag_t
flags
=
TX_BURST_MIDDLE
;
if
(
SF_type
==
SF_S
)
{
int
txsymb
=
fp
->
dl_symbols_in_S_subframe
+
(
ru
->
is_slave
==
0
?
1
:
0
);
...
...
@@ -757,13 +758,13 @@ void tx_rf(RU_t *ru,
siglen
=
(
fp
->
ofdm_symbol_size
+
fp
->
nb_prefix_samples0
)
+
(
txsymb
-
1
)
*
(
fp
->
ofdm_symbol_size
+
fp
->
nb_prefix_samples
)
+
ru
->
end_of_burst_delay
;
flags
=
3
;
// end of burst
flags
=
TX_BURST_END
;
}
if
(
fp
->
frame_type
==
TDD
&&
SF_type
==
SF_DL
&&
prevSF_type
==
SF_UL
)
{
flags
=
2
;
// start of burst
flags
=
TX_BURST_START
;
sf_extension
=
ru
->
sf_extension
;
}
...
...
@@ -781,24 +782,24 @@ void tx_rf(RU_t *ru,
LOG_E
(
PHY
,
"%d.%d late_control : %d
\n
"
,
frame
,
subframe
,
late_control
);
switch
(
late_control
)
{
case
STATE_BURST_TERMINATE
:
flags
=
10
;
// end of burst and no time spec
flags
=
TX_BURST_END_NO_TIME_SPEC
;
late_control
=
STATE_BURST_STOP_1
;
break
;
case
STATE_BURST_STOP_1
:
flags
=
0
;
// no send
flags
=
TX_BURST_INVALID
;
late_control
=
STATE_BURST_STOP_2
;
return
;
//no send
break
;
case
STATE_BURST_STOP_2
:
flags
=
0
;
// no send
flags
=
TX_BURST_INVALID
;
late_control
=
STATE_BURST_RESTART
;
return
;
//no send
break
;
case
STATE_BURST_RESTART
:
flags
=
2
;
// start burst
flags
=
TX_BURST_START
;
late_control
=
STATE_BURST_NORMAL
;
break
;
...
...
executables/main-ocp.c
View file @
72460cec
...
...
@@ -695,7 +695,8 @@ void ocp_tx_rf(RU_t *ru, L1_rxtx_proc_t *proc) {
if
((
SF_type
==
SF_DL
)
||
(
SF_type
==
SF_S
))
{
int
siglen
=
fp
->
samples_per_tti
,
flags
=
1
;
int
siglen
=
fp
->
samples_per_tti
;
radio_tx_burst_flag_t
flags
=
TX_BURST_MIDDLE
;
if
(
SF_type
==
SF_S
)
{
/* end_of_burst_delay is used to stop TX only "after a while".
...
...
@@ -708,13 +709,13 @@ void ocp_tx_rf(RU_t *ru, L1_rxtx_proc_t *proc) {
siglen
=
(
fp
->
ofdm_symbol_size
+
fp
->
nb_prefix_samples0
)
+
(
fp
->
dl_symbols_in_S_subframe
-
1
)
*
(
fp
->
ofdm_symbol_size
+
fp
->
nb_prefix_samples
)
+
ru
->
end_of_burst_delay
;
flags
=
3
;
// end of burst
flags
=
TX_BURST_END
;
}
if
(
fp
->
frame_type
==
TDD
&&
SF_type
==
SF_DL
&&
prevSF_type
==
SF_UL
)
{
flags
=
2
;
// start of burst
flags
=
TX_BURST_START
;
sf_extension
=
ru
->
sf_extension
;
}
...
...
executables/nr-ru.c
View file @
72460cec
...
...
@@ -733,7 +733,8 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
T_INT
(
0
),
T_BUFFER
(
&
ru
->
common
.
txdata
[
0
][
fp
->
get_samples_slot_timestamp
(
slot
,
fp
,
0
)],
fp
->
samples_per_subframe
*
4
));
int
sf_extension
=
0
;
int
siglen
=
fp
->
get_samples_per_slot
(
slot
,
fp
);
int
flags
=
0
,
flags_burst
=
0
,
flags_gpio
=
0
;
int
flags
=
0
,
flags_gpio
=
0
;
radio_tx_burst_flag_t
flags_burst
=
TX_BURST_INVALID
;
if
(
cfg
->
cell_config
.
frame_duplex_type
.
value
==
TDD
&&
!
get_softmodem_params
()
->
continuous_tx
)
{
int
slot_type
=
nr_slot_select
(
cfg
,
frame
,
slot
%
fp
->
slots_per_frame
);
...
...
@@ -760,25 +761,21 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
}
//+ ru->end_of_burst_delay;
flags_burst
=
3
;
// end of burst
flags_burst
=
TX_BURST_END
;
}
else
if
(
slot_type
==
NR_DOWNLINK_SLOT
)
{
int
prevslot_type
=
nr_slot_select
(
cfg
,
frame
,(
slot
+
(
fp
->
slots_per_frame
-
1
))
%
fp
->
slots_per_frame
);
int
nextslot_type
=
nr_slot_select
(
cfg
,
frame
,(
slot
+
1
)
%
fp
->
slots_per_frame
);
if
(
prevslot_type
==
NR_UPLINK_SLOT
)
{
flags_burst
=
2
;
// start of burst
flags_burst
=
TX_BURST_START
;
sf_extension
=
ru
->
sf_extension
;
}
else
if
(
nextslot_type
==
NR_UPLINK_SLOT
)
{
flags_burst
=
3
;
// end of burst
flags_burst
=
TX_BURST_END
;
}
else
{
flags_burst
=
1
;
// middle of burst
flags_burst
=
TX_BURST_MIDDLE
;
}
}
}
else
{
// FDD
if
(
proc
->
first_tx
==
1
)
{
flags_burst
=
2
;
// start of burst
}
else
{
flags_burst
=
1
;
// middle of burst
}
flags_burst
=
proc
->
first_tx
==
1
?
TX_BURST_START
:
TX_BURST_MIDDLE
;
}
if
(
fp
->
freq_range
==
nr_FR2
)
{
...
...
executables/nr-ue.c
View file @
72460cec
...
...
@@ -509,7 +509,7 @@ static void RU_write(nr_rxtx_thread_data_t *rxtxD) {
txp
[
i
]
=
(
void
*
)
&
UE
->
common_vars
.
txdata
[
i
][
UE
->
frame_parms
.
get_samples_slot_timestamp
(
proc
->
nr_slot_tx
,
&
UE
->
frame_parms
,
0
)];
radio_tx_
flag_t
flags
=
Invalid
;
radio_tx_
burst_flag_t
flags
=
TX_BURST_INVALID
;
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
0
);
...
...
@@ -531,13 +531,13 @@ static void RU_write(nr_rxtx_thread_data_t *rxtxD) {
uint8_t
first_tx_slot
=
tdd_period
-
num_UL_slots
;
if
(
slot_tx_usrp
%
tdd_period
==
first_tx_slot
)
flags
=
StartOfBurst
;
flags
=
TX_BURST_START
;
else
if
(
slot_tx_usrp
%
tdd_period
==
first_tx_slot
+
num_UL_slots
-
1
)
flags
=
EndOfBurst
;
flags
=
TX_BURST_END
;
else
if
(
slot_tx_usrp
%
tdd_period
>
first_tx_slot
)
flags
=
MiddleOfBurst
;
flags
=
TX_BURST_MIDDLE
;
}
else
{
flags
=
MiddleOfBurst
;
flags
=
TX_BURST_MIDDLE
;
}
if
(
flags
||
IS_SOFTMODEM_RFSIM
)
...
...
radio/COMMON/common_lib.h
View file @
72460cec
...
...
@@ -152,11 +152,13 @@ typedef enum {
/*! \brief Radio Tx burst flags */
typedef
enum
{
Invalid
=
0
,
MiddleOfBurst
,
StartOfBurst
,
EndOfBurst
}
radio_tx_flag_t
;
TX_BURST_INVALID
=
0
,
TX_BURST_MIDDLE
=
1
,
TX_BURST_START
=
2
,
TX_BURST_END
=
3
,
TX_BURST_START_AND_END
=
4
,
TX_BURST_END_NO_TIME_SPEC
=
10
,
}
radio_tx_burst_flag_t
;
/*! \brief Structure used for initializing UDP read threads */
typedef
struct
{
...
...
radio/IRIS/USERSPACE/LIB/iris_lib.cpp
View file @
72460cec
...
...
@@ -164,9 +164,9 @@ trx_iris_write(openair0_device *device, openair0_timestamp timestamp, void **buf
return
nsamps
;
}
if
(
flags
==
2
||
flags
==
1
)
{
// start of burst
if
(
flags
==
TX_BURST_START
||
flags
==
TX_BURST_MIDDLE
)
}
else
if
(
flags
==
3
||
flags
==
4
)
{
}
else
if
(
flags
==
TX_BURST_END
||
flags
==
TX_BURST_START_AND_END
)
{
flag
|=
SOAPY_SDR_END_BURST
;
}
...
...
radio/USRP/USERSPACE/LIB/usrp_lib.cpp
View file @
72460cec
...
...
@@ -389,7 +389,7 @@ static int trx_usrp_write(openair0_device *device,
usrp_state_t
*
s
=
(
usrp_state_t
*
)
device
->
priv
;
int
nsamps2
;
// aligned to upper 32 or 16 byte boundary
int
flags_burst
=
flags
&
0xf
;
radio_tx_burst_flag_t
flags_burst
=
(
radio_tx_burst_flag_t
)
(
flags
&
0xf
)
;
int
flags_gpio
=
(
flags
>>
4
)
&
0x1fff
;
//MSB to enable sending GPIO command, 12 LSB carry GPIO values
int
end
;
...
...
@@ -400,22 +400,22 @@ static int trx_usrp_write(openair0_device *device,
bool
first_packet_state
=
false
,
last_packet_state
=
false
;
if
(
flags_burst
==
2
)
{
// start of burst
if
(
flags_burst
==
TX_BURST_START
)
{
// s->tx_md.start_of_burst = true;
// s->tx_md.end_of_burst = false;
first_packet_state
=
true
;
last_packet_state
=
false
;
}
else
if
(
flags_burst
==
3
)
{
// end of burst
}
else
if
(
flags_burst
==
TX_BURST_END
)
{
//s->tx_md.start_of_burst = false;
//s->tx_md.end_of_burst = true;
first_packet_state
=
false
;
last_packet_state
=
true
;
}
else
if
(
flags_burst
==
4
)
{
// start and end
}
else
if
(
flags_burst
==
TX_BURST_START_AND_END
)
{
// s->tx_md.start_of_burst = true;
// s->tx_md.end_of_burst = true;
first_packet_state
=
true
;
last_packet_state
=
true
;
}
else
if
(
flags_burst
==
1
)
{
// middle of burst
}
else
if
(
flags_burst
==
TX_BURST_MIDDLE
)
{
// s->tx_md.start_of_burst = false;
// s->tx_md.end_of_burst = false;
first_packet_state
=
false
;
...
...
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