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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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-RAN
Commits
5e7ce26c
Commit
5e7ce26c
authored
Aug 10, 2020
by
Sakthi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more additions
parent
e2afb866
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
17 deletions
+31
-17
openair1/PHY/MODULATION/nr_modulation.c
openair1/PHY/MODULATION/nr_modulation.c
+1
-3
openair1/PHY/NR_REFSIG/nr_gen_mod_table.c
openair1/PHY/NR_REFSIG/nr_gen_mod_table.c
+21
-8
openair1/PHY/NR_REFSIG/nr_mod_table.h
openair1/PHY/NR_REFSIG/nr_mod_table.h
+4
-1
openair1/PHY/NR_TRANSPORT/nr_pbch.c
openair1/PHY/NR_TRANSPORT/nr_pbch.c
+5
-5
No files found.
openair1/PHY/MODULATION/nr_modulation.c
View file @
5e7ce26c
...
...
@@ -22,8 +22,6 @@
#include "nr_modulation.h"
#include "PHY/NR_REFSIG/nr_mod_table.h"
extern
short
nr_mod_table
[
NR_MOD_TABLE_SIZE_SHORT
];
void
nr_modulation
(
uint32_t
*
in
,
uint32_t
length
,
uint16_t
mod_order
,
...
...
@@ -114,7 +112,7 @@ void nr_modulation(uint32_t *in,
return
;
case
8
:
nr_mod_table32
=
(
int32_t
*
)
nr_mod_table
;
nr_mod_table32
=
(
int32_t
*
)
nr_
256qam_
mod_table
;
for
(
i
=
0
;
i
<
length
/
8
;
i
++
)
out32
[
i
]
=
nr_mod_table32
[(
offset
+
in_bytes
[
i
])];
return
;
...
...
openair1/PHY/NR_REFSIG/nr_gen_mod_table.c
View file @
5e7ce26c
...
...
@@ -32,15 +32,9 @@ void nr_generate_modulation_table() {
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]);
}
}
short
nr_qpsk_mod_table
[
8
]
=
{
16384
,
16384
,
-
16384
,
16384
,
16384
,
-
16384
,
-
16384
,
-
16384
};
#if defined(__AVX2__)
//QPSK m256
table
=
(
short
*
)
nr_qpsk_2byte_mod_table
;
for
(
i
=
0
;
i
<
65536
;
i
++
)
{
...
...
@@ -50,6 +44,18 @@ void nr_generate_modulation_table() {
//printf("%d j%d\n",nr_qpsk_byte_mod_table[i*8+(j*2)],nr_qpsk_byte_mod_table[i*8+(j*2)+1]);
}
}
#elif defined(__SSE2__)
//QPSK m128
table
=
(
short
*
)
nr_qpsk_byte_mod_table
;
for
(
i
=
0
;
i
<
256
;
i
++
)
{
for
(
j
=
0
;
j
<
4
;
j
++
)
{
table
[
i
*
8
+
(
j
*
2
)]
=
(
short
)(
1
-
2
*
((
i
>>
(
j
*
2
))
&
1
))
*
val
*
sqrt2
*
sqrt2
;
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]);
}
}
#endif
//16QAM
for
(
i
=
0
;
i
<
256
;
i
++
)
{
...
...
@@ -69,5 +75,12 @@ void nr_generate_modulation_table() {
//printf("%d j%d\n",table[i*4+(j*2)],table[i*4+(j*2)+1]);
}
}
//256QAM
table
=
(
short
*
)
nr_256qam_mod_table
;
for
(
i
=
0
;
i
<
256
;
i
++
)
{
table
[
i
*
2
]
=
(
short
)((
1
-
2
*
(
i
&
1
))
*
(
8
-
(
1
-
2
*
((
i
>>
2
)
&
1
))
*
(
4
-
(
1
-
2
*
((
i
>>
4
)
&
1
))
*
(
2
-
(
1
-
2
*
((
i
>>
6
)
&
1
))))))
*
val
*
sqrt170
*
sqrt2
;
table
[
i
*
2
+
1
]
=
(
short
)((
1
-
2
*
((
i
>>
1
)
&
1
))
*
(
8
-
(
1
-
2
*
((
i
>>
3
)
&
1
))
*
(
4
-
(
1
-
2
*
((
i
>>
5
)
&
1
))
*
(
2
-
(
1
-
2
*
((
i
>>
7
)
&
1
))))))
*
val
*
sqrt170
*
sqrt2
;
}
}
openair1/PHY/NR_REFSIG/nr_mod_table.h
View file @
5e7ce26c
...
...
@@ -28,7 +28,8 @@
#define NR_MOD_TABLE_QAM16_OFFSET 7
#define NR_MOD_TABLE_QAM64_OFFSET 23
#define NR_MOD_TABLE_QAM256_OFFSET 87
short
nr_qpsk_mod_table
[
8
]
=
{
16384
,
16384
,
-
16384
,
16384
,
16384
,
-
16384
,
-
16384
,
-
16384
};
short
nr_qpsk_mod_table
[
8
];
#if defined(__AVX2__)
__m256i
nr_qpsk_2byte_mod_table
[
65536
];
...
...
@@ -39,4 +40,6 @@ __m128i nr_qpsk_byte_mod_table[2048];
int64_t
nr_16qam_byte_mod_table
[
1024
];
int64_t
nr_64qam_mod_table
[
4096
];
int32_t
nr_256qam_mod_table
[
512
];
#endif
openair1/PHY/NR_TRANSPORT/nr_pbch.c
View file @
5e7ce26c
...
...
@@ -40,7 +40,7 @@
//#define DEBUG_PBCH_ENCODING
//#define DEBUG_PBCH_DMRS
extern
short
nr_
mod_table
[
NR_MOD_TABLE_SIZE_SHORT
];
extern
short
nr_
qpsk_mod_table
[
8
];
uint8_t
nr_pbch_payload_interleaving_pattern
[
32
]
=
{
16
,
23
,
18
,
17
,
8
,
30
,
10
,
6
,
24
,
7
,
0
,
5
,
3
,
2
,
1
,
4
,
9
,
11
,
12
,
13
,
14
,
15
,
19
,
20
,
21
,
22
,
25
,
26
,
27
,
28
,
29
,
31
...
...
@@ -62,8 +62,8 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
/// QPSK modulation
for
(
int
m
=
0
;
m
<
NR_PBCH_DMRS_LENGTH
;
m
++
)
{
idx
=
((((
gold_pbch_dmrs
[(
m
<<
1
)
>>
5
])
>>
((
m
<<
1
)
&
0x1f
))
&
1
)
<<
1
)
^
(((
gold_pbch_dmrs
[((
m
<<
1
)
+
1
)
>>
5
])
>>
(((
m
<<
1
)
+
1
)
&
0x1f
))
&
1
);
mod_dmrs
[
m
<<
1
]
=
nr_
mod_table
[(
NR_MOD_TABLE_QPSK_OFFSET
+
idx
)
<<
1
];
mod_dmrs
[(
m
<<
1
)
+
1
]
=
nr_
mod_table
[((
NR_MOD_TABLE_QPSK_OFFSET
+
idx
)
<<
1
)
+
1
];
mod_dmrs
[
m
<<
1
]
=
nr_
qpsk_mod_table
[
idx
<<
1
];
mod_dmrs
[(
m
<<
1
)
+
1
]
=
nr_
qpsk_mod_table
[(
idx
<<
1
)
+
1
];
#ifdef DEBUG_PBCH_DMRS
printf
(
"m %d idx %d gold seq %d b0-b1 %d-%d mod_dmrs %d %d
\n
"
,
m
,
idx
,
gold_pbch_dmrs
[(
m
<<
1
)
>>
5
],
(((
gold_pbch_dmrs
[(
m
<<
1
)
>>
5
])
>>
((
m
<<
1
)
&
0x1f
))
&
1
),
(((
gold_pbch_dmrs
[((
m
<<
1
)
+
1
)
>>
5
])
>>
(((
m
<<
1
)
+
1
)
&
0x1f
))
&
1
),
mod_dmrs
[(
m
<<
1
)],
mod_dmrs
[(
m
<<
1
)
+
1
]);
...
...
@@ -324,8 +324,8 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
/// QPSK modulation
for
(
int
i
=
0
;
i
<
NR_POLAR_PBCH_E
>>
1
;
i
++
)
{
idx
=
(((
pbch
->
pbch_e
[(
i
<<
1
)
>>
5
]
>>
((
i
<<
1
)
&
0x1f
))
&
1
)
<<
1
)
^
((
pbch
->
pbch_e
[((
i
<<
1
)
+
1
)
>>
5
]
>>
(((
i
<<
1
)
+
1
)
&
0x1f
))
&
1
);
mod_pbch_e
[
i
<<
1
]
=
nr_
mod_table
[(
NR_MOD_TABLE_QPSK_OFFSET
+
idx
)
<<
1
];
mod_pbch_e
[(
i
<<
1
)
+
1
]
=
nr_
mod_table
[((
NR_MOD_TABLE_QPSK_OFFSET
+
idx
)
<<
1
)
+
1
];
mod_pbch_e
[
i
<<
1
]
=
nr_
qpsk_mod_table
[
idx
<<
1
];
mod_pbch_e
[(
i
<<
1
)
+
1
]
=
nr_
qpsk_mod_table
[(
idx
<<
1
)
+
1
];
#ifdef DEBUG_PBCH
printf
(
"i %d idx %d mod_pbch %d %d
\n
"
,
i
,
idx
,
mod_pbch_e
[
2
*
i
],
mod_pbch_e
[
2
*
i
+
1
]);
#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