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
lizhongxiao
OpenXG-RAN
Commits
738ca2d2
Commit
738ca2d2
authored
Sep 04, 2023
by
mir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
4G Simulator
parent
e976c66b
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
42 additions
and
30 deletions
+42
-30
executables/lte-softmodem.c
executables/lte-softmodem.c
+10
-6
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
+2
-2
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
+4
-0
openair1/PHY/defs_eNB.h
openair1/PHY/defs_eNB.h
+0
-4
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+2
-6
openair1/SIMULATION/LTE_PHY/dlsim.c
openair1/SIMULATION/LTE_PHY/dlsim.c
+11
-6
openair1/SIMULATION/LTE_PHY/ulsim.c
openair1/SIMULATION/LTE_PHY/ulsim.c
+13
-6
No files found.
executables/lte-softmodem.c
View file @
738ca2d2
...
...
@@ -546,17 +546,21 @@ int main ( int argc, char **argv )
printf
(
"Initializing eNB threads single_thread_flag:%d wait_for_sync:%d
\n
"
,
get_softmodem_params
()
->
single_thread_flag
,
get_softmodem_params
()
->
wait_for_sync
);
init_eNB
(
get_softmodem_params
()
->
single_thread_flag
,
get_softmodem_params
()
->
wait_for_sync
);
}
#ifdef TASK_MANAGER_LTE
int
const
log_cores
=
get_nprocs_conf
();
assert
(
log_cores
>
0
);
task_manager_t
man
=
{
0
};
// Assuming: Physical cores = Logical cores / 2
init_task_manager
(
&
man
,
log_cores
);
#endif
for
(
int
x
=
0
;
x
<
RC
.
nb_L1_inst
;
x
++
)
for
(
int
CC_id
=
0
;
CC_id
<
RC
.
nb_L1_CC
[
x
];
CC_id
++
)
{
L1_rxtx_proc_t
*
L1proc
=
&
RC
.
eNB
[
x
][
CC_id
]
->
proc
.
L1_proc
;
L1_rxtx_proc_t
*
L1proctx
=
&
RC
.
eNB
[
x
][
CC_id
]
->
proc
.
L1_proc_tx
;
#ifdef TASK_MANAGER_LTE
int
const
log_cores
=
get_nprocs_conf
();
assert
(
log_cores
>
0
);
// Assuming: Physical cores = Logical cores / 2
init_task_manager
(
&
RC
.
eNB
[
x
][
CC_id
]
->
proc
.
man
,
log_cores
);
L1proc
->
man
=
&
RC
.
eNB
[
x
][
CC_id
]
->
proc
.
man
;
L1proctx
->
man
=
&
RC
.
eNB
[
x
][
CC_id
]
->
proc
.
man
;
L1proc
->
man
=
&
man
;
L1proctx
->
man
=
&
man
;
#else
L1proc
->
respDecode
=
(
notifiedFIFO_t
*
)
malloc
(
sizeof
(
notifiedFIFO_t
));
// Most likely a bug. Do you want a thread pool per CC ?
...
...
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
View file @
738ca2d2
...
...
@@ -283,7 +283,7 @@ static void TPencode(void * arg) {
#ifdef TASK_MANAGER_LTE
assert
(
atomic_load
(
rdata
->
tasks_remaining
)
==
0
);
atomic_store_explicit
(
rdata
->
tasks_remaining
,
1
,
memory_order_seq_cst
);
atomic_store_explicit
(
rdata
->
tasks_remaining
,
1
,
memory_order_seq_cst
);
#endif
}
...
...
@@ -384,7 +384,7 @@ int dlsch_encoding(PHY_VARS_eNB *eNB,
rdata
->
G
=
G
;
#ifdef TASK_MANAGER_LTE
task_t
t
=
{.
func
=
TPencode
,
.
args
=
rdata
};
task_t
t
=
{.
func
=
TPencode
,
.
args
=
rdata
};
async_task_manager
(
proc
->
man
,
t
);
#else
pushTpool
(
proc
->
threadPool
,
req
);
...
...
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
View file @
738ca2d2
...
...
@@ -390,6 +390,10 @@ static int ulsch_decoding_data(PHY_VARS_eNB *eNB, L1_rxtx_proc_t *proc, int UE_i
r_offset
+=
E
;
offset
+=
sz
;
}
#ifdef TASK_MANAGER_LTE
trigger_all_task_manager
(
proc
->
man
);
#endif
return
(
ret
);
}
...
...
openair1/PHY/defs_eNB.h
View file @
738ca2d2
...
...
@@ -419,10 +419,6 @@ typedef struct L1_proc_t_s {
/// for waking up tx procedure
RU_proc_t
*
ru_proc
;
struct
PHY_VARS_eNB_s
*
eNB
;
#ifdef TASK_MANAGER_LTE
task_manager_t
man
;
#endif
}
L1_proc_t
;
...
...
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
738ca2d2
...
...
@@ -1418,10 +1418,11 @@ void pusch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
}
}
// for (i=0; i<NUMBER_OF_ULSCH_MAX; i++)
const
bool
decode
=
proc
->
nbDecode
;
#ifdef TASK_MANAGER_LTE
if
(
proc
->
nbDecode
)
{
// Not needed, but won't hurt performance
trigger_all_task_manager
(
proc
->
man
);
wait_spin_all_atomics_one
(
t_info
.
len
,
t_info
.
tasks_remaining
);
for
(
int
i
=
0
;
i
<
t_info
.
len
;
++
i
){
postDecode
(
proc
,
&
arr
[
i
]);
...
...
@@ -1429,7 +1430,6 @@ void pusch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
//printf("Decoding time %ld \n", time_now_ns() - t0);
}
#else
while
(
proc
->
nbDecode
>
0
)
{
notifiedFIFO_elt_t
*
req
=
pullTpool
(
proc
->
respDecode
,
proc
->
threadPool
);
if
(
req
==
NULL
)
...
...
@@ -1439,14 +1439,10 @@ void pusch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
merge_meas
(
&
eNB
->
ulsch_turbo_decoding_stats
,
&
ts
);
delNotifiedFIFO_elt
(
req
);
}
#endif
if
(
decode
)
stop_meas
(
&
eNB
->
ulsch_decoding_stats
);
}
extern
int
oai_exit
;
...
...
openair1/SIMULATION/LTE_PHY/dlsim.c
View file @
738ca2d2
...
...
@@ -589,6 +589,10 @@ int main(int argc, char **argv) {
nfapi_tx_request_t
TX_req
;
Sched_Rsp_t
sched_resp
;
int
pa
=
dB0
;
#ifdef TASK_MANAGER_LTE
task_manager_t
man
=
{
0
};
#endif
cpu_freq_GHz
=
get_cpu_freq_GHz
();
printf
(
"Detected cpu_freq %f GHz
\n
"
,
cpu_freq_GHz
);
memset
((
void
*
)
&
sched_resp
,
0
,
sizeof
(
sched_resp
));
...
...
@@ -1256,14 +1260,15 @@ int main(int argc, char **argv) {
L1_rxtx_proc_t
*
proc_eNB
=
&
eNB
->
proc
.
L1_proc
;
proc_eNB
->
respDecode
=
(
notifiedFIFO_t
*
)
malloc
(
sizeof
(
notifiedFIFO_t
));
initNotifiedFIFO
(
proc_eNB
->
respDecode
);
//#ifdef TASK_MANAGER
// int const log_cores = get_nprocs_conf();
// assert(log_cores > 0);
// init_task_manager(&proc_eNB->man, log_cores);
//#else
#ifdef TASK_MANAGER_LTE
int
const
log_cores
=
get_nprocs_conf
();
assert
(
log_cores
>
0
);
init_task_manager
(
&
man
,
log_cores
);
proc_eNB
->
man
=
&
man
;
#else
proc_eNB
->
threadPool
=
(
tpool_t
*
)
malloc
(
sizeof
(
tpool_t
));
initTpool
(
"n"
,
proc_eNB
->
threadPool
,
true
);
//
#endif
#endif
proc_eNB
->
frame_tx
=
0
;
...
...
openair1/SIMULATION/LTE_PHY/ulsim.c
View file @
738ca2d2
...
...
@@ -363,6 +363,11 @@ int main(int argc, char **argv) {
static
double
maxDoppler
=
0
.
0
;
static
int
srs_flag
=
0
;
static
int
N_RB_DL
=
25
,
osf
=
1
;
#ifdef TASK_MANAGER_LTE
task_manager_t
man
=
{
0
};
#endif
//uint8_t cyclic_shift = 0;
static
uint8_t
beta_ACK
=
0
,
beta_RI
=
0
,
beta_CQI
=
2
,
cqi_size
=
11
;
static
uint8_t
tdd_config
=
3
,
frame_type
=
FDD
;
...
...
@@ -788,14 +793,16 @@ int main(int argc, char **argv) {
proc_rxtx_ue
->
subframe_tx
=
proc_rxtx
->
subframe_rx
;
proc_rxtx_ue
->
subframe_rx
=
(
proc_rxtx
->
subframe_tx
+
6
)
%
10
;
//#ifdef TASK_MANAGER
// int const log_cores = get_nprocs_conf();
// assert(log_cores > 0);
// init_task_manager(&proc_rxtx->man, log_cores);
//#else
#ifdef TASK_MANAGER_LTE
int
const
log_cores
=
get_nprocs_conf
();
assert
(
log_cores
>
0
);
init_task_manager
(
&
man
,
log_cores
);
proc_rxtx
->
man
=
&
man
;
#else
proc_rxtx
->
threadPool
=
(
tpool_t
*
)
malloc
(
sizeof
(
tpool_t
));
initTpool
(
"n"
,
proc_rxtx
->
threadPool
,
true
);
//#endif
#endif
proc_rxtx
->
respDecode
=
(
notifiedFIFO_t
*
)
malloc
(
sizeof
(
notifiedFIFO_t
));
initNotifiedFIFO
(
proc_rxtx
->
respDecode
);
...
...
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