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
wangjie
OpenXG-RAN
Commits
4189af6c
Commit
4189af6c
authored
Apr 13, 2021
by
Sakthivel Velumani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed common txFifo for multiple threads
parent
f011b798
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
26 deletions
+20
-26
executables/nr-ue.c
executables/nr-ue.c
+8
-17
openair1/PHY/defs_nr_UE.h
openair1/PHY/defs_nr_UE.h
+1
-1
openair1/SCHED_NR_UE/defs.h
openair1/SCHED_NR_UE/defs.h
+4
-1
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+5
-6
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+2
-1
No files found.
executables/nr-ue.c
View file @
4189af6c
...
@@ -324,7 +324,6 @@ void processSlotRX(void *arg) {
...
@@ -324,7 +324,6 @@ void processSlotRX(void *arg) {
fapi_nr_config_request_t
*
cfg
=
&
UE
->
nrUE_config
;
fapi_nr_config_request_t
*
cfg
=
&
UE
->
nrUE_config
;
int
rx_slot_type
=
nr_ue_slot_select
(
cfg
,
proc
->
frame_rx
,
proc
->
nr_slot_rx
);
int
rx_slot_type
=
nr_ue_slot_select
(
cfg
,
proc
->
frame_rx
,
proc
->
nr_slot_rx
);
int
tx_slot_type
=
nr_ue_slot_select
(
cfg
,
proc
->
frame_tx
,
proc
->
nr_slot_tx
);
int
tx_slot_type
=
nr_ue_slot_select
(
cfg
,
proc
->
frame_tx
,
proc
->
nr_slot_tx
);
bool
isTxRunning
=
true
;
uint8_t
gNB_id
=
0
;
uint8_t
gNB_id
=
0
;
if
(
rx_slot_type
==
NR_DOWNLINK_SLOT
||
rx_slot_type
==
NR_MIXED_SLOT
){
if
(
rx_slot_type
==
NR_DOWNLINK_SLOT
||
rx_slot_type
==
NR_MIXED_SLOT
){
...
@@ -340,7 +339,7 @@ void processSlotRX(void *arg) {
...
@@ -340,7 +339,7 @@ void processSlotRX(void *arg) {
phy_procedures_slot_parallelization_nrUE_RX
(
UE
,
proc
,
0
,
0
,
1
,
no_relay
,
NULL
);
phy_procedures_slot_parallelization_nrUE_RX
(
UE
,
proc
,
0
,
0
,
1
,
no_relay
,
NULL
);
#else
#else
uint64_t
a
=
rdtsc
();
uint64_t
a
=
rdtsc
();
phy_procedures_nrUE_RX
(
UE
,
proc
,
gNB_id
,
get_nrUE_params
()
->
nr_dlsch_parallel
);
phy_procedures_nrUE_RX
(
UE
,
proc
,
gNB_id
,
get_nrUE_params
()
->
nr_dlsch_parallel
,
&
rxtxD
->
txFifo
);
LOG_D
(
PHY
,
"In %s: slot %d, time %lu
\n
"
,
__FUNCTION__
,
proc
->
nr_slot_rx
,
(
rdtsc
()
-
a
)
/
3500
);
LOG_D
(
PHY
,
"In %s: slot %d, time %lu
\n
"
,
__FUNCTION__
,
proc
->
nr_slot_rx
,
(
rdtsc
()
-
a
)
/
3500
);
#endif
#endif
...
@@ -352,15 +351,9 @@ void processSlotRX(void *arg) {
...
@@ -352,15 +351,9 @@ void processSlotRX(void *arg) {
}
}
// Wait for PUSCH processing to finish
// Wait for PUSCH processing to finish
while
(
isTxRunning
)
{
notifiedFIFO_elt_t
*
res
;
notifiedFIFO_elt_t
*
res
;
res
=
pullTpool
(
UE
->
txFifo
,
&
(
get_nrUE_params
()
->
Tpool
));
res
=
pullTpool
(
&
rxtxD
->
txFifo
,
&
(
get_nrUE_params
()
->
Tpool
));
if
(
res
->
key
==
proc
->
nr_slot_tx
)
{
delNotifiedFIFO_elt
(
res
);
isTxRunning
=
false
;
res
->
key
=
TX_JOB_ID
;
}
pushNotifiedFIFO
(
UE
->
txFifo
,
res
);
}
}
else
{
}
else
{
processSlotTX
(
rxtxD
);
processSlotTX
(
rxtxD
);
...
@@ -514,10 +507,6 @@ void *UE_thread(void *arg) {
...
@@ -514,10 +507,6 @@ void *UE_thread(void *arg) {
notifiedFIFO_t
freeBlocks
;
notifiedFIFO_t
freeBlocks
;
initNotifiedFIFO_nothreadSafe
(
&
freeBlocks
);
initNotifiedFIFO_nothreadSafe
(
&
freeBlocks
);
notifiedFIFO_t
txFifo
;
UE
->
txFifo
=
&
txFifo
;
initNotifiedFIFO
(
&
txFifo
);
int
nbSlotProcessing
=
0
;
int
nbSlotProcessing
=
0
;
int
thread_idx
=
0
;
int
thread_idx
=
0
;
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
0
);
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
0
);
...
@@ -528,8 +517,10 @@ void *UE_thread(void *arg) {
...
@@ -528,8 +517,10 @@ void *UE_thread(void *arg) {
int
absolute_slot
=
0
,
decoded_frame_rx
=
INT_MAX
,
trashed_frames
=
0
;
int
absolute_slot
=
0
,
decoded_frame_rx
=
INT_MAX
,
trashed_frames
=
0
;
for
(
int
i
=
0
;
i
<
NR_RX_NB_TH
+
1
;
i
++
)
{
// NR_RX_NB_TH working + 1 we are making to be pushed
for
(
int
i
=
0
;
i
<
NR_RX_NB_TH
+
1
;
i
++
)
{
// NR_RX_NB_TH working + 1 we are making to be pushed
pushNotifiedFIFO_nothreadSafe
(
&
freeBlocks
,
newNotifiedFIFO_elt
(
sizeof
(
nr_rxtx_thread_data_t
),
RX_JOB_ID
,
&
nf
,
processSlotRX
));
notifiedFIFO_elt_t
*
newElt
=
newNotifiedFIFO_elt
(
sizeof
(
nr_rxtx_thread_data_t
),
RX_JOB_ID
,
&
nf
,
processSlotRX
);
pushNotifiedFIFO
(
&
txFifo
,
newNotifiedFIFO_elt
(
sizeof
(
nr_rxtx_thread_data_t
),
TX_JOB_ID
,
&
txFifo
,
processSlotTX
));
nr_rxtx_thread_data_t
*
curMsg
=
(
nr_rxtx_thread_data_t
*
)
NotifiedFifoData
(
newElt
);
initNotifiedFIFO
(
&
curMsg
->
txFifo
);
pushNotifiedFIFO_nothreadSafe
(
&
freeBlocks
,
newElt
);
}
}
while
(
!
oai_exit
)
{
while
(
!
oai_exit
)
{
...
...
openair1/PHY/defs_nr_UE.h
View file @
4189af6c
...
@@ -1073,7 +1073,6 @@ typedef struct {
...
@@ -1073,7 +1073,6 @@ typedef struct {
SLIST_HEAD
(
ral_thresholds_gen_poll_s
,
ral_threshold_phy_t
)
ral_thresholds_gen_polled
[
RAL_LINK_PARAM_GEN_MAX
];
SLIST_HEAD
(
ral_thresholds_gen_poll_s
,
ral_threshold_phy_t
)
ral_thresholds_gen_polled
[
RAL_LINK_PARAM_GEN_MAX
];
SLIST_HEAD
(
ral_thresholds_lte_poll_s
,
ral_threshold_phy_t
)
ral_thresholds_lte_polled
[
RAL_LINK_PARAM_LTE_MAX
];
SLIST_HEAD
(
ral_thresholds_lte_poll_s
,
ral_threshold_phy_t
)
ral_thresholds_lte_polled
[
RAL_LINK_PARAM_LTE_MAX
];
#endif
#endif
notifiedFIFO_t
*
txFifo
;
int
dl_stats
[
5
];
int
dl_stats
[
5
];
...
@@ -1085,6 +1084,7 @@ typedef struct {
...
@@ -1085,6 +1084,7 @@ typedef struct {
typedef
struct
nr_rxtx_thread_data_s
{
typedef
struct
nr_rxtx_thread_data_s
{
UE_nr_rxtx_proc_t
proc
;
UE_nr_rxtx_proc_t
proc
;
PHY_VARS_NR_UE
*
UE
;
PHY_VARS_NR_UE
*
UE
;
notifiedFIFO_t
txFifo
;
}
nr_rxtx_thread_data_t
;
}
nr_rxtx_thread_data_t
;
#include "SIMULATION/ETH_TRANSPORT/defs.h"
#include "SIMULATION/ETH_TRANSPORT/defs.h"
...
...
openair1/SCHED_NR_UE/defs.h
View file @
4189af6c
...
@@ -115,14 +115,17 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
...
@@ -115,14 +115,17 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
@param proc Pointer to proc information
@param proc Pointer to proc information
@param gNB_id Local id of eNB on which to act
@param gNB_id Local id of eNB on which to act
@param dlsch_parallel use multithreaded dlsch processing
@param dlsch_parallel use multithreaded dlsch processing
@param txFifo Result fifo if PDSCH is run in parallel
*/
*/
int
phy_procedures_nrUE_RX
(
PHY_VARS_NR_UE
*
ue
,
int
phy_procedures_nrUE_RX
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
UE_nr_rxtx_proc_t
*
proc
,
uint8_t
gNB_id
,
uint8_t
gNB_id
,
uint8_t
dlsch_parallel
);
uint8_t
dlsch_parallel
,
notifiedFIFO_t
*
txFifo
);
int
phy_procedures_slot_parallelization_nrUE_RX
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
uint8_t
eNB_id
,
uint8_t
abstraction_flag
,
uint8_t
do_pdcch_flag
,
relaying_type_t
r_type
);
int
phy_procedures_slot_parallelization_nrUE_RX
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
uint8_t
eNB_id
,
uint8_t
abstraction_flag
,
uint8_t
do_pdcch_flag
,
relaying_type_t
r_type
);
void
processSlotTX
(
void
*
arg
);
#ifdef UE_SLOT_PARALLELISATION
#ifdef UE_SLOT_PARALLELISATION
void
*
UE_thread_slot1_dl_processing
(
void
*
arg
);
void
*
UE_thread_slot1_dl_processing
(
void
*
arg
);
...
...
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
4189af6c
...
@@ -1600,7 +1600,8 @@ int is_pbch_in_slot(fapi_nr_config_request_t *config, int frame, int slot, NR_DL
...
@@ -1600,7 +1600,8 @@ int is_pbch_in_slot(fapi_nr_config_request_t *config, int frame, int slot, NR_DL
int
phy_procedures_nrUE_RX
(
PHY_VARS_NR_UE
*
ue
,
int
phy_procedures_nrUE_RX
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
UE_nr_rxtx_proc_t
*
proc
,
uint8_t
gNB_id
,
uint8_t
gNB_id
,
uint8_t
dlsch_parallel
uint8_t
dlsch_parallel
,
notifiedFIFO_t
*
txFifo
)
)
{
{
int
frame_rx
=
proc
->
frame_rx
;
int
frame_rx
=
proc
->
frame_rx
;
...
@@ -1759,13 +1760,11 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
...
@@ -1759,13 +1760,11 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
#endif //NR_PDCCH_SCHED
#endif //NR_PDCCH_SCHED
// Start PUSCH processing here. It runs in parallel with PDSCH processing
// Start PUSCH processing here. It runs in parallel with PDSCH processing
notifiedFIFO_elt_t
*
res
;
notifiedFIFO_elt_t
*
newElt
=
newNotifiedFIFO_elt
(
sizeof
(
nr_rxtx_thread_data_t
),
proc
->
nr_slot_tx
,
txFifo
,
processSlotTX
);
res
=
pullTpool
(
ue
->
txFifo
,
&
(
get_nrUE_params
()
->
Tpool
));
nr_rxtx_thread_data_t
*
curMsg
=
(
nr_rxtx_thread_data_t
*
)
NotifiedFifoData
(
newElt
);
nr_rxtx_thread_data_t
*
curMsg
=
(
nr_rxtx_thread_data_t
*
)
NotifiedFifoData
(
res
);
curMsg
->
proc
=
*
proc
;
curMsg
->
proc
=
*
proc
;
curMsg
->
UE
=
ue
;
curMsg
->
UE
=
ue
;
res
->
key
=
proc
->
nr_slot_tx
;
pushTpool
(
&
(
get_nrUE_params
()
->
Tpool
),
newElt
);
pushTpool
(
&
(
get_nrUE_params
()
->
Tpool
),
res
);
#if UE_TIMING_TRACE
#if UE_TIMING_TRACE
start_meas
(
&
ue
->
generic_stat
);
start_meas
(
&
ue
->
generic_stat
);
...
...
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
4189af6c
...
@@ -1121,7 +1121,8 @@ int main(int argc, char **argv)
...
@@ -1121,7 +1121,8 @@ int main(int argc, char **argv)
phy_procedures_nrUE_RX
(
UE
,
phy_procedures_nrUE_RX
(
UE
,
&
UE_proc
,
&
UE_proc
,
0
,
0
,
dlsch_threads
);
dlsch_threads
,
NULL
);
//printf("dlsim round %d ends\n",round);
//printf("dlsim round %d ends\n",round);
round
++
;
round
++
;
...
...
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