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
Michael Black
OpenXG-RAN
Commits
ca4b438d
Commit
ca4b438d
authored
Mar 27, 2023
by
francescomani
Committed by
Robert Schmidt
Apr 14, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clang warning fixes to compile lte softmodems
parent
971bacb7
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
35 additions
and
70 deletions
+35
-70
executables/lte-enb.c
executables/lte-enb.c
+1
-1
executables/lte-ru.c
executables/lte-ru.c
+5
-5
executables/lte-softmodem.h
executables/lte-softmodem.h
+26
-26
executables/lte-uesoftmodem.c
executables/lte-uesoftmodem.c
+1
-1
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
+0
-1
openair2/LAYER2/PDCP_v10.1.0/pdcp_primitives.c
openair2/LAYER2/PDCP_v10.1.0/pdcp_primitives.c
+0
-21
openair2/LAYER2/PDCP_v10.1.0/pdcp_primitives.h
openair2/LAYER2/PDCP_v10.1.0/pdcp_primitives.h
+0
-10
radio/iqplayer/iqplayer_lib.c
radio/iqplayer/iqplayer_lib.c
+2
-5
No files found.
executables/lte-enb.c
View file @
ca4b438d
...
...
@@ -206,7 +206,7 @@ static inline int rxtx(PHY_VARS_eNB *eNB,
T
(
T_ENB_PHY_DL_TICK
,
T_INT
(
eNB
->
Mod_id
),
T_INT
(
proc
->
frame_tx
),
T_INT
(
proc
->
subframe_tx
));
// if this is IF5 or 3GPP_eNB
if
(
eNB
->
RU_list
&&
eNB
->
RU_list
[
0
]
&&
eNB
->
RU_list
[
0
]
->
function
<
NGFI_RAU_IF4p5
)
{
if
(
eNB
->
RU_list
[
0
]
&&
eNB
->
RU_list
[
0
]
->
function
<
NGFI_RAU_IF4p5
)
{
wakeup_prach_eNB
(
eNB
,
NULL
,
proc
->
frame_rx
,
proc
->
subframe_rx
);
wakeup_prach_eNB_br
(
eNB
,
NULL
,
proc
->
frame_rx
,
proc
->
subframe_rx
);
}
...
...
executables/lte-ru.c
View file @
ca4b438d
...
...
@@ -1126,7 +1126,7 @@ static void do_ru_synch(RU_t *ru) {
int
check_sync
(
RU_t
*
ru
,
RU_t
*
ru_master
,
int
subframe
)
{
if
(
f
abs
(
ru_master
->
proc
.
t
[
subframe
].
tv_nsec
-
ru
->
proc
.
t
[
subframe
].
tv_nsec
)
>
500000
)
if
(
l
abs
(
ru_master
->
proc
.
t
[
subframe
].
tv_nsec
-
ru
->
proc
.
t
[
subframe
].
tv_nsec
)
>
500000
)
return
0
;
return
1
;
...
...
@@ -1178,12 +1178,12 @@ void wakeup_L1s(RU_t *ru) {
if
(
ru
->
is_slave
==
0
&&
(
(
proc
->
RU_mask
[
ru
->
proc
.
tti_rx
]
&
(
1
<<
i
))
==
1
)
&&
eNB
->
RU_list
[
i
]
->
state
==
RU_RUN
)
{
//This is master & the RRU has already been received
if
(
check_sync
(
eNB
->
RU_list
[
i
],
eNB
->
RU_list
[
0
],
ru
->
proc
.
tti_rx
)
==
0
)
LOG_E
(
PHY
,
"RU %d is not SYNC, subframe %d, time %
f
this is master
\n
"
,
eNB
->
RU_list
[
i
]
->
idx
,
ru
->
proc
.
tti_rx
,
f
abs
(
eNB
->
RU_list
[
i
]
->
proc
.
t
[
ru
->
proc
.
tti_rx
].
tv_nsec
-
eNB
->
RU_list
[
0
]
->
proc
.
t
[
ru
->
proc
.
tti_rx
].
tv_nsec
));
LOG_E
(
PHY
,
"RU %d is not SYNC, subframe %d, time %
ld
this is master
\n
"
,
eNB
->
RU_list
[
i
]
->
idx
,
ru
->
proc
.
tti_rx
,
l
abs
(
eNB
->
RU_list
[
i
]
->
proc
.
t
[
ru
->
proc
.
tti_rx
].
tv_nsec
-
eNB
->
RU_list
[
0
]
->
proc
.
t
[
ru
->
proc
.
tti_rx
].
tv_nsec
));
}
else
if
(
ru
->
is_slave
==
1
&&
ru
->
state
==
RU_RUN
&&
(
(
proc
->
RU_mask
[
ru
->
proc
.
tti_rx
]
&
(
1
<<
0
))
==
1
))
{
// master already received. TODO: we assume that RU0 is master.
if
(
check_sync
(
ru
,
eNB
->
RU_list
[
0
],
ru
->
proc
.
tti_rx
)
==
0
)
LOG_E
(
PHY
,
"RU %d is not SYNC time, subframe %d, time %
f
\n
"
,
ru
->
idx
,
ru
->
proc
.
tti_rx
,
f
abs
(
ru
->
proc
.
t
[
ru
->
proc
.
tti_rx
].
tv_nsec
-
eNB
->
RU_list
[
0
]
->
proc
.
t
[
ru
->
proc
.
tti_rx
].
tv_nsec
));
LOG_E
(
PHY
,
"RU %d is not SYNC time, subframe %d, time %
ld
\n
"
,
ru
->
idx
,
ru
->
proc
.
tti_rx
,
l
abs
(
ru
->
proc
.
t
[
ru
->
proc
.
tti_rx
].
tv_nsec
-
eNB
->
RU_list
[
0
]
->
proc
.
t
[
ru
->
proc
.
tti_rx
].
tv_nsec
));
}
}
...
...
executables/lte-softmodem.h
View file @
ca4b438d
...
...
@@ -41,13 +41,13 @@
/* optname helpstr paramflags XXXptr defXXXval type numelt */
/*------------------------------------------------------------------------------------------------------------------------------------------*/
#define CMDLINE_UEMODEPARAMS_DESC { \
{"calib-ue-rx", CONFIG_HLP_CALUER, 0,
iptr:&rx_input_level_dBm, defintval:
0, TYPE_INT, 0}, \
{"calib-ue-rx-med", CONFIG_HLP_CALUERM, 0,
iptr:&rx_input_level_dBm, defintval:
0, TYPE_INT, 0}, \
{"calib-ue-rx-byp", CONFIG_HLP_CALUERB, 0,
iptr:&rx_input_level_dBm, defintval:
0, TYPE_INT, 0}, \
{"debug-ue-prach", CONFIG_HLP_DBGUEPR, PARAMFLAG_BOOL,
uptr:NULL, defuintval:
1, TYPE_INT, 0}, \
{"no-L2-connect", CONFIG_HLP_NOL2CN, PARAMFLAG_BOOL,
uptr:NULL, defuintval:
1, TYPE_INT, 0}, \
{"calib-prach-tx", CONFIG_HLP_CALPRACH, PARAMFLAG_BOOL,
uptr:NULL, defuintval:
1, TYPE_INT, 0}, \
{"ue-dump-frame", CONFIG_HLP_DUMPFRAME, PARAMFLAG_BOOL,
iptr:&dumpframe, defintval:
0, TYPE_INT, 0}, \
{"calib-ue-rx", CONFIG_HLP_CALUER, 0,
.iptr=&rx_input_level_dBm, .defintval=
0, TYPE_INT, 0}, \
{"calib-ue-rx-med", CONFIG_HLP_CALUERM, 0,
.iptr=&rx_input_level_dBm, .defintval=
0, TYPE_INT, 0}, \
{"calib-ue-rx-byp", CONFIG_HLP_CALUERB, 0,
.iptr=&rx_input_level_dBm, .defintval=
0, TYPE_INT, 0}, \
{"debug-ue-prach", CONFIG_HLP_DBGUEPR, PARAMFLAG_BOOL,
.uptr=NULL, .defuintval=
1, TYPE_INT, 0}, \
{"no-L2-connect", CONFIG_HLP_NOL2CN, PARAMFLAG_BOOL,
.uptr=NULL, .defuintval=
1, TYPE_INT, 0}, \
{"calib-prach-tx", CONFIG_HLP_CALPRACH, PARAMFLAG_BOOL,
.uptr=NULL, .defuintval=
1, TYPE_INT, 0}, \
{"ue-dump-frame", CONFIG_HLP_DUMPFRAME, PARAMFLAG_BOOL,
.iptr=&dumpframe, .defintval=
0, TYPE_INT, 0}, \
}
#define CMDLINE_CALIBUERX_IDX 0
#define CMDLINE_CALIBUERXMED_IDX 1
...
...
@@ -90,25 +90,25 @@
/*-------------------------------------------------------------------------------------------------------------------------------------------------------*/
// clang-format off
#define CMDLINE_UEPARAMS_DESC { \
{"U", CONFIG_HLP_NUMUE, 0,
iptr:&NB_UE_INST, defuintval:
1, TYPE_INT, 0}, \
{"ue-rxgain", CONFIG_HLP_UERXG, 0,
dblptr:&(rx_gain[0][0]), defdblval:
130, TYPE_DOUBLE, 0}, \
{"ue-rxgain-off", CONFIG_HLP_UERXGOFF, 0,
dblptr:&rx_gain_off, defdblval:
0, TYPE_DOUBLE, 0}, \
{"ue-txgain", CONFIG_HLP_UETXG, 0,
dblptr:&(tx_gain[0][0]), defdblval:
0, TYPE_DOUBLE, 0}, \
{"ue-nb-ant-rx", CONFIG_HLP_UENANTR, 0,
u8ptr:&nb_antenna_rx, defuintval:
1, TYPE_UINT8, 0}, \
{"ue-nb-ant-tx", CONFIG_HLP_UENANTT, 0,
u8ptr:&nb_antenna_tx, defuintval:
1, TYPE_UINT8, 0}, \
{"ue-scan-carrier", CONFIG_HLP_UESCAN, PARAMFLAG_BOOL,
iptr:&UE_scan_carrier, defintval:
0, TYPE_INT, 0}, \
{"ue-max-power", NULL, 0,
iptr:&(tx_max_power[0]), defintval:
23, TYPE_INT, 0}, \
{"emul-iface", CONFIG_HLP_EMULIFACE, 0,
strptr:&emul_iface, defstrval:
"lo", TYPE_STRING, 100}, \
{"L2-emul", NULL, 0,
u8ptr:&nfapi_mode, defuintval:
3, TYPE_UINT8, 0}, \
{"num-ues", NULL, 0,
iptr:&(NB_UE_INST), defuintval:
1, TYPE_INT, 0}, \
{"r" , CONFIG_HLP_PRB, 0,
u8ptr:&(frame_parms[0]->N_RB_DL), defintval:
25, TYPE_UINT8, 0}, \
{"dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0,
iptr:(int32_t *)&dlsch_demod_shift, defintval:
0, TYPE_INT, 0}, \
{"usrp-args", CONFIG_HLP_USRP_ARGS, 0,
strptr:&usrp_args, defstrval:
"type=b200",TYPE_STRING, 0}, \
{"mmapped-dma", CONFIG_HLP_DMAMAP, PARAMFLAG_BOOL,
uptr:&mmapped_dma, defintval:
0, TYPE_INT, 0}, \
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL,
iptr:&tddflag, defintval:
0, TYPE_INT, 0}, \
{"A", CONFIG_HLP_TADV, 0,
iptr:&(timingadv), defintval:
0, TYPE_INT, 0}, \
{"ue-idx-standalone", NULL, 0,
u16ptr:&ue_idx_standalone, defuintval:
0xFFFF, TYPE_UINT16, 0}, \
{"node-number", NULL, 0,
u16ptr:&node_number, defuintval:
2, TYPE_UINT16, 0}, \
{"U", CONFIG_HLP_NUMUE, 0,
.iptr=&NB_UE_INST, .defuintval=
1, TYPE_INT, 0}, \
{"ue-rxgain", CONFIG_HLP_UERXG, 0,
.dblptr=&(rx_gain[0][0]), .defdblval=
130, TYPE_DOUBLE, 0}, \
{"ue-rxgain-off", CONFIG_HLP_UERXGOFF, 0,
.dblptr=&rx_gain_off, .defdblval=
0, TYPE_DOUBLE, 0}, \
{"ue-txgain", CONFIG_HLP_UETXG, 0,
.dblptr=&(tx_gain[0][0]), .defdblval=
0, TYPE_DOUBLE, 0}, \
{"ue-nb-ant-rx", CONFIG_HLP_UENANTR, 0,
.u8ptr=&nb_antenna_rx, .defuintval=
1, TYPE_UINT8, 0}, \
{"ue-nb-ant-tx", CONFIG_HLP_UENANTT, 0,
.u8ptr=&nb_antenna_tx, .defuintval=
1, TYPE_UINT8, 0}, \
{"ue-scan-carrier", CONFIG_HLP_UESCAN, PARAMFLAG_BOOL,
.iptr=&UE_scan_carrier, .defintval=
0, TYPE_INT, 0}, \
{"ue-max-power", NULL, 0,
.iptr=&(tx_max_power[0]), .defintval=
23, TYPE_INT, 0}, \
{"emul-iface", CONFIG_HLP_EMULIFACE, 0,
.strptr=&emul_iface, .defstrval=
"lo", TYPE_STRING, 100}, \
{"L2-emul", NULL, 0,
.u8ptr=&nfapi_mode, .defuintval=
3, TYPE_UINT8, 0}, \
{"num-ues", NULL, 0,
.iptr=&(NB_UE_INST), .defuintval=
1, TYPE_INT, 0}, \
{"r" , CONFIG_HLP_PRB, 0,
.u8ptr=&(frame_parms[0]->N_RB_DL), .defintval=
25, TYPE_UINT8, 0}, \
{"dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0,
.iptr=(int32_t *)&dlsch_demod_shift, .defintval=
0, TYPE_INT, 0}, \
{"usrp-args", CONFIG_HLP_USRP_ARGS, 0,
.strptr=&usrp_args, .defstrval=
"type=b200",TYPE_STRING, 0}, \
{"mmapped-dma", CONFIG_HLP_DMAMAP, PARAMFLAG_BOOL,
.uptr=&mmapped_dma, .defintval=
0, TYPE_INT, 0}, \
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL,
.iptr=&tddflag, .defintval=
0, TYPE_INT, 0}, \
{"A", CONFIG_HLP_TADV, 0,
.iptr=&(timingadv), .defintval=
0, TYPE_INT, 0}, \
{"ue-idx-standalone", NULL, 0,
.u16ptr=&ue_idx_standalone, .defuintval=
0xFFFF, TYPE_UINT16, 0}, \
{"node-number", NULL, 0,
.u16ptr=&node_number, .defuintval=
2, TYPE_UINT16, 0}, \
}
// clang-format on
...
...
executables/lte-uesoftmodem.c
View file @
ca4b438d
...
...
@@ -482,7 +482,7 @@ void init_openair0(LTE_DL_FRAME_PARMS *frame_parms,int rxgain) {
void
terminate_task
(
task_id_t
task_id
,
module_id_t
mod_id
)
{
LOG_I
(
ENB_APP
,
"sending TERMINATE_MESSAGE to task %s (%d)
\n
"
,
itti_get_task_name
(
task_id
),
task_id
);
MessageDef
*
msg
;
msg
=
itti_alloc_new_message
(
ENB_APP
,
0
,
TERMINATE_MESSAGE
);
msg
=
itti_alloc_new_message
(
TASK_
ENB_APP
,
0
,
TERMINATE_MESSAGE
);
itti_send_msg_to_task
(
task_id
,
ENB_MODULE_ID_TO_INSTANCE
(
mod_id
),
msg
);
}
...
...
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
View file @
ca4b438d
...
...
@@ -647,7 +647,6 @@ pdcp_data_ind(
exit
(
1
);
}
//uint8_t dc = pdcp_get_dc_filed((unsigned char*)sdu_buffer_pP->data);
}
/*
...
...
openair2/LAYER2/PDCP_v10.1.0/pdcp_primitives.c
View file @
ca4b438d
...
...
@@ -34,27 +34,6 @@
extern
bool
util_mark_nth_bit_of_octet
(
uint8_t
*
octet
,
uint8_t
index
);
/*
* Parses data/control field out of buffer of User Plane PDCP Data PDU with
* long PDCP SN (12-bit)
*
* @param pdu_buffer PDCP PDU buffer
* @return 1 bit dc
*/
uint8_t
pdcp_get_dc_filed
(
unsigned
char
*
pdu_buffer
)
{
uint8_t
dc
=
0x00
;
if
(
pdu_buffer
==
NULL
)
{
return
0
;
}
dc
=
(
uint8_t
)
pdu_buffer
[
0
]
&
0xF0
;
// Reset D/C field
dc
>>=
8
;
// FIXME this is broken!!! returns 0 all the time
return
dc
;
}
/*
* Parses sequence number out of buffer of User Plane PDCP Data PDU with
* long PDCP SN (12-bit)
...
...
openair2/LAYER2/PDCP_v10.1.0/pdcp_primitives.h
View file @
ca4b438d
...
...
@@ -101,16 +101,6 @@ typedef struct {
*/
#define PDCP_CONTROL_PDU_STATUS_REPORT_HEADER_SIZE 2
/*
* Parses data/control field out of buffer of User Plane PDCP Data PDU with
* long PDCP SN (12-bit)
*
* @param pdu_buffer PDCP PDU buffer
* @return 1 bit dc
*/
uint8_t
pdcp_get_dc_filed
(
unsigned
char
*
pdu_buffer
);
/*
* Parses sequence number out of buffer of User Plane PDCP Data PDU with
* long PDCP SN (12-bit)
...
...
radio/iqplayer/iqplayer_lib.c
View file @
ca4b438d
...
...
@@ -43,16 +43,13 @@
static
void
busy_wait
(
uint32_t
usecs
)
{
uint32_t
elapsed_usecs
;
double
temp
;
int
j
;
struct
timespec
requestStart
,
requestEnd
;
// Active wait
clock_gettime
(
CLOCK_REALTIME
,
&
requestStart
);
temp
=
0
;
while
(
1
)
{
for
(
j
=
0
;
j
<
40
;
j
++
)
temp
+=
sin
(
j
);
for
(
int
j
=
0
;
j
<
40
;
j
++
)
(
void
)
sin
(
j
);
clock_gettime
(
CLOCK_REALTIME
,
&
requestEnd
);
elapsed_usecs
=
(
requestEnd
.
tv_sec
-
requestStart
.
tv_sec
)
/
1e-6
+
(
requestEnd
.
tv_nsec
-
requestStart
.
tv_nsec
)
/
1e3
;
...
...
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