Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
openairinterface-6g
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
OpenXG
openairinterface-6g
Commits
f982d9b5
Commit
f982d9b5
authored
Nov 03, 2025
by
Laurent THOMAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename a function to what it does (it generate a reference signal) and minor readability changes
parent
032fc5e9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
37 deletions
+25
-37
openair1/PHY/NR_REFSIG/nr_dmrs_rx.c
openair1/PHY/NR_REFSIG/nr_dmrs_rx.c
+1
-1
openair1/PHY/NR_REFSIG/refsig_defs_ue.h
openair1/PHY/NR_REFSIG/refsig_defs_ue.h
+1
-1
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
+23
-35
No files found.
openair1/PHY/NR_REFSIG/nr_dmrs_rx.c
View file @
f982d9b5
...
@@ -150,7 +150,7 @@ int nr_pdsch_dmrs_rx(const PHY_VARS_NR_UE *ue,
...
@@ -150,7 +150,7 @@ int nr_pdsch_dmrs_rx(const PHY_VARS_NR_UE *ue,
return
(
0
);
return
(
0
);
}
}
void
nr_pdcch_dmrs_r
x
(
const
unsigned
int
*
nr_gold_pdcch
,
c16_t
*
output
,
unsigned
short
nb_rb_coreset
)
void
nr_pdcch_dmrs_r
ef
(
const
unsigned
int
*
nr_gold_pdcch
,
c16_t
*
output
,
unsigned
short
nb_rb_coreset
)
{
{
for
(
int
i
=
0
;
i
<
((
nb_rb_coreset
*
6
)
>>
1
);
i
++
)
{
for
(
int
i
=
0
;
i
<
((
nb_rb_coreset
*
6
)
>>
1
);
i
++
)
{
output
[
i
]
=
get_modulated
(
nr_gold_pdcch
,
i
,
true
);
output
[
i
]
=
get_modulated
(
nr_gold_pdcch
,
i
,
true
);
...
...
openair1/PHY/NR_REFSIG/refsig_defs_ue.h
View file @
f982d9b5
...
@@ -35,7 +35,7 @@ void nr_pbch_dmrs_rx(int dmrss, const unsigned int *nr_gold_pbch, c16_t *output,
...
@@ -35,7 +35,7 @@ void nr_pbch_dmrs_rx(int dmrss, const unsigned int *nr_gold_pbch, c16_t *output,
/*!\brief This function generates the NR Gold sequence (38-211, Sec 5.2.1) for the PDCCH DMRS.
/*!\brief This function generates the NR Gold sequence (38-211, Sec 5.2.1) for the PDCCH DMRS.
@param PHY_VARS_NR_UE* ue structure provides configuration, frame parameters and the pointers to the 32 bits sequence storage tables
@param PHY_VARS_NR_UE* ue structure provides configuration, frame parameters and the pointers to the 32 bits sequence storage tables
*/
*/
void
nr_pdcch_dmrs_r
x
(
const
unsigned
int
*
nr_gold_pdcch
,
c16_t
*
output
,
unsigned
short
nb_rb_corset
);
void
nr_pdcch_dmrs_r
ef
(
const
unsigned
int
*
nr_gold_pdcch
,
c16_t
*
output
,
unsigned
short
nb_rb_corset
);
int
nr_pdsch_dmrs_rx
(
const
PHY_VARS_NR_UE
*
ue
,
int
nr_pdsch_dmrs_rx
(
const
PHY_VARS_NR_UE
*
ue
,
unsigned
int
Ns
,
unsigned
int
Ns
,
...
...
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
View file @
f982d9b5
...
@@ -807,10 +807,8 @@ void nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -807,10 +807,8 @@ void nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
c16_t
pdcch_dl_ch_estimates
[][
pdcch_est_size
],
c16_t
pdcch_dl_ch_estimates
[][
pdcch_est_size
],
c16_t
rxdataF
[
ue
->
frame_parms
.
nb_antennas_rx
][
ue
->
frame_parms
.
ofdm_symbol_size
])
c16_t
rxdataF
[
ue
->
frame_parms
.
nb_antennas_rx
][
ue
->
frame_parms
.
ofdm_symbol_size
])
{
{
const
int
symb_sz
=
ue
->
frame_parms
.
ofdm_symbol_size
;
int
slot
=
proc
->
nr_slot_rx
;
int
slot
=
proc
->
nr_slot_rx
;
unsigned
char
aarx
;
unsigned
short
k
;
unsigned
int
pilot_cnt
;
int
nb_rb_coreset
=
0
;
int
nb_rb_coreset
=
0
;
int
coreset_start_rb
=
0
;
int
coreset_start_rb
=
0
;
...
@@ -824,14 +822,6 @@ void nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -824,14 +822,6 @@ void nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
unsigned
short
coreset_start_subcarrier
=
first_carrier_offset
+
(
BWPStart
+
coreset_start_rb
)
*
12
;
unsigned
short
coreset_start_subcarrier
=
first_carrier_offset
+
(
BWPStart
+
coreset_start_rb
)
*
12
;
#ifdef DEBUG_PDCCH
printf
(
"PDCCH Channel Estimation : OFDM size %d, Ncp=%d, slot=%d, symbol %d
\n
"
,
ue
->
frame_parms
.
ofdm_symbol_size
,
ue
->
frame_parms
.
Ncp
,
slot
,
symbol
);
#endif
#if CH_INTERP
#if CH_INTERP
int16_t
*
fl
=
filt16a_l1
;
int16_t
*
fl
=
filt16a_l1
;
int16_t
*
fm
=
filt16a_m1
;
int16_t
*
fm
=
filt16a_m1
;
...
@@ -846,14 +836,13 @@ void nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -846,14 +836,13 @@ void nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
c16_t
pilot
[(
nb_rb_coreset
+
dmrs_ref
)
*
3
]
__attribute__
((
aligned
(
16
)));
c16_t
pilot
[(
nb_rb_coreset
+
dmrs_ref
)
*
3
]
__attribute__
((
aligned
(
16
)));
// Note: pilot returned by the following function is already the complex conjugate of the transmitted DMRS
// Note: pilot returned by the following function is already the complex conjugate of the transmitted DMRS
const
uint32_t
*
gold
=
nr_gold_pdcch
(
ue
->
frame_parms
.
N_RB_DL
,
ue
->
frame_parms
.
symbols_per_slot
,
scrambling_id
,
slot
,
symbol
);
const
uint32_t
*
gold
=
nr_gold_pdcch
(
ue
->
frame_parms
.
N_RB_DL
,
ue
->
frame_parms
.
symbols_per_slot
,
scrambling_id
,
slot
,
symbol
);
nr_pdcch_dmrs_rx
(
gold
,
pilot
,
nb_rb_coreset
+
dmrs_ref
);
nr_pdcch_dmrs_ref
(
gold
,
pilot
,
nb_rb_coreset
+
dmrs_ref
);
for
(
aarx
=
0
;
aarx
<
ue
->
frame_parms
.
nb_antennas_rx
;
aarx
++
)
{
k
=
coreset_start_subcarrier
;
for
(
int
aarx
=
0
;
aarx
<
ue
->
frame_parms
.
nb_antennas_rx
;
aarx
++
)
{
int
k
=
coreset_start_subcarrier
;
c16_t
*
pil
=
&
pilot
[
dmrs_ref
*
3
];
c16_t
*
pil
=
&
pilot
[
dmrs_ref
*
3
];
c16_t
*
rxF
=
&
rxdataF
[
aarx
][
k
+
1
];
c16_t
*
rxF
=
&
rxdataF
[
aarx
][
k
+
1
];
c16_t
*
dl_ch
=
&
pdcch_dl_ch_estimates
[
aarx
][
0
];
c16_t
*
dl_ch
=
pdcch_dl_ch_estimates
[
aarx
];
memset
(
dl_ch
,
0
,
sizeof
(
c16_t
)
*
ue
->
frame_parms
.
ofdm_symbol_size
);
memset
(
dl_ch
,
0
,
sizeof
(
c16_t
)
*
ue
->
frame_parms
.
ofdm_symbol_size
);
...
@@ -871,36 +860,36 @@ void nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -871,36 +860,36 @@ void nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
rxF
+=
4
;
rxF
+=
4
;
k
+=
2
;
k
+=
2
;
if
(
k
>=
ue
->
frame_parms
.
ofdm_symbol_size
)
{
if
(
k
>=
symb_sz
)
{
k
-=
ue
->
frame_parms
.
ofdm_symbol_size
;
k
-=
symb_sz
;
rxF
=
&
rxdataF
[
aarx
][
k
+
1
];
rxF
=
&
rxdataF
[
aarx
][
k
+
1
];
}
}
multadd_real_vector_complex_scalar
(
fm
,
c16mulShift
(
*
pil
++
,
*
rxF
,
15
),
dl_ch
,
16
);
multadd_real_vector_complex_scalar
(
fm
,
c16mulShift
(
*
pil
++
,
*
rxF
,
15
),
dl_ch
,
16
);
k
=
(
k
+
4
)
%
ue
->
frame_parms
.
ofdm_symbol_size
;
k
=
(
k
+
4
)
%
symb_sz
;
rxF
=
(
c16_t
*
)
&
rxdataF
[
aarx
][
k
+
1
)];
rxF
=
&
rxdataF
[
aarx
][
k
+
1
)];
multadd_real_vector_complex_scalar
(
fr
,
c16mulShift
(
*
pil
++
,
*
rxF
,
15
),
dl_ch
,
16
);
multadd_real_vector_complex_scalar
(
fr
,
c16mulShift
(
*
pil
++
,
*
rxF
,
15
),
dl_ch
,
16
);
dl_ch
+=
12
;
dl_ch
+=
12
;
k
=
(
k
+
4
)
%
ue
->
frame_parms
.
ofdm_symbol_size
;
k
=
(
k
+
4
)
%
symb_sz
;
rxF
=
(
c16_t
*
)
&
rxdataF
[
aarx
][
k
+
1
];
rxF
=
&
rxdataF
[
aarx
][
k
+
1
];
for
(
pilot_cnt
=
3
;
pilot_cnt
<
(
3
*
nb_rb_coreset
);
pilot_cnt
+=
3
)
{
for
(
int
pilot_cnt
=
3
;
pilot_cnt
<
(
3
*
nb_rb_coreset
);
pilot_cnt
+=
3
)
{
multadd_real_vector_complex_scalar
(
fl
,
c16mulShift
(
*
pil
++
,
*
rxF
,
15
),
dl_ch
,
16
);
multadd_real_vector_complex_scalar
(
fl
,
c16mulShift
(
*
pil
++
,
*
rxF
,
15
),
dl_ch
,
16
);
k
=
(
k
+
4
)
%
ue
->
frame_parms
.
ofdm_symbol_size
;
k
=
(
k
+
4
)
%
symb_sz
;
rxF
=
(
c16_t
*
)
&
rxdataF
[
aarx
][
k
+
1
];
rxF
=
&
rxdataF
[
aarx
][
k
+
1
];
multadd_real_vector_complex_scalar
(
fm
,
c16mulShift
(
*
pil
++
,
*
rxF
,
15
),
dl_ch
,
16
);
multadd_real_vector_complex_scalar
(
fm
,
c16mulShift
(
*
pil
++
,
*
rxF
,
15
),
dl_ch
,
16
);
k
=
(
k
+
4
)
%
ue
->
frame_parms
.
ofdm_symbol_size
;
k
=
(
k
+
4
)
%
symb_sz
;
rxF
=
(
c16_t
*
)
&
rxdataF
[
aarx
][
k
+
1
];
rxF
=
&
rxdataF
[
aarx
][
k
+
1
];
multadd_real_vector_complex_scalar
(
fr
,
c16mulShift
(
*
pil
++
,
*
rxF
,
15
),
dl_ch
,
16
);
multadd_real_vector_complex_scalar
(
fr
,
c16mulShift
(
*
pil
++
,
*
rxF
,
15
),
dl_ch
,
16
);
dl_ch
+=
12
;
dl_ch
+=
12
;
k
=
(
k
+
4
)
%
ue
->
frame_parms
.
ofdm_symbol_size
;
k
=
(
k
+
4
)
%
symb_sz
;
rxF
=
(
c16_t
*
)
&
rxdataF
[
aarx
][
k
+
1
];
rxF
=
&
rxdataF
[
aarx
][
k
+
1
];
}
}
#else //ELSE CH_INTERP
#else //ELSE CH_INTERP
c32_t
ch_sum
=
{
0
,
0
};
c32_t
ch_sum
=
{
0
,
0
};
for
(
pilot_cnt
=
0
;
pilot_cnt
<
3
*
nb_rb_coreset
;
pilot_cnt
++
)
{
for
(
int
pilot_cnt
=
0
;
pilot_cnt
<
3
*
nb_rb_coreset
;
pilot_cnt
++
)
{
#ifdef DEBUG_PDCCH
#ifdef DEBUG_PDCCH
printf
(
"pilot[%u] = (%d, %d)
\t
rxF[%d] = (%d, %d)
\n
"
,
pilot_cnt
,
pil
[
0
],
pil
[
1
],
k
+
1
,
rxF
[
0
],
rxF
[
1
]);
printf
(
"pilot[%u] = (%d, %d)
\t
rxF[%d] = (%d, %d)
\n
"
,
pilot_cnt
,
pil
[
0
],
pil
[
1
],
k
+
1
,
rxF
[
0
],
rxF
[
1
]);
...
@@ -908,8 +897,8 @@ void nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -908,8 +897,8 @@ void nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
c16_t
ch
=
c16mulShift
(
*
pil
++
,
*
rxF
,
15
);
c16_t
ch
=
c16mulShift
(
*
pil
++
,
*
rxF
,
15
);
ch_sum
.
r
+=
ch
.
r
;
ch_sum
.
r
+=
ch
.
r
;
ch_sum
.
i
+=
ch
.
i
;
ch_sum
.
i
+=
ch
.
i
;
k
=
(
k
+
4
)
%
ue
->
frame_parms
.
ofdm_symbol_size
;
k
=
(
k
+
4
)
%
symb_sz
;
rxF
=
(
c16_t
*
)
&
rxdataF
[
aarx
][
k
+
1
];
rxF
=
&
rxdataF
[
aarx
][
k
+
1
];
if
(
pilot_cnt
%
3
==
2
)
{
if
(
pilot_cnt
%
3
==
2
)
{
ch
.
r
=
ch_sum
.
r
/
3
;
ch
.
r
=
ch_sum
.
r
/
3
;
...
@@ -923,11 +912,10 @@ void nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
...
@@ -923,11 +912,10 @@ void nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
ch_sum
=
(
c32_t
){
0
};
ch_sum
=
(
c32_t
){
0
};
}
}
}
}
#endif //END CH_INTERP
#endif //END CH_INTERP
//}
//}
}
}
}
}
...
...
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