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
alex037yang
OpenXG-RAN
Commits
e2afb866
Commit
e2afb866
authored
Aug 10, 2020
by
Sakthivel Velumani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new table generator
parent
82df0e51
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
73 additions
and
0 deletions
+73
-0
openair1/PHY/NR_REFSIG/nr_gen_mod_table.c
openair1/PHY/NR_REFSIG/nr_gen_mod_table.c
+73
-0
No files found.
openair1/PHY/NR_REFSIG/nr_gen_mod_table.c
0 → 100644
View file @
e2afb866
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "nr_refsig.h"
#include "nr_mod_table.h"
#include <math.h>
void
nr_generate_modulation_table
()
{
float
sqrt2
=
0
.
70711
;
float
sqrt10
=
0
.
31623
;
float
sqrt42
=
0
.
15430
;
float
sqrt170
=
0
.
0766
96
;
float
val
=
32768
.
0
;
uint32_t
i
,
j
;
short
*
table
;
//QPSK m128
for
(
i
=
0
;
i
<
256
;
i
++
)
{
for
(
j
=
0
;
j
<
4
;
j
++
)
{
nr_qpsk_byte_mod_table
[
i
*
8
+
(
j
*
2
)]
=
(
short
)(
1
-
2
*
((
i
>>
(
j
*
2
))
&
1
))
*
val
*
sqrt2
*
sqrt2
;
nr_qpsk_byte_mod_table
[
i
*
8
+
(
j
*
2
)
+
1
]
=
(
short
)(
1
-
2
*
((
i
>>
(
j
*
2
+
1
))
&
1
))
*
val
*
sqrt2
*
sqrt2
;
//printf("%d j%d\n",nr_qpsk_byte_mod_table[i*8+(j*2)],nr_qpsk_byte_mod_table[i*8+(j*2)+1]);
}
}
//QPSK m256
table
=
(
short
*
)
nr_qpsk_2byte_mod_table
;
for
(
i
=
0
;
i
<
65536
;
i
++
)
{
for
(
j
=
0
;
j
<
8
;
j
++
)
{
table
[
i
*
16
+
(
j
*
2
)]
=
(
short
)(
1
-
2
*
((
i
>>
(
j
*
2
))
&
1
))
*
val
*
sqrt2
*
sqrt2
;
table
[
i
*
16
+
(
j
*
2
)
+
1
]
=
(
short
)(
1
-
2
*
((
i
>>
(
j
*
2
+
1
))
&
1
))
*
val
*
sqrt2
*
sqrt2
;
//printf("%d j%d\n",nr_qpsk_byte_mod_table[i*8+(j*2)],nr_qpsk_byte_mod_table[i*8+(j*2)+1]);
}
}
//16QAM
for
(
i
=
0
;
i
<
256
;
i
++
)
{
for
(
j
=
0
;
j
<
2
;
j
++
)
{
nr_16qam_byte_mod_table
[
i
*
4
+
(
j
*
2
)]
=
(
short
)((
1
-
2
*
((
i
>>
(
j
*
4
))
&
1
))
*
(
2
-
(
1
-
2
*
((
i
>>
(
j
*
4
+
2
))
&
1
))))
*
val
*
sqrt10
*
sqrt2
;
nr_16qam_byte_mod_table
[
i
*
4
+
(
j
*
2
)
+
1
]
=
(
short
)((
1
-
2
*
((
i
>>
(
j
*
4
+
1
))
&
1
))
*
(
2
-
(
1
-
2
*
((
i
>>
(
j
*
4
+
3
))
&
1
))))
*
val
*
sqrt10
*
sqrt2
;
//printf("%d j%d\n",nr_16qam_byte_mod_table[i*4+(j*2)],nr_16qam_byte_mod_table[i*4+(j*2)+1]);
}
}
//64QAM
table
=
(
short
*
)
nr_64qam_mod_table
;
for
(
i
=
0
;
i
<
4096
;
i
++
)
{
for
(
j
=
0
;
j
<
2
;
j
++
)
{
table
[
i
*
4
+
(
j
*
2
)]
=
(
short
)((
1
-
2
*
((
i
>>
(
j
*
6
))
&
1
))
*
(
4
-
(
1
-
2
*
((
i
>>
(
j
*
6
+
2
))
&
1
))
*
(
2
-
(
1
-
2
*
((
i
>>
(
j
*
6
+
4
))
&
1
)))))
*
val
*
sqrt42
*
sqrt2
;
table
[
i
*
4
+
(
j
*
2
)
+
1
]
=
(
short
)((
1
-
2
*
((
i
>>
(
j
*
6
+
1
))
&
1
))
*
(
4
-
(
1
-
2
*
((
i
>>
(
j
*
6
+
3
))
&
1
))
*
(
2
-
(
1
-
2
*
((
i
>>
(
j
*
6
+
5
))
&
1
)))))
*
val
*
sqrt42
*
sqrt2
;
//printf("%d j%d\n",table[i*4+(j*2)],table[i*4+(j*2)+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