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
zzha zzha
OpenXG-RAN
Commits
c348a9ee
Commit
c348a9ee
authored
Oct 04, 2019
by
yilmazt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
common thread-related minor functions in new .h file
parent
9aa34832
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
92 additions
and
90 deletions
+92
-90
executables/nr-gnb.c
executables/nr-gnb.c
+11
-10
executables/nr-ru.c
executables/nr-ru.c
+6
-11
executables/nr-softmodem.c
executables/nr-softmodem.c
+6
-4
executables/nr-softmodem.h
executables/nr-softmodem.h
+0
-1
executables/nr-uesoftmodem.c
executables/nr-uesoftmodem.c
+2
-0
executables/softmodem-common.h
executables/softmodem-common.h
+0
-42
executables/thread-common.h
executables/thread-common.h
+42
-0
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
+2
-1
openair1/SIMULATION/LTE_PHY/dlsim.c
openair1/SIMULATION/LTE_PHY/dlsim.c
+7
-7
openair1/SIMULATION/LTE_PHY/ulsim.c
openair1/SIMULATION/LTE_PHY/ulsim.c
+2
-1
openair2/ENB_APP/enb_config.c
openair2/ENB_APP/enb_config.c
+4
-4
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+3
-2
targets/RT/USER/lte-enb.c
targets/RT/USER/lte-enb.c
+3
-3
targets/RT/USER/lte-ru.c
targets/RT/USER/lte-ru.c
+3
-3
targets/RT/USER/lte-softmodem-common.c
targets/RT/USER/lte-softmodem-common.c
+1
-0
targets/RT/USER/lte-uesoftmodem.c
targets/RT/USER/lte-uesoftmodem.c
+0
-1
No files found.
executables/nr-gnb.c
View file @
c348a9ee
...
...
@@ -99,10 +99,10 @@
#if defined(ENABLE_ITTI)
extern
volatile
int
start_gNB
;
extern
volatile
int
start_UE
;
extern
volatile
int
start_gNB
;
extern
volatile
int
start_UE
;
#endif
extern
volatile
int
oai_exit
;
extern
volatile
int
oai_exit
;
extern
openair0_config_t
openair0_cfg
[
MAX_CARDS
];
...
...
@@ -110,7 +110,7 @@ extern int transmission_mode;
uint16_t
sl_ahead
=
4
;
uint16_t
sf_ahead
=
4
;
//pthread_t
main_gNB_thread;
//pthread_t main_gNB_thread;
time_stats_t
softmodem_stats_mt
;
// main thread
time_stats_t
softmodem_stats_hw
;
// hw acquisition
...
...
@@ -133,13 +133,14 @@ extern double cpuf;
void
init_gNB
(
int
,
int
);
void
stop_gNB
(
int
nb_inst
);
int
wakeup_txfh
(
PHY_VARS_gNB
*
gNB
,
gNB_L1_rxtx_proc_t
*
proc
,
int
frame_tx
,
int
slot_tx
,
uint64_t
timestamp_tx
);
int
wakeup_tx
(
PHY_VARS_gNB
*
gNB
,
int
frame_rx
,
int
slot_rx
,
int
frame_tx
,
int
slot_tx
,
uint64_t
timestamp_tx
);
extern
PARALLEL_CONF_t
get_thread_parallel_conf
(
void
);
extern
WORKER_CONF_t
get_thread_worker_conf
(
void
);
int
wakeup_txfh
(
PHY_VARS_gNB
*
gNB
,
gNB_L1_rxtx_proc_t
*
proc
,
int
frame_tx
,
int
slot_tx
,
uint64_t
timestamp_tx
);
int
wakeup_tx
(
PHY_VARS_gNB
*
gNB
,
int
frame_rx
,
int
slot_rx
,
int
frame_tx
,
int
slot_tx
,
uint64_t
timestamp_tx
);
#include "executables/thread-common.h"
//extern PARALLEL_CONF_t get_thread_parallel_conf(void);
//extern WORKER_CONF_t get_thread_worker_conf(void);
void
wakeup_prach_gNB
(
PHY_VARS_gNB
*
gNB
,
RU_t
*
ru
,
int
frame
,
int
subframe
);
void
wakeup_prach_gNB
(
PHY_VARS_gNB
*
gNB
,
RU_t
*
ru
,
int
frame
,
int
subframe
);
extern
uint8_t
nfapi_mode
;
extern
void
oai_subframe_ind
(
uint16_t
sfn
,
uint16_t
sf
);
...
...
@@ -149,7 +150,7 @@ extern void add_subframe(uint16_t *frameP, uint16_t *subframeP, int offset);
#define TICK_TO_US(ts) (ts.trials==0?0:ts.diff/ts.trials)
static
inline
int
rxtx
(
PHY_VARS_gNB
*
gNB
,
int
frame_rx
,
int
slot_rx
,
int
frame_tx
,
int
slot_tx
,
char
*
thread_name
)
{
static
inline
int
rxtx
(
PHY_VARS_gNB
*
gNB
,
int
frame_rx
,
int
slot_rx
,
int
frame_tx
,
int
slot_tx
,
char
*
thread_name
)
{
start_meas
(
&
softmodem_stats_rxtx_sf
);
// *******************************************************************
...
...
executables/nr-ru.c
View file @
c348a9ee
...
...
@@ -114,27 +114,22 @@ static int DEFENBS[] = {0};
#include "T.h"
#include "nfapi_interface.h"
extern
volatile
int
oai_exit
;
extern
volatile
int
oai_exit
;
extern
void
nr_phy_free_RU
(
RU_t
*
);
extern
void
nr_phy_config_request
(
NR_PHY_Config_t
*
gNB
);
extern
PARALLEL_CONF_t
get_thread_parallel_conf
(
void
);
extern
WORKER_CONF_t
get_thread_worker_conf
(
void
);
#include "executables/thread-common.h"
//
extern PARALLEL_CONF_t get_thread_parallel_conf(void);
//
extern WORKER_CONF_t get_thread_worker_conf(void);
void
init_NR_RU
(
char
*
);
void
stop_RU
(
int
nb_ru
);
void
do_ru_sync
(
RU_t
*
ru
);
void
configure_ru
(
int
idx
,
void
*
arg
);
void
configure_rru
(
int
idx
,
void
*
arg
);
void
configure_ru
(
int
idx
,
void
*
arg
);
void
configure_rru
(
int
idx
,
void
*
arg
);
int
attach_rru
(
RU_t
*
ru
);
int
connect_rau
(
RU_t
*
ru
);
extern
uint16_t
sl_ahead
;
...
...
executables/nr-softmodem.c
View file @
c348a9ee
...
...
@@ -84,6 +84,8 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "PHY/TOOLS/nr_phy_scope.h"
#include "stats.h"
#include "nr-softmodem.h"
#include "executables/softmodem-common.h"
#include "executables/thread-common.h"
#include "NB_IoT_interface.h"
short
nr_mod_table
[
NR_MOD_TABLE_SIZE_SHORT
]
=
{
0
,
0
,
16384
,
16384
,
-
16384
,
-
16384
,
16384
,
16384
,
16384
,
-
16384
,
-
16384
,
16384
,
-
16384
,
-
16384
,
7327
,
7327
,
7327
,
21981
,
21981
,
7327
,
21981
,
21981
,
7327
,
-
7327
,
7327
,
-
21981
,
21981
,
-
7327
,
21981
,
-
21981
,
-
7327
,
7327
,
-
7327
,
21981
,
-
21981
,
7327
,
-
21981
,
21981
,
-
7327
,
-
7327
,
-
7327
,
-
21981
,
-
21981
,
-
7327
,
-
21981
,
-
21981
,
10726
,
10726
,
10726
,
3576
,
3576
,
10726
,
3576
,
3576
,
10726
,
17876
,
10726
,
25027
,
3576
,
17876
,
3576
,
25027
,
17876
,
10726
,
17876
,
3576
,
25027
,
10726
,
25027
,
3576
,
17876
,
17876
,
17876
,
25027
,
25027
,
17876
,
25027
,
25027
,
10726
,
-
10726
,
10726
,
-
3576
,
3576
,
-
10726
,
3576
,
-
3576
,
10726
,
-
17876
,
10726
,
-
25027
,
3576
,
-
17876
,
3576
,
-
25027
,
17876
,
-
10726
,
17876
,
-
3576
,
25027
,
-
10726
,
25027
,
-
3576
,
17876
,
-
17876
,
17876
,
-
25027
,
25027
,
-
17876
,
25027
,
-
25027
,
-
10726
,
10726
,
-
10726
,
3576
,
-
3576
,
10726
,
-
3576
,
3576
,
-
10726
,
17876
,
-
10726
,
25027
,
-
3576
,
17876
,
-
3576
,
25027
,
-
17876
,
10726
,
-
17876
,
3576
,
-
25027
,
10726
,
-
25027
,
3576
,
-
17876
,
17876
,
-
17876
,
25027
,
-
25027
,
17876
,
-
25027
,
25027
,
-
10726
,
-
10726
,
-
10726
,
-
3576
,
-
3576
,
-
10726
,
-
3576
,
-
3576
,
-
10726
,
-
17876
,
-
10726
,
-
25027
,
-
3576
,
-
17876
,
-
3576
,
-
25027
,
-
17876
,
-
10726
,
-
17876
,
-
3576
,
-
25027
,
-
10726
,
-
25027
,
-
3576
,
-
17876
,
-
17876
,
-
17876
,
-
25027
,
-
25027
,
-
17876
,
-
25027
,
-
25027
,
8886
,
8886
,
8886
,
12439
,
12439
,
8886
,
12439
,
12439
,
8886
,
5332
,
8886
,
1778
,
12439
,
5332
,
12439
,
1778
,
5332
,
8886
,
5332
,
12439
,
1778
,
8886
,
1778
,
12439
,
5332
,
5332
,
5332
,
1778
,
1778
,
5332
,
1778
,
1778
,
8886
,
19547
,
8886
,
15993
,
12439
,
19547
,
12439
,
15993
,
8886
,
23101
,
8886
,
26655
,
12439
,
23101
,
12439
,
26655
,
5332
,
19547
,
5332
,
15993
,
1778
,
19547
,
1778
,
15993
,
5332
,
23101
,
5332
,
26655
,
1778
,
23101
,
1778
,
26655
,
19547
,
8886
,
19547
,
12439
,
15993
,
8886
,
15993
,
12439
,
19547
,
5332
,
19547
,
1778
,
15993
,
5332
,
15993
,
1778
,
23101
,
8886
,
23101
,
12439
,
26655
,
8886
,
26655
,
12439
,
23101
,
5332
,
23101
,
1778
,
26655
,
5332
,
26655
,
1778
,
19547
,
19547
,
19547
,
15993
,
15993
,
19547
,
15993
,
15993
,
19547
,
23101
,
19547
,
26655
,
15993
,
23101
,
15993
,
26655
,
23101
,
19547
,
23101
,
15993
,
26655
,
19547
,
26655
,
15993
,
23101
,
23101
,
23101
,
26655
,
26655
,
23101
,
26655
,
26655
,
8886
,
-
8886
,
8886
,
-
12439
,
12439
,
-
8886
,
12439
,
-
12439
,
8886
,
-
5332
,
8886
,
-
1778
,
12439
,
-
5332
,
12439
,
-
1778
,
5332
,
-
8886
,
5332
,
-
12439
,
1778
,
-
8886
,
1778
,
-
12439
,
5332
,
-
5332
,
5332
,
-
1778
,
1778
,
-
5332
,
1778
,
-
1778
,
8886
,
-
19547
,
8886
,
-
15993
,
12439
,
-
19547
,
12439
,
-
15993
,
8886
,
-
23101
,
8886
,
-
26655
,
12439
,
-
23101
,
12439
,
-
26655
,
5332
,
-
19547
,
5332
,
-
15993
,
1778
,
-
19547
,
1778
,
-
15993
,
5332
,
-
23101
,
5332
,
-
26655
,
1778
,
-
23101
,
1778
,
-
26655
,
19547
,
-
8886
,
19547
,
-
12439
,
15993
,
-
8886
,
15993
,
-
12439
,
19547
,
-
5332
,
19547
,
-
1778
,
15993
,
-
5332
,
15993
,
-
1778
,
23101
,
-
8886
,
23101
,
-
12439
,
26655
,
-
8886
,
26655
,
-
12439
,
23101
,
-
5332
,
23101
,
-
1778
,
26655
,
-
5332
,
26655
,
-
1778
,
19547
,
-
19547
,
19547
,
-
15993
,
15993
,
-
19547
,
15993
,
-
15993
,
19547
,
-
23101
,
19547
,
-
26655
,
15993
,
-
23101
,
15993
,
-
26655
,
23101
,
-
19547
,
23101
,
-
15993
,
26655
,
-
19547
,
26655
,
-
15993
,
23101
,
-
23101
,
23101
,
-
26655
,
26655
,
-
23101
,
26655
,
-
26655
,
-
8886
,
8886
,
-
8886
,
12439
,
-
12439
,
8886
,
-
12439
,
12439
,
-
8886
,
5332
,
-
8886
,
1778
,
-
12439
,
5332
,
-
12439
,
1778
,
-
5332
,
8886
,
-
5332
,
12439
,
-
1778
,
8886
,
-
1778
,
12439
,
-
5332
,
5332
,
-
5332
,
1778
,
-
1778
,
5332
,
-
1778
,
1778
,
-
8886
,
19547
,
-
8886
,
15993
,
-
12439
,
19547
,
-
12439
,
15993
,
-
8886
,
23101
,
-
8886
,
26655
,
-
12439
,
23101
,
-
12439
,
26655
,
-
5332
,
19547
,
-
5332
,
15993
,
-
1778
,
19547
,
-
1778
,
15993
,
-
5332
,
23101
,
-
5332
,
26655
,
-
1778
,
23101
,
-
1778
,
26655
,
-
19547
,
8886
,
-
19547
,
12439
,
-
15993
,
8886
,
-
15993
,
12439
,
-
19547
,
5332
,
-
19547
,
1778
,
-
15993
,
5332
,
-
15993
,
1778
,
-
23101
,
8886
,
-
23101
,
12439
,
-
26655
,
8886
,
-
26655
,
12439
,
-
23101
,
5332
,
-
23101
,
1778
,
-
26655
,
5332
,
-
26655
,
1778
,
-
19547
,
19547
,
-
19547
,
15993
,
-
15993
,
19547
,
-
15993
,
15993
,
-
19547
,
23101
,
-
19547
,
26655
,
-
15993
,
23101
,
-
15993
,
26655
,
-
23101
,
19547
,
-
23101
,
15993
,
-
26655
,
19547
,
-
26655
,
15993
,
-
23101
,
23101
,
-
23101
,
26655
,
-
26655
,
23101
,
-
26655
,
26655
,
-
8886
,
-
8886
,
-
8886
,
-
12439
,
-
12439
,
-
8886
,
-
12439
,
-
12439
,
-
8886
,
-
5332
,
-
8886
,
-
1778
,
-
12439
,
-
5332
,
-
12439
,
-
1778
,
-
5332
,
-
8886
,
-
5332
,
-
12439
,
-
1778
,
-
8886
,
-
1778
,
-
12439
,
-
5332
,
-
5332
,
-
5332
,
-
1778
,
-
1778
,
-
5332
,
-
1778
,
-
1778
,
-
8886
,
-
19547
,
-
8886
,
-
15993
,
-
12439
,
-
19547
,
-
12439
,
-
15993
,
-
8886
,
-
23101
,
-
8886
,
-
26655
,
-
12439
,
-
23101
,
-
12439
,
-
26655
,
-
5332
,
-
19547
,
-
5332
,
-
15993
,
-
1778
,
-
19547
,
-
1778
,
-
15993
,
-
5332
,
-
23101
,
-
5332
,
-
26655
,
-
1778
,
-
23101
,
-
1778
,
-
26655
,
-
19547
,
-
8886
,
-
19547
,
-
12439
,
-
15993
,
-
8886
,
-
15993
,
-
12439
,
-
19547
,
-
5332
,
-
19547
,
-
1778
,
-
15993
,
-
5332
,
-
15993
,
-
1778
,
-
23101
,
-
8886
,
-
23101
,
-
12439
,
-
26655
,
-
8886
,
-
26655
,
-
12439
,
-
23101
,
-
5332
,
-
23101
,
-
1778
,
-
26655
,
-
5332
,
-
26655
,
-
1778
,
-
19547
,
-
19547
,
-
19547
,
-
15993
,
-
15993
,
-
19547
,
-
15993
,
-
15993
,
-
19547
,
-
23101
,
-
19547
,
-
26655
,
-
15993
,
-
23101
,
-
15993
,
-
26655
,
-
23101
,
-
19547
,
-
23101
,
-
15993
,
-
26655
,
-
19547
,
-
26655
,
-
15993
,
-
23101
,
-
23101
,
-
23101
,
-
26655
,
-
26655
,
-
23101
,
-
26655
,
-
26655
};
...
...
@@ -189,7 +191,7 @@ int transmission_mode=1;
int
emulate_rf
=
0
;
int
numerology
=
0
;
typedef
struct
{
/*
typedef struct {
uint64_t optmask;
THREAD_STRUCT thread_struct;
char rf_config_file[1024];
...
...
@@ -203,12 +205,12 @@ typedef struct {
unsigned int start_msc;
uint32_t clock_source;
int hw_timing_advance;
}
softmodem_params_t
;
} softmodem_params_t;
*/
static
softmodem_params_t
softmodem_params
;
static
char
*
parallel_config
=
NULL
;
static
char
*
worker_config
=
NULL
;
static
THREAD_STRUCT
thread_struct
;
/*
static THREAD_STRUCT thread_struct;
void set_parallel_conf(char *parallel_conf) {
if(strcmp(parallel_conf,"PARALLEL_SINGLE_THREAD")==0) thread_struct.parallel_conf = PARALLEL_SINGLE_THREAD;
...
...
@@ -228,7 +230,7 @@ PARALLEL_CONF_t get_thread_parallel_conf(void) {
}
WORKER_CONF_t get_thread_worker_conf(void) {
return thread_struct.worker_conf;
}
}
*/
/* struct for ethernet specific parameters given in eNB conf file */
eth_params_t
*
eth_params
;
...
...
executables/nr-softmodem.h
View file @
c348a9ee
...
...
@@ -2,7 +2,6 @@
#define NR_SOFTMODEM_H
#include <executables/nr-softmodem-common.h>
#include <executables/softmodem-common.h>
#include "flexran_agent.h"
#include "PHY/defs_gNB.h"
...
...
executables/nr-uesoftmodem.c
View file @
c348a9ee
...
...
@@ -105,6 +105,8 @@ char title[255];
static
pthread_t
forms_thread
;
//xforms
#include <executables/nr-uesoftmodem.h>
#include "executables/softmodem-common.h"
#include "executables/thread-common.h"
RAN_CONTEXT_t
RC
;
volatile
int
start_eNB
=
0
;
...
...
executables/softmodem-common.h
View file @
c348a9ee
#ifndef SOFTMODEM_COMMON_H
#define SOFTMODEM_COMMON_H
//#include "threads_t.h"
THREAD_STRUCT
thread_struct
;
static
inline
void
set_parallel_conf
(
char
*
parallel_conf
)
{
mapping
config
[]
=
{
FOREACH_PARALLEL
(
GENERATE_ENUMTXT
)
{
NULL
,
-
1
}
};
thread_struct
.
parallel_conf
=
(
PARALLEL_CONF_t
)
map_str_to_int
(
config
,
parallel_conf
);
if
(
thread_struct
.
parallel_conf
==
-
1
)
{
LOG_E
(
ENB_APP
,
"Impossible value: %s
\n
"
,
parallel_conf
);
thread_struct
.
parallel_conf
=
PARALLEL_SINGLE_THREAD
;
}
printf
(
"[CONFIG] parallel_conf is set to %d
\n
"
,
thread_struct
.
parallel_conf
);
}
static
inline
void
set_worker_conf
(
char
*
worker_conf
)
{
mapping
config
[]
=
{
FOREACH_WORKER
(
GENERATE_ENUMTXT
)
{
NULL
,
-
1
}
};
thread_struct
.
worker_conf
=
(
WORKER_CONF_t
)
map_str_to_int
(
config
,
worker_conf
);
if
(
thread_struct
.
worker_conf
==
-
1
)
{
LOG_E
(
ENB_APP
,
"Impossible value: %s
\n
"
,
worker_conf
);
thread_struct
.
worker_conf
=
WORKER_DISABLE
;
}
printf
(
"[CONFIG] worker_conf is set to %d
\n
"
,
thread_struct
.
worker_conf
);
}
static
inline
PARALLEL_CONF_t
get_thread_parallel_conf
(
void
)
{
return
thread_struct
.
parallel_conf
;
}
static
inline
WORKER_CONF_t
get_thread_worker_conf
(
void
)
{
return
thread_struct
.
worker_conf
;
}
typedef
struct
{
uint64_t
optmask
;
THREAD_STRUCT
thread_struct
;
...
...
@@ -57,8 +19,4 @@ typedef struct {
uint32_t
send_dmrs_sync
;
}
softmodem_params_t
;
#endif
executables/thread-common.h
0 → 100644
View file @
c348a9ee
#ifndef THREAD_COMMON_H
#define THREAD_COMMON_H
#include "PHY/defs_common.h"
THREAD_STRUCT
thread_struct
;
static
inline
void
set_parallel_conf
(
char
*
parallel_conf
)
{
mapping
config
[]
=
{
FOREACH_PARALLEL
(
GENERATE_ENUMTXT
)
{
NULL
,
-
1
}
};
thread_struct
.
parallel_conf
=
(
PARALLEL_CONF_t
)
map_str_to_int
(
config
,
parallel_conf
);
if
(
thread_struct
.
parallel_conf
==
-
1
)
{
LOG_E
(
ENB_APP
,
"Impossible value: %s
\n
"
,
parallel_conf
);
thread_struct
.
parallel_conf
=
PARALLEL_SINGLE_THREAD
;
}
printf
(
"[CONFIG] parallel_conf is set to %d
\n
"
,
thread_struct
.
parallel_conf
);
}
static
inline
void
set_worker_conf
(
char
*
worker_conf
)
{
mapping
config
[]
=
{
FOREACH_WORKER
(
GENERATE_ENUMTXT
)
{
NULL
,
-
1
}
};
thread_struct
.
worker_conf
=
(
WORKER_CONF_t
)
map_str_to_int
(
config
,
worker_conf
);
if
(
thread_struct
.
worker_conf
==
-
1
)
{
LOG_E
(
ENB_APP
,
"Impossible value: %s
\n
"
,
worker_conf
);
thread_struct
.
worker_conf
=
WORKER_DISABLE
;
}
printf
(
"[CONFIG] worker_conf is set to %d
\n
"
,
thread_struct
.
worker_conf
);
}
static
inline
PARALLEL_CONF_t
get_thread_parallel_conf
(
void
)
{
return
thread_struct
.
parallel_conf
;
}
static
inline
WORKER_CONF_t
get_thread_worker_conf
(
void
)
{
return
thread_struct
.
worker_conf
;
}
#endif
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
View file @
c348a9ee
...
...
@@ -57,7 +57,8 @@
uint64_t runtime,
uint64_t deadline,
uint64_t period);*/
extern
WORKER_CONF_t
get_thread_worker_conf
(
void
);
//extern WORKER_CONF_t get_thread_worker_conf(void);
#include "executables/thread-common.h"
extern
volatile
int
oai_exit
;
...
...
openair1/SIMULATION/LTE_PHY/dlsim.c
View file @
c348a9ee
...
...
@@ -84,11 +84,11 @@ double t_tx_min = 1000000000; /*!< \brief initial min process time for tx */
double
t_rx_min
=
1000000000
;
/*!< \brief initial min process time for rx */
int
n_tx_dropped
=
0
;
/*!< \brief initial max process time for tx */
int
n_rx_dropped
=
0
;
/*!< \brief initial max process time for rx */
THREAD_STRUCT
thread_struct
;
#include "executables/thread-common.h"
//
THREAD_STRUCT thread_struct;
//static THREAD_STRUCT thread_struct;
void
set_parallel_conf_dlsim
(
char
*
parallel_conf
)
{
/*
void set_parallel_conf_dlsim(char *parallel_conf) {
if(strcmp(parallel_conf,"PARALLEL_SINGLE_THREAD")==0) thread_struct.parallel_conf = PARALLEL_SINGLE_THREAD;
else if(strcmp(parallel_conf,"PARALLEL_RU_L1_SPLIT")==0) thread_struct.parallel_conf = PARALLEL_RU_L1_SPLIT;
else if(strcmp(parallel_conf,"PARALLEL_RU_L1_TRX_SPLIT")==0) thread_struct.parallel_conf = PARALLEL_RU_L1_TRX_SPLIT;
...
...
@@ -101,7 +101,7 @@ void set_worker_conf_dlsim(char *worker_conf) {
printf("[CONFIG] worker conf is set to %d\n",thread_struct.worker_conf);
}
/*
PARALLEL_CONF_t get_thread_parallel_conf(void) {
PARALLEL_CONF_t get_thread_parallel_conf(void) {
return thread_struct.parallel_conf;
}
WORKER_CONF_t get_thread_worker_conf(void) {
...
...
@@ -641,7 +641,7 @@ int main(int argc, char **argv) {
memset
((
void
*
)
&
TX_req
,
0
,
sizeof
(
TX_req
));
DL_req
.
dl_config_request_body
.
dl_config_pdu_list
=
dl_config_pdu_list
;
TX_req
.
tx_request_body
.
tx_pdu_list
=
tx_pdu_list
;
set_parallel_conf
_dlsim
(
"PARALLEL_SINGLE_THREAD"
);
set_parallel_conf
(
"PARALLEL_SINGLE_THREAD"
);
cpuf
=
cpu_freq_GHz
;
//signal(SIGSEGV, handler);
//signal(SIGABRT, handler);
...
...
@@ -891,7 +891,7 @@ int main(int argc, char **argv) {
break
;
case
'Q'
:
set_parallel_conf
_dlsim
(
optarg
);
set_parallel_conf
(
optarg
);
break
;
default:
...
...
@@ -912,7 +912,7 @@ int main(int argc, char **argv) {
if
(
help
)
exit
(
0
);
if
(
thread_struct
.
parallel_conf
!=
PARALLEL_SINGLE_THREAD
)
set_worker_conf
_dlsim
(
"WORKER_ENABLE"
);
set_worker_conf
(
"WORKER_ENABLE"
);
if
(
transmission_mode
>
1
)
pa
=
dBm3
;
...
...
openair1/SIMULATION/LTE_PHY/ulsim.c
View file @
c348a9ee
...
...
@@ -96,7 +96,8 @@ nfapi_tx_request_pdu_t tx_pdu_list[MAX_NUM_TX_REQUEST_PDU];
nfapi_tx_request_t
TX_req
;
Sched_Rsp_t
sched_resp
;
THREAD_STRUCT
thread_struct
;
#include "executables/thread-common.h"
//THREAD_STRUCT thread_struct;
void
fill_nfapi_ulsch_config_request
(
nfapi_ul_config_request_pdu_t
*
ul_config_pdu
,
...
...
openair2/ENB_APP/enb_config.c
View file @
c348a9ee
...
...
@@ -55,11 +55,11 @@
#include "RRC_config_tools.h"
#include "enb_paramdef.h"
#include "proto_agent.h"
extern
void
set_parallel_conf
(
char
*
parallel_conf
);
#include "executables/thread-common.h"
/*
extern void set_parallel_conf(char *parallel_conf);
extern void set_worker_conf(char *worker_conf);
//
extern PARALLEL_CONF_t get_thread_parallel_conf(void);
//extern WORKER_CONF_t get_thread_worker_conf(void);
extern PARALLEL_CONF_t get_thread_parallel_conf(void);
extern WORKER_CONF_t get_thread_worker_conf(void);*/
extern
uint32_t
to_earfcn_DL
(
int
eutra_bandP
,
uint32_t
dl_CarrierFreq
,
uint32_t
bw
);
extern
uint32_t
to_earfcn_UL
(
int
eutra_bandP
,
uint32_t
ul_CarrierFreq
,
uint32_t
bw
);
extern
char
*
parallel_config
;
...
...
openair2/GNB_APP/gnb_config.c
View file @
c348a9ee
...
...
@@ -77,10 +77,11 @@
#include "NR_EUTRA-MBSFN-SubframeConfig.h"
extern
uint16_t
sf_ahead
;
extern
void
set_parallel_conf
(
char
*
parallel_conf
);
#include "executables/thread-common.h"
/*extern void set_parallel_conf(char *parallel_conf);
extern void set_worker_conf(char *worker_conf);
extern PARALLEL_CONF_t get_thread_parallel_conf(void);
extern
WORKER_CONF_t
get_thread_worker_conf
(
void
);
extern WORKER_CONF_t get_thread_worker_conf(void);
*/
extern
int
config_check_band_frequencies
(
int
ind
,
int16_t
band
,
uint32_t
downlink_frequency
,
int32_t
uplink_frequency_offset
,
uint32_t
frame_type
);
...
...
targets/RT/USER/lte-enb.c
View file @
c348a9ee
...
...
@@ -118,9 +118,9 @@ extern int oaisim_flag;
//uint16_t sf_ahead=4;
extern
uint16_t
sf_ahead
;
extern
PARALLEL_CONF_t
get_thread_parallel_conf
(
void
);
extern
WORKER_CONF_t
get_thread_worker_conf
(
void
);
#include "executables/thread-common.h"
//
extern PARALLEL_CONF_t get_thread_parallel_conf(void);
//
extern WORKER_CONF_t get_thread_worker_conf(void);
//pthread_t main_eNB_thread;
...
...
targets/RT/USER/lte-ru.c
View file @
c348a9ee
...
...
@@ -104,9 +104,9 @@ extern volatile int oai_exit;
extern
int
emulate_rf
;
extern
int
numerology
;
extern
clock_source_t
clock_source
;
extern
PARALLEL_CONF_t
get_thread_parallel_conf
(
void
);
extern
WORKER_CONF_t
get_thread_worker_conf
(
void
);
#include "executables/thread-common.h"
//
extern PARALLEL_CONF_t get_thread_parallel_conf(void);
//
extern WORKER_CONF_t get_thread_worker_conf(void);
extern
void
phy_init_RU
(
RU_t
*
);
void
stop_RU
(
int
nb_ru
);
...
...
targets/RT/USER/lte-softmodem-common.c
View file @
c348a9ee
...
...
@@ -34,6 +34,7 @@
#include "UTIL/OPT/opt.h"
#include "common/config/config_userapi.h"
#include "common/utils/load_module_shlib.h"
#include "executables/thread-common.h"
#include <dlfcn.h>
static
softmodem_params_t
softmodem_params
;
char
*
parallel_config
=
NULL
;
...
...
targets/RT/USER/lte-uesoftmodem.c
View file @
c348a9ee
...
...
@@ -89,7 +89,6 @@
#include "lte-softmodem.h"
/* temporary compilation wokaround (UE/eNB split */
uint16_t
sf_ahead
;
...
...
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