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
Michael Black
OpenXG-RAN
Commits
c9a8b466
Commit
c9a8b466
authored
3 years ago
by
hardy
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/fix-ptr-regression' into integration_2022_wk03_b
parents
27599b0b
55d1f1bd
Branches unavailable
2023.w22
2023.w21
2023.w20
2023.w19
2023.w18
2023.w18b
2023.w16
2023.w15
2023.w14
2023.w13
2023.w12
2023.w11
2023.w11b
2023.w10
2023.w10b
2023.w09
2023.w08
2023.w08b
2023.w07
2023.w06
2023.w05
2023.w03
2023.w02
2022.42
2022.41
2022.w51
2022.w50
2022.w49
2022.w48
2022.w47
2022.w46
2022.w45
2022.w43
2022.w42
2022.w42b
2022.w41
2022.w40
2022.w39
2022.w38
2022.w37
2022.w37b
2022.w36
2022.w35
2022.w33
2022.w32
2022.w31
2022.w31b
2022.w30
2022.w29
2022.w26
2022.w25
2022.w24
2022.w24b
2022.w23
2022.w22
2022.w21
2022.w20
2022.w19
2022.w18
2022.w17
2022.w15
2022.w15b
2022.w14a
2022.w13
2022.w13b
2022.w13a
2022.w12
2022.w10
2022.w09
2022.w09b
2022.w08
2022.w08b
2022.w07
2022.w07b
2022.w06
2022.w06a
2022.w05
2022.w05b
2022.w03_b
setparam
flexran-eol
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
16 deletions
+13
-16
openair1/PHY/NR_REFSIG/ptrs_nr.c
openair1/PHY/NR_REFSIG/ptrs_nr.c
+13
-16
No files found.
openair1/PHY/NR_REFSIG/ptrs_nr.c
View file @
c9a8b466
...
...
@@ -105,10 +105,9 @@ void set_ptrs_symb_idx(uint16_t *ptrs_symbols,
uint8_t
L_ptrs
,
uint16_t
ul_dmrs_symb_pos
)
{
uint
i
=
0
,
last_symbol
,
l_ref
;
int
l_counter
;
l_ref
=
start_symbol
;
last_symbol
=
start_symbol
+
duration_in_symbols
-
1
;
int
i
=
0
;
int
l_ref
=
start_symbol
;
const
int
last_symbol
=
start_symbol
+
duration_in_symbols
-
1
;
if
(
L_ptrs
==
0
)
{
LOG_E
(
PHY
,
"bug: impossible L_ptrs
\n
"
);
*
ptrs_symbols
=
0
;
...
...
@@ -117,7 +116,7 @@ void set_ptrs_symb_idx(uint16_t *ptrs_symbols,
while
(
(
l_ref
+
i
*
L_ptrs
)
<=
last_symbol
)
{
int
is_dmrs_symbol
=
0
;
int
is_dmrs_symbol
=
0
,
l_counter
;
for
(
l_counter
=
l_ref
+
i
*
L_ptrs
;
l_counter
>=
max
(
l_ref
+
(
i
-
1
)
*
L_ptrs
+
1
,
l_ref
);
l_counter
--
)
{
...
...
@@ -269,8 +268,8 @@ void nr_ptrs_cpe_estimation(uint8_t K_ptrs,
return
;
}
uint16_t
sc_per_symbol
=
(
nb_rb
+
K_ptrs
-
1
)
/
K_ptrs
;
int16_t
*
ptrs_p
=
(
int16_t
*
)
malloc
(
sizeof
(
int32_t
)
*
((
1
+
sc_per_symbol
/
4
)
*
4
))
;
int16_t
*
dmrs_comp_p
=
(
int16_t
*
)
malloc
(
sizeof
(
int32_t
)
*
((
1
+
sc_per_symbol
/
4
)
*
4
))
;
struct
complex16
ptrs_p
[(
1
+
sc_per_symbol
/
4
)
*
4
]
;
struct
complex16
dmrs_comp_p
[(
1
+
sc_per_symbol
/
4
)
*
4
]
;
double
abs
=
0
.
0
;
double
real
=
0
.
0
;
double
imag
=
0
.
0
;
...
...
@@ -278,7 +277,7 @@ void nr_ptrs_cpe_estimation(uint8_t K_ptrs,
double
alpha
=
0
;
#endif
/* generate PTRS RE for the symbol */
nr_gen_ref_conj_symbols
(
gold_seq
,
sc_per_symbol
*
2
,
ptrs_p
,
NR_MOD_TABLE_QPSK_OFFSET
,
2
);
// 2 for QPSK
nr_gen_ref_conj_symbols
(
gold_seq
,
sc_per_symbol
*
2
,
(
int16_t
*
)
ptrs_p
,
NR_MOD_TABLE_QPSK_OFFSET
,
2
);
// 2 for QPSK
/* loop over all sub carriers to get compensated RE on ptrs symbols*/
for
(
int
re
=
0
;
re
<
nb_re_pdsch
;
re
++
)
{
...
...
@@ -292,8 +291,8 @@ void nr_ptrs_cpe_estimation(uint8_t K_ptrs,
0
,
// start_re is 0 here
ofdm_symbol_size
);
if
(
is_ptrs_re
)
{
dmrs_comp_p
[
re_cnt
*
2
]
=
rxF_comp
[
re
*
2
];
dmrs_comp_p
[
(
re_cnt
*
2
)
+
1
]
=
rxF_comp
[(
re
*
2
)
+
1
];
dmrs_comp_p
[
re_cnt
].
r
=
rxF_comp
[
re
*
2
];
dmrs_comp_p
[
re_cnt
].
i
=
rxF_comp
[(
re
*
2
)
+
1
];
re_cnt
++
;
}
else
{
...
...
@@ -307,7 +306,7 @@ void nr_ptrs_cpe_estimation(uint8_t K_ptrs,
*
ptrs_sc
=
re_cnt
;
/*Multiple compensated data with conj of PTRS */
mult_cpx_vector
(
dmrs_comp_p
,
ptrs_p
,
ptrs_ch_p
,(
1
+
sc_per_symbol
/
4
)
*
4
,
15
);
// 2^15 shifted
mult_cpx_vector
(
(
int16_t
*
)
dmrs_comp_p
,
(
int16_t
*
)
ptrs_p
,
ptrs_ch_p
,(
1
+
sc_per_symbol
/
4
)
*
4
,
15
);
// 2^15 shifted
/* loop over all ptrs sub carriers in a symbol */
/* sum the error vector */
...
...
@@ -331,9 +330,6 @@ void nr_ptrs_cpe_estimation(uint8_t K_ptrs,
#ifdef DEBUG_PTRS
printf
(
"[PHY][PTRS]: Estimated Symbol %d -> %d + j* %d
\n
"
,
symbol
,
error_est
[
0
],
error_est
[
1
]
);
#endif
/* free vectors */
free
(
ptrs_p
);
free
(
dmrs_comp_p
);
}
...
...
@@ -426,9 +422,10 @@ void get_slope_from_estimates(uint8_t start, uint8_t end, int16_t *est_p, double
/* estimate from slope */
void
ptrs_estimate_from_slope
(
int16_t
*
error_est
,
double
*
slope_p
,
uint8_t
start
,
uint8_t
end
)
{
struct
complex16
*
error
=
(
struct
complex16
*
)
error_est
;
for
(
uint8_t
i
=
1
;
i
<
(
end
-
start
);
i
++
)
{
error
_est
[(
start
+
i
)
*
2
]
=
(
error_est
[
start
*
2
]
+
(
int16_t
)(
i
*
slope_p
[
0
])
);
// real
error
_est
[((
start
+
i
)
*
2
)
+
1
]
=
(
error_est
[(
start
*
2
)
+
1
]
+
(
int16_t
)(
i
*
slope_p
[
1
])
);
//imag
error
[
start
+
i
].
r
=
error
[
start
].
r
+
(
int16_t
)(
i
*
slope_p
[
0
]
);
// real
error
[
start
+
i
].
i
=
error
[
start
].
i
+
(
int16_t
)(
i
*
slope_p
[
1
]
);
//imag
#ifdef DEBUG_PTRS
printf
(
"[PHY][PTRS]: Estimated Symbol %2d -> %4d %4d from Slope (%4f %4f)
\n
"
,
start
+
i
,
error_est
[(
start
+
i
)
*
2
],
error_est
[((
start
+
i
)
*
2
)
+
1
],
slope_p
[
0
],
slope_p
[
1
]);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment