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
zzha zzha
OpenXG-RAN
Commits
ecaa424c
Commit
ecaa424c
authored
Apr 03, 2019
by
Francesco Mani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes in how sync for two frames is handled in pss functions, it works
parent
385dcea7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
45 deletions
+47
-45
openair1/PHY/NR_REFSIG/pss_nr.h
openair1/PHY/NR_REFSIG/pss_nr.h
+1
-1
openair1/PHY/NR_UE_TRANSPORT/pss_nr.c
openair1/PHY/NR_UE_TRANSPORT/pss_nr.c
+45
-43
targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf
.../GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf
+1
-1
No files found.
openair1/PHY/NR_REFSIG/pss_nr.h
View file @
ecaa424c
...
...
@@ -138,7 +138,7 @@ int pss_synchro_nr(PHY_VARS_NR_UE *PHY_vars_UE, int is, int rate_change);
int
pss_search_time_nr
(
int
**
rxdata
,
///rx data in time domain
NR_DL_FRAME_PARMS
*
frame_parms
,
int
fo_flag
,
int
corr_sample
s
,
int
i
s
,
int
*
eNB_id
,
int
*
f_off
);
...
...
openair1/PHY/NR_UE_TRANSPORT/pss_nr.c
View file @
ecaa424c
...
...
@@ -608,14 +608,10 @@ void restore_frame_context_pss_nr(NR_DL_FRAME_PARMS *frame_parms_ue, int rate_ch
*
********************************************************************/
void
decimation_synchro_nr
(
PHY_VARS_NR_UE
*
PHY_vars_UE
,
int
rate_change
,
int
is
,
int
**
rxdata
)
void
decimation_synchro_nr
(
PHY_VARS_NR_UE
*
PHY_vars_UE
,
int
rate_change
,
int
**
rxdata
)
{
int
samples_for_frame
;
NR_DL_FRAME_PARMS
*
frame_parms
=
&
(
PHY_vars_UE
->
frame_parms
);
if
(
is
==
0
)
samples_for_frame
=
frame_parms
->
samples_per_frame
+
frame_parms
->
ofdm_symbol_size
;
else
samples_for_frame
=
frame_parms
->
samples_per_frame
;
int
samples_for_frame
=
2
*
frame_parms
->
samples_per_frame
;
AssertFatal
(
frame_parms
->
samples_per_tti
>
3839
,
"Illegal samples_per_tti %d
\n
"
,
frame_parms
->
samples_per_tti
);
...
...
@@ -630,11 +626,11 @@ void decimation_synchro_nr(PHY_VARS_NR_UE *PHY_vars_UE, int rate_change, int is,
/* build with cic filter does not work properly. Performances are significantly deteriorated */
#ifdef CIC_DECIMATOR
cic_decimator
((
int16_t
*
)
&
(
PHY_vars_UE
->
common_vars
.
rxdata
[
0
][
is
*
frame_parms
->
samples_per_frame
]),
(
int16_t
*
)
&
(
rxdata
[
0
][
0
]),
cic_decimator
((
int16_t
*
)
&
(
PHY_vars_UE
->
common_vars
.
rxdata
_is
[
0
][
0
]),
(
int16_t
*
)
&
(
rxdata
[
0
][
0
]),
samples_for_frame
,
rate_change
,
CIC_FILTER_STAGE_NUMBER
,
0
,
FIR_RATE_CHANGE
);
#else
fir_decimator
((
int16_t
*
)
&
(
PHY_vars_UE
->
common_vars
.
rxdata
[
0
][
frame_parms
->
samples_per_frame
]),
(
int16_t
*
)
&
(
rxdata
[
0
][
0
]),
fir_decimator
((
int16_t
*
)
&
(
PHY_vars_UE
->
common_vars
.
rxdata
_is
[
0
][
0
]),
(
int16_t
*
)
&
(
rxdata
[
0
][
0
]),
samples_for_frame
,
rate_change
,
0
);
#endif
...
...
@@ -666,44 +662,36 @@ int pss_synchro_nr(PHY_VARS_NR_UE *PHY_vars_UE, int is, int rate_change)
{
NR_DL_FRAME_PARMS
*
frame_parms
=
&
(
PHY_vars_UE
->
frame_parms
);
int
synchro_position
;
int
**
rxdata
;
int
**
rxdata
=
NULL
;
int
fo_flag
=
PHY_vars_UE
->
UE_fo_compensation
;
// flag to enable freq offset estimation and compensation
int
samples_for_frame
;
// to take into account the possibility of PSS to be found between the two frames
// the analysis of the first of two frames is extended by one symbol (duration of PSS)
if
(
is
==
0
)
samples_for_frame
=
frame_parms
->
samples_per_frame
+
frame_parms
->
ofdm_symbol_size
;
else
samples_for_frame
=
frame_parms
->
samples_per_frame
;
#ifdef DBG_PSS_NR
LOG_M
(
"rxdata0_rand.m"
,
"rxd0_rand"
,
&
PHY_vars_UE
->
common_vars
.
rxdata
[
0
][
0
],
2
*
frame_parms
->
samples_per_frame
,
1
,
1
);
#endif
rxdata
=
(
int32_t
**
)
malloc16
(
frame_parms
->
nb_antennas_rx
*
sizeof
(
int32_t
*
)
);
for
(
int
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_rx
;
aa
++
)
rxdata
[
aa
]
=
(
int32_t
*
)
malloc16_clear
(
(
samples_for_frame
+
8192
)
*
sizeof
(
int32_t
));
LOG_M
(
"rxdata0_rand.m"
,
"rxd0_rand"
,
&
PHY_vars_UE
->
common_vars
.
rxdata_is
[
0
][
0
],
frame_parms
->
samples_per_frame
,
1
,
1
);
#endif
if
(
rate_change
!=
1
)
{
rxdata
=
(
int32_t
**
)
malloc16
(
frame_parms
->
nb_antennas_rx
*
sizeof
(
int32_t
*
));
for
(
int
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_rx
;
aa
++
)
{
rxdata
[
aa
]
=
(
int32_t
*
)
malloc16_clear
(
(
frame_parms
->
samples_per_frame
+
8192
)
*
sizeof
(
int32_t
));
}
#ifdef SYNCHRO_DECIMAT
decimation_synchro_nr
(
PHY_vars_UE
,
rate_change
,
is
,
rxdata
);
decimation_synchro_nr
(
PHY_vars_UE
,
rate_change
,
rxdata
);
#endif
}
else
{
for
(
int
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_rx
;
aa
++
)
memcpy
(
&
(
rxdata
[
aa
][
0
]),
&
(
PHY_vars_UE
->
common_vars
.
rxdata
[
aa
][
is
*
frame_parms
->
samples_per_frame
]),
samples_for_frame
*
sizeof
(
int32_t
));
rxdata
=
PHY_vars_UE
->
common_vars
.
rxdata_is
;
}
#ifdef DBG_PSS_NR
LOG_M
(
"rxdata0_des.m"
,
"rxd0_des"
,
&
rxdata
[
0
][
0
],
samples_fo
r_frame
,
1
,
1
);
LOG_M
(
"rxdata0_des.m"
,
"rxd0_des"
,
&
rxdata
[
0
][
0
],
frame_parms
->
samples_pe
r_frame
,
1
,
1
);
#endif
...
...
@@ -718,7 +706,7 @@ int pss_synchro_nr(PHY_VARS_NR_UE *PHY_vars_UE, int is, int rate_change)
synchro_position
=
pss_search_time_nr
(
rxdata
,
frame_parms
,
fo_flag
,
samples_for_frame
,
is
,
(
int
*
)
&
PHY_vars_UE
->
common_vars
.
eNb_id
,
(
int
*
)
&
PHY_vars_UE
->
common_vars
.
freq_offset
);
...
...
@@ -738,20 +726,26 @@ int pss_synchro_nr(PHY_VARS_NR_UE *PHY_vars_UE, int is, int rate_change)
#endif
#ifdef SYNCHRO_DECIMAT
if
(
rate_change
!=
1
)
restore_frame_context_pss_nr
(
frame_parms
,
rate_change
);
#endif
if
(
rxdata
[
0
]
!=
NULL
)
{
for
(
int
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_rx
;
aa
++
)
if
(
rate_change
!=
1
)
{
if
(
rxdata
[
0
]
!=
NULL
)
{
for
(
int
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_rx
;
aa
++
)
{
free
(
rxdata
[
aa
]);
}
free
(
rxdata
);
}
restore_frame_context_pss_nr
(
frame_parms
,
rate_change
);
}
#endif
return
synchro_position
;
}
static
inline
int
abs32
(
int
x
)
{
return
(((
int
)((
short
*
)
&
x
)[
0
])
*
((
int
)((
short
*
)
&
x
)[
0
])
+
((
int
)((
short
*
)
&
x
)[
1
])
*
((
int
)((
short
*
)
&
x
)[
1
]));
...
...
@@ -777,7 +771,7 @@ static inline double angle64(int64_t x)
*
* PARAMETERS : received buffer
* frame parameters
*
*
https://www.ilpost.it/
* RETURN : position of detected pss
*
* DESCRIPTION : Synchronisation on pss sequence is based on a time domain correlation between received samples and pss sequence
...
...
@@ -826,7 +820,7 @@ static inline double angle64(int64_t x)
int
pss_search_time_nr
(
int
**
rxdata
,
///rx data in time domain
NR_DL_FRAME_PARMS
*
frame_parms
,
int
fo_flag
,
int
corr_sample
s
,
int
i
s
,
int
*
eNB_id
,
int
*
f_off
)
{
...
...
@@ -836,13 +830,18 @@ int pss_search_time_nr(int **rxdata, ///rx data in time domain
int64_t
avg
[
NUMBER_PSS_SEQUENCE
];
double
ffo_est
=
0
;
unsigned
int
length
=
corr_samples
;
// performing the correlation on a frame length plus one symbol for the first of the two frame
// to take into account the possibility of PSS in between the two frames
unsigned
int
length
;
if
(
is
==
0
)
length
=
frame_parms
->
samples_per_frame
+
(
2
*
frame_parms
->
ofdm_symbol_size
);
else
length
=
frame_parms
->
samples_per_frame
;
AssertFatal
(
length
>
0
,
"illegal length %d
\n
"
,
length
);
for
(
int
i
=
0
;
i
<
NUMBER_PSS_SEQUENCE
;
i
++
)
AssertFatal
(
pss_corr_ue
[
i
]
!=
NULL
,
"pss_corr_ue[%d] not yet allocated! Exiting.
\n
"
,
i
);
printf
(
"%d
\n\n
"
,
length
);
peak_value
=
0
;
peak_position
=
0
;
pss_source
=
0
;
...
...
@@ -878,7 +877,7 @@ int pss_search_time_nr(int **rxdata, ///rx data in time domain
/* perform correlation of rx data and pss sequence ie it is a dot product */
result
=
dot_product64
((
short
*
)
primary_synchro_time_nr
[
pss_index
],
(
short
*
)
&
(
rxdata
[
ar
][
n
]),
(
short
*
)
&
(
rxdata
[
ar
][
n
])
+
(
is
*
frame_parms
->
samples_per_frame
)
,
frame_parms
->
ofdm_symbol_size
,
shift
);
pss_corr_ue
[
pss_index
][
n
]
+=
abs64
(
result
);
...
...
@@ -912,13 +911,13 @@ int pss_search_time_nr(int **rxdata, ///rx data in time domain
int64_t
result1
,
result2
;
// Computing cross-correlation at peak on half the symbol size for first half of data
result1
=
dot_product64
((
short
*
)
primary_synchro_time_nr
[
pss_source
],
(
short
*
)
&
(
rxdata
[
0
][
peak_position
]),
(
short
*
)
&
(
rxdata
[
0
][
peak_position
])
+
(
is
*
frame_parms
->
samples_per_frame
)
,
frame_parms
->
ofdm_symbol_size
>>
1
,
shift
);
// Computing cross-correlation at peak on half the symbol size for data shifted by half symbol size
// as it is real and complex it is necessary to shift by a value equal to symbol size to obtain such shift
result2
=
dot_product64
((
short
*
)
primary_synchro_time_nr
[
pss_source
]
+
(
frame_parms
->
ofdm_symbol_size
),
(
short
*
)
&
(
rxdata
[
0
][
peak_position
])
+
(
frame_parms
->
ofdm_symbol_size
),
(
short
*
)
&
(
rxdata
[
0
][
peak_position
])
+
(
frame_parms
->
ofdm_symbol_size
+
(
is
*
frame_parms
->
samples_per_frame
)
),
frame_parms
->
ofdm_symbol_size
>>
1
,
shift
);
...
...
@@ -957,7 +956,10 @@ int pss_search_time_nr(int **rxdata, ///rx data in time domain
LOG_M
(
"pss_corr_ue0.m"
,
"pss_corr_ue0"
,
pss_corr_ue
[
0
],
length
,
1
,
6
);
LOG_M
(
"pss_corr_ue1.m"
,
"pss_corr_ue1"
,
pss_corr_ue
[
1
],
length
,
1
,
6
);
LOG_M
(
"pss_corr_ue2.m"
,
"pss_corr_ue2"
,
pss_corr_ue
[
2
],
length
,
1
,
6
);
LOG_M
(
"rxdata0.m"
,
"rxd0"
,
rxdata
[
0
],
length
,
1
,
1
);
if
(
is
)
LOG_M
(
"rxdata1.m"
,
"rxd0"
,
rxdata
[
frame_parms
->
samples_per_frame
],
length
,
1
,
1
);
else
LOG_M
(
"rxdata0.m"
,
"rxd0"
,
rxdata
[
0
],
length
,
1
,
1
);
}
else
{
debug_cnt
++
;
}
...
...
targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf
View file @
ecaa424c
...
...
@@ -71,7 +71,7 @@ gNBs =
UL_timeAlignmentTimerCommon
=
"infinity"
;
ServingCellConfigCommon_n_TimingAdvanceOffset
=
"n0"
ServingCellConfigCommon_ssb_PositionsInBurst_PR
=
0
x01
;
ServingCellConfigCommon_ssb_periodicityServingCell
=
2
0
;
ServingCellConfigCommon_ssb_periodicityServingCell
=
1
0
;
ServingCellConfigCommon_dmrs_TypeA_Position
=
2
;
NIA_SubcarrierSpacing
=
"kHz15"
;
ServingCellConfigCommon_ss_PBCH_BlockPower
= -
60
;
...
...
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