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
ZhouShuya
OpenXG-RAN
Commits
76b1ee89
Commit
76b1ee89
authored
Aug 17, 2018
by
yilmazt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Working polartest.c
parent
ca207808
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
openair1/PHY/CODING/TESTBENCH/polartest.c
openair1/PHY/CODING/TESTBENCH/polartest.c
+5
-2
openair1/PHY/CODING/nrPolar_tools/nr_bitwise_operations.c
openair1/PHY/CODING/nrPolar_tools/nr_bitwise_operations.c
+4
-2
No files found.
openair1/PHY/CODING/TESTBENCH/polartest.c
View file @
76b1ee89
...
...
@@ -11,7 +11,7 @@
#include "PHY/defs_gNB.h"
#include "SIMULATION/TOOLS/sim.h"
#define DEBUG_POLAR_PARAMS
//
#define DEBUG_POLAR_PARAMS
int
main
(
int
argc
,
char
*
argv
[])
{
...
...
@@ -138,9 +138,12 @@ int main(int argc, char *argv[]) {
in
[
0
]
=
0x01189400
;
in
[
1
]
=
0xffffff0f
;
uint8_t
*
out
=
malloc
(
sizeof
(
uint8_t
)
*
41
);
nr_bit2byte
(
in
,
41
,
out
);
nr_bit2byte
_uint32_8_t
(
in
,
41
,
out
);
for
(
int
i
=
0
;
i
<
41
;
i
++
)
printf
(
"out[%d]=%d
\n
"
,
i
,
out
[
i
]);
uint32_t
inn
[
4
];
nr_byte2bit_uint8_32_t
(
out
,
41
,
inn
);
printf
(
"inn[0]=%#x, inn[1]=%#x
\n
"
,
inn
[
0
],
inn
[
1
]);
return
(
0
);
#endif
...
...
openair1/PHY/CODING/nrPolar_tools/nr_bitwise_operations.c
View file @
76b1ee89
...
...
@@ -33,9 +33,11 @@ void nr_bit2byte_uint32_8_t(uint32_t *in, uint16_t arraySize, uint8_t *out) {
void
nr_byte2bit_uint8_32_t
(
uint8_t
*
in
,
uint16_t
arraySize
,
uint32_t
*
out
)
{
uint8_t
arrayInd
=
ceil
(
arraySize
/
32
.
0
);
for
(
int
i
=
0
;
i
<
arrayInd
;
i
++
)
{
for
(
int
j
=
0
;
j
<
32
;
j
++
)
{
out
[
i
]
|=
in
[
j
+
(
i
*
32
)];
out
[
i
]
=
0
;
for
(
int
j
=
31
;
j
>
0
;
j
--
)
{
out
[
i
]
|=
in
[(
i
*
32
)
+
j
];
out
[
i
]
<<=
1
;
}
out
[
i
]
|=
in
[(
i
*
32
)];
}
}
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