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
promise
OpenXG-RAN
Commits
82be3653
Commit
82be3653
authored
Jul 30, 2020
by
Sakthivel Velumani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Included special case for 64qam
parent
7bcf468e
Changes
1
Hide 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 @
82be3653
...
...
@@ -29,20 +29,36 @@ 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
);
for
(
int
i
=
0
;
i
<
length
/
mod_order
;
i
++
)
{
idx
=
((
in
[
i
*
mod_order
/
32
]
>>
(
i
*
mod_order
))
&
mask
);
out
[
i
<<
1
]
=
nr_mod_table
[(
offset
+
idx
)
<<
1
];
out
[(
i
<<
1
)
+
1
]
=
nr_mod_table
[((
offset
+
idx
)
<<
1
)
+
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
)
&
0x1f
))
&
mask
);
out
[
i
<<
1
]
=
nr_mod_table
[(
offset
+
idx
)
<<
1
];
out
[(
i
<<
1
)
+
1
]
=
nr_mod_table
[((
offset
+
idx
)
<<
1
)
+
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