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
wangwenhui
OpenXG-RAN
Commits
136ca508
Commit
136ca508
authored
Sep 06, 2018
by
hongzhi wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nr ue clean warnings
parent
2714854e
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
157 additions
and
183 deletions
+157
-183
openair1/PHY/INIT/nr_init_ue.c
openair1/PHY/INIT/nr_init_ue.c
+4
-1
openair1/PHY/INIT/phy_init.h
openair1/PHY/INIT/phy_init.h
+2
-0
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
+8
-22
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
+4
-4
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
+7
-7
targets/RT/USER/nr-ue.c
targets/RT/USER/nr-ue.c
+7
-1
targets/RT/USER/nr-uesoftmodem.c
targets/RT/USER/nr-uesoftmodem.c
+125
-148
No files found.
openair1/PHY/INIT/nr_init_ue.c
View file @
136ca508
...
@@ -34,6 +34,9 @@
...
@@ -34,6 +34,9 @@
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h"
#include "PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/NR_REFSIG/pss_nr.h"
#include "openair1/PHY/NR_REFSIG/ul_ref_seq_nr.h"
//uint8_t dmrs1_tab_ue[8] = {0,2,3,4,6,8,9,10};
//uint8_t dmrs1_tab_ue[8] = {0,2,3,4,6,8,9,10};
...
@@ -658,8 +661,8 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
...
@@ -658,8 +661,8 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
printf
(
"Initializing UE vars (abstraction %"
PRIu8
") for eNB TXant %"
PRIu8
", UE RXant %"
PRIu8
"
\n
"
,
abstraction_flag
,
fp
->
nb_antennas_tx
,
fp
->
nb_antennas_rx
);
printf
(
"Initializing UE vars (abstraction %"
PRIu8
") for eNB TXant %"
PRIu8
", UE RXant %"
PRIu8
"
\n
"
,
abstraction_flag
,
fp
->
nb_antennas_tx
,
fp
->
nb_antennas_rx
);
//LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_UE][MOD %02u][]\n", ue->Mod_id+NB_eNB_INST);
//LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_UE][MOD %02u][]\n", ue->Mod_id+NB_eNB_INST);
nr_init_frame_parms_ue
(
&
ue
->
frame_parms
);
phy_init_nr_top
(
ue
);
phy_init_nr_top
(
ue
);
//nr_init_frame_parms_ue(&ue->frame_parms);
// many memory allocation sizes are hard coded
// many memory allocation sizes are hard coded
AssertFatal
(
fp
->
nb_antennas_rx
<=
2
,
"hard coded allocation for ue_common_vars->dl_ch_estimates[eNB_id]"
);
AssertFatal
(
fp
->
nb_antennas_rx
<=
2
,
"hard coded allocation for ue_common_vars->dl_ch_estimates[eNB_id]"
);
...
...
openair1/PHY/INIT/phy_init.h
View file @
136ca508
...
@@ -56,6 +56,8 @@ int l1_north_init_eNB(void);
...
@@ -56,6 +56,8 @@ int l1_north_init_eNB(void);
*/
*/
int
phy_init_top
(
LTE_DL_FRAME_PARMS
*
frame_parms
);
int
phy_init_top
(
LTE_DL_FRAME_PARMS
*
frame_parms
);
void
phy_init_nr_top
(
PHY_VARS_NR_UE
*
ue
);
/*!
/*!
\brief Allocate and Initialize the PHY variables relevant to the LTE ue signal buffers.
\brief Allocate and Initialize the PHY variables relevant to the LTE ue signal buffers.
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
View file @
136ca508
...
@@ -32,11 +32,11 @@
...
@@ -32,11 +32,11 @@
#include "PHY/types.h"
#include "PHY/types.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/phy_extern_nr_ue.h"
#include "PHY/phy_extern_nr_ue.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/MODULATION/modulation_UE.h"
#include "nr_transport_proto_ue.h"
//#include "SCHED/defs.h"
//#include "SCHED/defs.h"
//#include "SCHED/extern.h"
//#include "SCHED/extern.h"
//#include "defs.h"
//#include "extern.h"
#include "common_lib.h"
#include "common_lib.h"
...
@@ -45,20 +45,16 @@
...
@@ -45,20 +45,16 @@
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
extern
openair0_config_t
openair0_cfg
[];
extern
openair0_config_t
openair0_cfg
[];
static
nfapi_nr_config_request_t
config_t
;
//
static nfapi_nr_config_request_t config_t;
static
nfapi_nr_config_request_t
*
config
=&
config_t
;
//
static nfapi_nr_config_request_t* config =&config_t;
int
cnt
=
0
;
int
cnt
=
0
;
/* forward declarations */
void
set_default_frame_parms_single
(
nfapi_nr_config_request_t
*
config
,
NR_DL_FRAME_PARMS
*
frame_parms
);
//#define DEBUG_INITIAL_SYNCH
//#define DEBUG_INITIAL_SYNCH
int
nr_pbch_detection
(
PHY_VARS_NR_UE
*
ue
,
runmode_t
mode
)
int
nr_pbch_detection
(
PHY_VARS_NR_UE
*
ue
,
runmode_t
mode
)
{
{
printf
(
"nr pbch detec RB_DL %d
\n
"
,
ue
->
frame_parms
.
N_RB_DL
);
printf
(
"nr pbch detec RB_DL %d
\n
"
,
ue
->
frame_parms
.
N_RB_DL
);
uint8_t
l
,
pbch_decoded
,
frame_mod4
,
pbch_tx_ant
,
dummy
;
NR_DL_FRAME_PARMS
*
frame_parms
=&
ue
->
frame_parms
;
NR_DL_FRAME_PARMS
*
frame_parms
=&
ue
->
frame_parms
;
char
phich_resource
[
6
];
int
ret
=-
1
;
int
ret
=-
1
;
#ifdef DEBUG_INITIAL_SYNCH
#ifdef DEBUG_INITIAL_SYNCH
...
@@ -98,23 +94,15 @@ int nr_pbch_detection(PHY_VARS_NR_UE *ue, runmode_t mode)
...
@@ -98,23 +94,15 @@ int nr_pbch_detection(PHY_VARS_NR_UE *ue, runmode_t mode)
frame_parms
->
nb_prefix_samples0
=
nb_prefix_samples0
;
frame_parms
->
nb_prefix_samples0
=
nb_prefix_samples0
;
pbch_decoded
=
0
;
printf
(
"pbch_detection nid_cell %d
\n
"
,
frame_parms
->
Nid_cell
);
printf
(
"pbch_detection nid_cell %d
\n
"
,
frame_parms
->
Nid_cell
);
//for (frame_mod4=0; frame_mod4<4; frame_mod4++) {
ret
=
nr_rx_pbch
(
ue
,
ret
=
nr_rx_pbch
(
ue
,
&
ue
->
proc
.
proc_rxtx
[
0
],
&
ue
->
proc
.
proc_rxtx
[
0
],
ue
->
pbch_vars
[
0
],
ue
->
pbch_vars
[
0
],
frame_parms
,
frame_parms
,
0
,
0
,
SISO
,
SISO
,
ue
->
high_speed_flag
,
ue
->
high_speed_flag
);
frame_mod4
);
pbch_decoded
=
0
;
//to be updated
// break;
//}
if
(
ret
==
0
)
{
if
(
ret
==
0
)
{
...
@@ -176,7 +164,6 @@ int nr_initial_sync(PHY_VARS_NR_UE *ue, runmode_t mode)
...
@@ -176,7 +164,6 @@ int nr_initial_sync(PHY_VARS_NR_UE *ue, runmode_t mode)
// First try FDD normal prefix
// First try FDD normal prefix
frame_parms
->
Ncp
=
NORMAL
;
frame_parms
->
Ncp
=
NORMAL
;
frame_parms
->
frame_type
=
TDD
;
frame_parms
->
frame_type
=
TDD
;
set_default_frame_parms_single
(
config
,
frame_parms
);
nr_init_frame_parms_ue
(
frame_parms
);
nr_init_frame_parms_ue
(
frame_parms
);
printf
(
"nr_initial sync ue RB_DL %d
\n
"
,
ue
->
frame_parms
.
N_RB_DL
);
printf
(
"nr_initial sync ue RB_DL %d
\n
"
,
ue
->
frame_parms
.
N_RB_DL
);
/*
/*
...
@@ -198,7 +185,7 @@ int nr_initial_sync(PHY_VARS_NR_UE *ue, runmode_t mode)
...
@@ -198,7 +185,7 @@ int nr_initial_sync(PHY_VARS_NR_UE *ue, runmode_t mode)
*/
*/
cnt
++
;
cnt
++
;
if
(
cnt
>
100
){
if
(
cnt
>
100
){
cnt
=
0
;
cnt
=
0
;
/* process pss search on received buffer */
/* process pss search on received buffer */
sync_pos
=
pss_synchro_nr
(
ue
,
NO_RATE_CHANGE
);
sync_pos
=
pss_synchro_nr
(
ue
,
NO_RATE_CHANGE
);
...
@@ -233,8 +220,7 @@ int nr_initial_sync(PHY_VARS_NR_UE *ue, runmode_t mode)
...
@@ -233,8 +220,7 @@ int nr_initial_sync(PHY_VARS_NR_UE *ue, runmode_t mode)
rx_sss_nr
(
ue
,
&
metric_fdd_ncp
,
&
phase_fdd_ncp
);
rx_sss_nr
(
ue
,
&
metric_fdd_ncp
,
&
phase_fdd_ncp
);
//set_default_frame_parms_single(config,&ue->frame_parms);
nr_init_frame_parms_ue
(
&
ue
->
frame_parms
);
nr_init_frame_parms_ue
(
config
,
&
ue
->
frame_parms
);
nr_gold_pbch
(
ue
);
nr_gold_pbch
(
ue
);
ret
=
nr_pbch_detection
(
ue
,
mode
);
ret
=
nr_pbch_detection
(
ue
,
mode
);
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
View file @
136ca508
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
#include "PHY/phy_extern_nr_ue.h"
#include "PHY/phy_extern_nr_ue.h"
#include "PHY/sse_intrin.h"
#include "PHY/sse_intrin.h"
#include "SIMULATION/TOOLS/sim.h"
#include "SIMULATION/TOOLS/sim.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
//#define DEBUG_PBCH 1
//#define DEBUG_PBCH 1
//#define DEBUG_PBCH_ENCODING
//#define DEBUG_PBCH_ENCODING
...
@@ -508,8 +509,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
...
@@ -508,8 +509,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
NR_DL_FRAME_PARMS
*
frame_parms
,
NR_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
eNB_id
,
uint8_t
eNB_id
,
MIMO_mode_t
mimo_mode
,
MIMO_mode_t
mimo_mode
,
uint32_t
high_speed_flag
,
uint32_t
high_speed_flag
)
uint8_t
frame_mod4
)
{
{
NR_UE_COMMON
*
nr_ue_common_vars
=
&
ue
->
common_vars
;
NR_UE_COMMON
*
nr_ue_common_vars
=
&
ue
->
common_vars
;
...
@@ -535,13 +535,13 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
...
@@ -535,13 +535,13 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
unsigned
short
idx_demod
=
0
;
unsigned
short
idx_demod
=
0
;
int8_t
decoderState
=
0
;
int8_t
decoderState
=
0
;
uint8_t
decoderListSize
=
8
,
pathMetricAppr
=
0
;
uint8_t
decoderListSize
=
8
,
pathMetricAppr
=
0
;
double
aPrioriArray
[
frame_parms
->
pbch_polar_params
.
payloadBits
];
// assume no a priori knowledge available about the payload.
//
double aPrioriArray[frame_parms->pbch_polar_params.payloadBits]; // assume no a priori knowledge available about the payload.
memset
(
&
pbch_a
[
0
],
0
,
sizeof
(
uint8_t
)
*
NR_POLAR_PBCH_PAYLOAD_BITS
);
memset
(
&
pbch_a
[
0
],
0
,
sizeof
(
uint8_t
)
*
NR_POLAR_PBCH_PAYLOAD_BITS
);
//printf("nr_pbch_ue nid_cell %d\n",frame_parms->Nid_cell);
//printf("nr_pbch_ue nid_cell %d\n",frame_parms->Nid_cell);
for
(
int
i
=
0
;
i
<
frame_parms
->
pbch_polar_params
.
payloadBits
;
i
++
)
aPrioriArray
[
i
]
=
NAN
;
//
for (int i=0; i<frame_parms->pbch_polar_params.payloadBits; i++) aPrioriArray[i] = NAN;
int
subframe_rx
=
proc
->
subframe_rx
;
int
subframe_rx
=
proc
->
subframe_rx
;
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h
View file @
136ca508
...
@@ -1072,13 +1072,13 @@ int rx_sss(PHY_VARS_NR_UE *phy_vars_ue,int32_t *tot_metric,uint8_t *flip_max,uin
...
@@ -1072,13 +1072,13 @@ int rx_sss(PHY_VARS_NR_UE *phy_vars_ue,int32_t *tot_metric,uint8_t *flip_max,uin
/*! \brief receiver for the PBCH
/*! \brief receiver for the PBCH
\returns number of tx antennas or -1 if error
\returns number of tx antennas or -1 if error
*/
*/
uint16_t
rx_pbch
(
NR_UE_COMMON
*
lte_ue_common_vars
,
int
nr_rx_pbch
(
PHY_VARS_NR_UE
*
ue
,
NR_UE_PBCH
*
lte_ue_pbch_vars
,
UE_nr_rxtx_proc_t
*
proc
,
NR_DL_FRAME_PARMS
*
frame_parm
s
,
NR_UE_PBCH
*
nr_ue_pbch_var
s
,
uint8_t
eNB_id
,
NR_DL_FRAME_PARMS
*
frame_parms
,
MIMO_mode_t
mimo_mode
,
uint8_t
eNB_id
,
uint32_t
high_speed_flag
,
MIMO_mode_t
mimo_mode
,
uint8_t
frame_mod4
);
uint32_t
high_speed_flag
);
uint16_t
rx_pbch_emul
(
PHY_VARS_NR_UE
*
phy_vars_ue
,
uint16_t
rx_pbch_emul
(
PHY_VARS_NR_UE
*
phy_vars_ue
,
uint8_t
eNB_id
,
uint8_t
eNB_id
,
...
...
targets/RT/USER/nr-ue.c
View file @
136ca508
...
@@ -283,9 +283,10 @@ void init_UE(int nb_inst)
...
@@ -283,9 +283,10 @@ void init_UE(int nb_inst)
NR_UE_MAC_INST_t
*
mac_inst
;
NR_UE_MAC_INST_t
*
mac_inst
;
for
(
inst
=
0
;
inst
<
nb_inst
;
inst
++
)
{
for
(
inst
=
0
;
inst
<
nb_inst
;
inst
++
)
{
// UE->rfdevice.type = NONE_DEV;
// UE->rfdevice.type = NONE_DEV;
PHY_VARS_NR_UE
*
UE
=
PHY_vars_UE_g
[
inst
][
0
];
//
PHY_VARS_NR_UE *UE = PHY_vars_UE_g[inst][0];
LOG_I
(
PHY
,
"Initializing memory for UE instance %d (%p)
\n
"
,
inst
,
PHY_vars_UE_g
[
inst
]);
LOG_I
(
PHY
,
"Initializing memory for UE instance %d (%p)
\n
"
,
inst
,
PHY_vars_UE_g
[
inst
]);
PHY_vars_UE_g
[
inst
][
0
]
=
init_nr_ue_vars
(
NULL
,
inst
,
0
);
PHY_vars_UE_g
[
inst
][
0
]
=
init_nr_ue_vars
(
NULL
,
inst
,
0
);
PHY_VARS_NR_UE
*
UE
=
PHY_vars_UE_g
[
inst
][
0
];
AssertFatal
((
UE
->
if_inst
=
nr_ue_if_module_init
(
inst
))
!=
NULL
,
"can not initial IF module
\n
"
);
AssertFatal
((
UE
->
if_inst
=
nr_ue_if_module_init
(
inst
))
!=
NULL
,
"can not initial IF module
\n
"
);
nr_l3_init_ue
();
nr_l3_init_ue
();
...
@@ -295,6 +296,11 @@ void init_UE(int nb_inst)
...
@@ -295,6 +296,11 @@ void init_UE(int nb_inst)
mac_inst
->
if_module
=
UE
->
if_inst
;
mac_inst
->
if_module
=
UE
->
if_inst
;
UE
->
if_inst
->
scheduled_response
=
nr_ue_scheduled_response
;
UE
->
if_inst
->
scheduled_response
=
nr_ue_scheduled_response
;
UE
->
if_inst
->
phy_config_request
=
nr_ue_phy_config_request
;
UE
->
if_inst
->
phy_config_request
=
nr_ue_phy_config_request
;
LOG_I
(
PHY
,
"Intializing UE Threads for instance %d (%p,%p)...
\n
"
,
inst
,
PHY_vars_UE_g
[
inst
],
PHY_vars_UE_g
[
inst
][
0
]);
//init_UE_threads(inst);
//UE = PHY_vars_UE_g[inst][0];
AssertFatal
(
0
==
pthread_create
(
&
UE
->
proc
.
pthread_ue
,
AssertFatal
(
0
==
pthread_create
(
&
UE
->
proc
.
pthread_ue
,
&
UE
->
proc
.
attr_ue
,
&
UE
->
proc
.
attr_ue
,
...
...
targets/RT/USER/nr-uesoftmodem.c
View file @
136ca508
This diff is collapsed.
Click to expand it.
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