Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
OpenXG UE
Commits
2bc74050
Commit
2bc74050
authored
Jul 30, 2020
by
Sakthivel Velumani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Included special case for 64qam
parent
8f2bad07
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
8 deletions
+24
-8
openair1/PHY/MODULATION/nr_modulation.c
openair1/PHY/MODULATION/nr_modulation.c
+24
-8
No files found.
openair1/PHY/MODULATION/nr_modulation.c
View file @
2bc74050
...
...
@@ -29,21 +29,37 @@ void nr_modulation(uint32_t *in,
int16_t
*
out
)
{
uint16_t
offset
;
uint8_t
idx
,
b_idx
;
uint16_t
mask
=
((
1
<<
mod_order
)
-
1
);
uint8_t
idx
;
offset
=
(
mod_order
==
2
)
?
NR_MOD_TABLE_QPSK_OFFSET
:
(
mod_order
==
4
)
?
NR_MOD_TABLE_QAM16_OFFSET
:
\
(
mod_order
==
6
)
?
NR_MOD_TABLE_QAM64_OFFSET
:
(
mod_order
==
8
)
?
NR_MOD_TABLE_QAM256_OFFSET
:
0
;
LOG_D
(
PHY
,
"nr_modulation: length %d, mod_order %d
\n
"
,
length
,
mod_order
);
uint16_t
mask
=
((
1
<<
mod_order
)
-
1
);
if
(
mod_order
==
6
)
{
uint16_t
u
=
1
;
uint8_t
shift_lut
[
3
]
=
{
0
,
2
,
4
};
for
(
int
i
=
0
;
i
<
length
/
mod_order
;
i
++
)
{
idx
=
((
in
[
i
*
mod_order
/
32
]
>>
((
i
*
mod_order
)
&
0x1f
))
&
mask
);
if
((((
i
+
1
)
*
mod_order
)
>
32
*
u
)
&&
(
i
!=
0
))
idx
|=
(
in
[(
i
*
mod_order
/
32
)
+
1
]
<<
shift_lut
[(
u
++
)
%
3
])
&
0x3f
;
else
if
(((
i
+
1
)
*
mod_order
)
==
32
*
u
)
u
++
;
out
[
i
<<
1
]
=
nr_mod_table
[(
offset
+
idx
)
<<
1
];
out
[(
i
<<
1
)
+
1
]
=
nr_mod_table
[((
offset
+
idx
)
<<
1
)
+
1
];
}
}
else
{
for
(
int
i
=
0
;
i
<
length
/
mod_order
;
i
++
)
{
idx
=
((
in
[
i
*
mod_order
/
32
]
>>
(
i
*
mod_order
))
&
mask
);
idx
=
((
in
[
i
*
mod_order
/
32
]
>>
((
i
*
mod_order
)
&
0x1f
))
&
mask
);
out
[
i
<<
1
]
=
nr_mod_table
[(
offset
+
idx
)
<<
1
];
out
[(
i
<<
1
)
+
1
]
=
nr_mod_table
[((
offset
+
idx
)
<<
1
)
+
1
];
}
}
}
void
nr_layer_mapping
(
int16_t
**
mod_symbs
,
...
...
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