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
0dcf4ef8
Commit
0dcf4ef8
authored
Nov 26, 2020
by
frtabu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove L2L1 task, parallelisation as config option
parent
6b8eb372
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
111 additions
and
215 deletions
+111
-215
executables/nr-softmodem.c
executables/nr-softmodem.c
+0
-84
executables/nr-ue.c
executables/nr-ue.c
+5
-5
executables/nr-uesoftmodem.c
executables/nr-uesoftmodem.c
+24
-51
executables/nr-uesoftmodem.h
executables/nr-uesoftmodem.h
+27
-11
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+0
-1
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+9
-17
openair1/PHY/TOOLS/nr_phy_scope.c
openair1/PHY/TOOLS/nr_phy_scope.c
+0
-1
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+46
-40
targets/COMMON/create_nr_tasks.h
targets/COMMON/create_nr_tasks.h
+0
-2
targets/COMMON/create_tasks.h
targets/COMMON/create_tasks.h
+0
-3
No files found.
executables/nr-softmodem.c
View file @
0dcf4ef8
...
@@ -300,87 +300,11 @@ void exit_function(const char *file, const char *function, const int line, const
...
@@ -300,87 +300,11 @@ void exit_function(const char *file, const char *function, const int line, const
}
}
void
*
l2l1_task
(
void
*
arg
)
{
MessageDef
*
message_p
=
NULL
;
int
result
;
itti_set_task_real_time
(
TASK_L2L1
);
itti_mark_task_ready
(
TASK_L2L1
);
/* Wait for the initialize message */
printf
(
"Wait for the ITTI initialize message
\n
"
);
do
{
if
(
message_p
!=
NULL
)
{
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
message_p
),
message_p
);
AssertFatal
(
result
==
EXIT_SUCCESS
,
"Failed to free memory (%d)!
\n
"
,
result
);
}
itti_receive_msg
(
TASK_L2L1
,
&
message_p
);
switch
(
ITTI_MSG_ID
(
message_p
))
{
case
INITIALIZE_MESSAGE
:
/* Start gNB thread */
LOG_D
(
EMU
,
"L2L1 TASK received %s
\n
"
,
ITTI_MSG_NAME
(
message_p
));
start_gNB
=
1
;
break
;
case
TERMINATE_MESSAGE
:
printf
(
"received terminate message
\n
"
);
oai_exit
=
1
;
start_gNB
=
0
;
itti_exit_task
();
break
;
default:
LOG_E
(
EMU
,
"Received unexpected message %s
\n
"
,
ITTI_MSG_NAME
(
message_p
));
break
;
}
}
while
(
ITTI_MSG_ID
(
message_p
)
!=
INITIALIZE_MESSAGE
);
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
message_p
),
message_p
);
AssertFatal
(
result
==
EXIT_SUCCESS
,
"Failed to free memory (%d)!
\n
"
,
result
);
/* ???? no else but seems to be UE only ???
do {
// Wait for a message
itti_receive_msg (TASK_L2L1, &message_p);
switch (ITTI_MSG_ID(message_p)) {
case TERMINATE_MESSAGE:
oai_exit=1;
itti_exit_task ();
break;
case ACTIVATE_MESSAGE:
start_UE = 1;
break;
case DEACTIVATE_MESSAGE:
start_UE = 0;
break;
case MESSAGE_TEST:
LOG_I(EMU, "Received %s\n", ITTI_MSG_NAME(message_p));
break;
default:
LOG_E(EMU, "Received unexpected message %s\n", ITTI_MSG_NAME(message_p));
break;
}
result = itti_free (ITTI_MSG_ORIGIN_ID(message_p), message_p);
AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
} while(!oai_exit);
*/
return
NULL
;
}
int
create_gNB_tasks
(
uint32_t
gnb_nb
)
{
int
create_gNB_tasks
(
uint32_t
gnb_nb
)
{
LOG_D
(
GNB_APP
,
"%s(gnb_nb:%d)
\n
"
,
__FUNCTION__
,
gnb_nb
);
LOG_D
(
GNB_APP
,
"%s(gnb_nb:%d)
\n
"
,
__FUNCTION__
,
gnb_nb
);
itti_wait_ready
(
1
);
itti_wait_ready
(
1
);
if
(
itti_create_task
(
TASK_L2L1
,
l2l1_task
,
NULL
)
<
0
)
{
LOG_E
(
PDCP
,
"Create task for L2L1 failed
\n
"
);
return
-
1
;
}
if
(
gnb_nb
>
0
)
{
if
(
gnb_nb
>
0
)
{
/* Last task to create, others task must be ready before its start */
/* Last task to create, others task must be ready before its start */
...
@@ -717,7 +641,6 @@ int stop_L1L2(module_id_t gnb_id) {
...
@@ -717,7 +641,6 @@ int stop_L1L2(module_id_t gnb_id) {
/* these tasks need to pick up new configuration */
/* these tasks need to pick up new configuration */
terminate_task
(
TASK_RRC_ENB
,
gnb_id
);
terminate_task
(
TASK_RRC_ENB
,
gnb_id
);
terminate_task
(
TASK_L2L1
,
gnb_id
);
LOG_I
(
GNB_APP
,
"calling kill_gNB_proc() for instance %d
\n
"
,
gnb_id
);
LOG_I
(
GNB_APP
,
"calling kill_gNB_proc() for instance %d
\n
"
,
gnb_id
);
kill_gNB_proc
(
gnb_id
);
kill_gNB_proc
(
gnb_id
);
LOG_I
(
GNB_APP
,
"calling kill_NR_RU_proc() for instance %d
\n
"
,
gnb_id
);
LOG_I
(
GNB_APP
,
"calling kill_NR_RU_proc() for instance %d
\n
"
,
gnb_id
);
...
@@ -753,13 +676,6 @@ int restart_L1L2(module_id_t gnb_id) {
...
@@ -753,13 +676,6 @@ int restart_L1L2(module_id_t gnb_id) {
rrc_enb_init
();
rrc_enb_init
();
itti_mark_task_ready
(
TASK_RRC_ENB
);
itti_mark_task_ready
(
TASK_RRC_ENB
);
if
(
itti_create_task
(
TASK_L2L1
,
l2l1_task
,
NULL
)
<
0
)
{
LOG_E
(
PDCP
,
"Create task for L2L1 failed
\n
"
);
return
-
1
;
}
else
{
LOG_I
(
PDCP
,
"Re-created task for L2L1 successfully
\n
"
);
}
/* pass a reconfiguration request which will configure everything down to
/* pass a reconfiguration request which will configure everything down to
* RC.eNB[i][j]->frame_parms, too */
* RC.eNB[i][j]->frame_parms, too */
msg_p
=
itti_alloc_new_message
(
TASK_ENB_APP
,
RRC_CONFIGURATION_REQ
);
msg_p
=
itti_alloc_new_message
(
TASK_ENB_APP
,
RRC_CONFIGURATION_REQ
);
...
...
executables/nr-ue.c
View file @
0dcf4ef8
...
@@ -860,11 +860,11 @@ void init_NR_UE_threads(int nb_inst) {
...
@@ -860,11 +860,11 @@ void init_NR_UE_threads(int nb_inst) {
LOG_I
(
PHY
,
"Intializing UE Threads for instance %d (%p,%p)...
\n
"
,
inst
,
PHY_vars_UE_g
[
inst
],
PHY_vars_UE_g
[
inst
][
0
]);
LOG_I
(
PHY
,
"Intializing UE Threads for instance %d (%p,%p)...
\n
"
,
inst
,
PHY_vars_UE_g
[
inst
],
PHY_vars_UE_g
[
inst
][
0
]);
threadCreate
(
&
threads
[
inst
],
UE_thread
,
(
void
*
)
UE
,
"UEthread"
,
-
1
,
OAI_PRIORITY_RT_MAX
);
threadCreate
(
&
threads
[
inst
],
UE_thread
,
(
void
*
)
UE
,
"UEthread"
,
-
1
,
OAI_PRIORITY_RT_MAX
);
#ifdef UE_DLSCH_PARALLELISATION
if
(
IS_DLSCH_PARALLEL
)
{
pthread_t
dlsch0_threads
;
pthread_t
dlsch0_threads
;
threadCreate
(
&
dlsch0_threads
,
dlsch_thread
,
(
void
*
)
UE
,
"DLthread"
,
-
1
,
OAI_PRIORITY_RT_MAX
-
1
);
threadCreate
(
&
dlsch0_threads
,
dlsch_thread
,
(
void
*
)
UE
,
"DLthread"
,
-
1
,
OAI_PRIORITY_RT_MAX
-
1
);
#endif
}
}
}
}
}
...
...
executables/nr-uesoftmodem.c
View file @
0dcf4ef8
...
@@ -81,6 +81,7 @@ unsigned short config_frames[4] = {2,9,11,13};
...
@@ -81,6 +81,7 @@ unsigned short config_frames[4] = {2,9,11,13};
// current status is that every UE has a DL scope for a SINGLE eNB (eNB_id=0)
// current status is that every UE has a DL scope for a SINGLE eNB (eNB_id=0)
#include "PHY/TOOLS/phy_scope_interface.h"
#include "PHY/TOOLS/phy_scope_interface.h"
#include "PHY/TOOLS/nr_phy_scope.h"
#include "PHY/TOOLS/nr_phy_scope.h"
#define NRUE_MAIN
#include <executables/nr-uesoftmodem.h>
#include <executables/nr-uesoftmodem.h>
#include "executables/softmodem-common.h"
#include "executables/softmodem-common.h"
#include "executables/thread-common.h"
#include "executables/thread-common.h"
...
@@ -106,7 +107,6 @@ volatile int start_eNB = 0;
...
@@ -106,7 +107,6 @@ volatile int start_eNB = 0;
volatile
int
start_UE
=
0
;
volatile
int
start_UE
=
0
;
volatile
int
oai_exit
=
0
;
volatile
int
oai_exit
=
0
;
// Command line options
extern
int16_t
nr_dlsch_demod_shift
;
extern
int16_t
nr_dlsch_demod_shift
;
static
int
tx_max_power
[
MAX_NUM_CCs
]
=
{
0
};
static
int
tx_max_power
[
MAX_NUM_CCs
]
=
{
0
};
...
@@ -208,57 +208,23 @@ void exit_function(const char *file, const char *function, const int line, const
...
@@ -208,57 +208,23 @@ void exit_function(const char *file, const char *function, const int line, const
exit
(
1
);
exit
(
1
);
}
}
void
*
l2l1_task
(
void
*
arg
)
{
MessageDef
*
message_p
=
NULL
;
int
result
;
itti_set_task_real_time
(
TASK_L2L1
);
itti_mark_task_ready
(
TASK_L2L1
);
do
{
// Wait for a message
itti_receive_msg
(
TASK_L2L1
,
&
message_p
);
switch
(
ITTI_MSG_ID
(
message_p
))
{
case
TERMINATE_MESSAGE
:
oai_exit
=
1
;
itti_exit_task
();
break
;
case
ACTIVATE_MESSAGE
:
start_UE
=
1
;
break
;
case
DEACTIVATE_MESSAGE
:
start_UE
=
0
;
break
;
case
MESSAGE_TEST
:
LOG_I
(
EMU
,
"Received %s
\n
"
,
ITTI_MSG_NAME
(
message_p
));
break
;
default:
LOG_E
(
EMU
,
"Received unexpected message %s
\n
"
,
ITTI_MSG_NAME
(
message_p
));
break
;
}
result
=
itti_free
(
ITTI_MSG_ORIGIN_ID
(
message_p
),
message_p
);
AssertFatal
(
result
==
EXIT_SUCCESS
,
"Failed to free memory (%d)!
\n
"
,
result
);
}
while
(
!
oai_exit
);
return
NULL
;
nrUE_params_t
*
get_nrUE_params
(
void
)
{
return
&
nrUE_params
;
}
}
static
void
get_options
(
void
)
{
static
void
get_options
(
void
)
{
char
*
loopfile
=
NULL
;
char
*
loopfile
=
NULL
;
int32_t
nr_dlsch_parallel
=
0
;
paramdef_t
cmdline_params
[]
=
CMDLINE_PARAMS_DESC_UE
;
paramdef_t
cmdline_params
[]
=
CMDLINE_PARAMS_DESC_UE
;
config_process_cmdline
(
cmdline_params
,
sizeof
(
cmdline_params
)
/
sizeof
(
paramdef_t
),
NULL
);
config_process_cmdline
(
cmdline_params
,
sizeof
(
cmdline_params
)
/
sizeof
(
paramdef_t
),
NULL
);
paramdef_t
cmdline_uemodeparams
[]
=
CMDLINE_UEMODEPARAMS_DESC
;
paramdef_t
cmdline_uemodeparams
[]
=
CMDLINE_UEMODEPARAMS_DESC
;
paramdef_t
cmdline_ueparams
[]
=
CMDLINE_NRUEPARAMS_DESC
;
paramdef_t
cmdline_ueparams
[]
=
CMDLINE_NRUEPARAMS_DESC
;
config_process_cmdline
(
cmdline_uemodeparams
,
sizeof
(
cmdline_uemodeparams
)
/
sizeof
(
paramdef_t
),
NULL
);
config_process_cmdline
(
cmdline_uemodeparams
,
sizeof
(
cmdline_uemodeparams
)
/
sizeof
(
paramdef_t
),
NULL
);
config_process_cmdline
(
cmdline_ueparams
,
sizeof
(
cmdline_ueparams
)
/
sizeof
(
paramdef_t
),
NULL
);
config_process_cmdline
(
cmdline_ueparams
,
sizeof
(
cmdline_ueparams
)
/
sizeof
(
paramdef_t
),
NULL
);
for
(
int
card
=
1
;
card
<
MAX_CARDS
;
card
++
)
openair0_cfg
[
card
].
threequarter_fs
=
openair0_cfg
[
0
].
threequarter_fs
;
if
(
(
cmdline_uemodeparams
[
CMDLINE_CALIBUERX_IDX
].
paramflags
&
PARAMFLAG_PARAMSET
)
!=
0
)
mode
=
rx_calib_ue
;
if
(
(
cmdline_uemodeparams
[
CMDLINE_CALIBUERX_IDX
].
paramflags
&
PARAMFLAG_PARAMSET
)
!=
0
)
mode
=
rx_calib_ue
;
if
(
(
cmdline_uemodeparams
[
CMDLINE_CALIBUERXMED_IDX
].
paramflags
&
PARAMFLAG_PARAMSET
)
!=
0
)
mode
=
rx_calib_ue_med
;
if
(
(
cmdline_uemodeparams
[
CMDLINE_CALIBUERXMED_IDX
].
paramflags
&
PARAMFLAG_PARAMSET
)
!=
0
)
mode
=
rx_calib_ue_med
;
...
@@ -476,6 +442,19 @@ void *rrc_enb_process_msg(void *notUsed) {
...
@@ -476,6 +442,19 @@ void *rrc_enb_process_msg(void *notUsed) {
return
NULL
;
return
NULL
;
}
}
/* initialie thread pools used for NRUE processing paralleliation */
void
init_tpools
(
void
)
{
tpool_t
pool
;
Tpool
=
&
pool
;
char
params
[]
=
"-1,-1"
;
initTpool
(
params
,
Tpool
,
false
);
if
(
IS_DLSCH_PARALLEL
)
{
tpool_t
pool_dl
;
Tpool_dl
=
&
pool_dl
;
char
params_dl
[]
=
"-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1"
;
initTpool
(
params_dl
,
Tpool_dl
,
false
);
}
}
int
main
(
int
argc
,
char
**
argv
)
{
int
main
(
int
argc
,
char
**
argv
)
{
//uint8_t beta_ACK=0,beta_RI=0,beta_CQI=2;
//uint8_t beta_ACK=0,beta_RI=0,beta_CQI=2;
...
@@ -492,23 +471,16 @@ int main( int argc, char **argv ) {
...
@@ -492,23 +471,16 @@ int main( int argc, char **argv ) {
// initialize logging
// initialize logging
logInit
();
logInit
();
// get options and fill parameters from configuration file
// get options and fill parameters from configuration file
get_options
();
//Command-line options
get_options
();
//Command-line options specific for NRUE
get_common_options
(
SOFTMODEM_5GUE_BIT
);
get_common_options
(
SOFTMODEM_5GUE_BIT
);
#if T_TRACER
#if T_TRACER
T_Config_Init
();
T_Config_Init
();
#endif
#endif
//randominit (0);
//randominit (0);
set_taus_seed
(
0
);
set_taus_seed
(
0
);
tpool_t
pool
;
init_tpools
();
Tpool
=
&
pool
;
char
params
[]
=
"-1,-1"
;
initTpool
(
params
,
Tpool
,
false
);
#ifdef UE_DLSCH_PARALLELISATION
tpool_t
pool_dl
;
Tpool_dl
=
&
pool_dl
;
char
params_dl
[]
=
"-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1"
;
initTpool
(
params_dl
,
Tpool_dl
,
false
);
#endif
cpuf
=
get_cpu_freq_GHz
();
cpuf
=
get_cpu_freq_GHz
();
itti_init
(
TASK_MAX
,
THREAD_MAX
,
MESSAGES_ID_MAX
,
tasks_info
,
messages_info
);
itti_init
(
TASK_MAX
,
THREAD_MAX
,
MESSAGES_ID_MAX
,
tasks_info
,
messages_info
);
...
@@ -538,6 +510,7 @@ int main( int argc, char **argv ) {
...
@@ -538,6 +510,7 @@ int main( int argc, char **argv ) {
for
(
int
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
for
(
int
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
PHY_vars_UE_g
[
0
][
CC_id
]
=
(
PHY_VARS_NR_UE
*
)
malloc
(
sizeof
(
PHY_VARS_NR_UE
));
PHY_vars_UE_g
[
0
][
CC_id
]
=
(
PHY_VARS_NR_UE
*
)
malloc
(
sizeof
(
PHY_VARS_NR_UE
));
UE
[
CC_id
]
=
PHY_vars_UE_g
[
0
][
CC_id
];
UE
[
CC_id
]
=
PHY_vars_UE_g
[
0
][
CC_id
];
memset
(
UE
[
CC_id
],
0
,
sizeof
(
PHY_VARS_NR_UE
));
memset
(
UE
[
CC_id
],
0
,
sizeof
(
PHY_VARS_NR_UE
));
...
...
executables/nr-uesoftmodem.h
View file @
0dcf4ef8
...
@@ -52,24 +52,40 @@
...
@@ -52,24 +52,40 @@
{"usrp-args", CONFIG_HLP_USRP_ARGS, 0, strptr:(char **)&usrp_args, defstrval:"type=b200", TYPE_STRING, 0} \
{"usrp-args", CONFIG_HLP_USRP_ARGS, 0, strptr:(char **)&usrp_args, defstrval:"type=b200", TYPE_STRING, 0} \
}
}
#define CONFIG_HLP_DLSCH_PARA "enable dlsch processing parallelization"
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
/* command line parameters common to gNB and UE */
/* command line parameters common to gNB and UE */
/* optname helpstr paramflags XXXptr defXXXval type numelt */
/* optname helpstr paramflags XXXptr defXXXval type numelt */
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
#define CMDLINE_PARAMS_DESC_UE { \
#define CMDLINE_PARAMS_DESC_UE { \
{"single-thread-disable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&single_thread_flag, defintval:1, TYPE_INT, 0}, \
{"single-thread-disable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&single_thread_flag, defintval:1, TYPE_INT, 0}, \
{"dlsch-parallel", CONFIG_HLP_DLSCH_PARA, PARAMFLAG_BOOL, iptr:(int32_t *)&nr_dlsch_parallel, defintval:0, TYPE_INT, 0}, \
{"nr-dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&nr_dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \
{"nr-dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&nr_dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \
{"A" , CONFIG_HLP_TADV, 0, uptr:&timing_advance, defintval:0, TYPE_UINT, 0}, \
{"A" , CONFIG_HLP_TADV, 0, uptr:&timing_advance, defintval:0, TYPE_UINT, 0}, \
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, i
ptr:&threequarter_fs, defintval:0, TYPE_INT
, 0}, \
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, i
8ptr:&(openair0_cfg[0].threequarter_fs), defintval:0, TYPE_INT8
, 0}, \
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
{"V" , CONFIG_HLP_VCD, PARAMFLAG_BOOL, iptr:&vcdflag, defintval:0, TYPE_INT, 0}, \
{"V" , CONFIG_HLP_VCD, PARAMFLAG_BOOL, iptr:&vcdflag, defintval:0, TYPE_INT, 0}, \
{"ue-timing-correction-disable", CONFIG_HLP_DISABLETIMECORR, PARAMFLAG_BOOL, iptr:&UE_no_timing_correction, defintval:0, TYPE_INT, 0}, \
{"ue-timing-correction-disable", CONFIG_HLP_DISABLETIMECORR, PARAMFLAG_BOOL, iptr:&UE_no_timing_correction, defintval:0, TYPE_INT, 0}, \
{"rrc_config_path", CONFIG_HLP_RRC_CFG_PATH,0, strptr:(char **)&rrc_config_path, defstrval:"./", TYPE_STRING, 0} \
{"rrc_config_path", CONFIG_HLP_RRC_CFG_PATH,0, strptr:(char **)&rrc_config_path, defstrval:"./", TYPE_STRING, 0} \
}
}
extern
int
T_port
;
extern
int
T_nowait
;
extern
int
T_dont_fork
;
#define NRUE_DLSCH_PARALLEL_BIT (1<<0)
#define IS_DLSCH_PARALLEL ( get_nrUE_optmask() & NRUE_DLSCH_PARALLEL_BIT)
typedef
struct
{
uint64_t
optmask
;
//mask to store boolean config options
}
nrUE_params_t
;
extern
uint64_t
get_nrUE_optmask
(
void
);
extern
uint64_t
set_nrUE_optmask
(
uint64_t
bitmask
);
extern
nrUE_params_t
*
get_nrUE_params
(
void
);
#ifdef NRUE_MAIN
nrUE_params_t
nrUE_params
;
#endif
// In nr-ue.c
// In nr-ue.c
extern
int
setup_nr_ue_buffers
(
PHY_VARS_NR_UE
**
phy_vars_ue
,
openair0_config_t
*
openair0_cfg
);
extern
int
setup_nr_ue_buffers
(
PHY_VARS_NR_UE
**
phy_vars_ue
,
openair0_config_t
*
openair0_cfg
);
...
...
openair1/PHY/INIT/nr_init.c
View file @
0dcf4ef8
...
@@ -19,7 +19,6 @@
...
@@ -19,7 +19,6 @@
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
#include "executables/nr-softmodem-common.h"
#include "PHY/defs_gNB.h"
#include "PHY/defs_gNB.h"
#include "PHY/phy_extern.h"
#include "PHY/phy_extern.h"
#include "PHY/NR_REFSIG/nr_refsig.h"
#include "PHY/NR_REFSIG/nr_refsig.h"
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
View file @
0dcf4ef8
...
@@ -752,7 +752,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -752,7 +752,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
return
(
ret
);
return
(
ret
);
}
}
#ifdef UE_DLSCH_PARALLELISATION
uint32_t
nr_dlsch_decoding_mthread
(
PHY_VARS_NR_UE
*
phy_vars_ue
,
uint32_t
nr_dlsch_decoding_mthread
(
PHY_VARS_NR_UE
*
phy_vars_ue
,
UE_nr_rxtx_proc_t
*
proc
,
UE_nr_rxtx_proc_t
*
proc
,
int
eNB_id
,
int
eNB_id
,
...
@@ -797,15 +797,12 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -797,15 +797,12 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
uint8_t
Nl
=
4
;
uint8_t
Nl
=
4
;
int16_t
z
[
68
*
384
];
int16_t
z
[
68
*
384
];
int8_t
l
[
68
*
384
];
int8_t
l
[
68
*
384
];
//__m128i l;
uint8_t
kc
;
//int16_t inv_d [68*384];
//int16_t *p_invd =&inv_d;
uint8_t
kb
,
kc
;
uint8_t
Ilbrm
=
1
;
uint8_t
Ilbrm
=
1
;
uint32_t
Tbslbrm
=
950984
;
uint32_t
Tbslbrm
=
950984
;
uint16_t
nb_rb
=
30
;
uint16_t
nb_rb
=
30
;
double
Coderate
=
0
.
0
;
double
Coderate
=
0
.
0
;
uint8_t
dmrs_
t
ype
=
harq_process
->
dmrsConfigType
;
uint8_t
dmrs_
T
ype
=
harq_process
->
dmrsConfigType
;
//nfapi_nr_config_request_t *cfg = &phy_vars_ue->nrUE_config;
//nfapi_nr_config_request_t *cfg = &phy_vars_ue->nrUE_config;
//uint8_t dmrs_type = cfg->pdsch_config.dmrs_type.value;
//uint8_t dmrs_type = cfg->pdsch_config.dmrs_type.value;
...
@@ -815,7 +812,7 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -815,7 +812,7 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
else
else
nb_re_dmrs
=
4
*
harq_process
->
n_dmrs_cdm_groups
;
nb_re_dmrs
=
4
*
harq_process
->
n_dmrs_cdm_groups
;
uint16_t
length_dmrs
=
get_num_dmrs
(
dl_config_pdu
->
dlDmrsSymbPos
);
uint16_t
length_dmrs
=
get_num_dmrs
(
harq_process
->
dlDmrsSymbPos
);
uint32_t
i
,
j
;
uint32_t
i
,
j
;
// int nbDlProcessing =0;
// int nbDlProcessing =0;
...
@@ -1344,15 +1341,14 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -1344,15 +1341,14 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
return
(
ret
);
return
(
ret
);
}
}
#endif
#ifdef UE_DLSCH_PARALLELISATION
void
nr_dlsch_decoding_process
(
void
*
arg
)
void
nr_dlsch_decoding_process
(
void
*
arg
)
{
{
nr_rxtx_thread_data_t
*
rxtxD
=
(
nr_rxtx_thread_data_t
*
)
arg
;
nr_rxtx_thread_data_t
*
rxtxD
=
(
nr_rxtx_thread_data_t
*
)
arg
;
UE_nr_rxtx_proc_t
*
proc
=
&
rxtxD
->
proc
;
UE_nr_rxtx_proc_t
*
proc
=
&
rxtxD
->
proc
;
PHY_VARS_NR_UE
*
phy_vars_ue
=
rxtxD
->
UE
;
PHY_VARS_NR_UE
*
phy_vars_ue
=
rxtxD
->
UE
;
NR_DL_FRAME_PARMS
*
frame_parms
=
&
phy_vars_ue
->
frame_parms
;
int
llr8_flag1
;
int
llr8_flag1
;
int32_t
no_iteration_ldpc
,
length_dec
;
int32_t
no_iteration_ldpc
,
length_dec
;
t_nrLDPC_dec_params
decParams
;
t_nrLDPC_dec_params
decParams
;
...
@@ -1366,7 +1362,7 @@ void nr_dlsch_decoding_process(void *arg)
...
@@ -1366,7 +1362,7 @@ void nr_dlsch_decoding_process(void *arg)
//__m128i l;
//__m128i l;
//int16_t inv_d [68*384];
//int16_t inv_d [68*384];
//int16_t *p_invd =&inv_d;
//int16_t *p_invd =&inv_d;
uint8_t
kb
,
kc
;
uint8_t
kc
;
uint8_t
Ilbrm
=
1
;
uint8_t
Ilbrm
=
1
;
uint32_t
Tbslbrm
=
950984
;
uint32_t
Tbslbrm
=
950984
;
uint16_t
nb_rb
=
30
;
//to update
uint16_t
nb_rb
=
30
;
//to update
...
@@ -1376,8 +1372,6 @@ void nr_dlsch_decoding_process(void *arg)
...
@@ -1376,8 +1372,6 @@ void nr_dlsch_decoding_process(void *arg)
uint16_t
length_dmrs
=
1
;
uint16_t
length_dmrs
=
1
;
uint32_t
i
,
j
;
uint32_t
i
,
j
;
uint32_t
k
;
__m128i
*
pv
=
(
__m128i
*
)
&
z
;
__m128i
*
pv
=
(
__m128i
*
)
&
z
;
__m128i
*
pl
=
(
__m128i
*
)
&
l
;
__m128i
*
pl
=
(
__m128i
*
)
&
l
;
...
@@ -1394,7 +1388,7 @@ void nr_dlsch_decoding_process(void *arg)
...
@@ -1394,7 +1388,7 @@ void nr_dlsch_decoding_process(void *arg)
#endif
#endif
uint32_t
A
,
E
;
uint32_t
A
,
E
;
uint32_t
G
;
uint32_t
G
;
uint32_t
ret
,
offset
;
uint32_t
ret
;
uint32_t
r
,
r_offset
=
0
,
Kr
,
Kr_bytes
,
err_flag
=
0
,
K_bytes_F
;
uint32_t
r
,
r_offset
=
0
,
Kr
,
Kr_bytes
,
err_flag
=
0
,
K_bytes_F
;
uint8_t
crc_type
;
uint8_t
crc_type
;
uint8_t
C
,
Cprime
;
uint8_t
C
,
Cprime
;
...
@@ -1765,7 +1759,6 @@ void nr_dlsch_decoding_process(void *arg)
...
@@ -1765,7 +1759,6 @@ void nr_dlsch_decoding_process(void *arg)
void
*
dlsch_thread
(
void
*
arg
)
{
void
*
dlsch_thread
(
void
*
arg
)
{
//this thread should be over the processing thread to keep in real time
//this thread should be over the processing thread to keep in real time
PHY_VARS_NR_UE
*
UE
=
(
PHY_VARS_NR_UE
*
)
arg
;
notifiedFIFO_t
nf
;
notifiedFIFO_t
nf
;
initNotifiedFIFO
(
&
nf
);
initNotifiedFIFO
(
&
nf
);
notifiedFIFO_elt_t
*
res_dl
;
notifiedFIFO_elt_t
*
res_dl
;
...
@@ -1781,7 +1774,6 @@ void *dlsch_thread(void *arg) {
...
@@ -1781,7 +1774,6 @@ void *dlsch_thread(void *arg) {
while
(
nbDlProcessing
>=
RX_NB_TH_DL
)
{
while
(
nbDlProcessing
>=
RX_NB_TH_DL
)
{
if
(
(
res
=
tryPullTpool
(
&
nf
,
Tpool_dl
))
!=
NULL
)
{
if
(
(
res
=
tryPullTpool
(
&
nf
,
Tpool_dl
))
!=
NULL
)
{
nr_rxtx_thread_data_t
*
tmp
=
(
nr_rxtx_thread_data_t
*
)
res
->
msgData
;
//nbDlProcessing--;
//nbDlProcessing--;
pushNotifiedFIFO_nothreadSafe
(
&
freeBlocks_dl
,
res
);
pushNotifiedFIFO_nothreadSafe
(
&
freeBlocks_dl
,
res
);
}
}
...
@@ -1802,4 +1794,4 @@ void *dlsch_thread(void *arg) {
...
@@ -1802,4 +1794,4 @@ void *dlsch_thread(void *arg) {
return
NULL
;
return
NULL
;
}
}
#endif
openair1/PHY/TOOLS/nr_phy_scope.c
View file @
0dcf4ef8
...
@@ -25,7 +25,6 @@
...
@@ -25,7 +25,6 @@
#include <stdlib.h>
#include <stdlib.h>
#include "nr_phy_scope.h"
#include "nr_phy_scope.h"
#include "executables/nr-softmodem-common.h"
#include "executables/softmodem-common.h"
#include "executables/softmodem-common.h"
#include <forms.h>
#include <forms.h>
...
...
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
0dcf4ef8
...
@@ -50,6 +50,7 @@
...
@@ -50,6 +50,7 @@
#include "SCHED/phy_procedures_emos.h"
#include "SCHED/phy_procedures_emos.h"
#endif
#endif
#include "executables/softmodem-common.h"
#include "executables/softmodem-common.h"
#include "executables/nr-uesoftmodem.h"
#include "openair2/LAYER2/NR_MAC_UE/mac_proto.h"
#include "openair2/LAYER2/NR_MAC_UE/mac_proto.h"
//#define DEBUG_PHY_PROC
//#define DEBUG_PHY_PROC
...
@@ -1048,7 +1049,8 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
...
@@ -1048,7 +1049,8 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
start_meas
(
&
ue
->
dlsch_decoding_stats
[
proc
->
thread_id
]);
start_meas
(
&
ue
->
dlsch_decoding_stats
[
proc
->
thread_id
]);
#endif
#endif
#ifdef UE_DLSCH_PARALLELISATION
if
(
IS_DLSCH_PARALLEL
)
{
ret
=
nr_dlsch_decoding_mthread
(
ue
,
ret
=
nr_dlsch_decoding_mthread
(
ue
,
proc
,
proc
,
eNB_id
,
eNB_id
,
...
@@ -1062,8 +1064,10 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
...
@@ -1062,8 +1064,10 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
harq_pid
,
harq_pid
,
pdsch
==
PDSCH
?
1
:
0
,
pdsch
==
PDSCH
?
1
:
0
,
dlsch0
->
harq_processes
[
harq_pid
]
->
TBS
>
256
?
1
:
0
);
dlsch0
->
harq_processes
[
harq_pid
]
->
TBS
>
256
?
1
:
0
);
LOG_T
(
PHY
,
"UE_DLSCH_PARALLELISATION is defined, ret = %d
\n
"
,
ret
);
LOG_T
(
PHY
,
"dlsch decoding is parallelized, ret = %d
\n
"
,
ret
);
#else
}
else
{
ret
=
nr_dlsch_decoding
(
ue
,
ret
=
nr_dlsch_decoding
(
ue
,
proc
,
proc
,
eNB_id
,
eNB_id
,
...
@@ -1077,9 +1081,9 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
...
@@ -1077,9 +1081,9 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
harq_pid
,
harq_pid
,
pdsch
==
PDSCH
?
1
:
0
,
pdsch
==
PDSCH
?
1
:
0
,
dlsch0
->
harq_processes
[
harq_pid
]
->
TBS
>
256
?
1
:
0
);
dlsch0
->
harq_processes
[
harq_pid
]
->
TBS
>
256
?
1
:
0
);
LOG_T
(
PHY
,
"
UE_DLSCH_PARALLELISATION is NOT defined
, ret = %d
\n
"
,
ret
);
LOG_T
(
PHY
,
"
Sequential dlsch decoding
, ret = %d
\n
"
,
ret
);
//printf("start cW0 dlsch decoding\n");
}
#endif
#if UE_TIMING_TRACE
#if UE_TIMING_TRACE
stop_meas
(
&
ue
->
dlsch_decoding_stats
[
proc
->
thread_id
]);
stop_meas
(
&
ue
->
dlsch_decoding_stats
[
proc
->
thread_id
]);
...
@@ -1131,7 +1135,8 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
...
@@ -1131,7 +1135,8 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
start_meas
(
&
ue
->
dlsch_decoding_stats
[
proc
->
thread_id
]);
start_meas
(
&
ue
->
dlsch_decoding_stats
[
proc
->
thread_id
]);
#endif
#endif
#ifdef UE_DLSCH_PARALLELISATION
if
(
IS_DLSCH_PARALLEL
)
{
ret1
=
nr_dlsch_decoding_mthread
(
ue
,
ret1
=
nr_dlsch_decoding_mthread
(
ue
,
proc
,
proc
,
eNB_id
,
eNB_id
,
...
@@ -1141,12 +1146,14 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
...
@@ -1141,12 +1146,14 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
dlsch1
->
harq_processes
[
harq_pid
],
dlsch1
->
harq_processes
[
harq_pid
],
frame_rx
,
frame_rx
,
nb_symb_sch
,
nb_symb_sch
,
nr_slot
_rx
,
nr_tti
_rx
,
harq_pid
,
harq_pid
,
pdsch
==
PDSCH
?
1
:
0
,
pdsch
==
PDSCH
?
1
:
0
,
dlsch1
->
harq_processes
[
harq_pid
]
->
TBS
>
256
?
1
:
0
);
dlsch1
->
harq_processes
[
harq_pid
]
->
TBS
>
256
?
1
:
0
);
LOG_T
(
PHY
,
"UE_DLSCH_PARALLELISATION is defined, ret1 = %d
\n
"
,
ret1
);
LOG_T
(
PHY
,
"CW dlsch decoding is parallelized, ret1 = %d
\n
"
,
ret1
);
#else
}
else
{
ret1
=
nr_dlsch_decoding
(
ue
,
ret1
=
nr_dlsch_decoding
(
ue
,
proc
,
proc
,
eNB_id
,
eNB_id
,
...
@@ -1156,13 +1163,12 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
...
@@ -1156,13 +1163,12 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
dlsch1
->
harq_processes
[
harq_pid
],
dlsch1
->
harq_processes
[
harq_pid
],
frame_rx
,
frame_rx
,
nb_symb_sch
,
nb_symb_sch
,
nr_slot
_rx
,
nr_tti
_rx
,
harq_pid
,
harq_pid
,
pdsch
==
PDSCH
?
1
:
0
,
//proc->decoder_switch,
pdsch
==
PDSCH
?
1
:
0
,
//proc->decoder_switch,
dlsch1
->
harq_processes
[
harq_pid
]
->
TBS
>
256
?
1
:
0
);
dlsch1
->
harq_processes
[
harq_pid
]
->
TBS
>
256
?
1
:
0
);
LOG_T
(
PHY
,
"UE_DLSCH_PARALLELISATION is NOT defined, ret1 = %d
\n
"
,
ret1
);
LOG_T
(
PHY
,
"CWW sequential dlsch decoding, ret1 = %d
\n
"
,
ret1
);
printf
(
"start cw1 dlsch decoding
\n
"
);
}
#endif
#if UE_TIMING_TRACE
#if UE_TIMING_TRACE
stop_meas
(
&
ue
->
dlsch_decoding_stats
[
proc
->
thread_id
]);
stop_meas
(
&
ue
->
dlsch_decoding_stats
[
proc
->
thread_id
]);
...
...
targets/COMMON/create_nr_tasks.h
View file @
0dcf4ef8
...
@@ -22,8 +22,6 @@
...
@@ -22,8 +22,6 @@
#ifndef CREATE_NR_TASKS_H_
#ifndef CREATE_NR_TASKS_H_
#define CREATE_NR_TASKS_H_
#define CREATE_NR_TASKS_H_
/* External declaration of L2L1 task that depend on the target */
extern
void
*
l2l1_task
(
void
*
arg
);
int
create_gNB_tasks
(
uint32_t
gnb_nb
);
int
create_gNB_tasks
(
uint32_t
gnb_nb
);
...
...
targets/COMMON/create_tasks.h
View file @
0dcf4ef8
...
@@ -22,9 +22,6 @@
...
@@ -22,9 +22,6 @@
#ifndef CREATE_TASKS_H_
#ifndef CREATE_TASKS_H_
#define CREATE_TASKS_H_
#define CREATE_TASKS_H_
/* External declaration of L2L1 task that depend on the target */
extern
void
*
l2l1_task
(
void
*
arg
);
int
create_tasks
(
uint32_t
enb_nb
);
int
create_tasks
(
uint32_t
enb_nb
);
int
create_tasks_ue
(
uint32_t
ue_nb
);
int
create_tasks_ue
(
uint32_t
ue_nb
);
int
create_tasks_mbms
(
uint32_t
enb_nb
);
int
create_tasks_mbms
(
uint32_t
enb_nb
);
...
...
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