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
spbro
OpenXG-RAN
Commits
d7a27954
Commit
d7a27954
authored
Apr 14, 2024
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moving psbch DMRS modulation function away from gold sequence file
parent
f042bd7a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
38 deletions
+37
-38
openair1/PHY/INIT/nr_init_ue.c
openair1/PHY/INIT/nr_init_ue.c
+37
-0
openair1/PHY/NR_REFSIG/nr_gold_ue.c
openair1/PHY/NR_REFSIG/nr_gold_ue.c
+0
-37
openair1/PHY/NR_REFSIG/refsig_defs_ue.h
openair1/PHY/NR_REFSIG/refsig_defs_ue.h
+0
-1
No files found.
openair1/PHY/INIT/nr_init_ue.c
View file @
d7a27954
...
...
@@ -32,6 +32,7 @@
#include "PHY/NR_REFSIG/ul_ref_seq_nr.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "PHY/NR_REFSIG/nr_refsig.h"
#include "PHY/NR_REFSIG/nr_mod_table.h"
#include "openair2/COMMON/prs_nr_paramdef.h"
#include "SCHED_NR_UE/harq_nr.h"
...
...
@@ -713,6 +714,42 @@ void phy_term_nr_top(void)
free_context_synchro_nr
();
}
static
void
sl_generate_psbch_dmrs_qpsk_sequences
(
PHY_VARS_NR_UE
*
UE
,
struct
complex16
*
modulated_dmrs_sym
,
uint16_t
slss_id
)
{
uint8_t
idx
=
0
;
uint32_t
*
sl_dmrs_sequence
=
UE
->
SL_UE_PHY_PARAMS
.
init_params
.
psbch_dmrs_gold_sequences
[
slss_id
];
c16_t
*
mod_table
=
(
c16_t
*
)
nr_qpsk_mod_table
;
#ifdef SL_DEBUG_INIT
printf
(
"SIDELINK INIT: PSBCH DMRS Generation with slss_id:%d
\n
"
,
slss_id
);
#endif
/// QPSK modulation
for
(
int
m
=
0
;
m
<
SL_NR_NUM_PSBCH_DMRS_RE
;
m
++
)
{
idx
=
(((
sl_dmrs_sequence
[(
m
<<
1
)
>>
5
])
>>
((
m
<<
1
)
&
0x1f
))
&
3
);
modulated_dmrs_sym
[
m
].
r
=
mod_table
[
idx
].
r
;
modulated_dmrs_sym
[
m
].
i
=
mod_table
[
idx
].
i
;
#ifdef SL_DEBUG_INIT_DATA
printf
(
"m:%d gold seq: %d b0-b1: %d-%d DMRS Symbols: %d %d
\n
"
,
m
,
sl_dmrs_sequence
[(
m
<<
1
)
>>
5
],
(((
sl_dmrs_sequence
[(
m
<<
1
)
>>
5
])
>>
((
m
<<
1
)
&
0x1f
))
&
1
),
(((
sl_dmrs_sequence
[((
m
<<
1
)
+
1
)
>>
5
])
>>
(((
m
<<
1
)
+
1
)
&
0x1f
))
&
1
),
modulated_dmrs_sym
[
m
].
r
,
modulated_dmrs_sym
[
m
].
i
);
printf
(
"idx:%d, qpsk_table.r:%d, qpsk_table.i:%d
\n
"
,
idx
,
mod_table
[
idx
].
r
,
mod_table
[
idx
].
i
);
#endif
}
#ifdef SL_DUMP_INIT_SAMPLES
char
filename
[
40
],
varname
[
25
];
sprintf
(
filename
,
"sl_psbch_dmrs_slssid_%d.m"
,
slss_id
);
sprintf
(
varname
,
"sl_dmrs_id_%d.m"
,
slss_id
);
LOG_M
(
filename
,
varname
,
(
void
*
)
modulated_dmrs_sym
,
SL_NR_NUM_PSBCH_DMRS_RE
,
1
,
1
);
#endif
}
void
sl_ue_phy_init
(
PHY_VARS_NR_UE
*
UE
)
{
uint16_t
scaling_value
=
ONE_OVER_SQRT2_Q15
;
...
...
openair1/PHY/NR_REFSIG/nr_gold_ue.c
View file @
d7a27954
...
...
@@ -20,7 +20,6 @@
*/
#include "refsig_defs_ue.h"
#include "PHY/NR_REFSIG/nr_mod_table.h"
void
nr_gold_pbch
(
PHY_VARS_NR_UE
*
ue
)
{
...
...
@@ -174,39 +173,3 @@ void sl_init_psbch_dmrs_gold_sequences(PHY_VARS_NR_UE *UE)
}
}
}
void
sl_generate_psbch_dmrs_qpsk_sequences
(
PHY_VARS_NR_UE
*
UE
,
struct
complex16
*
modulated_dmrs_sym
,
uint16_t
slss_id
)
{
uint8_t
idx
=
0
;
uint32_t
*
sl_dmrs_sequence
=
UE
->
SL_UE_PHY_PARAMS
.
init_params
.
psbch_dmrs_gold_sequences
[
slss_id
];
c16_t
*
mod_table
=
(
c16_t
*
)
nr_qpsk_mod_table
;
#ifdef SL_DEBUG_INIT
printf
(
"SIDELINK INIT: PSBCH DMRS Generation with slss_id:%d
\n
"
,
slss_id
);
#endif
/// QPSK modulation
for
(
int
m
=
0
;
m
<
SL_NR_NUM_PSBCH_DMRS_RE
;
m
++
)
{
idx
=
(((
sl_dmrs_sequence
[(
m
<<
1
)
>>
5
])
>>
((
m
<<
1
)
&
0x1f
))
&
3
);
modulated_dmrs_sym
[
m
].
r
=
mod_table
[
idx
].
r
;
modulated_dmrs_sym
[
m
].
i
=
mod_table
[
idx
].
i
;
#ifdef SL_DEBUG_INIT_DATA
printf
(
"m:%d gold seq: %d b0-b1: %d-%d DMRS Symbols: %d %d
\n
"
,
m
,
sl_dmrs_sequence
[(
m
<<
1
)
>>
5
],
(((
sl_dmrs_sequence
[(
m
<<
1
)
>>
5
])
>>
((
m
<<
1
)
&
0x1f
))
&
1
),
(((
sl_dmrs_sequence
[((
m
<<
1
)
+
1
)
>>
5
])
>>
(((
m
<<
1
)
+
1
)
&
0x1f
))
&
1
),
modulated_dmrs_sym
[
m
].
r
,
modulated_dmrs_sym
[
m
].
i
);
printf
(
"idx:%d, qpsk_table.r:%d, qpsk_table.i:%d
\n
"
,
idx
,
mod_table
[
idx
].
r
,
mod_table
[
idx
].
i
);
#endif
}
#ifdef SL_DUMP_INIT_SAMPLES
char
filename
[
40
],
varname
[
25
];
sprintf
(
filename
,
"sl_psbch_dmrs_slssid_%d.m"
,
slss_id
);
sprintf
(
varname
,
"sl_dmrs_id_%d.m"
,
slss_id
);
LOG_M
(
filename
,
varname
,
(
void
*
)
modulated_dmrs_sym
,
SL_NR_NUM_PSBCH_DMRS_RE
,
1
,
1
);
#endif
}
openair1/PHY/NR_REFSIG/refsig_defs_ue.h
View file @
d7a27954
...
...
@@ -70,5 +70,4 @@ void sl_generate_pss(SL_NR_UE_INIT_PARAMS_t *sl_init_params, uint8_t n_sl_id2, u
void
sl_generate_pss_ifft_samples
(
sl_nr_ue_phy_params_t
*
sl_ue_params
,
SL_NR_UE_INIT_PARAMS_t
*
sl_init_params
);
void
sl_generate_sss
(
SL_NR_UE_INIT_PARAMS_t
*
sl_init_params
,
uint16_t
slss_id
,
uint16_t
scaling
);
void
sl_init_psbch_dmrs_gold_sequences
(
PHY_VARS_NR_UE
*
UE
);
void
sl_generate_psbch_dmrs_qpsk_sequences
(
PHY_VARS_NR_UE
*
UE
,
struct
complex16
*
modulated_dmrs_sym
,
uint16_t
slss_id
);
#endif
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