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
alex037yang
OpenXG-RAN
Commits
818c9b2c
Commit
818c9b2c
authored
Mar 25, 2021
by
Laurent THOMAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first pass
parent
b28ac6d9
Changes
21
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
243 additions
and
504 deletions
+243
-504
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+6
-3
executables/ocp-gnb.c
executables/ocp-gnb.c
+1
-1
openair1/PHY/CODING/3gpplte_turbo_decoder_sse_8bit.c
openair1/PHY/CODING/3gpplte_turbo_decoder_sse_8bit.c
+17
-18
openair1/PHY/LTE_ESTIMATION/lte_sync_time.c
openair1/PHY/LTE_ESTIMATION/lte_sync_time.c
+182
-431
openair1/PHY/LTE_REFSIG/primary_synch.h
openair1/PHY/LTE_REFSIG/primary_synch.h
+0
-1
openair1/PHY/TOOLS/lte_phy_scope.c
openair1/PHY/TOOLS/lte_phy_scope.c
+4
-5
openair1/PHY/TOOLS/tools_defs.h
openair1/PHY/TOOLS/tools_defs.h
+5
-0
openair1/PHY/phy_extern.h
openair1/PHY/phy_extern.h
+0
-6
openair1/PHY/phy_extern_nr_ue.h
openair1/PHY/phy_extern_nr_ue.h
+0
-3
openair1/PHY/phy_extern_ue.h
openair1/PHY/phy_extern_ue.h
+0
-6
openair1/PHY/phy_vars.h
openair1/PHY/phy_vars.h
+0
-3
openair1/PHY/phy_vars_ue.h
openair1/PHY/phy_vars_ue.h
+0
-3
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+4
-4
openair2/LAYER2/MAC/config.c
openair2/LAYER2/MAC/config.c
+5
-3
openair2/LAYER2/MAC/eNB_scheduler_mch.c
openair2/LAYER2/MAC/eNB_scheduler_mch.c
+1
-1
openair2/LAYER2/MAC/mac_extern.h
openair2/LAYER2/MAC/mac_extern.h
+1
-0
openair2/LAYER2/MAC/ue_procedures.c
openair2/LAYER2/MAC/ue_procedures.c
+1
-1
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
+11
-12
openair2/RRC/LTE/plmn_data.h
openair2/RRC/LTE/plmn_data.h
+2
-1
targets/RT/USER/lte-softmodem.c
targets/RT/USER/lte-softmodem.c
+2
-0
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+1
-2
No files found.
cmake_targets/CMakeLists.txt
View file @
818c9b2c
...
@@ -45,6 +45,8 @@ include_directories(${CONFIG_INCLUDE_DIRS})
...
@@ -45,6 +45,8 @@ include_directories(${CONFIG_INCLUDE_DIRS})
pkg_search_module
(
CRYPTO libcrypto REQUIRED
)
pkg_search_module
(
CRYPTO libcrypto REQUIRED
)
include_directories
(
${
CRYPTO_INCLUDE_DIRS
}
)
include_directories
(
${
CRYPTO_INCLUDE_DIRS
}
)
#uhd 4.0 and iris installs by default in /usr/local
include_directories
(
"/usr/local/include/"
)
#use native cmake method as this package is not in pkg-config
#use native cmake method as this package is not in pkg-config
if
(
${
RF_BOARD
}
STREQUAL
"OAI_USRP"
)
if
(
${
RF_BOARD
}
STREQUAL
"OAI_USRP"
)
find_package
(
Boost REQUIRED
)
find_package
(
Boost REQUIRED
)
...
@@ -52,7 +54,7 @@ if (${RF_BOARD} STREQUAL "OAI_USRP")
...
@@ -52,7 +54,7 @@ if (${RF_BOARD} STREQUAL "OAI_USRP")
elseif
(
${
RF_BOARD
}
STREQUAL
"OAI_IRIS"
)
elseif
(
${
RF_BOARD
}
STREQUAL
"OAI_IRIS"
)
include_directories
(
"
${
OPENAIR_TARGETS
}
/ARCH/IRIS/USERSPACE/LIB/"
)
include_directories
(
"
${
OPENAIR_TARGETS
}
/ARCH/IRIS/USERSPACE/LIB/"
)
include_directories
(
"/usr/local/include/"
)
set
(
HW_SOURCE
${
HW_SOURCE
}
set
(
HW_SOURCE
${
HW_SOURCE
}
${
OPENAIR_TARGETS
}
/ARCH/IRIS/USERSPACE/LIB/iris_lib.cpp
)
${
OPENAIR_TARGETS
}
/ARCH/IRIS/USERSPACE/LIB/iris_lib.cpp
)
LINK_DIRECTORIES
(
"/usr/local/lib"
)
LINK_DIRECTORIES
(
"/usr/local/lib"
)
...
@@ -336,11 +338,11 @@ endif ()
...
@@ -336,11 +338,11 @@ endif ()
add_definitions
(
"-DASN_DISABLE_OER_SUPPORT"
)
add_definitions
(
"-DASN_DISABLE_OER_SUPPORT"
)
#########################
#########################
set
(
CMAKE_EXE_LINKER_FLAGS
"
${
CMAKE_EXE_LINKER_FLAGS
}
-Wl,-rpath -Wl,
${
CMAKE_CURRENT_BINARY_DIR
}
"
)
set
(
CMAKE_EXE_LINKER_FLAGS
"
${
CMAKE_EXE_LINKER_FLAGS
}
-
-sanitize=address -
Wl,-rpath -Wl,
${
CMAKE_CURRENT_BINARY_DIR
}
"
)
#########################
#########################
# set a flag for changes in the source code
# set a flag for changes in the source code
# these changes are related to hardcoded path to include .h files
# these changes are related to hardcoded path to include .h files
set
(
CMAKE_C_FLAGS_DEBUG
"
${
CMAKE_C_FLAGS
}
-g3 -O0 -DMALLOC_CHECK_=3"
)
set
(
CMAKE_C_FLAGS_DEBUG
"
${
CMAKE_C_FLAGS
}
-g3 -O0 -
-sanitize=address -
DMALLOC_CHECK_=3"
)
set
(
CMAKE_C_FLAGS_RELWITHDEBINFO
"
${
CMAKE_C_FLAGS
}
-g3 -DMALLOC_CHECK_=3 -O2 -fno-delete-null-pointer-checks"
)
set
(
CMAKE_C_FLAGS_RELWITHDEBINFO
"
${
CMAKE_C_FLAGS
}
-g3 -DMALLOC_CHECK_=3 -O2 -fno-delete-null-pointer-checks"
)
set
(
CMAKE_C_FLAGS_RELEASE
"
${
CMAKE_C_FLAGS
}
-O3"
)
set
(
CMAKE_C_FLAGS_RELEASE
"
${
CMAKE_C_FLAGS
}
-O3"
)
...
@@ -3088,6 +3090,7 @@ add_executable(ocp-gnb
...
@@ -3088,6 +3090,7 @@ add_executable(ocp-gnb
${
OPENAIR_DIR
}
/common/utils/nr/nr_common.c
${
OPENAIR_DIR
}
/common/utils/nr/nr_common.c
${
OPENAIR_DIR
}
/common/utils/utils.c
${
OPENAIR_DIR
}
/common/utils/utils.c
${
OPENAIR_DIR
}
/common/utils/system.c
${
OPENAIR_DIR
}
/common/utils/system.c
${
OPENAIR3_DIR
}
/GTPV1-U/gtpv1u_gNB.c
${
GTPU_need_ITTI
}
${
GTPU_need_ITTI
}
${
XFORMS_SOURCE_NR
}
${
XFORMS_SOURCE_NR
}
${
T_SOURCE
}
${
T_SOURCE
}
...
...
executables/ocp-gnb.c
View file @
818c9b2c
...
@@ -77,7 +77,6 @@ int config_sync_var=-1;
...
@@ -77,7 +77,6 @@ int config_sync_var=-1;
pthread_mutex_t
nfapi_sync_mutex
;
pthread_mutex_t
nfapi_sync_mutex
;
pthread_cond_t
nfapi_sync_cond
;
pthread_cond_t
nfapi_sync_cond
;
int
nfapi_sync_var
=-
1
;
int
nfapi_sync_var
=-
1
;
uint8_t
nfapi_mode
=
NFAPI_MONOLITHIC
;
// Default to monolithic mode
double
cpuf
;
double
cpuf
;
...
@@ -95,6 +94,7 @@ time_stats_t nfapi_meas; // total tx time
...
@@ -95,6 +94,7 @@ time_stats_t nfapi_meas; // total tx time
time_stats_t
softmodem_stats_rx_sf
;
// total rx time
time_stats_t
softmodem_stats_rx_sf
;
// total rx time
// not used but needed for link
// not used but needed for link
openair0_config_t
openair0_cfg
[
MAX_CARDS
];
openair0_config_t
openair0_cfg
[
MAX_CARDS
];
uint16_t
slot_ahead
=
6
;
AGENT_RRC_xface
*
agent_rrc_xface
[
NUM_MAX_ENB
];
AGENT_RRC_xface
*
agent_rrc_xface
[
NUM_MAX_ENB
];
AGENT_MAC_xface
*
agent_mac_xface
[
NUM_MAX_ENB
];
AGENT_MAC_xface
*
agent_mac_xface
[
NUM_MAX_ENB
];
...
...
openair1/PHY/CODING/3gpplte_turbo_decoder_sse_8bit.c
View file @
818c9b2c
...
@@ -798,11 +798,11 @@ uint8_t phy_threegpplte_turbo_decoder8(int16_t *y,
...
@@ -798,11 +798,11 @@ uint8_t phy_threegpplte_turbo_decoder8(int16_t *y,
n is the size in bits of the coded block, with the tail */
n is the size in bits of the coded block, with the tail */
int
n2
;
int
n2
;
llr_t
y8
[
3
*
(
n
+
16
)]
__attribute__
((
aligned
(
16
)));
llr_t
y8
[
3
*
(
n
+
16
)]
__attribute__
((
aligned
(
16
)));
llr_t
systematic0
[
n
+
16
]
__attribute__
((
aligned
(
16
)));
llr_t
systematic0
[
n
+
32
]
__attribute__
((
aligned
(
16
)));
llr_t
systematic1
[
n
+
16
]
__attribute__
((
aligned
(
16
)));
llr_t
systematic1
[
n
+
32
]
__attribute__
((
aligned
(
16
)));
llr_t
systematic2
[
n
+
16
]
__attribute__
((
aligned
(
16
)));
llr_t
systematic2
[
n
+
32
]
__attribute__
((
aligned
(
16
)));
llr_t
yparity1
[
n
+
16
]
__attribute__
((
aligned
(
16
)));
llr_t
yparity1
[
n
+
32
]
__attribute__
((
aligned
(
16
)));
llr_t
yparity2
[
n
+
16
]
__attribute__
((
aligned
(
16
)));
llr_t
yparity2
[
n
+
32
]
__attribute__
((
aligned
(
16
)));
llr_t
ext
[
n
+
128
]
__attribute__
((
aligned
(
16
)));
llr_t
ext
[
n
+
128
]
__attribute__
((
aligned
(
16
)));
llr_t
ext2
[
n
+
128
]
__attribute__
((
aligned
(
16
)));
llr_t
ext2
[
n
+
128
]
__attribute__
((
aligned
(
16
)));
llr_t
alpha
[(
n
+
16
)
*
8
]
__attribute__
((
aligned
(
16
)));
llr_t
alpha
[(
n
+
16
)
*
8
]
__attribute__
((
aligned
(
16
)));
...
@@ -811,7 +811,7 @@ uint8_t phy_threegpplte_turbo_decoder8(int16_t *y,
...
@@ -811,7 +811,7 @@ uint8_t phy_threegpplte_turbo_decoder8(int16_t *y,
llr_t
m10
[
n
+
16
]
__attribute__
((
aligned
(
16
)));
llr_t
m10
[
n
+
16
]
__attribute__
((
aligned
(
16
)));
// int *pi2_p,*pi4_p,*pi5_p,*pi6_p;
// int *pi2_p,*pi4_p,*pi5_p,*pi6_p;
int
*
pi4_p
,
*
pi5_p
,
*
pi6_p
;
int
*
pi4_p
,
*
pi5_p
,
*
pi6_p
;
llr_t
*
s
,
*
s
1
,
*
s2
,
*
yp1
,
*
yp2
,
*
yp
;
llr_t
*
s1
,
*
s2
,
*
yp1
,
*
yp2
,
*
yp
;
unsigned
int
i
,
j
,
iind
;
//,pi;
unsigned
int
i
,
j
,
iind
;
//,pi;
unsigned
char
iteration_cnt
=
0
;
unsigned
char
iteration_cnt
=
0
;
unsigned
int
crc
,
oldcrc
,
crc_len
;
unsigned
int
crc
,
oldcrc
,
crc_len
;
...
@@ -927,7 +927,6 @@ uint8_t phy_threegpplte_turbo_decoder8(int16_t *y,
...
@@ -927,7 +927,6 @@ uint8_t phy_threegpplte_turbo_decoder8(int16_t *y,
yp128
=
(
int8x16_t
*
)
y8
;
yp128
=
(
int8x16_t
*
)
y8
;
#endif
#endif
s
=
systematic0
;
s1
=
systematic1
;
s1
=
systematic1
;
s2
=
systematic2
;
s2
=
systematic2
;
yp1
=
yparity1
;
yp1
=
yparity1
;
...
@@ -938,7 +937,7 @@ uint8_t phy_threegpplte_turbo_decoder8(int16_t *y,
...
@@ -938,7 +937,7 @@ uint8_t phy_threegpplte_turbo_decoder8(int16_t *y,
for
(
i
=
0
;
i
<
16
;
i
++
)
for
(
i
=
0
;
i
<
16
;
i
++
)
for
(
j
=
0
;
j
<
n2
;
j
+=
16
)
{
for
(
j
=
0
;
j
<
n2
;
j
+=
16
)
{
int
k
=
i
+
j
;
int
k
=
i
+
j
;
s
[
k
]
=*
yp
++
;
s
ystematic0
[
k
]
=*
yp
++
;
yp1
[
k
]
=*
yp
++
;
yp1
[
k
]
=*
yp
++
;
yp2
[
k
]
=*
yp
++
;
yp2
[
k
]
=*
yp
++
;
}
}
...
@@ -948,8 +947,8 @@ uint8_t phy_threegpplte_turbo_decoder8(int16_t *y,
...
@@ -948,8 +947,8 @@ uint8_t phy_threegpplte_turbo_decoder8(int16_t *y,
if
(
n2
>
n
)
{
if
(
n2
>
n
)
{
/*
/*
s
[n]=0;s[n+1]=0;s[n+2]=0;s
[n+3]=0;
s
ystematic0[n]=0;systematic0[n+1]=0;systematic0[n+2]=0;systematic0
[n+3]=0;
s[n+4]=0;s[n+5]=0;s[n+6]=0;s[n+7]=0;
s
ystematic0
[n+4]=0;s[n+5]=0;s[n+6]=0;s[n+7]=0;
s1[n]=0;s1[n+1]=0;s1[n+2]=0;s1[n+3]=0;
s1[n]=0;s1[n+1]=0;s1[n+2]=0;s1[n+3]=0;
s1[n+4]=0;s1[n+5]=0;s1[n+6]=0;s1[n+7]=0;
s1[n+4]=0;s1[n+5]=0;s1[n+6]=0;s1[n+7]=0;
s2[n]=0;s2[n+1]=0;s2[n+2]=0;s2[n+3]=0;
s2[n]=0;s2[n+1]=0;s2[n+2]=0;s2[n+3]=0;
...
@@ -961,26 +960,26 @@ uint8_t phy_threegpplte_turbo_decoder8(int16_t *y,
...
@@ -961,26 +960,26 @@ uint8_t phy_threegpplte_turbo_decoder8(int16_t *y,
// Termination
// Termination
for
(
i
=
n2
;
i
<
n2
+
3
;
i
++
)
{
for
(
i
=
n2
;
i
<
n2
+
3
;
i
++
)
{
s
[
i
]
=
*
yp
;
s
ystematic0
[
i
]
=
*
yp
;
s1
[
i
]
=
s
[
i
]
;
s1
[
i
]
=
s
ystematic0
[
i
]
;
s2
[
i
]
=
s
[
i
];
s2
[
i
]
=
s
ystematic0
[
i
];
yp
++
;
yp
++
;
yp1
[
i
]
=
*
yp
;
yp1
[
i
]
=
*
yp
;
yp
++
;
yp
++
;
#ifdef DEBUG_LOGMAP
#ifdef DEBUG_LOGMAP
printf
(
"Term 1 (%u): %d %d
\n
"
,
i
,
s
[
i
],
yp1
[
i
]);
printf
(
"Term 1 (%u): %d %d
\n
"
,
i
,
s
ystematic0
[
i
],
yp1
[
i
]);
#endif //DEBUG_LOGMAP
#endif //DEBUG_LOGMAP
}
}
for
(
i
=
n2
+
16
;
i
<
n2
+
19
;
i
++
)
{
for
(
i
=
n2
+
16
;
i
<
n2
+
19
;
i
++
)
{
s
[
i
]
=
*
yp
;
s
ystematic0
[
i
]
=
*
yp
;
s1
[
i
]
=
s
[
i
]
;
s1
[
i
]
=
s
ystematic0
[
i
]
;
s2
[
i
]
=
s
[
i
];
s2
[
i
]
=
s
ystematic0
[
i
];
yp
++
;
yp
++
;
yp2
[
i
-
16
]
=
*
yp
;
yp2
[
i
-
16
]
=
*
yp
;
yp
++
;
yp
++
;
#ifdef DEBUG_LOGMAP
#ifdef DEBUG_LOGMAP
printf
(
"Term 2 (%u): %d %d
\n
"
,
i
-
16
,
s
[
i
],
yp2
[
i
-
16
]);
printf
(
"Term 2 (%u): %d %d
\n
"
,
i
-
16
,
s
ystematic0
[
i
],
yp2
[
i
-
16
]);
#endif //DEBUG_LOGMAP
#endif //DEBUG_LOGMAP
}
}
...
...
openair1/PHY/LTE_ESTIMATION/lte_sync_time.c
View file @
818c9b2c
...
@@ -37,266 +37,82 @@
...
@@ -37,266 +37,82 @@
// Note: this is for prototype of generate_drs_pusch (OTA synchronization of RRUs)
// Note: this is for prototype of generate_drs_pusch (OTA synchronization of RRUs)
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
int
*
sync_corr_ue0
=
NULL
;
static
struct
complex16
*
primary_synch0_time
__attribute__
((
aligned
(
32
)));
int
*
sync_corr_ue1
=
NULL
;
static
struct
complex16
*
primary_synch1_time
__attribute__
((
aligned
(
32
)));
int
*
sync_corr_ue2
=
NULL
;
static
struct
complex16
*
primary_synch2_time
__attribute__
((
aligned
(
32
)));
int
sync_tmp
[
2048
*
4
]
__attribute__
((
aligned
(
32
)));
short
syncF_tmp
[
2048
*
2
]
__attribute__
((
aligned
(
32
)));
int
lte_sync_time_init
(
LTE_DL_FRAME_PARMS
*
frame_parms
)
// LTE_UE_COMMON *common_vars
{
int
i
,
k
;
sync_corr_ue0
=
(
int
*
)
malloc16
(
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
*
sizeof
(
int
)
*
frame_parms
->
samples_per_tti
);
sync_corr_ue1
=
(
int
*
)
malloc16
(
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
*
sizeof
(
int
)
*
frame_parms
->
samples_per_tti
);
sync_corr_ue2
=
(
int
*
)
malloc16
(
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
*
sizeof
(
int
)
*
frame_parms
->
samples_per_tti
);
if
(
sync_corr_ue0
)
{
#ifdef DEBUG_PHY
LOG_D
(
PHY
,
"[openair][LTE_PHY][SYNC] sync_corr_ue allocated at %p
\n
"
,
sync_corr_ue0
);
#endif
//common_vars->sync_corr = sync_corr;
}
else
{
LOG_E
(
PHY
,
"[openair][LTE_PHY][SYNC] sync_corr_ue0 not allocated
\n
"
);
return
(
-
1
);
}
if
(
sync_corr_ue1
)
{
#ifdef DEBUG_PHY
LOG_D
(
PHY
,
"[openair][LTE_PHY][SYNC] sync_corr_ue allocated at %p
\n
"
,
sync_corr_ue1
);
#endif
//common_vars->sync_corr = sync_corr;
}
else
{
LOG_E
(
PHY
,
"[openair][LTE_PHY][SYNC] sync_corr_ue1 not allocated
\n
"
);
return
(
-
1
);
}
if
(
sync_corr_ue2
)
{
#ifdef DEBUG_PHY
LOG_D
(
PHY
,
"[openair][LTE_PHY][SYNC] sync_corr_ue allocated at %p
\n
"
,
sync_corr_ue2
);
#endif
//common_vars->sync_corr = sync_corr;
}
else
{
LOG_E
(
PHY
,
"[openair][LTE_PHY][SYNC] sync_corr_ue2 not allocated
\n
"
);
return
(
-
1
);
}
// primary_synch0_time = (int *)malloc16((frame_parms->ofdm_symbol_size+frame_parms->nb_prefix_samples)*sizeof(int));
primary_synch0_time
=
(
int16_t
*
)
malloc16
((
frame_parms
->
ofdm_symbol_size
)
*
sizeof
(
int16_t
)
*
2
);
if
(
primary_synch0_time
)
{
// bzero(primary_synch0_time,(frame_parms->ofdm_symbol_size+frame_parms->nb_prefix_samples)*sizeof(int));
bzero
(
primary_synch0_time
,(
frame_parms
->
ofdm_symbol_size
)
*
sizeof
(
int16_t
)
*
2
);
#ifdef DEBUG_PHY
LOG_D
(
PHY
,
"[openair][LTE_PHY][SYNC] primary_synch0_time allocated at %p
\n
"
,
primary_synch0_time
);
#endif
}
else
{
LOG_E
(
PHY
,
"[openair][LTE_PHY][SYNC] primary_synch0_time not allocated
\n
"
);
return
(
-
1
);
}
// primary_synch1_time = (int *)malloc16((frame_parms->ofdm_symbol_size+frame_parms->nb_prefix_samples)*sizeof(int));
primary_synch1_time
=
(
int16_t
*
)
malloc16
((
frame_parms
->
ofdm_symbol_size
)
*
sizeof
(
int16_t
)
*
2
);
if
(
primary_synch1_time
)
{
// bzero(primary_synch1_time,(frame_parms->ofdm_symbol_size+frame_parms->nb_prefix_samples)*sizeof(int));
bzero
(
primary_synch1_time
,(
frame_parms
->
ofdm_symbol_size
)
*
sizeof
(
int16_t
)
*
2
);
#ifdef DEBUG_PHY
LOG_D
(
PHY
,
"[openair][LTE_PHY][SYNC] primary_synch1_time allocated at %p
\n
"
,
primary_synch1_time
);
#endif
}
else
{
LOG_E
(
PHY
,
"[openair][LTE_PHY][SYNC] primary_synch1_time not allocated
\n
"
);
return
(
-
1
);
}
// primary_synch2_time = (int *)malloc16((frame_parms->ofdm_symbol_size+frame_parms->nb_prefix_samples)*sizeof(int));
primary_synch2_time
=
(
int16_t
*
)
malloc16
((
frame_parms
->
ofdm_symbol_size
)
*
sizeof
(
int16_t
)
*
2
);
if
(
primary_synch2_time
)
{
// bzero(primary_synch2_time,(frame_parms->ofdm_symbol_size+frame_parms->nb_prefix_samples)*sizeof(int));
bzero
(
primary_synch2_time
,(
frame_parms
->
ofdm_symbol_size
)
*
sizeof
(
int16_t
)
*
2
);
#ifdef DEBUG_PHY
LOG_D
(
PHY
,
"[openair][LTE_PHY][SYNC] primary_synch2_time allocated at %p
\n
"
,
primary_synch2_time
);
#endif
}
else
{
LOG_E
(
PHY
,
"[openair][LTE_PHY][SYNC] primary_synch2_time not allocated
\n
"
);
return
(
-
1
);
}
// generate oversampled sync_time sequences
static
void
doIdft
(
int
size
,
short
*
in
,
short
*
out
)
{
k
=
frame_parms
->
ofdm_symbol_size
-
36
;
switch
(
size
)
{
for
(
i
=
0
;
i
<
72
;
i
++
)
{
syncF_tmp
[
2
*
k
]
=
primary_synch0
[
2
*
i
]
>>
2
;
//we need to shift input to avoid overflow in fft
syncF_tmp
[
2
*
k
+
1
]
=
primary_synch0
[
2
*
i
+
1
]
>>
2
;
k
++
;
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
{
k
++
;
// skip DC carrier
k
-=
frame_parms
->
ofdm_symbol_size
;
}
}
switch
(
frame_parms
->
N_RB_DL
)
{
case
6
:
case
6
:
idft
(
IDFT_128
,(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_128
,
in
,
out
,
1
);
(
short
*
)
sync_tmp
,
/// complex output
1
);
break
;
break
;
case
25
:
idft
(
IDFT_512
,(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
1
);
break
;
case
50
:
idft
(
IDFT_1024
,(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
1
);
break
;
case
75
:
idft
(
IDFT_1536
,(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
1
);
/// complex output
break
;
case
100
:
idft
(
IDFT_2048
,(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
1
);
break
;
default:
LOG_E
(
PHY
,
"Unsupported N_RB_DL %d
\n
"
,
frame_parms
->
N_RB_DL
);
break
;
}
for
(
i
=
0
;
i
<
frame_parms
->
ofdm_symbol_size
;
i
++
)
((
int32_t
*
)
primary_synch0_time
)[
i
]
=
sync_tmp
[
i
];
k
=
frame_parms
->
ofdm_symbol_size
-
36
;
for
(
i
=
0
;
i
<
72
;
i
++
)
{
syncF_tmp
[
2
*
k
]
=
primary_synch1
[
2
*
i
]
>>
2
;
//we need to shift input to avoid overflow in fft
syncF_tmp
[
2
*
k
+
1
]
=
primary_synch1
[
2
*
i
+
1
]
>>
2
;
k
++
;
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
{
k
++
;
// skip DC carrier
k
-=
frame_parms
->
ofdm_symbol_size
;
}
}
switch
(
frame_parms
->
N_RB_DL
)
{
case
6
:
idft
(
IDFT_128
,(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
1
);
break
;
case
25
:
case
25
:
idft
(
IDFT_512
,(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_512
,
in
,
out
,
1
);
(
short
*
)
sync_tmp
,
/// complex output
1
);
break
;
break
;
case
50
:
case
50
:
idft
(
IDFT_1024
,(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_1024
,
in
,
out
,
1
);
(
short
*
)
sync_tmp
,
/// complex output
1
);
break
;
break
;
case
75
:
case
75
:
idft
(
IDFT_1536
,(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_1536
,
in
,
out
,
1
);
(
short
*
)
sync_tmp
,
/// complex output
1
);
break
;
break
;
case
100
:
case
100
:
idft
(
IDFT_2048
,(
short
*
)
syncF_tmp
,
/// complex input
idft
(
IDFT_2048
,
in
,
out
,
1
);
(
short
*
)
sync_tmp
,
/// complex output
1
);
break
;
break
;
default:
default:
LOG_E
(
PHY
,
"Unsupported N_RB_DL %d
\n
"
,
frame_parms
->
N_RB_DL
);
LOG_E
(
PHY
,
"Unsupported N_RB_DL %d
\n
"
,
size
);
abort
();
break
;
break
;
}
}
}
for
(
i
=
0
;
i
<
frame_parms
->
ofdm_symbol_size
;
i
++
)
static
void
copyPrimary
(
struct
complex16
*
out
,
struct
complex16
*
in
,
int
ofdmSize
)
{
((
int32_t
*
)
primary_synch1_time
)[
i
]
=
sync_tmp
[
i
];
int
k
=
ofdmSize
-
36
;
k
=
frame_parms
->
ofdm_symbol_size
-
36
;
for
(
i
=
0
;
i
<
72
;
i
++
)
{
for
(
i
nt
i
=
0
;
i
<
72
;
i
++
)
{
syncF_tmp
[
2
*
k
]
=
primary_synch2
[
2
*
i
]
>>
2
;
//we need to shift input to avoid overflow in fft
out
[
k
].
r
=
in
[
i
].
r
>>
2
;
//we need to shift input to avoid overflow in fft
syncF_tmp
[
2
*
k
+
1
]
=
primary_synch2
[
2
*
i
+
1
]
>>
2
;
out
[
k
].
i
=
in
[
i
].
i
>>
2
;
k
++
;
k
++
;
if
(
k
>=
frame_parms
->
ofdm_symbol_s
ize
)
{
if
(
k
>=
ofdmS
ize
)
{
k
++
;
// skip DC carrier
k
++
;
// skip DC carrier
k
-=
frame_parms
->
ofdm_symbol_s
ize
;
k
-=
ofdmS
ize
;
}
}
}
}
}
switch
(
frame_parms
->
N_RB_DL
)
{
int
lte_sync_time_init
(
LTE_DL_FRAME_PARMS
*
frame_parms
)
{
// LTE_UE_COMMON *common_vars
case
6
:
struct
complex16
syncF_tmp
[
2048
]
__attribute__
((
aligned
(
32
)))
=
{
0
};
idft
(
IDFT_128
,(
short
*
)
syncF_tmp
,
/// complex input
int
sz
=
frame_parms
->
ofdm_symbol_size
*
sizeof
(
*
primary_synch0_time
);
(
short
*
)
sync_tmp
,
/// complex output
AssertFatal
(
NULL
!=
(
primary_synch0_time
=
(
struct
complex16
*
)
malloc16
(
sz
)),
""
);
1
);
bzero
(
primary_synch0_time
,
sz
);
break
;
AssertFatal
(
NULL
!=
(
primary_synch1_time
=
(
struct
complex16
*
)
malloc16
(
sz
)),
""
);
case
25
:
bzero
(
primary_synch1_time
,
sz
);
idft
(
IDFT_512
,(
short
*
)
syncF_tmp
,
/// complex input
AssertFatal
(
NULL
!=
(
primary_synch2_time
=
(
struct
complex16
*
)
malloc16
(
sz
)),
""
);
(
short
*
)
sync_tmp
,
/// complex output
bzero
(
primary_synch2_time
,
sz
);
1
);
// generate oversampled sync_time sequences
break
;
copyPrimary
(
syncF_tmp
,
(
struct
complex16
*
)
primary_synch0
,
frame_parms
->
ofdm_symbol_size
);
case
50
:
doIdft
(
frame_parms
->
N_RB_DL
,
(
short
*
)
syncF_tmp
,(
short
*
)
primary_synch0_time
);
idft
(
IDFT_1024
,(
short
*
)
syncF_tmp
,
/// complex input
copyPrimary
(
syncF_tmp
,
(
struct
complex16
*
)
primary_synch1
,
frame_parms
->
ofdm_symbol_size
);
(
short
*
)
sync_tmp
,
/// complex output
doIdft
(
frame_parms
->
N_RB_DL
,
(
short
*
)
syncF_tmp
,(
short
*
)
primary_synch1_time
);
1
);
copyPrimary
(
syncF_tmp
,
(
struct
complex16
*
)
primary_synch2
,
frame_parms
->
ofdm_symbol_size
);
break
;
doIdft
(
frame_parms
->
N_RB_DL
,
(
short
*
)
syncF_tmp
,(
short
*
)
primary_synch2_time
);
case
75
:
if
(
LOG_DUMPFLAG
(
DEBUG_LTEESTIM
))
{
idft
(
IDFT_1536
,(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
1
);
break
;
case
100
:
idft
(
IDFT_2048
,(
short
*
)
syncF_tmp
,
/// complex input
(
short
*
)
sync_tmp
,
/// complex output
1
);
break
;
default:
LOG_E
(
PHY
,
"Unsupported N_RB_DL %d
\n
"
,
frame_parms
->
N_RB_DL
);
break
;
}
for
(
i
=
0
;
i
<
frame_parms
->
ofdm_symbol_size
;
i
++
)
((
int32_t
*
)
primary_synch2_time
)[
i
]
=
sync_tmp
[
i
];
if
(
LOG_DUMPFLAG
(
DEBUG_LTEESTIM
)){
LOG_M
(
"primary_sync0.m"
,
"psync0"
,
primary_synch0_time
,
frame_parms
->
ofdm_symbol_size
,
1
,
1
);
LOG_M
(
"primary_sync0.m"
,
"psync0"
,
primary_synch0_time
,
frame_parms
->
ofdm_symbol_size
,
1
,
1
);
LOG_M
(
"primary_sync1.m"
,
"psync1"
,
primary_synch1_time
,
frame_parms
->
ofdm_symbol_size
,
1
,
1
);
LOG_M
(
"primary_sync1.m"
,
"psync1"
,
primary_synch1_time
,
frame_parms
->
ofdm_symbol_size
,
1
,
1
);
LOG_M
(
"primary_sync2.m"
,
"psync2"
,
primary_synch2_time
,
frame_parms
->
ofdm_symbol_size
,
1
,
1
);
LOG_M
(
"primary_sync2.m"
,
"psync2"
,
primary_synch2_time
,
frame_parms
->
ofdm_symbol_size
,
1
,
1
);
}
}
return
(
1
);
return
(
1
);
}
}
void
lte_sync_time_free
(
void
)
void
lte_sync_time_free
(
void
)
{
{
if
(
sync_corr_ue0
)
{
LOG_D
(
PHY
,
"Freeing sync_corr_ue (%p)...
\n
"
,
sync_corr_ue0
);
free
(
sync_corr_ue0
);
}
if
(
sync_corr_ue1
)
{
LOG_D
(
PHY
,
"Freeing sync_corr_ue (%p)...
\n
"
,
sync_corr_ue1
);
free
(
sync_corr_ue1
);
}
if
(
sync_corr_ue2
)
{
LOG_D
(
PHY
,
"Freeing sync_corr_ue (%p)...
\n
"
,
sync_corr_ue2
);
free
(
sync_corr_ue2
);
}
if
(
primary_synch0_time
)
{
if
(
primary_synch0_time
)
{
LOG_D
(
PHY
,
"Freeing primary_sync0_time ...
\n
"
);
LOG_D
(
PHY
,
"Freeing primary_sync0_time ...
\n
"
);
free
(
primary_synch0_time
);
free
(
primary_synch0_time
);
...
@@ -312,126 +128,81 @@ void lte_sync_time_free(void)
...
@@ -312,126 +128,81 @@ void lte_sync_time_free(void)
free
(
primary_synch2_time
);
free
(
primary_synch2_time
);
}
}
sync_corr_ue0
=
NULL
;
sync_corr_ue1
=
NULL
;
sync_corr_ue2
=
NULL
;
primary_synch0_time
=
NULL
;
primary_synch0_time
=
NULL
;
primary_synch1_time
=
NULL
;
primary_synch1_time
=
NULL
;
primary_synch2_time
=
NULL
;
primary_synch2_time
=
NULL
;
}
}
static
inline
int
abs32
(
int
x
)
static
inline
int
abs32
(
int
x
)
{
{
return
(((
int
)((
short
*
)
&
x
)[
0
])
*
((
int
)((
short
*
)
&
x
)[
0
])
+
((
int
)((
short
*
)
&
x
)[
1
])
*
((
int
)((
short
*
)
&
x
)[
1
]));
return
(((
int
)((
short
*
)
&
x
)[
0
])
*
((
int
)((
short
*
)
&
x
)[
0
])
+
((
int
)((
short
*
)
&
x
)[
1
])
*
((
int
)((
short
*
)
&
x
)[
1
]));
}
}
static
inline
double
absF
(
struct
complexd
x
)
{
return
x
.
r
*
x
.
r
+
x
.
i
*
x
.
i
;
}
#define complexNull(c) bzero((void*) &(c), sizeof(c))
#define SHIFT 17
#define SHIFT 17
int
lte_sync_time
(
int
**
rxdata
,
///rx data in time domain
int
lte_sync_time
(
int
**
rxdata
,
///rx data in time domain
LTE_DL_FRAME_PARMS
*
frame_parms
,
LTE_DL_FRAME_PARMS
*
frame_parms
,
int
*
eNB_id
)
int
*
eNB_id
)
{
{
// perform a time domain correlation using the oversampled sync sequence
// perform a time domain correlation using the oversampled sync sequence
unsigned
int
n
,
ar
,
s
,
peak_pos
,
peak_val
,
sync_source
;
unsigned
int
n
,
ar
,
s
,
peak_pos
,
peak_val
,
sync_source
;
int
result
,
result2
;
int
result
,
result2
;
int
sync_out
[
3
]
=
{
0
,
0
,
0
},
sync_out2
[
3
]
=
{
0
,
0
,
0
};
struct
complexd
sync_out
[
3
]
=
{
0
},
sync_out2
[
3
]
=
{
0
};
int
tmp
[
3
]
=
{
0
,
0
,
0
};
int
length
=
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
*
frame_parms
->
samples_per_tti
>>
1
;
int
length
=
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
*
frame_parms
->
samples_per_tti
>>
1
;
//LOG_D(PHY,"[SYNC TIME] Calling sync_time.\n");
AssertFatal
(
sync_corr_ue0
!=
NULL
,
"sync_corr_ue0 not yet allocated! Exiting.
\n
"
);
AssertFatal
(
sync_corr_ue1
!=
NULL
,
"sync_corr_ue0 not yet allocated! Exiting.
\n
"
);
AssertFatal
(
sync_corr_ue2
!=
NULL
,
"sync_corr_ue0 not yet allocated! Exiting.
\n
"
);
peak_val
=
0
;
peak_val
=
0
;
peak_pos
=
0
;
peak_pos
=
0
;
sync_source
=
0
;
sync_source
=
0
;
for
(
n
=
0
;
n
<
length
;
n
+=
4
)
{
for
(
n
=
0
;
n
<
length
;
n
+=
4
)
{
sync_corr_ue0
[
n
]
=
0
;
sync_corr_ue0
[
n
+
length
]
=
0
;
sync_corr_ue1
[
n
]
=
0
;
sync_corr_ue1
[
n
+
length
]
=
0
;
sync_corr_ue2
[
n
]
=
0
;
sync_corr_ue2
[
n
+
length
]
=
0
;
for
(
s
=
0
;
s
<
3
;
s
++
)
{
for
(
s
=
0
;
s
<
3
;
s
++
)
{
sync_out
[
s
]
=
0
;
complexNull
(
sync_out
[
s
])
;
sync_out2
[
s
]
=
0
;
complexNull
(
sync_out2
[
s
])
;
}
}
// if (n<(length-frame_parms->ofdm_symbol_size-frame_parms->nb_prefix_samples)) {
// if (n<(length-frame_parms->ofdm_symbol_size-frame_parms->nb_prefix_samples)) {
if
(
n
<
(
length
-
frame_parms
->
ofdm_symbol_size
))
{
if
(
n
<
(
length
-
frame_parms
->
ofdm_symbol_size
))
{
//calculate dot product of primary_synch0_time and rxdata[ar][n] (ar=0..nb_ant_rx) and store the sum in temp[n];
//calculate dot product of primary_synch0_time and rxdata[ar][n] (ar=0..nb_ant_rx) and store the sum in temp[n];
for
(
ar
=
0
;
ar
<
frame_parms
->
nb_antennas_rx
;
ar
++
)
{
for
(
ar
=
0
;
ar
<
frame_parms
->
nb_antennas_rx
;
ar
++
)
{
result
=
dot_product
((
short
*
)
primary_synch0_time
,
(
short
*
)
&
(
rxdata
[
ar
][
n
]),
frame_parms
->
ofdm_symbol_size
,
SHIFT
);
result
=
dot_product
((
short
*
)
primary_synch0_time
,
(
short
*
)
&
(
rxdata
[
ar
][
n
]),
frame_parms
->
ofdm_symbol_size
,
SHIFT
);
result2
=
dot_product
((
short
*
)
primary_synch0_time
,
(
short
*
)
&
(
rxdata
[
ar
][
n
+
length
]),
frame_parms
->
ofdm_symbol_size
,
SHIFT
);
result2
=
dot_product
((
short
*
)
primary_synch0_time
,
(
short
*
)
&
(
rxdata
[
ar
][
n
+
length
]),
frame_parms
->
ofdm_symbol_size
,
SHIFT
);
sync_out
[
0
].
r
+=
((
short
*
)
&
result
)[
0
];
sync_out
[
0
].
i
+=
((
short
*
)
&
result
)[
1
];
((
short
*
)
sync_corr_ue0
)[
2
*
n
]
+=
((
short
*
)
&
result
)[
0
];
sync_out2
[
0
].
r
+=
((
short
*
)
&
result2
)[
0
];
((
short
*
)
sync_corr_ue0
)[
2
*
n
+
1
]
+=
((
short
*
)
&
result
)[
1
];
sync_out2
[
0
].
i
+=
((
short
*
)
&
result2
)[
1
];
((
short
*
)
sync_corr_ue0
)[
2
*
(
length
+
n
)]
+=
((
short
*
)
&
result2
)[
0
];
((
short
*
)
sync_corr_ue0
)[(
2
*
(
length
+
n
))
+
1
]
+=
((
short
*
)
&
result2
)[
1
];
((
short
*
)
sync_out
)[
0
]
+=
((
short
*
)
&
result
)[
0
];
((
short
*
)
sync_out
)[
1
]
+=
((
short
*
)
&
result
)[
1
];
((
short
*
)
sync_out2
)[
0
]
+=
((
short
*
)
&
result2
)[
0
];
((
short
*
)
sync_out2
)[
1
]
+=
((
short
*
)
&
result2
)[
1
];
}
}
for
(
ar
=
0
;
ar
<
frame_parms
->
nb_antennas_rx
;
ar
++
)
{
for
(
ar
=
0
;
ar
<
frame_parms
->
nb_antennas_rx
;
ar
++
)
{
result
=
dot_product
((
short
*
)
primary_synch1_time
,
(
short
*
)
&
(
rxdata
[
ar
][
n
]),
frame_parms
->
ofdm_symbol_size
,
SHIFT
);
result
=
dot_product
((
short
*
)
primary_synch1_time
,
(
short
*
)
&
(
rxdata
[
ar
][
n
]),
frame_parms
->
ofdm_symbol_size
,
SHIFT
);
result2
=
dot_product
((
short
*
)
primary_synch1_time
,
(
short
*
)
&
(
rxdata
[
ar
][
n
+
length
]),
frame_parms
->
ofdm_symbol_size
,
SHIFT
);
result2
=
dot_product
((
short
*
)
primary_synch1_time
,
(
short
*
)
&
(
rxdata
[
ar
][
n
+
length
]),
frame_parms
->
ofdm_symbol_size
,
SHIFT
);
((
short
*
)
sync_corr_ue1
)[
2
*
n
]
+=
((
short
*
)
&
result
)[
0
];
sync_out
[
1
].
r
+=
((
short
*
)
&
result
)[
0
];
((
short
*
)
sync_corr_ue1
)[
2
*
n
+
1
]
+=
((
short
*
)
&
result
)[
1
];
sync_out
[
1
].
i
+=
((
short
*
)
&
result
)[
1
];
((
short
*
)
sync_corr_ue1
)[
2
*
(
length
+
n
)]
+=
((
short
*
)
&
result2
)[
0
];
sync_out2
[
1
].
r
+=
((
short
*
)
&
result2
)[
0
];
((
short
*
)
sync_corr_ue1
)[(
2
*
(
length
+
n
))
+
1
]
+=
((
short
*
)
&
result2
)[
1
];
sync_out2
[
1
].
i
+=
((
short
*
)
&
result2
)[
1
];
((
short
*
)
sync_out
)[
2
]
+=
((
short
*
)
&
result
)[
0
];
((
short
*
)
sync_out
)[
3
]
+=
((
short
*
)
&
result
)[
1
];
((
short
*
)
sync_out2
)[
2
]
+=
((
short
*
)
&
result2
)[
0
];
((
short
*
)
sync_out2
)[
3
]
+=
((
short
*
)
&
result2
)[
1
];
}
}
for
(
ar
=
0
;
ar
<
frame_parms
->
nb_antennas_rx
;
ar
++
)
{
for
(
ar
=
0
;
ar
<
frame_parms
->
nb_antennas_rx
;
ar
++
)
{
result
=
dot_product
((
short
*
)
primary_synch2_time
,
(
short
*
)
&
(
rxdata
[
ar
][
n
]),
frame_parms
->
ofdm_symbol_size
,
SHIFT
);
result
=
dot_product
((
short
*
)
primary_synch2_time
,
(
short
*
)
&
(
rxdata
[
ar
][
n
]),
frame_parms
->
ofdm_symbol_size
,
SHIFT
);
result2
=
dot_product
((
short
*
)
primary_synch2_time
,
(
short
*
)
&
(
rxdata
[
ar
][
n
+
length
]),
frame_parms
->
ofdm_symbol_size
,
SHIFT
);
result2
=
dot_product
((
short
*
)
primary_synch2_time
,
(
short
*
)
&
(
rxdata
[
ar
][
n
+
length
]),
frame_parms
->
ofdm_symbol_size
,
SHIFT
);
sync_out
[
2
].
r
+=
((
short
*
)
&
result
)[
0
];
((
short
*
)
sync_corr_ue2
)[
2
*
n
]
+=
((
short
*
)
&
result
)[
0
];
sync_out
[
2
].
i
+=
((
short
*
)
&
result
)[
1
];
((
short
*
)
sync_corr_ue2
)[
2
*
n
+
1
]
+=
((
short
*
)
&
result
)[
1
];
sync_out2
[
2
].
r
+=
((
short
*
)
&
result2
)[
0
];
((
short
*
)
sync_corr_ue2
)[
2
*
(
length
+
n
)]
+=
((
short
*
)
&
result2
)[
0
];
sync_out2
[
2
].
i
+=
((
short
*
)
&
result2
)[
1
];
((
short
*
)
sync_corr_ue2
)[(
2
*
(
length
+
n
))
+
1
]
+=
((
short
*
)
&
result2
)[
1
];
((
short
*
)
sync_out
)[
4
]
+=
((
short
*
)
&
result
)[
0
];
((
short
*
)
sync_out
)[
5
]
+=
((
short
*
)
&
result
)[
1
];
((
short
*
)
sync_out2
)[
4
]
+=
((
short
*
)
&
result2
)[
0
];
((
short
*
)
sync_out2
)[
5
]
+=
((
short
*
)
&
result2
)[
1
];
}
}
}
}
// calculate the absolute value of sync_corr[n]
// calculate the absolute value of sync_corr[n]
sync_corr_ue0
[
n
]
=
abs32
(
sync_corr_ue0
[
n
]);
sync_corr_ue0
[
n
+
length
]
=
abs32
(
sync_corr_ue0
[
n
+
length
]);
sync_corr_ue1
[
n
]
=
abs32
(
sync_corr_ue1
[
n
]);
sync_corr_ue1
[
n
+
length
]
=
abs32
(
sync_corr_ue1
[
n
+
length
]);
sync_corr_ue2
[
n
]
=
abs32
(
sync_corr_ue2
[
n
]);
sync_corr_ue2
[
n
+
length
]
=
abs32
(
sync_corr_ue2
[
n
+
length
]);
for
(
s
=
0
;
s
<
3
;
s
++
)
{
for
(
s
=
0
;
s
<
3
;
s
++
)
{
tmp
[
s
]
=
(
abs32
(
sync_out
[
s
])
>>
1
)
+
(
abs32
(
sync_out2
[
s
])
>>
1
);
double
tmp
=
absF
(
sync_out
[
s
])
+
absF
(
sync_out2
[
s
]
);
if
(
tmp
[
s
]
>
peak_val
)
{
if
(
tmp
>
peak_val
)
{
peak_val
=
tmp
[
s
]
;
peak_val
=
tmp
;
peak_pos
=
n
;
peak_pos
=
n
;
sync_source
=
s
;
sync_source
=
s
;
/*
/*
...
@@ -443,42 +214,22 @@ int lte_sync_time(int **rxdata, ///rx data in time domain
...
@@ -443,42 +214,22 @@ int lte_sync_time(int **rxdata, ///rx data in time domain
}
}
*
eNB_id
=
sync_source
;
*
eNB_id
=
sync_source
;
LOG_I
(
PHY
,
"[UE] lte_sync_time: Sync source = %d, Peak found at pos %d, val = %d (%d dB)
\n
"
,
sync_source
,
peak_pos
,
peak_val
/
2
,
dB_fixed
(
peak_val
/
2
)
/
2
);
LOG_I
(
PHY
,
"[UE] lte_sync_time: Sync source = %d, Peak found at pos %d, val = %d (%d dB)
\n
"
,
sync_source
,
peak_pos
,
peak_val
,
dB_fixed
(
peak_val
)
/
2
);
if
(
LOG_DUMPFLAG
(
DEBUG_LTEESTIM
)){
static
int
debug_cnt
;
if
(
debug_cnt
==
0
)
{
LOG_M
(
"sync_corr0_ue.m"
,
"synccorr0"
,
sync_corr_ue0
,
2
*
length
,
1
,
2
);
LOG_M
(
"sync_corr1_ue.m"
,
"synccorr1"
,
sync_corr_ue1
,
2
*
length
,
1
,
2
);
LOG_M
(
"sync_corr2_ue.m"
,
"synccorr2"
,
sync_corr_ue2
,
2
*
length
,
1
,
2
);
LOG_M
(
"rxdata0.m"
,
"rxd0"
,
rxdata
[
0
],
length
<<
1
,
1
,
1
);
// exit(-1);
}
else
{
debug_cnt
++
;
}
}
return
(
peak_pos
);
return
(
peak_pos
);
}
}
int
ru_sync_time_init
(
RU_t
*
ru
)
// LTE_UE_COMMON *common_vars
int
ru_sync_time_init
(
RU_t
*
ru
)
{
// LTE_UE_COMMON *common_vars
{
/*
/*
int16_t dmrs[2048];
int16_t dmrs[2048];
int16_t *dmrsp[2] = {dmrs,NULL};
int16_t *dmrsp[2] = {dmrs,NULL};
*/
*/
int32_t
dmrs
[
ru
->
frame_parms
->
ofdm_symbol_size
*
14
]
__attribute__
((
aligned
(
32
)));
int32_t
dmrs
[
ru
->
frame_parms
->
ofdm_symbol_size
*
14
]
__attribute__
((
aligned
(
32
)));
//int32_t *dmrsp[2] = {&dmrs[(3-ru->frame_parms->Ncp)*ru->frame_parms->ofdm_symbol_size],NULL};
//int32_t *dmrsp[2] = {&dmrs[(3-ru->frame_parms->Ncp)*ru->frame_parms->ofdm_symbol_size],NULL};
int32_t
*
dmrsp
[
2
]
=
{
&
dmrs
[
0
],
NULL
};
int32_t
*
dmrsp
[
2
]
=
{
&
dmrs
[
0
],
NULL
};
generate_ul_ref_sigs
();
generate_ul_ref_sigs
();
ru
->
dmrssync
=
(
int16_t
*
)
malloc16_clear
(
ru
->
frame_parms
->
ofdm_symbol_size
*
2
*
sizeof
(
int16_t
));
ru
->
dmrssync
=
(
int16_t
*
)
malloc16_clear
(
ru
->
frame_parms
->
ofdm_symbol_size
*
2
*
sizeof
(
int16_t
));
ru
->
dmrs_corr
=
(
uint64_t
*
)
malloc16_clear
(
ru
->
frame_parms
->
samples_per_tti
*
10
*
sizeof
(
uint64_t
));
ru
->
dmrs_corr
=
(
uint64_t
*
)
malloc16_clear
(
ru
->
frame_parms
->
samples_per_tti
*
10
*
sizeof
(
uint64_t
));
generate_drs_pusch
(
NULL
,
generate_drs_pusch
(
NULL
,
NULL
,
NULL
,
ru
->
frame_parms
,
ru
->
frame_parms
,
...
@@ -492,31 +243,35 @@ int ru_sync_time_init(RU_t *ru) // LTE_UE_COMMON *common_vars
...
@@ -492,31 +243,35 @@ int ru_sync_time_init(RU_t *ru) // LTE_UE_COMMON *common_vars
switch
(
ru
->
frame_parms
->
N_RB_DL
)
{
switch
(
ru
->
frame_parms
->
N_RB_DL
)
{
case
6
:
case
6
:
idft
(
IDFT_128
,(
int16_t
*
)(
&
dmrsp
[
0
][
3
*
ru
->
frame_parms
->
ofdm_symbol_size
]),
idft
(
IDFT_128
,(
int16_t
*
)(
&
dmrsp
[
0
][
3
*
ru
->
frame_parms
->
ofdm_symbol_size
]),
ru
->
dmrssync
,
/// complex output
ru
->
dmrssync
,
/// complex output
1
);
1
);
break
;
break
;
case
25
:
case
25
:
idft
(
IDFT_512
,(
int16_t
*
)(
&
dmrsp
[
0
][
3
*
ru
->
frame_parms
->
ofdm_symbol_size
]),
idft
(
IDFT_512
,(
int16_t
*
)(
&
dmrsp
[
0
][
3
*
ru
->
frame_parms
->
ofdm_symbol_size
]),
ru
->
dmrssync
,
/// complex output
ru
->
dmrssync
,
/// complex output
1
);
1
);
break
;
break
;
case
50
:
case
50
:
idft
(
IDFT_1024
,(
int16_t
*
)(
&
dmrsp
[
0
][
3
*
ru
->
frame_parms
->
ofdm_symbol_size
]),
idft
(
IDFT_1024
,(
int16_t
*
)(
&
dmrsp
[
0
][
3
*
ru
->
frame_parms
->
ofdm_symbol_size
]),
ru
->
dmrssync
,
/// complex output
ru
->
dmrssync
,
/// complex output
1
);
1
);
break
;
break
;
case
75
:
case
75
:
idft
(
IDFT_1536
,(
int16_t
*
)(
&
dmrsp
[
0
][
3
*
ru
->
frame_parms
->
ofdm_symbol_size
]),
idft
(
IDFT_1536
,(
int16_t
*
)(
&
dmrsp
[
0
][
3
*
ru
->
frame_parms
->
ofdm_symbol_size
]),
ru
->
dmrssync
,
ru
->
dmrssync
,
1
);
/// complex output
1
);
/// complex output
break
;
break
;
case
100
:
case
100
:
idft
(
IDFT_2048
,(
int16_t
*
)(
&
dmrsp
[
0
][
3
*
ru
->
frame_parms
->
ofdm_symbol_size
]),
idft
(
IDFT_2048
,(
int16_t
*
)(
&
dmrsp
[
0
][
3
*
ru
->
frame_parms
->
ofdm_symbol_size
]),
ru
->
dmrssync
,
/// complex output
ru
->
dmrssync
,
/// complex output
1
);
1
);
break
;
break
;
default:
default:
AssertFatal
(
1
==
0
,
"Unsupported N_RB_DL %d
\n
"
,
ru
->
frame_parms
->
N_RB_DL
);
AssertFatal
(
1
==
0
,
"Unsupported N_RB_DL %d
\n
"
,
ru
->
frame_parms
->
N_RB_DL
);
break
;
break
;
...
@@ -527,10 +282,11 @@ int ru_sync_time_init(RU_t *ru) // LTE_UE_COMMON *common_vars
...
@@ -527,10 +282,11 @@ int ru_sync_time_init(RU_t *ru) // LTE_UE_COMMON *common_vars
void
ru_sync_time_free
(
RU_t
*
ru
)
{
void
ru_sync_time_free
(
RU_t
*
ru
)
{
AssertFatal
(
ru
->
dmrssync
!=
NULL
,
"ru->dmrssync is NULL
\n
"
);
AssertFatal
(
ru
->
dmrssync
!=
NULL
,
"ru->dmrssync is NULL
\n
"
);
free
(
ru
->
dmrssync
);
free
(
ru
->
dmrssync
);
if
(
ru
->
dmrs_corr
)
free
(
ru
->
dmrs_corr
);
if
(
ru
->
dmrs_corr
)
free
(
ru
->
dmrs_corr
);
}
}
//#define DEBUG_PHY
//#define DEBUG_PHY
...
@@ -539,10 +295,8 @@ int lte_sync_time_eNB(int32_t **rxdata, ///rx data in time domain
...
@@ -539,10 +295,8 @@ int lte_sync_time_eNB(int32_t **rxdata, ///rx data in time domain
LTE_DL_FRAME_PARMS
*
frame_parms
,
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint32_t
length
,
uint32_t
length
,
uint32_t
*
peak_val_out
,
uint32_t
*
peak_val_out
,
uint32_t
*
sync_corr_eNB
)
uint32_t
*
sync_corr_eNB
)
{
{
// perform a time domain correlation using the oversampled sync sequence
// perform a time domain correlation using the oversampled sync sequence
unsigned
int
n
,
ar
,
peak_val
,
peak_pos
;
unsigned
int
n
,
ar
,
peak_val
,
peak_pos
;
uint64_t
mean_val
;
uint64_t
mean_val
;
int
result
;
int
result
;
...
@@ -557,15 +311,15 @@ int lte_sync_time_eNB(int32_t **rxdata, ///rx data in time domain
...
@@ -557,15 +311,15 @@ int lte_sync_time_eNB(int32_t **rxdata, ///rx data in time domain
switch
(
eNB_id
)
{
switch
(
eNB_id
)
{
case
0
:
case
0
:
primary_synch_time
=
(
short
*
)
primary_synch0_time
;
primary_synch_time
=
(
short
*
)
primary_synch0_time
;
break
;
break
;
case
1
:
case
1
:
primary_synch_time
=
(
short
*
)
primary_synch1_time
;
primary_synch_time
=
(
short
*
)
primary_synch1_time
;
break
;
break
;
case
2
:
case
2
:
primary_synch_time
=
(
short
*
)
primary_synch2_time
;
primary_synch_time
=
(
short
*
)
primary_synch2_time
;
break
;
break
;
default:
default:
...
@@ -578,21 +332,16 @@ int lte_sync_time_eNB(int32_t **rxdata, ///rx data in time domain
...
@@ -578,21 +332,16 @@ int lte_sync_time_eNB(int32_t **rxdata, ///rx data in time domain
mean_val
=
0
;
mean_val
=
0
;
for
(
n
=
0
;
n
<
length
;
n
+=
4
)
{
for
(
n
=
0
;
n
<
length
;
n
+=
4
)
{
sync_corr_eNB
[
n
]
=
0
;
sync_corr_eNB
[
n
]
=
0
;
if
(
n
<
(
length
-
frame_parms
->
ofdm_symbol_size
-
frame_parms
->
nb_prefix_samples
))
{
if
(
n
<
(
length
-
frame_parms
->
ofdm_symbol_size
-
frame_parms
->
nb_prefix_samples
))
{
//calculate dot product of primary_synch0_time and rxdata[ar][n] (ar=0..nb_ant_rx) and store the sum in temp[n];
//calculate dot product of primary_synch0_time and rxdata[ar][n] (ar=0..nb_ant_rx) and store the sum in temp[n];
for
(
ar
=
0
;
ar
<
frame_parms
->
nb_antennas_rx
;
ar
++
)
{
for
(
ar
=
0
;
ar
<
frame_parms
->
nb_antennas_rx
;
ar
++
)
{
result
=
dot_product
((
short
*
)
primary_synch_time
,
(
short
*
)
&
(
rxdata
[
ar
][
n
]),
frame_parms
->
ofdm_symbol_size
,
SHIFT
);
result
=
dot_product
((
short
*
)
primary_synch_time
,
(
short
*
)
&
(
rxdata
[
ar
][
n
]),
frame_parms
->
ofdm_symbol_size
,
SHIFT
);
//((short*)sync_corr)[2*n] += ((short*) &result)[0];
//((short*)sync_corr)[2*n] += ((short*) &result)[0];
//((short*)sync_corr)[2*n+1] += ((short*) &result)[1];
//((short*)sync_corr)[2*n+1] += ((short*) &result)[1];
sync_corr_eNB
[
n
]
+=
abs32
(
result
);
sync_corr_eNB
[
n
]
+=
abs32
(
result
);
}
}
}
}
/*
/*
...
@@ -610,7 +359,6 @@ int lte_sync_time_eNB(int32_t **rxdata, ///rx data in time domain
...
@@ -610,7 +359,6 @@ int lte_sync_time_eNB(int32_t **rxdata, ///rx data in time domain
}
}
mean_val
/=
length
;
mean_val
/=
length
;
*
peak_val_out
=
peak_val
;
*
peak_val_out
=
peak_val
;
if
(
peak_val
<=
(
40
*
(
uint32_t
)
mean_val
))
{
if
(
peak_val
<=
(
40
*
(
uint32_t
)
mean_val
))
{
...
@@ -620,32 +368,27 @@ int lte_sync_time_eNB(int32_t **rxdata, ///rx data in time domain
...
@@ -620,32 +368,27 @@ int lte_sync_time_eNB(int32_t **rxdata, ///rx data in time domain
LOG_I
(
PHY
,
"[SYNC TIME] Peak found at pos %u, val = %u, mean_val = %"
PRIu64
"
\n
"
,
peak_pos
,
peak_val
,
mean_val
);
LOG_I
(
PHY
,
"[SYNC TIME] Peak found at pos %u, val = %u, mean_val = %"
PRIu64
"
\n
"
,
peak_pos
,
peak_val
,
mean_val
);
return
(
peak_pos
);
return
(
peak_pos
);
}
}
}
}
static
inline
int64_t
abs64
(
int64_t
x
)
static
inline
int64_t
abs64
(
int64_t
x
)
{
{
return
(((
int64_t
)((
int32_t
*
)
&
x
)[
0
])
*
((
int64_t
)((
int32_t
*
)
&
x
)[
0
])
+
((
int64_t
)
return
(((
int64_t
)((
int32_t
*
)
&
x
)[
0
])
*
((
int64_t
)((
int32_t
*
)
&
x
)[
0
])
+
((
int64_t
)
((
int32_t
*
)
&
x
)[
1
])
*
((
int64_t
)((
int32_t
*
)
&
x
)[
1
]));
((
int32_t
*
)
&
x
)[
1
])
*
((
int64_t
)((
int32_t
*
)
&
x
)[
1
]));
}
}
int
ru_sync_time
(
RU_t
*
ru
,
int
ru_sync_time
(
RU_t
*
ru
,
int64_t
*
lev
,
int64_t
*
lev
,
int64_t
*
avg
)
int64_t
*
avg
)
{
{
LTE_DL_FRAME_PARMS
*
frame_parms
=
ru
->
frame_parms
;
LTE_DL_FRAME_PARMS
*
frame_parms
=
ru
->
frame_parms
;
RU_CALIBRATION
*
calibration
=
&
ru
->
calibration
;
RU_CALIBRATION
*
calibration
=
&
ru
->
calibration
;
// perform a time domain correlation using the oversampled sync sequence
// perform a time domain correlation using the oversampled sync sequence
int
length
=
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
*
frame_parms
->
samples_per_tti
;
int
length
=
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME
*
frame_parms
->
samples_per_tti
;
// circular copy of beginning to end of rxdata buffer. Note: buffer should be big enough upon calling this function
// circular copy of beginning to end of rxdata buffer. Note: buffer should be big enough upon calling this function
for
(
int
ar
=
0
;
ar
<
ru
->
nb_rx
;
ar
++
)
memcpy
((
void
*
)
&
ru
->
common
.
rxdata
[
ar
][
2
*
length
],
for
(
int
ar
=
0
;
ar
<
ru
->
nb_rx
;
ar
++
)
(
void
*
)
&
ru
->
common
.
rxdata
[
ar
][
0
],
memcpy
((
void
*
)
&
ru
->
common
.
rxdata
[
ar
][
2
*
length
],
(
void
*
)
&
ru
->
common
.
rxdata
[
ar
][
0
],
frame_parms
->
ofdm_symbol_size
);
frame_parms
->
ofdm_symbol_size
);
int32_t
maxlev0
=
0
;
int32_t
maxlev0
=
0
;
...
@@ -653,15 +396,15 @@ int ru_sync_time(RU_t *ru,
...
@@ -653,15 +396,15 @@ int ru_sync_time(RU_t *ru,
int64_t
avg0
=
0
;
int64_t
avg0
=
0
;
int64_t
result
;
int64_t
result
;
int64_t
dmrs_corr
;
int64_t
dmrs_corr
;
int
maxval
=
0
;
int
maxval
=
0
;
for
(
int
i
=
0
;
i
<
2
*
(
frame_parms
->
ofdm_symbol_size
);
i
++
)
{
for
(
int
i
=
0
;
i
<
2
*
(
frame_parms
->
ofdm_symbol_size
);
i
++
)
{
maxval
=
max
(
maxval
,
ru
->
dmrssync
[
i
]);
maxval
=
max
(
maxval
,
ru
->
dmrssync
[
i
]);
maxval
=
max
(
maxval
,
-
ru
->
dmrssync
[
i
]);
maxval
=
max
(
maxval
,
-
ru
->
dmrssync
[
i
]);
}
}
if
(
ru
->
state
==
RU_CHECK_SYNC
)
{
if
(
ru
->
state
==
RU_CHECK_SYNC
)
{
for
(
int
i
=
0
;
i
<
2
*
(
frame_parms
->
ofdm_symbol_size
);
i
++
)
{
for
(
int
i
=
0
;
i
<
2
*
(
frame_parms
->
ofdm_symbol_size
);
i
++
)
{
maxval
=
max
(
maxval
,
calibration
->
drs_ch_estimates_time
[
0
][
i
]);
maxval
=
max
(
maxval
,
calibration
->
drs_ch_estimates_time
[
0
][
i
]);
maxval
=
max
(
maxval
,
-
calibration
->
drs_ch_estimates_time
[
0
][
i
]);
maxval
=
max
(
maxval
,
-
calibration
->
drs_ch_estimates_time
[
0
][
i
]);
}
}
...
@@ -670,38 +413,46 @@ int ru_sync_time(RU_t *ru,
...
@@ -670,38 +413,46 @@ int ru_sync_time(RU_t *ru,
int
shift
=
log2_approx
(
maxval
);
int
shift
=
log2_approx
(
maxval
);
for
(
int
n
=
0
;
n
<
length
;
n
+=
4
)
{
for
(
int
n
=
0
;
n
<
length
;
n
+=
4
)
{
dmrs_corr
=
0
;
dmrs_corr
=
0
;
//calculate dot product of primary_synch0_time and rxdata[ar][n] (ar=0..nb_ant_rx) and store the sum in temp[n];
//calculate dot product of primary_synch0_time and rxdata[ar][n] (ar=0..nb_ant_rx) and store the sum in temp[n];
for
(
int
ar
=
0
;
ar
<
ru
->
nb_rx
;
ar
++
)
{
for
(
int
ar
=
0
;
ar
<
ru
->
nb_rx
;
ar
++
)
{
result
=
dot_product64
(
ru
->
dmrssync
,
result
=
dot_product64
(
ru
->
dmrssync
,
(
int16_t
*
)
&
ru
->
common
.
rxdata
[
ar
][
n
],
(
int16_t
*
)
&
ru
->
common
.
rxdata
[
ar
][
n
],
frame_parms
->
ofdm_symbol_size
,
frame_parms
->
ofdm_symbol_size
,
shift
);
shift
);
if
(
ru
->
state
==
RU_CHECK_SYNC
)
{
if
(
ru
->
state
==
RU_CHECK_SYNC
)
{
result
=
dot_product64
((
int16_t
*
)
&
calibration
->
drs_ch_estimates_time
[
ar
],
result
=
dot_product64
((
int16_t
*
)
&
calibration
->
drs_ch_estimates_time
[
ar
],
(
int16_t
*
)
&
ru
->
common
.
rxdata
[
ar
][
n
],
(
int16_t
*
)
&
ru
->
common
.
rxdata
[
ar
][
n
],
frame_parms
->
ofdm_symbol_size
,
frame_parms
->
ofdm_symbol_size
,
shift
);
shift
);
}
}
dmrs_corr
+=
abs64
(
result
);
dmrs_corr
+=
abs64
(
result
);
}
}
if
(
ru
->
dmrs_corr
!=
NULL
)
ru
->
dmrs_corr
[
n
]
=
dmrs_corr
;
if
(
ru
->
dmrs_corr
!=
NULL
)
ru
->
dmrs_corr
[
n
]
=
dmrs_corr
;
// tmpi holds <synchi,rx0>+<synci,rx1>+...+<synchi,rx_{nbrx-1}>
// tmpi holds <synchi,rx0>+<synci,rx1>+...+<synchi,rx_{nbrx-1}>
if
(
dmrs_corr
>
maxlev0
)
{
maxlev0
=
dmrs_corr
;
maxpos0
=
n
;
}
if
(
dmrs_corr
>
maxlev0
)
{
maxlev0
=
dmrs_corr
;
maxpos0
=
n
;
}
avg0
+=
dmrs_corr
;
avg0
+=
dmrs_corr
;
}
}
avg0
/=
(
length
/
4
);
avg0
/=
(
length
/
4
);
int
dmrsoffset
=
frame_parms
->
samples_per_tti
+
(
3
*
frame_parms
->
ofdm_symbol_size
)
+
(
3
*
frame_parms
->
nb_prefix_samples
)
+
frame_parms
->
nb_prefix_samples0
;
int
dmrsoffset
=
frame_parms
->
samples_per_tti
+
(
3
*
frame_parms
->
ofdm_symbol_size
)
+
(
3
*
frame_parms
->
nb_prefix_samples
)
+
frame_parms
->
nb_prefix_samples0
;
if
((
int64_t
)
maxlev0
>
(
10
*
avg0
))
{
*
lev
=
maxlev0
;
*
avg
=
avg0
;
return
((
length
+
maxpos0
-
dmrsoffset
)
%
length
);}
if
((
int64_t
)
maxlev0
>
(
10
*
avg0
))
{
*
lev
=
maxlev0
;
*
avg
=
avg0
;
return
((
length
+
maxpos0
-
dmrsoffset
)
%
length
);
}
return
(
-
1
);
return
(
-
1
);
}
}
openair1/PHY/LTE_REFSIG/primary_synch.h
View file @
818c9b2c
...
@@ -18,7 +18,6 @@
...
@@ -18,7 +18,6 @@
* For more information about the OpenAirInterface (OAI) Software Alliance:
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
short
primary_synch0
[
144
]
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
32767
,
0
,
-
26120
,
-
19785
,
11971
,
-
30502
,
-
24020
,
-
22288
,
32117
,
6492
,
31311
,
9658
,
-
16384
,
-
28378
,
25100
,
-
21063
,
-
7292
,
-
31946
,
20429
,
25618
,
14948
,
29158
,
11971
,
-
30502
,
31311
,
9658
,
25100
,
-
21063
,
-
16384
,
28377
,
-
24020
,
22287
,
32117
,
6492
,
-
7292
,
31945
,
20429
,
25618
,
-
26120
,
-
19785
,
-
16384
,
-
28378
,
-
16384
,
28377
,
-
26120
,
-
19785
,
-
32402
,
4883
,
31311
,
-
9659
,
32117
,
6492
,
-
7292
,
-
31946
,
32767
,
-
1
,
25100
,
-
21063
,
-
24020
,
22287
,
-
32402
,
4883
,
-
32402
,
4883
,
-
24020
,
22287
,
25100
,
-
21063
,
32767
,
-
1
,
-
7292
,
-
31946
,
32117
,
6492
,
31311
,
-
9659
,
-
32402
,
4883
,
-
26120
,
-
19785
,
-
16384
,
28377
,
-
16384
,
-
28378
,
-
26120
,
-
19785
,
20429
,
25618
,
-
7292
,
31945
,
32117
,
6492
,
-
24020
,
22287
,
-
16384
,
28377
,
25100
,
-
21063
,
31311
,
9658
,
11971
,
-
30502
,
14948
,
29158
,
20429
,
25618
,
-
7292
,
-
31946
,
25100
,
-
21063
,
-
16384
,
-
28378
,
31311
,
9658
,
32117
,
6492
,
-
24020
,
-
22288
,
11971
,
-
30502
,
-
26120
,
-
19785
,
32767
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
short
primary_synch0
[
144
]
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
32767
,
0
,
-
26120
,
-
19785
,
11971
,
-
30502
,
-
24020
,
-
22288
,
32117
,
6492
,
31311
,
9658
,
-
16384
,
-
28378
,
25100
,
-
21063
,
-
7292
,
-
31946
,
20429
,
25618
,
14948
,
29158
,
11971
,
-
30502
,
31311
,
9658
,
25100
,
-
21063
,
-
16384
,
28377
,
-
24020
,
22287
,
32117
,
6492
,
-
7292
,
31945
,
20429
,
25618
,
-
26120
,
-
19785
,
-
16384
,
-
28378
,
-
16384
,
28377
,
-
26120
,
-
19785
,
-
32402
,
4883
,
31311
,
-
9659
,
32117
,
6492
,
-
7292
,
-
31946
,
32767
,
-
1
,
25100
,
-
21063
,
-
24020
,
22287
,
-
32402
,
4883
,
-
32402
,
4883
,
-
24020
,
22287
,
25100
,
-
21063
,
32767
,
-
1
,
-
7292
,
-
31946
,
32117
,
6492
,
31311
,
-
9659
,
-
32402
,
4883
,
-
26120
,
-
19785
,
-
16384
,
28377
,
-
16384
,
-
28378
,
-
26120
,
-
19785
,
20429
,
25618
,
-
7292
,
31945
,
32117
,
6492
,
-
24020
,
22287
,
-
16384
,
28377
,
25100
,
-
21063
,
31311
,
9658
,
11971
,
-
30502
,
14948
,
29158
,
20429
,
25618
,
-
7292
,
-
31946
,
25100
,
-
21063
,
-
16384
,
-
28378
,
31311
,
9658
,
32117
,
6492
,
-
24020
,
-
22288
,
11971
,
-
30502
,
-
26120
,
-
19785
,
32767
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
short
primary_synch1
[
144
]
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
32767
,
0
,
-
31754
,
-
8086
,
-
24020
,
-
22288
,
2448
,
32675
,
-
26120
,
19784
,
27073
,
18458
,
-
16384
,
28377
,
25100
,
21062
,
-
29523
,
14217
,
-
7292
,
31945
,
-
13477
,
-
29868
,
-
24020
,
-
22288
,
27073
,
18458
,
25100
,
21062
,
-
16384
,
-
28378
,
2448
,
-
32676
,
-
26120
,
19784
,
-
29523
,
-
14218
,
-
7292
,
31945
,
-
31754
,
-
8086
,
-
16384
,
28377
,
-
16384
,
-
28378
,
-
31754
,
-
8086
,
31311
,
-
9659
,
27073
,
-
18459
,
-
26120
,
19784
,
-
29523
,
14217
,
32767
,
-
1
,
25100
,
21062
,
2448
,
-
32676
,
31311
,
-
9659
,
31311
,
-
9659
,
2448
,
-
32676
,
25100
,
21062
,
32767
,
0
,
-
29523
,
14217
,
-
26120
,
19784
,
27073
,
-
18459
,
31311
,
-
9659
,
-
31754
,
-
8086
,
-
16384
,
-
28378
,
-
16384
,
28377
,
-
31754
,
-
8086
,
-
7292
,
31945
,
-
29523
,
-
14218
,
-
26120
,
19784
,
2448
,
-
32676
,
-
16384
,
-
28378
,
25100
,
21062
,
27073
,
18458
,
-
24020
,
-
22288
,
-
13477
,
-
29868
,
-
7292
,
31945
,
-
29523
,
14217
,
25100
,
21062
,
-
16384
,
28377
,
27073
,
18458
,
-
26120
,
19784
,
2448
,
32675
,
-
24020
,
-
22288
,
-
31754
,
-
8086
,
32767
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
short
primary_synch1
[
144
]
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
32767
,
0
,
-
31754
,
-
8086
,
-
24020
,
-
22288
,
2448
,
32675
,
-
26120
,
19784
,
27073
,
18458
,
-
16384
,
28377
,
25100
,
21062
,
-
29523
,
14217
,
-
7292
,
31945
,
-
13477
,
-
29868
,
-
24020
,
-
22288
,
27073
,
18458
,
25100
,
21062
,
-
16384
,
-
28378
,
2448
,
-
32676
,
-
26120
,
19784
,
-
29523
,
-
14218
,
-
7292
,
31945
,
-
31754
,
-
8086
,
-
16384
,
28377
,
-
16384
,
-
28378
,
-
31754
,
-
8086
,
31311
,
-
9659
,
27073
,
-
18459
,
-
26120
,
19784
,
-
29523
,
14217
,
32767
,
-
1
,
25100
,
21062
,
2448
,
-
32676
,
31311
,
-
9659
,
31311
,
-
9659
,
2448
,
-
32676
,
25100
,
21062
,
32767
,
0
,
-
29523
,
14217
,
-
26120
,
19784
,
27073
,
-
18459
,
31311
,
-
9659
,
-
31754
,
-
8086
,
-
16384
,
-
28378
,
-
16384
,
28377
,
-
31754
,
-
8086
,
-
7292
,
31945
,
-
29523
,
-
14218
,
-
26120
,
19784
,
2448
,
-
32676
,
-
16384
,
-
28378
,
25100
,
21062
,
27073
,
18458
,
-
24020
,
-
22288
,
-
13477
,
-
29868
,
-
7292
,
31945
,
-
29523
,
14217
,
25100
,
21062
,
-
16384
,
28377
,
27073
,
18458
,
-
26120
,
19784
,
2448
,
32675
,
-
24020
,
-
22288
,
-
31754
,
-
8086
,
32767
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
short
primary_synch2
[
144
]
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
32767
,
0
,
-
31754
,
8085
,
-
24020
,
22287
,
2448
,
-
32676
,
-
26120
,
-
19785
,
27073
,
-
18459
,
-
16384
,
-
28378
,
25100
,
-
21063
,
-
29523
,
-
14218
,
-
7292
,
-
31946
,
-
13477
,
29867
,
-
24020
,
22287
,
27073
,
-
18459
,
25100
,
-
21063
,
-
16384
,
28377
,
2448
,
32675
,
-
26120
,
-
19785
,
-
29523
,
14217
,
-
7292
,
-
31946
,
-
31754
,
8085
,
-
16384
,
-
28378
,
-
16384
,
28377
,
-
31754
,
8085
,
31311
,
9658
,
27073
,
18458
,
-
26120
,
-
19785
,
-
29523
,
-
14218
,
32767
,
0
,
25100
,
-
21063
,
2448
,
32675
,
31311
,
9658
,
31311
,
9658
,
2448
,
32675
,
25100
,
-
21063
,
32767
,
0
,
-
29523
,
-
14218
,
-
26120
,
-
19785
,
27073
,
18458
,
31311
,
9658
,
-
31754
,
8085
,
-
16384
,
28377
,
-
16384
,
-
28378
,
-
31754
,
8085
,
-
7292
,
-
31946
,
-
29523
,
14217
,
-
26120
,
-
19785
,
2448
,
32675
,
-
16384
,
28377
,
25100
,
-
21063
,
27073
,
-
18459
,
-
24020
,
22287
,
-
13477
,
29867
,
-
7292
,
-
31946
,
-
29523
,
-
14218
,
25100
,
-
21063
,
-
16384
,
-
28378
,
27073
,
-
18459
,
-
26120
,
-
19785
,
2448
,
-
32676
,
-
24020
,
22287
,
-
31754
,
8085
,
32767
,
-
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
short
primary_synch2
[
144
]
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
32767
,
0
,
-
31754
,
8085
,
-
24020
,
22287
,
2448
,
-
32676
,
-
26120
,
-
19785
,
27073
,
-
18459
,
-
16384
,
-
28378
,
25100
,
-
21063
,
-
29523
,
-
14218
,
-
7292
,
-
31946
,
-
13477
,
29867
,
-
24020
,
22287
,
27073
,
-
18459
,
25100
,
-
21063
,
-
16384
,
28377
,
2448
,
32675
,
-
26120
,
-
19785
,
-
29523
,
14217
,
-
7292
,
-
31946
,
-
31754
,
8085
,
-
16384
,
-
28378
,
-
16384
,
28377
,
-
31754
,
8085
,
31311
,
9658
,
27073
,
18458
,
-
26120
,
-
19785
,
-
29523
,
-
14218
,
32767
,
0
,
25100
,
-
21063
,
2448
,
32675
,
31311
,
9658
,
31311
,
9658
,
2448
,
32675
,
25100
,
-
21063
,
32767
,
0
,
-
29523
,
-
14218
,
-
26120
,
-
19785
,
27073
,
18458
,
31311
,
9658
,
-
31754
,
8085
,
-
16384
,
28377
,
-
16384
,
-
28378
,
-
31754
,
8085
,
-
7292
,
-
31946
,
-
29523
,
14217
,
-
26120
,
-
19785
,
2448
,
32675
,
-
16384
,
28377
,
25100
,
-
21063
,
27073
,
-
18459
,
-
24020
,
22287
,
-
13477
,
29867
,
-
7292
,
-
31946
,
-
29523
,
-
14218
,
25100
,
-
21063
,
-
16384
,
-
28378
,
27073
,
-
18459
,
-
26120
,
-
19785
,
2448
,
-
32676
,
-
24020
,
22287
,
-
31754
,
8085
,
32767
,
-
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
...
...
openair1/PHY/TOOLS/lte_phy_scope.c
View file @
818c9b2c
...
@@ -153,7 +153,6 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form,
...
@@ -153,7 +153,6 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form,
int16_t
**
chest_t
;
int16_t
**
chest_t
;
int16_t
**
chest_f
;
int16_t
**
chest_f
;
int16_t
*
pusch_llr
;
int16_t
*
pusch_llr
;
int32_t
*
pusch_comp
;
int32_t
*
pucch1_comp
;
int32_t
*
pucch1_comp
;
int32_t
*
pucch1_thres
;
int32_t
*
pucch1_thres
;
int32_t
*
pucch1ab_comp
;
int32_t
*
pucch1ab_comp
;
...
@@ -189,7 +188,7 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form,
...
@@ -189,7 +188,7 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form,
chest_t
=
(
int16_t
**
)
phy_vars_enb
->
srs_vars
[
UE_id
].
srs_ch_estimates
;
chest_t
=
(
int16_t
**
)
phy_vars_enb
->
srs_vars
[
UE_id
].
srs_ch_estimates
;
chest_f
=
(
int16_t
**
)
phy_vars_enb
->
pusch_vars
[
UE_id
]
->
drs_ch_estimates
;
chest_f
=
(
int16_t
**
)
phy_vars_enb
->
pusch_vars
[
UE_id
]
->
drs_ch_estimates
;
pusch_llr
=
(
int16_t
*
)
phy_vars_enb
->
pusch_vars
[
UE_id
]
->
llr
;
pusch_llr
=
(
int16_t
*
)
phy_vars_enb
->
pusch_vars
[
UE_id
]
->
llr
;
pusch_comp
=
(
int32
_t
*
)
phy_vars_enb
->
pusch_vars
[
UE_id
]
->
rxdataF_comp
[
0
];
int16_t
*
pusch_comp
=
(
int16
_t
*
)
phy_vars_enb
->
pusch_vars
[
UE_id
]
->
rxdataF_comp
[
0
];
pucch1_comp
=
(
int32_t
*
)
phy_vars_enb
->
pucch1_stats
[
UE_id
];
pucch1_comp
=
(
int32_t
*
)
phy_vars_enb
->
pucch1_stats
[
UE_id
];
pucch1_thres
=
(
int32_t
*
)
phy_vars_enb
->
pucch1_stats_thres
[
UE_id
];
pucch1_thres
=
(
int32_t
*
)
phy_vars_enb
->
pucch1_stats_thres
[
UE_id
];
pucch1ab_comp
=
(
int32_t
*
)
phy_vars_enb
->
pucch1ab_stats
[
UE_id
];
pucch1ab_comp
=
(
int32_t
*
)
phy_vars_enb
->
pucch1ab_stats
[
UE_id
];
...
@@ -684,7 +683,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
...
@@ -684,7 +683,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
if
(
frame_parms
->
N_RB_DL
!=
100
)
{
if
(
frame_parms
->
N_RB_DL
!=
100
)
{
fl_set_xyplot_data
(
form
->
pdcch_llr
,
bit_pdcch
,
llr_pdcch
,
12
*
frame_parms
->
N_RB_DL
*
2
*
num_pdcch_symbols
,
""
,
""
,
""
);
fl_set_xyplot_data
(
form
->
pdcch_llr
,
bit_pdcch
,
llr_pdcch
,
12
*
frame_parms
->
N_RB_DL
*
2
*
num_pdcch_symbols
,
""
,
""
,
""
);
}
else
{
}
else
{
LOG_D
(
PHY
,
"UE PDCCH LLR plot is bugged in 20 MHz BW, to be fixed !!!
\n
"
);
LOG_D
(
HW
,
"UE PDCCH LLR plot is bugged in 20 MHz BW, to be fixed !!!
\n
"
);
}
}
}
}
...
@@ -698,7 +697,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
...
@@ -698,7 +697,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
if
(
frame_parms
->
N_RB_DL
!=
100
)
{
if
(
frame_parms
->
N_RB_DL
!=
100
)
{
fl_set_xyplot_data
(
form
->
pdcch_comp
,
I
,
Q
,
12
*
frame_parms
->
N_RB_DL
*
num_pdcch_symbols
,
""
,
""
,
""
);
fl_set_xyplot_data
(
form
->
pdcch_comp
,
I
,
Q
,
12
*
frame_parms
->
N_RB_DL
*
num_pdcch_symbols
,
""
,
""
,
""
);
}
else
{
}
else
{
LOG_D
(
PHY
,
"UE PDCCH COMP plot is bugged in 20 MHz BW, to be fixed !!!
\n
"
);
LOG_D
(
HW
,
"UE PDCCH COMP plot is bugged in 20 MHz BW, to be fixed !!!
\n
"
);
}
}
}
}
...
@@ -714,7 +713,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
...
@@ -714,7 +713,7 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
if
(
frame_parms
->
N_RB_DL
!=
100
)
{
if
(
frame_parms
->
N_RB_DL
!=
100
)
{
fl_set_xyplot_data
(
form
->
pdsch_llr
,
bit
,
llr
,
coded_bits_per_codeword
,
""
,
""
,
""
);
fl_set_xyplot_data
(
form
->
pdsch_llr
,
bit
,
llr
,
coded_bits_per_codeword
,
""
,
""
,
""
);
}
else
{
}
else
{
LOG_D
(
PHY
,
"UE PDSCH LLR plot is bugged in 20 MHz BW, to be fixed !!!
\n
"
);
LOG_D
(
HW
,
"UE PDSCH LLR plot is bugged in 20 MHz BW, to be fixed !!!
\n
"
);
}
}
}
}
...
...
openair1/PHY/TOOLS/tools_defs.h
View file @
818c9b2c
...
@@ -44,6 +44,11 @@ struct complex {
...
@@ -44,6 +44,11 @@ struct complex {
double
y
;
double
y
;
};
};
struct
complexd
{
double
r
;
double
i
;
};
struct
complexf
{
struct
complexf
{
float
r
;
float
r
;
float
i
;
float
i
;
...
...
openair1/PHY/phy_extern.h
View file @
818c9b2c
...
@@ -48,12 +48,6 @@ extern short primary_synch2[144];
...
@@ -48,12 +48,6 @@ extern short primary_synch2[144];
extern
unsigned
char
primary_synch0_tab
[
72
];
extern
unsigned
char
primary_synch0_tab
[
72
];
extern
unsigned
char
primary_synch1_tab
[
72
];
extern
unsigned
char
primary_synch1_tab
[
72
];
extern
unsigned
char
primary_synch2_tab
[
72
];
extern
unsigned
char
primary_synch2_tab
[
72
];
extern
int16_t
*
primary_synch0_time
;
//!< index: [0..ofdm_symbol_size*2[
extern
int16_t
*
primary_synch1_time
;
//!< index: [0..ofdm_symbol_size*2[
extern
int16_t
*
primary_synch2_time
;
//!< index: [0..ofdm_symbol_size*2[
extern
int
*
sync_corr_ue0
;
//!< index [0..10*samples_per_tti[
extern
int
*
sync_corr_ue1
;
//!< index [0..10*samples_per_tti[
extern
int
*
sync_corr_ue2
;
//!< index [0..10*samples_per_tti[
extern
int
flagMag
;
extern
int
flagMag
;
//extern short **txdataF_rep_tmp;
//extern short **txdataF_rep_tmp;
...
...
openair1/PHY/phy_extern_nr_ue.h
View file @
818c9b2c
...
@@ -55,9 +55,6 @@ extern unsigned char primary_synch2_tab[72];
...
@@ -55,9 +55,6 @@ extern unsigned char primary_synch2_tab[72];
extern
int16_t
*
primary_synch0_time
;
//!< index: [0..ofdm_symbol_size*2[
extern
int16_t
*
primary_synch0_time
;
//!< index: [0..ofdm_symbol_size*2[
extern
int16_t
*
primary_synch1_time
;
//!< index: [0..ofdm_symbol_size*2[
extern
int16_t
*
primary_synch1_time
;
//!< index: [0..ofdm_symbol_size*2[
extern
int16_t
*
primary_synch2_time
;
//!< index: [0..ofdm_symbol_size*2[
extern
int16_t
*
primary_synch2_time
;
//!< index: [0..ofdm_symbol_size*2[
extern
int
*
sync_corr_ue0
;
//!< index [0..10*samples_per_tti[
extern
int
*
sync_corr_ue1
;
//!< index [0..10*samples_per_tti[
extern
int
*
sync_corr_ue2
;
//!< index [0..10*samples_per_tti[
extern
int
flagMag
;
extern
int
flagMag
;
//extern short **txdataF_rep_tmp;
//extern short **txdataF_rep_tmp;
...
...
openair1/PHY/phy_extern_ue.h
View file @
818c9b2c
...
@@ -47,12 +47,6 @@ extern short primary_synch2[144];
...
@@ -47,12 +47,6 @@ extern short primary_synch2[144];
extern
unsigned
char
primary_synch0_tab
[
72
];
extern
unsigned
char
primary_synch0_tab
[
72
];
extern
unsigned
char
primary_synch1_tab
[
72
];
extern
unsigned
char
primary_synch1_tab
[
72
];
extern
unsigned
char
primary_synch2_tab
[
72
];
extern
unsigned
char
primary_synch2_tab
[
72
];
extern
int16_t
*
primary_synch0_time
;
//!< index: [0..ofdm_symbol_size*2[
extern
int16_t
*
primary_synch1_time
;
//!< index: [0..ofdm_symbol_size*2[
extern
int16_t
*
primary_synch2_time
;
//!< index: [0..ofdm_symbol_size*2[
extern
int
*
sync_corr_ue0
;
//!< index [0..10*samples_per_tti[
extern
int
*
sync_corr_ue1
;
//!< index [0..10*samples_per_tti[
extern
int
*
sync_corr_ue2
;
//!< index [0..10*samples_per_tti[
extern
int
flagMag
;
extern
int
flagMag
;
//extern short **txdataF_rep_tmp;
//extern short **txdataF_rep_tmp;
...
...
openair1/PHY/phy_vars.h
View file @
818c9b2c
...
@@ -33,9 +33,6 @@ char* namepointer_log2;
...
@@ -33,9 +33,6 @@ char* namepointer_log2;
#include "PHY/LTE_REFSIG/primary_synch.h"
#include "PHY/LTE_REFSIG/primary_synch.h"
int16_t
*
primary_synch0_time
;
int16_t
*
primary_synch1_time
;
int16_t
*
primary_synch2_time
;
#include "PHY/LTE_TRANSPORT/transport_vars.h"
#include "PHY/LTE_TRANSPORT/transport_vars.h"
...
...
openair1/PHY/phy_vars_ue.h
View file @
818c9b2c
...
@@ -33,9 +33,6 @@ char *namepointer_log2;
...
@@ -33,9 +33,6 @@ char *namepointer_log2;
#include "PHY/LTE_REFSIG/primary_synch.h"
#include "PHY/LTE_REFSIG/primary_synch.h"
int16_t
*
primary_synch0_time
;
int16_t
*
primary_synch1_time
;
int16_t
*
primary_synch2_time
;
PHY_VARS_UE
***
PHY_vars_UE_g
;
PHY_VARS_UE
***
PHY_vars_UE_g
;
...
...
openair2/GNB_APP/gnb_config.c
View file @
818c9b2c
...
@@ -175,7 +175,7 @@ void prepare_scc(NR_ServingCellConfigCommon_t *scc) {
...
@@ -175,7 +175,7 @@ void prepare_scc(NR_ServingCellConfigCommon_t *scc) {
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
pusch_ConfigCommon
->
choice
.
setup
->
msg3_DeltaPreamble
=
CALLOC
(
1
,
sizeof
(
long
));
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
pusch_ConfigCommon
->
choice
.
setup
->
msg3_DeltaPreamble
=
CALLOC
(
1
,
sizeof
(
long
));
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
pusch_ConfigCommon
->
choice
.
setup
->
p0_NominalWithGrant
=
CALLOC
(
1
,
sizeof
(
long
));
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
pusch_ConfigCommon
->
choice
.
setup
->
p0_NominalWithGrant
=
CALLOC
(
1
,
sizeof
(
long
));
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
pucch_ConfigCommon
=
CALLOC
(
1
,
sizeof
(
struct
NR_SetupRelease_PUCCH
_ConfigCommon
));
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
pucch_ConfigCommon
=
CALLOC
(
1
,
sizeof
(
*
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
pucch
_ConfigCommon
));
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
pucch_ConfigCommon
->
present
=
NR_SetupRelease_PUCCH_ConfigCommon_PR_setup
;
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
pucch_ConfigCommon
->
present
=
NR_SetupRelease_PUCCH_ConfigCommon_PR_setup
;
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
pucch_ConfigCommon
->
choice
.
setup
=
CALLOC
(
1
,
sizeof
(
struct
NR_PUCCH_ConfigCommon
));
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
pucch_ConfigCommon
->
choice
.
setup
=
CALLOC
(
1
,
sizeof
(
struct
NR_PUCCH_ConfigCommon
));
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
pucch_ConfigCommon
->
choice
.
setup
->
p0_nominal
=
CALLOC
(
1
,
sizeof
(
long
));
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
pucch_ConfigCommon
->
choice
.
setup
->
p0_nominal
=
CALLOC
(
1
,
sizeof
(
long
));
...
@@ -297,7 +297,7 @@ void fix_scc(NR_ServingCellConfigCommon_t *scc,uint64_t ssbmap) {
...
@@ -297,7 +297,7 @@ void fix_scc(NR_ServingCellConfigCommon_t *scc,uint64_t ssbmap) {
void
prepare_scd
(
NR_ServingCellConfig_t
*
scd
)
{
void
prepare_scd
(
NR_ServingCellConfig_t
*
scd
)
{
// Allocate downlink structures
// Allocate downlink structures
scd
->
downlinkBWP_ToAddModList
=
CALLOC
(
1
,
sizeof
(
scd
->
downlinkBWP_ToAddModList
));
scd
->
downlinkBWP_ToAddModList
=
CALLOC
(
1
,
sizeof
(
*
scd
->
downlinkBWP_ToAddModList
));
// Downlink bandwidth part
// Downlink bandwidth part
NR_BWP_Downlink_t
*
bwp
=
calloc
(
1
,
sizeof
(
*
bwp
));
NR_BWP_Downlink_t
*
bwp
=
calloc
(
1
,
sizeof
(
*
bwp
));
...
@@ -318,14 +318,14 @@ void prepare_scd(NR_ServingCellConfig_t *scd) {
...
@@ -318,14 +318,14 @@ void prepare_scd(NR_ServingCellConfig_t *scd) {
NR_DMRS_DownlinkCfg
->
phaseTrackingRS
->
present
=
NR_SetupRelease_PTRS_DownlinkConfig_PR_setup
;
NR_DMRS_DownlinkCfg
->
phaseTrackingRS
->
present
=
NR_SetupRelease_PTRS_DownlinkConfig_PR_setup
;
NR_DMRS_DownlinkCfg
->
phaseTrackingRS
->
choice
.
setup
=
CALLOC
(
1
,
sizeof
(
*
NR_DMRS_DownlinkCfg
->
phaseTrackingRS
->
choice
.
setup
));
NR_DMRS_DownlinkCfg
->
phaseTrackingRS
->
choice
.
setup
=
CALLOC
(
1
,
sizeof
(
*
NR_DMRS_DownlinkCfg
->
phaseTrackingRS
->
choice
.
setup
));
NR_PTRS_DownlinkConfig_t
*
NR_PTRS_DownlinkCfg
=
NR_DMRS_DownlinkCfg
->
phaseTrackingRS
->
choice
.
setup
;
NR_PTRS_DownlinkConfig_t
*
NR_PTRS_DownlinkCfg
=
NR_DMRS_DownlinkCfg
->
phaseTrackingRS
->
choice
.
setup
;
NR_PTRS_DownlinkCfg
->
frequencyDensity
=
CALLOC
(
1
,
sizeof
(
NR_PTRS_DownlinkCfg
->
frequencyDensity
)
);
AssertFatal
(
NULL
!=
(
NR_PTRS_DownlinkCfg
->
frequencyDensity
=
CALLOC
(
1
,
sizeof
(
*
NR_PTRS_DownlinkCfg
->
frequencyDensity
))),
""
);
int
*
dl_rbs
[
2
];
int
*
dl_rbs
[
2
];
for
(
int
i
=
0
;
i
<
2
;
i
++
)
{
for
(
int
i
=
0
;
i
<
2
;
i
++
)
{
dl_rbs
[
i
]
=
CALLOC
(
1
,
sizeof
(
*
dl_rbs
[
i
]));
dl_rbs
[
i
]
=
CALLOC
(
1
,
sizeof
(
*
dl_rbs
[
i
]));
*
dl_rbs
[
i
]
=
0
;
*
dl_rbs
[
i
]
=
0
;
ASN_SEQUENCE_ADD
(
&
NR_PTRS_DownlinkCfg
->
frequencyDensity
->
list
,
dl_rbs
[
i
]);
ASN_SEQUENCE_ADD
(
&
NR_PTRS_DownlinkCfg
->
frequencyDensity
->
list
,
dl_rbs
[
i
]);
}
}
NR_PTRS_DownlinkCfg
->
timeDensity
=
CALLOC
(
1
,
sizeof
(
NR_PTRS_DownlinkCfg
->
timeDensity
));
NR_PTRS_DownlinkCfg
->
timeDensity
=
CALLOC
(
1
,
sizeof
(
*
NR_PTRS_DownlinkCfg
->
timeDensity
));
int
*
dl_mcs
[
3
];
int
*
dl_mcs
[
3
];
for
(
int
i
=
0
;
i
<
3
;
i
++
)
{
for
(
int
i
=
0
;
i
<
3
;
i
++
)
{
dl_mcs
[
i
]
=
CALLOC
(
1
,
sizeof
(
*
dl_mcs
[
i
]));
dl_mcs
[
i
]
=
CALLOC
(
1
,
sizeof
(
*
dl_mcs
[
i
]));
...
...
openair2/LAYER2/MAC/config.c
View file @
818c9b2c
...
@@ -337,7 +337,8 @@ config_sib2(int Mod_idP,
...
@@ -337,7 +337,8 @@ config_sib2(int Mod_idP,
LTE_ARFCN_ValueEUTRA_t
*
ul_CArrierFreqP
,
LTE_ARFCN_ValueEUTRA_t
*
ul_CArrierFreqP
,
long
*
ul_BandwidthP
,
long
*
ul_BandwidthP
,
LTE_AdditionalSpectrumEmission_t
*
additionalSpectrumEmissionP
,
LTE_AdditionalSpectrumEmission_t
*
additionalSpectrumEmissionP
,
struct
LTE_MBSFN_SubframeConfigList
*
mbsfn_SubframeConfigListP
)
{
struct
LTE_MBSFN_SubframeConfigList
*
mbsfn_SubframeConfigListP
,
int
dl_Bandwidth
)
{
nfapi_config_request_t
*
cfg
=
&
RC
.
mac
[
Mod_idP
]
->
config
[
CC_idP
];
nfapi_config_request_t
*
cfg
=
&
RC
.
mac
[
Mod_idP
]
->
config
[
CC_idP
];
cfg
->
subframe_config
.
pb
.
value
=
radioResourceConfigCommonP
->
pdsch_ConfigCommon
.
p_b
;
cfg
->
subframe_config
.
pb
.
value
=
radioResourceConfigCommonP
->
pdsch_ConfigCommon
.
p_b
;
cfg
->
subframe_config
.
pb
.
tl
.
tag
=
NFAPI_SUBFRAME_CONFIG_PB_TAG
;
cfg
->
subframe_config
.
pb
.
tl
.
tag
=
NFAPI_SUBFRAME_CONFIG_PB_TAG
;
...
@@ -345,7 +346,7 @@ config_sib2(int Mod_idP,
...
@@ -345,7 +346,7 @@ config_sib2(int Mod_idP,
cfg
->
rf_config
.
reference_signal_power
.
value
=
radioResourceConfigCommonP
->
pdsch_ConfigCommon
.
referenceSignalPower
;
cfg
->
rf_config
.
reference_signal_power
.
value
=
radioResourceConfigCommonP
->
pdsch_ConfigCommon
.
referenceSignalPower
;
cfg
->
rf_config
.
reference_signal_power
.
tl
.
tag
=
NFAPI_RF_CONFIG_REFERENCE_SIGNAL_POWER_TAG
;
cfg
->
rf_config
.
reference_signal_power
.
tl
.
tag
=
NFAPI_RF_CONFIG_REFERENCE_SIGNAL_POWER_TAG
;
cfg
->
num_tlv
++
;
cfg
->
num_tlv
++
;
cfg
->
nfapi_config
.
max_transmit_power
.
value
=
cfg
->
rf_config
.
reference_signal_power
.
value
+
power_off_dB
[
cfg
->
rf_config
.
dl_channel_bandwidth
.
value
];
cfg
->
nfapi_config
.
max_transmit_power
.
value
=
cfg
->
rf_config
.
reference_signal_power
.
value
+
power_off_dB
[
dl_Bandwidth
];
cfg
->
nfapi_config
.
max_transmit_power
.
tl
.
tag
=
NFAPI_NFAPI_MAXIMUM_TRANSMIT_POWER_TAG
;
cfg
->
nfapi_config
.
max_transmit_power
.
tl
.
tag
=
NFAPI_NFAPI_MAXIMUM_TRANSMIT_POWER_TAG
;
cfg
->
num_tlv
++
;
cfg
->
num_tlv
++
;
cfg
->
prach_config
.
configuration_index
.
value
=
radioResourceConfigCommonP
->
prach_Config
.
prach_ConfigInfo
.
prach_ConfigIndex
;
cfg
->
prach_config
.
configuration_index
.
value
=
radioResourceConfigCommonP
->
prach_Config
.
prach_ConfigInfo
.
prach_ConfigIndex
;
...
@@ -870,7 +871,8 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
...
@@ -870,7 +871,8 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
config_sib2
(
Mod_idP
,
CC_idP
,
radioResourceConfigCommon
,
config_sib2
(
Mod_idP
,
CC_idP
,
radioResourceConfigCommon
,
radioResourceConfigCommon_BR
,
radioResourceConfigCommon_BR
,
NULL
,
ul_Bandwidth
,
additionalSpectrumEmission
,
NULL
,
ul_Bandwidth
,
additionalSpectrumEmission
,
mbsfn_SubframeConfigList
);
mbsfn_SubframeConfigList
,
mib
->
message
.
dl_Bandwidth
);
}
// mib != NULL
}
// mib != NULL
if
(
mobilityControlInfo
!=
NULL
)
{
if
(
mobilityControlInfo
!=
NULL
)
{
...
...
openair2/LAYER2/MAC/eNB_scheduler_mch.c
View file @
818c9b2c
...
@@ -84,7 +84,7 @@ get_mbsfn_sf_alloction(module_id_t module_idP, uint8_t CC_id,
...
@@ -84,7 +84,7 @@ get_mbsfn_sf_alloction(module_id_t module_idP, uint8_t CC_id,
static
uint32_t
bytes_in_buffer
=
0
;
static
uint32_t
bytes_in_buffer
=
0
;
static
uint32_t
msi_pmch_stop
=
0
;
static
uint32_t
msi_pmch_stop
=
0
;
uint16
_t
mbms_rab_id
=
2047
;
//[8] = {2047,2047,2047,2047,2047,2047,2047,2047};
rb_id
_t
mbms_rab_id
=
2047
;
//[8] = {2047,2047,2047,2047,2047,2047,2047,2047};
static
uint32_t
msi_sfs
=
0
;
static
uint32_t
msi_sfs
=
0
;
...
...
openair2/LAYER2/MAC/mac_extern.h
View file @
818c9b2c
...
@@ -65,6 +65,7 @@ extern const int cqi_to_mcs[16];
...
@@ -65,6 +65,7 @@ extern const int cqi_to_mcs[16];
extern
uint32_t
RRC_CONNECTION_FLAG
;
extern
uint32_t
RRC_CONNECTION_FLAG
;
extern
uint8_t
rb_table
[
34
];
extern
uint8_t
rb_table
[
34
];
extern
rb_id_t
mbms_rab_id
;
#if defined(PRE_SCD_THREAD)
#if defined(PRE_SCD_THREAD)
...
...
openair2/LAYER2/MAC/ue_procedures.c
View file @
818c9b2c
...
@@ -72,7 +72,7 @@ extern UL_IND_t *UL_INFO;
...
@@ -72,7 +72,7 @@ extern UL_IND_t *UL_INFO;
extern
int
next_ra_frame
;
extern
int
next_ra_frame
;
extern
module_id_t
next_Mod_id
;
extern
module_id_t
next_Mod_id
;
in
t
mbms_rab_id
=
2047
;
//[8] = {2047,2047,2047,2047,2047,2047,2047,2047};
rb_id_
t
mbms_rab_id
=
2047
;
//[8] = {2047,2047,2047,2047,2047,2047,2047,2047};
static
int
mbms_mch_i
=
0
;
static
int
mbms_mch_i
=
0
;
//static int num_msi_per_CSA[28];
//static int num_msi_per_CSA[28];
...
...
openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c
View file @
818c9b2c
...
@@ -78,7 +78,6 @@ extern int nas_sock_fd[MAX_MOBILES_PER_ENB];
...
@@ -78,7 +78,6 @@ extern int nas_sock_fd[MAX_MOBILES_PER_ENB];
extern
int
nas_sock_mbms_fd
;
extern
int
nas_sock_mbms_fd
;
extern
int
mbms_rab_id
;
extern
struct
msghdr
nas_msg_tx
;
extern
struct
msghdr
nas_msg_tx
;
...
@@ -113,8 +112,6 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t *const ctxt_pP) {
...
@@ -113,8 +112,6 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t *const ctxt_pP) {
* PDCP packet to pick the right socket below */
* PDCP packet to pick the right socket below */
int
rb_id
=
pdcpHead
->
rb_id
;
int
rb_id
=
pdcpHead
->
rb_id
;
int
sizeToWrite
=
sizeof
(
pdcp_data_ind_header_t
)
+
pdcpHead
->
data_size
;
void
*
pdcpData
=
(
void
*
)(
pdcpHead
+
1
);
void
*
pdcpData
=
(
void
*
)(
pdcpHead
+
1
);
if
(
rb_id
==
10
)
{
//hardcoded for PC5-Signaling
if
(
rb_id
==
10
)
{
//hardcoded for PC5-Signaling
if
(
LOG_DEBUGFLAG
(
DEBUG_PDCP
)
)
{
if
(
LOG_DEBUGFLAG
(
DEBUG_PDCP
)
)
{
...
@@ -128,24 +125,25 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t *const ctxt_pP) {
...
@@ -128,24 +125,25 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t *const ctxt_pP) {
}
else
if
(
UE_NAS_USE_TUN
)
{
}
else
if
(
UE_NAS_USE_TUN
)
{
//ret = write(nas_sock_fd[pdcpHead->inst], &(sdu_p->data[sizeof(pdcp_data_ind_header_t)]),sizeToWrite );
//ret = write(nas_sock_fd[pdcpHead->inst], &(sdu_p->data[sizeof(pdcp_data_ind_header_t)]),sizeToWrite );
if
(
rb_id
==
mbms_rab_id
){
if
(
rb_id
==
mbms_rab_id
){
ret
=
write
(
nas_sock_mbms_fd
,
pdcpData
,
sizeToWrit
e
);
ret
=
write
(
nas_sock_mbms_fd
,
pdcpData
,
pdcpHead
->
data_siz
e
);
LOG_I
(
PDCP
,
"[PDCP_FIFOS] ret %d TRIED TO PUSH MBMS DATA TO rb_id %d handle %d sizeToWrite %d
\n
"
,
LOG_I
(
PDCP
,
"[PDCP_FIFOS] ret %d TRIED TO PUSH MBMS DATA TO rb_id %d handle %d sizeToWrite %d
\n
"
,
ret
,
rb_id
,
nas_sock_fd
[
pdcpHead
->
inst
],
sizeToWrit
e
);
ret
,
rb_id
,
nas_sock_fd
[
pdcpHead
->
inst
],
pdcpHead
->
data_siz
e
);
}
}
else
else
{
{
if
(
LOG_DEBUGFLAG
(
DEBUG_PDCP
)
)
if
(
LOG_DEBUGFLAG
(
DEBUG_PDCP
)
)
log_dump
(
PDCP
,
pdcpData
,
sizeToWrit
e
,
LOG_DUMP_CHAR
,
"PDCP output to be sent to TUN interface:
\n
"
);
log_dump
(
PDCP
,
pdcpData
,
pdcpHead
->
data_siz
e
,
LOG_DUMP_CHAR
,
"PDCP output to be sent to TUN interface:
\n
"
);
ret
=
write
(
nas_sock_fd
[
pdcpHead
->
inst
],
pdcpData
,
sizeToWrit
e
);
ret
=
write
(
nas_sock_fd
[
pdcpHead
->
inst
],
pdcpData
,
pdcpHead
->
data_siz
e
);
LOG_T
(
PDCP
,
"[UE PDCP_FIFOS] ret %d TRIED TO PUSH DATA TO rb_id %d handle %d sizeToWrite %d
\n
"
,
LOG_T
(
PDCP
,
"[UE PDCP_FIFOS] ret %d TRIED TO PUSH DATA TO rb_id %d handle %d sizeToWrite %d
\n
"
,
ret
,
rb_id
,
nas_sock_fd
[
pdcpHead
->
inst
],
sizeToWrit
e
);
ret
,
rb_id
,
nas_sock_fd
[
pdcpHead
->
inst
],
pdcpHead
->
data_siz
e
);
}
}
}
else
if
(
ENB_NAS_USE_TUN
)
{
}
else
if
(
ENB_NAS_USE_TUN
)
{
if
(
LOG_DEBUGFLAG
(
DEBUG_PDCP
)
)
if
(
LOG_DEBUGFLAG
(
DEBUG_PDCP
)
)
log_dump
(
PDCP
,
pdcpData
,
sizeToWrit
e
,
LOG_DUMP_CHAR
,
"PDCP output to be sent to TUN interface:
\n
"
);
log_dump
(
PDCP
,
pdcpData
,
pdcpHead
->
data_siz
e
,
LOG_DUMP_CHAR
,
"PDCP output to be sent to TUN interface:
\n
"
);
ret
=
write
(
nas_sock_fd
[
0
],
pdcpData
,
sizeToWrit
e
);
ret
=
write
(
nas_sock_fd
[
0
],
pdcpData
,
pdcpHead
->
data_siz
e
);
LOG_T
(
PDCP
,
"[NB PDCP_FIFOS] ret %d TRIED TO PUSH DATA TO rb_id %d handle %d sizeToWrite %d
\n
"
,
ret
,
rb_id
,
nas_sock_fd
[
0
],
sizeToWrit
e
);
LOG_T
(
PDCP
,
"[NB PDCP_FIFOS] ret %d TRIED TO PUSH DATA TO rb_id %d handle %d sizeToWrite %d
\n
"
,
ret
,
rb_id
,
nas_sock_fd
[
0
],
pdcpHead
->
data_siz
e
);
}
else
if
(
PDCP_USE_NETLINK
)
{
}
else
if
(
PDCP_USE_NETLINK
)
{
int
sizeToWrite
=
sizeof
(
pdcp_data_ind_header_t
)
+
pdcpHead
->
data_size
;
memcpy
(
NLMSG_DATA
(
nas_nlh_tx
),
(
uint8_t
*
)
pdcpHead
,
sizeToWrite
);
memcpy
(
NLMSG_DATA
(
nas_nlh_tx
),
(
uint8_t
*
)
pdcpHead
,
sizeToWrite
);
nas_nlh_tx
->
nlmsg_len
=
sizeToWrite
;
nas_nlh_tx
->
nlmsg_len
=
sizeToWrite
;
ret
=
sendmsg
(
nas_sock_fd
[
0
],
&
nas_msg_tx
,
0
);
ret
=
sendmsg
(
nas_sock_fd
[
0
],
&
nas_msg_tx
,
0
);
...
@@ -154,7 +152,7 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t *const ctxt_pP) {
...
@@ -154,7 +152,7 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t *const ctxt_pP) {
AssertFatal
(
ret
>=
0
,
"[PDCP_FIFOS] pdcp_fifo_flush_sdus (errno: %d %s), nas_sock_fd[0]: %d
\n
"
,
errno
,
strerror
(
errno
),
nas_sock_fd
[
0
]);
AssertFatal
(
ret
>=
0
,
"[PDCP_FIFOS] pdcp_fifo_flush_sdus (errno: %d %s), nas_sock_fd[0]: %d
\n
"
,
errno
,
strerror
(
errno
),
nas_sock_fd
[
0
]);
if
(
LOG_DEBUGFLAG
(
DEBUG_PDCP
)
)
if
(
LOG_DEBUGFLAG
(
DEBUG_PDCP
)
)
log_dump
(
PDCP
,
pdcpData
,
min
(
sizeToWrit
e
,
30
)
,
LOG_DUMP_CHAR
,
log_dump
(
PDCP
,
pdcpData
,
min
(
pdcpHead
->
data_siz
e
,
30
)
,
LOG_DUMP_CHAR
,
"Printing first bytes of PDCP SDU before removing it from the list:
\n
"
);
"Printing first bytes of PDCP SDU before removing it from the list:
\n
"
);
delNotifiedFIFO_elt
(
sdu_p
);
delNotifiedFIFO_elt
(
sdu_p
);
pdcp_nb_sdu_sent
++
;
pdcp_nb_sdu_sent
++
;
...
@@ -384,6 +382,7 @@ int pdcp_fifo_read_input_sdus_fromnetlinksock (const protocol_ctxt_t *const ctx
...
@@ -384,6 +382,7 @@ int pdcp_fifo_read_input_sdus_fromnetlinksock (const protocol_ctxt_t *const ctx
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ
,
1
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ
,
1
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ_BUFFER
,
1
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ_BUFFER
,
1
);
len
=
recvmsg
(
nas_sock_fd
[
0
],
&
nas_msg_rx
,
0
);
len
=
recvmsg
(
nas_sock_fd
[
0
],
&
nas_msg_rx
,
0
);
printf
(
"recev: %d
\n
"
,
len
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ_BUFFER
,
0
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_FIFO_READ_BUFFER
,
0
);
if
(
len
>
0
)
{
if
(
len
>
0
)
{
...
...
openair2/RRC/LTE/plmn_data.h
View file @
818c9b2c
...
@@ -2231,7 +2231,7 @@ static const plmn_data_t plmn_data[] = {
...
@@ -2231,7 +2231,7 @@ static const plmn_data_t plmn_data[] = {
/*
/*
310 900 Mid-Rivers Communications Mid-Rivers Wireless Operational
310 900 Mid-Rivers Communications Mid-Rivers Wireless Operational
*/
*/
{
310
,
910
,
"Verizon Wireless"
,
"Verizon USA"
}
{
310
,
910
,
"Verizon Wireless"
,
"Verizon USA"
}
,
/*
/*
310 920 Get Mobile Inactive
310 920 Get Mobile Inactive
310 930 Copper Valley Wireless Inactive
310 930 Copper Valley Wireless Inactive
...
@@ -2295,6 +2295,7 @@ static const plmn_data_t plmn_data[] = {
...
@@ -2295,6 +2295,7 @@ static const plmn_data_t plmn_data[] = {
648 4 Econet Wireless Econet Operational
648 4 Econet Wireless Econet Operational
*/
*/
{
0
,
0
,
""
,
""
}
};
};
...
...
targets/RT/USER/lte-softmodem.c
View file @
818c9b2c
...
@@ -56,6 +56,8 @@
...
@@ -56,6 +56,8 @@
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
#include <openair1/PHY/phy_extern_ue.h>
#include "PHY/phy_vars.h"
#include "PHY/phy_vars.h"
#include "SCHED/sched_common_vars.h"
#include "SCHED/sched_common_vars.h"
#include "LAYER2/MAC/mac_vars.h"
#include "LAYER2/MAC/mac_vars.h"
...
...
targets/RT/USER/lte-ue.c
View file @
818c9b2c
...
@@ -181,8 +181,7 @@ PHY_VARS_UE *init_ue_vars(LTE_DL_FRAME_PARMS *frame_parms,
...
@@ -181,8 +181,7 @@ PHY_VARS_UE *init_ue_vars(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t
abstraction_flag
)
uint8_t
abstraction_flag
)
{
{
PHY_VARS_UE
*
ue
=
(
PHY_VARS_UE
*
)
malloc
(
sizeof
(
PHY_VARS_UE
));
PHY_VARS_UE
*
ue
=
(
PHY_VARS_UE
*
)
calloc
(
1
,
sizeof
(
PHY_VARS_UE
));
memset
(
ue
,
0
,
sizeof
(
PHY_VARS_UE
));
if
(
frame_parms
!=
(
LTE_DL_FRAME_PARMS
*
)
NULL
)
{
// if we want to give initial frame parms, allocate the PHY_VARS_UE structure and put them in
if
(
frame_parms
!=
(
LTE_DL_FRAME_PARMS
*
)
NULL
)
{
// if we want to give initial frame parms, allocate the PHY_VARS_UE structure and put them in
memcpy
(
&
(
ue
->
frame_parms
),
frame_parms
,
sizeof
(
LTE_DL_FRAME_PARMS
));
memcpy
(
&
(
ue
->
frame_parms
),
frame_parms
,
sizeof
(
LTE_DL_FRAME_PARMS
));
...
...
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