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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
62c42f4e
Commit
62c42f4e
authored
Jun 19, 2019
by
Rakesh
Committed by
Florian Kaltenberger
Jul 08, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for dmrs and data extraction for using threequarter sampling rate
parent
4998b6ae
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
28 deletions
+59
-28
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
+53
-24
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
+6
-4
No files found.
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
View file @
62c42f4e
...
@@ -98,7 +98,8 @@ int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue,
...
@@ -98,7 +98,8 @@ int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue,
#endif
#endif
pil
+=
2
;
pil
+=
2
;
re_offset
=
(
re_offset
+
4
)
&
(
ue
->
frame_parms
.
ofdm_symbol_size
-
1
);
//re_offset = (re_offset+4)&(ue->frame_parms.ofdm_symbol_size-1);
re_offset
=
(
re_offset
>=
ue
->
frame_parms
.
ofdm_symbol_size
)
?
(
re_offset
-
ue
->
frame_parms
.
ofdm_symbol_size
+
4
)
:
(
re_offset
+
4
);
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
re_offset
)];
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
re_offset
)];
...
@@ -113,7 +114,8 @@ int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue,
...
@@ -113,7 +114,8 @@ int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue,
#endif
#endif
pil
+=
2
;
pil
+=
2
;
re_offset
=
(
re_offset
+
4
)
&
(
ue
->
frame_parms
.
ofdm_symbol_size
-
1
);
//re_offset = (re_offset+4)&(ue->frame_parms.ofdm_symbol_size-1);
re_offset
=
(
re_offset
>=
ue
->
frame_parms
.
ofdm_symbol_size
)
?
(
re_offset
-
ue
->
frame_parms
.
ofdm_symbol_size
+
4
)
:
(
re_offset
+
4
);
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
re_offset
)];
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
re_offset
)];
current_ssb
->
c_re
+=
ch
[
0
];
current_ssb
->
c_re
+=
ch
[
0
];
...
@@ -124,7 +126,8 @@ int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue,
...
@@ -124,7 +126,8 @@ int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue,
#endif
#endif
pil
+=
2
;
pil
+=
2
;
re_offset
=
(
re_offset
+
4
)
&
(
ue
->
frame_parms
.
ofdm_symbol_size
-
1
);
//re_offset = (re_offset+4)&(ue->frame_parms.ofdm_symbol_size-1);
re_offset
=
(
re_offset
>=
ue
->
frame_parms
.
ofdm_symbol_size
)
?
(
re_offset
-
ue
->
frame_parms
.
ofdm_symbol_size
+
4
)
:
(
re_offset
+
4
);
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
re_offset
)];
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
re_offset
)];
for
(
pilot_cnt
=
3
;
pilot_cnt
<
(
3
*
20
);
pilot_cnt
+=
3
)
{
for
(
pilot_cnt
=
3
;
pilot_cnt
<
(
3
*
20
);
pilot_cnt
+=
3
)
{
...
@@ -135,7 +138,8 @@ int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue,
...
@@ -135,7 +138,8 @@ int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue,
// in 2nd symbol, skip middle REs (48 with DMRS, 144 for SSS, and another 48 with DMRS)
// in 2nd symbol, skip middle REs (48 with DMRS, 144 for SSS, and another 48 with DMRS)
if
(
dmrss
==
1
&&
pilot_cnt
==
12
)
{
if
(
dmrss
==
1
&&
pilot_cnt
==
12
)
{
pilot_cnt
=
48
;
pilot_cnt
=
48
;
re_offset
=
(
re_offset
+
144
)
&
(
ue
->
frame_parms
.
ofdm_symbol_size
-
1
);
//re_offset = (re_offset+144)&(ue->frame_parms.ofdm_symbol_size-1);
re_offset
=
(
re_offset
>=
ue
->
frame_parms
.
ofdm_symbol_size
)
?
(
re_offset
-
ue
->
frame_parms
.
ofdm_symbol_size
+
144
)
:
(
re_offset
+
144
);
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
re_offset
)];
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
re_offset
)];
}
}
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
...
@@ -149,7 +153,8 @@ int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue,
...
@@ -149,7 +153,8 @@ int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue,
#endif
#endif
pil
+=
2
;
pil
+=
2
;
re_offset
=
(
re_offset
+
4
)
&
(
ue
->
frame_parms
.
ofdm_symbol_size
-
1
);
//re_offset = (re_offset+4)&(ue->frame_parms.ofdm_symbol_size-1);
re_offset
=
(
re_offset
>=
ue
->
frame_parms
.
ofdm_symbol_size
)
?
(
re_offset
-
ue
->
frame_parms
.
ofdm_symbol_size
+
4
)
:
(
re_offset
+
4
);
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
re_offset
)];
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
re_offset
)];
...
@@ -163,7 +168,8 @@ int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue,
...
@@ -163,7 +168,8 @@ int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue,
printf
(
"pilot %d : rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
pilot_cnt
+
1
,
rxF
[
0
],
rxF
[
1
],
ch
[
0
],
ch
[
1
],
pil
[
0
],
pil
[
1
]);
printf
(
"pilot %d : rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d)
\n
"
,
pilot_cnt
+
1
,
rxF
[
0
],
rxF
[
1
],
ch
[
0
],
ch
[
1
],
pil
[
0
],
pil
[
1
]);
#endif
#endif
pil
+=
2
;
pil
+=
2
;
re_offset
=
(
re_offset
+
4
)
&
(
ue
->
frame_parms
.
ofdm_symbol_size
-
1
);
//re_offset = (re_offset+4)&(ue->frame_parms.ofdm_symbol_size-1);
re_offset
=
(
re_offset
>=
ue
->
frame_parms
.
ofdm_symbol_size
)
?
(
re_offset
-
ue
->
frame_parms
.
ofdm_symbol_size
+
4
)
:
(
re_offset
+
4
);
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
re_offset
)];
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
re_offset
)];
...
@@ -178,7 +184,8 @@ int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue,
...
@@ -178,7 +184,8 @@ int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue,
#endif
#endif
pil
+=
2
;
pil
+=
2
;
re_offset
=
(
re_offset
+
4
)
&
(
ue
->
frame_parms
.
ofdm_symbol_size
-
1
);
//re_offset = (re_offset+4)&(ue->frame_parms.ofdm_symbol_size-1);
re_offset
=
(
re_offset
>=
ue
->
frame_parms
.
ofdm_symbol_size
)
?
(
re_offset
-
ue
->
frame_parms
.
ofdm_symbol_size
+
4
)
:
(
re_offset
+
4
);
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
re_offset
)];
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
re_offset
)];
}
}
...
@@ -303,7 +310,8 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -303,7 +310,8 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
dl_ch
,
dl_ch
,
16
);
16
);
pil
+=
2
;
pil
+=
2
;
re_offset
=
(
re_offset
+
4
)
&
(
ue
->
frame_parms
.
ofdm_symbol_size
-
1
);
//re_offset = (re_offset+4)&(ue->frame_parms.ofdm_symbol_size-1);
re_offset
=
(
re_offset
>=
ue
->
frame_parms
.
ofdm_symbol_size
)
?
(
re_offset
-
ue
->
frame_parms
.
ofdm_symbol_size
+
4
)
:
(
re_offset
+
4
);
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
re_offset
)];
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
re_offset
)];
//for (int i= 0; i<8; i++)
//for (int i= 0; i<8; i++)
...
@@ -321,7 +329,8 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -321,7 +329,8 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
dl_ch
,
dl_ch
,
16
);
16
);
pil
+=
2
;
pil
+=
2
;
re_offset
=
(
re_offset
+
4
)
&
(
ue
->
frame_parms
.
ofdm_symbol_size
-
1
);
//re_offset = (re_offset+4)&(ue->frame_parms.ofdm_symbol_size-1);
re_offset
=
(
re_offset
>=
ue
->
frame_parms
.
ofdm_symbol_size
)
?
(
re_offset
-
ue
->
frame_parms
.
ofdm_symbol_size
+
4
)
:
(
re_offset
+
4
);
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
re_offset
)];
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
re_offset
)];
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
...
@@ -336,7 +345,8 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -336,7 +345,8 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
dl_ch
,
dl_ch
,
16
);
16
);
pil
+=
2
;
pil
+=
2
;
re_offset
=
(
re_offset
+
4
)
&
(
ue
->
frame_parms
.
ofdm_symbol_size
-
1
);
//re_offset = (re_offset+4)&(ue->frame_parms.ofdm_symbol_size-1);
re_offset
=
(
re_offset
>=
ue
->
frame_parms
.
ofdm_symbol_size
)
?
(
re_offset
-
ue
->
frame_parms
.
ofdm_symbol_size
+
4
)
:
(
re_offset
+
4
);
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
re_offset
)];
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
re_offset
)];
dl_ch
+=
24
;
dl_ch
+=
24
;
...
@@ -348,7 +358,8 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -348,7 +358,8 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
// in 2nd symbol, skip middle REs (48 with DMRS, 144 for SSS, and another 48 with DMRS)
// in 2nd symbol, skip middle REs (48 with DMRS, 144 for SSS, and another 48 with DMRS)
if
(
dmrss
==
1
&&
pilot_cnt
==
12
)
{
if
(
dmrss
==
1
&&
pilot_cnt
==
12
)
{
pilot_cnt
=
48
;
pilot_cnt
=
48
;
re_offset
=
(
re_offset
+
144
)
&
(
ue
->
frame_parms
.
ofdm_symbol_size
-
1
);
//re_offset = (re_offset+144)&(ue->frame_parms.ofdm_symbol_size-1);
re_offset
=
(
re_offset
>=
ue
->
frame_parms
.
ofdm_symbol_size
)
?
(
re_offset
-
ue
->
frame_parms
.
ofdm_symbol_size
+
144
)
:
(
re_offset
+
144
);
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
re_offset
)];
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
re_offset
)];
dl_ch
+=
288
;
dl_ch
+=
288
;
}
}
...
@@ -367,7 +378,8 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -367,7 +378,8 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
// printf("pilot_cnt %d dl_ch %d %d\n", pilot_cnt, dl_ch+i, *(dl_ch+i));
// printf("pilot_cnt %d dl_ch %d %d\n", pilot_cnt, dl_ch+i, *(dl_ch+i));
pil
+=
2
;
pil
+=
2
;
re_offset
=
(
re_offset
+
4
)
&
(
ue
->
frame_parms
.
ofdm_symbol_size
-
1
);
//re_offset = (re_offset+4)&(ue->frame_parms.ofdm_symbol_size-1);
re_offset
=
(
re_offset
>=
ue
->
frame_parms
.
ofdm_symbol_size
)
?
(
re_offset
-
ue
->
frame_parms
.
ofdm_symbol_size
+
4
)
:
(
re_offset
+
4
);
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
re_offset
)];
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
re_offset
)];
...
@@ -382,7 +394,8 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -382,7 +394,8 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
dl_ch
,
dl_ch
,
16
);
16
);
pil
+=
2
;
pil
+=
2
;
re_offset
=
(
re_offset
+
4
)
&
(
ue
->
frame_parms
.
ofdm_symbol_size
-
1
);
//re_offset = (re_offset+4)&(ue->frame_parms.ofdm_symbol_size-1);
re_offset
=
(
re_offset
>=
ue
->
frame_parms
.
ofdm_symbol_size
)
?
(
re_offset
-
ue
->
frame_parms
.
ofdm_symbol_size
+
4
)
:
(
re_offset
+
4
);
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
re_offset
)];
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
re_offset
)];
...
@@ -398,7 +411,8 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -398,7 +411,8 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
dl_ch
,
dl_ch
,
16
);
16
);
pil
+=
2
;
pil
+=
2
;
re_offset
=
(
re_offset
+
4
)
&
(
ue
->
frame_parms
.
ofdm_symbol_size
-
1
);
//re_offset = (re_offset+4)&(ue->frame_parms.ofdm_symbol_size-1);
re_offset
=
(
re_offset
>=
ue
->
frame_parms
.
ofdm_symbol_size
)
?
(
re_offset
-
ue
->
frame_parms
.
ofdm_symbol_size
+
4
)
:
(
re_offset
+
4
);
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
re_offset
)];
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
k
+
re_offset
)];
dl_ch
+=
24
;
dl_ch
+=
24
;
...
@@ -611,9 +625,17 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -611,9 +625,17 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
idft
=
idft2048
;
idft
=
idft2048
;
break
;
break
;
default:
case
3072
:
idft
=
idft512
;
idft
=
idft3072
;
break
;
case
4096
:
idft
=
idft4096
;
break
;
break
;
default:
printf
(
"unsupported ofdm symbol size
\n
"
);
assert
(
0
);
}
}
if
(
(
Ns
==
1
)
&&
(
symbol
==
0
))
if
(
(
Ns
==
1
)
&&
(
symbol
==
0
))
...
@@ -623,7 +645,7 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -623,7 +645,7 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
for
(
p
=
0
;
p
<
ue
->
frame_parms
.
nb_antenna_ports_eNB
;
p
++
)
{
for
(
p
=
0
;
p
<
ue
->
frame_parms
.
nb_antenna_ports_eNB
;
p
++
)
{
if
(
ue
->
pdcch_vars
[
ue
->
current_thread_id
[
Ns
]][
eNB_offset
]
->
dl_ch_estimates
[(
p
<<
1
)
+
aarx
])
if
(
ue
->
pdcch_vars
[
ue
->
current_thread_id
[
Ns
]][
eNB_offset
]
->
dl_ch_estimates
[(
p
<<
1
)
+
aarx
])
{
{
LOG_
D
(
PHY
,
"Channel Impulse Computation Slot %d ThreadId %d Symbol %d
\n
"
,
Ns
,
ue
->
current_thread_id
[
Ns
],
symbol
);
LOG_
I
(
PHY
,
"Channel Impulse Computation Slot %d ThreadId %d Symbol %d
\n
"
,
Ns
,
ue
->
current_thread_id
[
Ns
],
symbol
);
idft
((
int16_t
*
)
&
ue
->
pdcch_vars
[
ue
->
current_thread_id
[
Ns
]][
eNB_offset
]
->
dl_ch_estimates
[(
p
<<
1
)
+
aarx
][
0
],
idft
((
int16_t
*
)
&
ue
->
pdcch_vars
[
ue
->
current_thread_id
[
Ns
]][
eNB_offset
]
->
dl_ch_estimates
[(
p
<<
1
)
+
aarx
][
0
],
(
int16_t
*
)
ue
->
pdcch_vars
[
ue
->
current_thread_id
[
Ns
]][
eNB_offset
]
->
dl_ch_estimates_time
[(
p
<<
1
)
+
aarx
],
1
);
(
int16_t
*
)
ue
->
pdcch_vars
[
ue
->
current_thread_id
[
Ns
]][
eNB_offset
]
->
dl_ch_estimates_time
[(
p
<<
1
)
+
aarx
],
1
);
}
}
...
@@ -734,7 +756,8 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -734,7 +756,8 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
dl_ch
,
dl_ch
,
8
);
8
);
pil
+=
2
;
pil
+=
2
;
re_offset
=
(
re_offset
+
2
)
&
(
ue
->
frame_parms
.
ofdm_symbol_size
-
1
);
//re_offset = (re_offset+2)&(ue->frame_parms.ofdm_symbol_size-1);
re_offset
=
(
re_offset
>=
ue
->
frame_parms
.
ofdm_symbol_size
)
?
(
re_offset
-
ue
->
frame_parms
.
ofdm_symbol_size
+
2
)
:
(
re_offset
+
2
);
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
nushift
+
re_offset
)];
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
nushift
+
re_offset
)];
//for (int i= 0; i<8; i++)
//for (int i= 0; i<8; i++)
//printf("dl_ch addr %p %d\n", dl_ch+i, *(dl_ch+i));
//printf("dl_ch addr %p %d\n", dl_ch+i, *(dl_ch+i));
...
@@ -749,7 +772,8 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -749,7 +772,8 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
dl_ch
,
dl_ch
,
8
);
8
);
pil
+=
2
;
pil
+=
2
;
re_offset
=
(
re_offset
+
2
)
&
(
ue
->
frame_parms
.
ofdm_symbol_size
-
1
);
//re_offset = (re_offset+2)&(ue->frame_parms.ofdm_symbol_size-1);
re_offset
=
(
re_offset
>=
ue
->
frame_parms
.
ofdm_symbol_size
)
?
(
re_offset
-
ue
->
frame_parms
.
ofdm_symbol_size
+
2
)
:
(
re_offset
+
2
);
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
nushift
+
re_offset
)];
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
nushift
+
re_offset
)];
//printf("dl_ch addr %p\n",dl_ch);
//printf("dl_ch addr %p\n",dl_ch);
...
@@ -767,7 +791,8 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -767,7 +791,8 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
//printf("dl_ch addr %p %d\n", dl_ch+i, *(dl_ch+i));
//printf("dl_ch addr %p %d\n", dl_ch+i, *(dl_ch+i));
pil
+=
2
;
pil
+=
2
;
re_offset
=
(
re_offset
+
2
)
&
(
ue
->
frame_parms
.
ofdm_symbol_size
-
1
);
//re_offset = (re_offset+2)&(ue->frame_parms.ofdm_symbol_size-1);
re_offset
=
(
re_offset
>=
ue
->
frame_parms
.
ofdm_symbol_size
)
?
(
re_offset
-
ue
->
frame_parms
.
ofdm_symbol_size
+
2
)
:
(
re_offset
+
2
);
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
nushift
+
re_offset
)];
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
nushift
+
re_offset
)];
dl_ch
+=
8
;
dl_ch
+=
8
;
...
@@ -787,7 +812,8 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -787,7 +812,8 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
8
);
8
);
pil
+=
2
;
pil
+=
2
;
re_offset
=
(
re_offset
+
2
)
&
(
ue
->
frame_parms
.
ofdm_symbol_size
-
1
);
//re_offset = (re_offset+2)&(ue->frame_parms.ofdm_symbol_size-1);
re_offset
=
(
re_offset
>=
ue
->
frame_parms
.
ofdm_symbol_size
)
?
(
re_offset
-
ue
->
frame_parms
.
ofdm_symbol_size
+
2
)
:
(
re_offset
+
2
);
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
nushift
+
re_offset
)];
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
nushift
+
re_offset
)];
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
...
@@ -800,7 +826,8 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -800,7 +826,8 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
dl_ch
,
dl_ch
,
8
);
8
);
pil
+=
2
;
pil
+=
2
;
re_offset
=
(
re_offset
+
2
)
&
(
ue
->
frame_parms
.
ofdm_symbol_size
-
1
);
//re_offset = (re_offset+2)&(ue->frame_parms.ofdm_symbol_size-1);
re_offset
=
(
re_offset
>=
ue
->
frame_parms
.
ofdm_symbol_size
)
?
(
re_offset
-
ue
->
frame_parms
.
ofdm_symbol_size
+
2
)
:
(
re_offset
+
2
);
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
nushift
+
re_offset
)];
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
nushift
+
re_offset
)];
dl_ch
+=
8
;
dl_ch
+=
8
;
...
@@ -821,7 +848,8 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -821,7 +848,8 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
//printf("dl_ch addr %p %d\n", dl_ch+i, *(dl_ch+i));
//printf("dl_ch addr %p %d\n", dl_ch+i, *(dl_ch+i));
pil
+=
2
;
pil
+=
2
;
re_offset
=
(
re_offset
+
2
)
&
(
ue
->
frame_parms
.
ofdm_symbol_size
-
1
);
//re_offset = (re_offset+2)&(ue->frame_parms.ofdm_symbol_size-1);
re_offset
=
(
re_offset
>=
ue
->
frame_parms
.
ofdm_symbol_size
)
?
(
re_offset
-
ue
->
frame_parms
.
ofdm_symbol_size
+
2
)
:
(
re_offset
+
2
);
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
nushift
+
re_offset
)];
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
nushift
+
re_offset
)];
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
ch
[
0
]
=
(
int16_t
)(((
int32_t
)
pil
[
0
]
*
rxF
[
0
]
-
(
int32_t
)
pil
[
1
]
*
rxF
[
1
])
>>
15
);
...
@@ -836,7 +864,8 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -836,7 +864,8 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
8
);
8
);
pil
+=
2
;
pil
+=
2
;
re_offset
=
(
re_offset
+
2
)
&
(
ue
->
frame_parms
.
ofdm_symbol_size
-
1
);
//re_offset = (re_offset+2)&(ue->frame_parms.ofdm_symbol_size-1);
re_offset
=
(
re_offset
>=
ue
->
frame_parms
.
ofdm_symbol_size
)
?
(
re_offset
-
ue
->
frame_parms
.
ofdm_symbol_size
+
2
)
:
(
re_offset
+
2
);
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
nushift
+
re_offset
)];
rxF
=
(
int16_t
*
)
&
rxdataF
[
aarx
][(
symbol_offset
+
nushift
+
re_offset
)];
dl_ch
+=
8
;
dl_ch
+=
8
;
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
View file @
62c42f4e
...
@@ -103,7 +103,8 @@ uint16_t nr_pbch_extract(int **rxdataF,
...
@@ -103,7 +103,8 @@ uint16_t nr_pbch_extract(int **rxdataF,
j
++
;
j
++
;
}
}
rx_offset
=
(
rx_offset
+
1
)
&
(
frame_parms
->
ofdm_symbol_size
-
1
);
//rx_offset=(rx_offset+1)&(frame_parms->ofdm_symbol_size-1);
rx_offset
=
(
rx_offset
>=
frame_parms
->
ofdm_symbol_size
)
?
(
rx_offset
-
frame_parms
->
ofdm_symbol_size
+
1
)
:
(
rx_offset
+
1
);
}
}
rxF_ext
+=
9
;
rxF_ext
+=
9
;
...
@@ -125,11 +126,12 @@ uint16_t nr_pbch_extract(int **rxdataF,
...
@@ -125,11 +126,12 @@ uint16_t nr_pbch_extract(int **rxdataF,
j
++
;
j
++
;
}
}
rx_offset
=
(
rx_offset
+
1
)
&
(
frame_parms
->
ofdm_symbol_size
-
1
);
//rx_offset=(rx_offset+1)&(frame_parms->ofdm_symbol_size-1);
rx_offset
=
(
rx_offset
>=
frame_parms
->
ofdm_symbol_size
)
?
(
rx_offset
-
frame_parms
->
ofdm_symbol_size
+
1
)
:
(
rx_offset
+
1
);
}
}
rxF_ext
+=
9
;
rxF_ext
+=
9
;
}
else
rx_offset
=
(
rx_offset
+
12
)
&
(
frame_parms
->
ofdm_symbol_size
-
1
);
}
else
rx_offset
=
(
rx_offset
>=
frame_parms
->
ofdm_symbol_size
)
?
(
rx_offset
-
frame_parms
->
ofdm_symbol_size
+
12
)
:
(
rx_offset
+
12
);
//rx_offset = (rx_offset
+12)&(frame_parms->ofdm_symbol_size-1);
}
}
}
}
...
...
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