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
ca207808
Commit
ca207808
authored
Aug 16, 2018
by
yilmazt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Debug changes5
parent
b31a0b42
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
27 deletions
+26
-27
openair1/PHY/CODING/TESTBENCH/polartest.c
openair1/PHY/CODING/TESTBENCH/polartest.c
+8
-0
openair1/PHY/CODING/nrPolar_tools/nr_bitwise_operations.c
openair1/PHY/CODING/nrPolar_tools/nr_bitwise_operations.c
+13
-21
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
+2
-3
openair1/PHY/NR_TRANSPORT/nr_dci.c
openair1/PHY/NR_TRANSPORT/nr_dci.c
+3
-3
No files found.
openair1/PHY/CODING/TESTBENCH/polartest.c
View file @
ca207808
...
@@ -133,6 +133,14 @@ int main(int argc, char *argv[]) {
...
@@ -133,6 +133,14 @@ int main(int argc, char *argv[]) {
nr_polar_init
(
&
nrPolar_params
,
1
,
21
,
1
);
nr_polar_init
(
&
nrPolar_params
,
1
,
21
,
1
);
nr_polar_init
(
&
nrPolar_params
,
polarMessageType
,
testLength
,
aggregation_level
);
nr_polar_init
(
&
nrPolar_params
,
polarMessageType
,
testLength
,
aggregation_level
);
nr_polar_print_polarParams
(
nrPolar_params
);
nr_polar_print_polarParams
(
nrPolar_params
);
uint32_t
in
[
4
];
in
[
0
]
=
0x01189400
;
in
[
1
]
=
0xffffff0f
;
uint8_t
*
out
=
malloc
(
sizeof
(
uint8_t
)
*
41
);
nr_bit2byte
(
in
,
41
,
out
);
for
(
int
i
=
0
;
i
<
41
;
i
++
)
printf
(
"out[%d]=%d
\n
"
,
i
,
out
[
i
]);
return
(
0
);
return
(
0
);
#endif
#endif
...
...
openair1/PHY/CODING/nrPolar_tools/nr_bitwise_operations.c
View file @
ca207808
...
@@ -21,29 +21,21 @@
...
@@ -21,29 +21,21 @@
#include "PHY/CODING/nrPolar_tools/nr_polar_defs.h"
#include "PHY/CODING/nrPolar_tools/nr_polar_defs.h"
void
nr_byte2bit_uint8
(
uint8_t
*
array
,
uint8_t
arraySize
,
uint8_t
*
bitArray
)
{
void
nr_bit2byte_uint32_8_t
(
uint32_t
*
in
,
uint16_t
arraySize
,
uint8_t
*
out
)
{
//First 2 parameters are in bytes.
uint8_t
arrayInd
=
ceil
(
arraySize
/
32
.
0
);
for
(
int
i
=
0
;
i
<
arrayInd
;
i
++
)
{
for
(
int
i
=
0
;
i
<
arraySize
;
i
++
)
{
for
(
int
j
=
0
;
j
<
32
;
j
++
)
{
bitArray
[(
7
+
(
i
*
8
))]
=
(
array
[
i
]
>>
0
&
0x01
);
out
[
j
+
(
i
*
32
)]
=
(
in
[
i
]
>>
j
)
&
1
;
bitArray
[(
6
+
(
i
*
8
))]
=
(
array
[
i
]
>>
1
&
0x01
);
}
bitArray
[(
5
+
(
i
*
8
))]
=
(
array
[
i
]
>>
2
&
0x01
);
bitArray
[(
4
+
(
i
*
8
))]
=
(
array
[
i
]
>>
3
&
0x01
);
bitArray
[(
3
+
(
i
*
8
))]
=
(
array
[
i
]
>>
4
&
0x01
);
bitArray
[(
2
+
(
i
*
8
))]
=
(
array
[
i
]
>>
5
&
0x01
);
bitArray
[(
1
+
(
i
*
8
))]
=
(
array
[
i
]
>>
6
&
0x01
);
bitArray
[(
i
*
8
)]
=
(
array
[
i
]
>>
7
&
0x01
);
}
}
void
nr_bit2byte
(
uint32_t
*
in
,
uint16_t
arraySize
,
uint8_t
*
out
)
{
for
(
int
i
=
0
;
i
<
arraySize
;
i
++
)
{
out
[
i
]
=
((
*
in
)
>>
i
)
&
1
;
}
}
}
}
void
nr_byte2bit
(
uint8_t
*
in
,
uint16_t
arraySize
,
uint32_t
*
out
)
{
void
nr_byte2bit_uint8_32_t
(
uint8_t
*
in
,
uint16_t
arraySize
,
uint32_t
*
out
)
{
for
(
int
i
=
0
;
i
<
arraySize
;
i
++
)
{
uint8_t
arrayInd
=
ceil
(
arraySize
/
32
.
0
);
*
out
=
(
*
out
)
<<
i
|
in
[
i
];
for
(
int
i
=
0
;
i
<
arrayInd
;
i
++
)
{
for
(
int
j
=
0
;
j
<
32
;
j
++
)
{
out
[
i
]
|=
in
[
j
+
(
i
*
32
)];
out
[
i
]
<<=
1
;
}
}
}
}
}
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
View file @
ca207808
...
@@ -113,9 +113,8 @@ void nr_polar_info_bit_pattern(uint8_t *ibp, int16_t *Q_I_N, int16_t *Q_F_N,
...
@@ -113,9 +113,8 @@ void nr_polar_info_bit_pattern(uint8_t *ibp, int16_t *Q_I_N, int16_t *Q_F_N,
void
nr_polar_info_bit_extraction
(
uint8_t
*
input
,
uint8_t
*
output
,
void
nr_polar_info_bit_extraction
(
uint8_t
*
input
,
uint8_t
*
output
,
uint8_t
*
pattern
,
uint16_t
size
);
uint8_t
*
pattern
,
uint16_t
size
);
void
nr_byte2bit
(
uint8_t
*
in
,
uint16_t
arraySize
,
uint32_t
*
out
);
void
nr_bit2byte_uint32_8_t
(
uint32_t
*
in
,
uint16_t
arraySize
,
uint8_t
*
out
);
void
nr_byte2bit_uint8
(
uint8_t
*
array
,
uint8_t
arraySize
,
uint8_t
*
bitArray
);
void
nr_byte2bit_uint8_32_t
(
uint8_t
*
in
,
uint16_t
arraySize
,
uint32_t
*
out
);
void
nr_bit2byte
(
uint32_t
*
in
,
uint16_t
arraySize
,
uint8_t
*
out
);
void
nr_polar_bit_insertion
(
uint8_t
*
input
,
uint8_t
*
output
,
uint16_t
N
,
void
nr_polar_bit_insertion
(
uint8_t
*
input
,
uint8_t
*
output
,
uint16_t
N
,
uint16_t
K
,
int16_t
*
Q_I_N
,
int16_t
*
Q_PC_N
,
uint8_t
n_PC
);
uint16_t
K
,
int16_t
*
Q_I_N
,
int16_t
*
Q_PC_N
,
uint8_t
n_PC
);
...
...
openair1/PHY/NR_TRANSPORT/nr_dci.c
View file @
ca207808
...
@@ -204,15 +204,15 @@ uint8_t nr_generate_dci_top(NR_gNB_PDCCH pdcch_vars,
...
@@ -204,15 +204,15 @@ uint8_t nr_generate_dci_top(NR_gNB_PDCCH pdcch_vars,
/// DCI payload processing
/// DCI payload processing
//channel coding
//channel coding
#ifdef DEBUG_POLAR_PARAMS
#ifdef DEBUG_POLAR_PARAMS
dci_alloc
.
dci_pdu
[
1
]
=
10
;
dci_alloc
.
dci_pdu
[
1
]
=
0xffffffff
;
uint8_t
*
encoderInput
=
malloc
(
sizeof
(
uint8_t
)
*
dci_alloc
.
size
);
uint8_t
*
encoderInput
=
malloc
(
sizeof
(
uint8_t
)
*
dci_alloc
.
size
);
printf
(
"
\n
[TY]DCI PDU: [0]->0x%08x
\t
[1]->0x%08x
\t
[2]->0x%08x
\t
[3]->0x%08x
\n
"
,
printf
(
"[TY]DCI PDU: [0]->0x%08x
\t
[1]->0x%08x
\t
[2]->0x%08x
\t
[3]->0x%08x
\n
"
,
dci_alloc
.
dci_pdu
[
0
],
dci_alloc
.
dci_pdu
[
1
],
dci_alloc
.
dci_pdu
[
2
],
dci_alloc
.
dci_pdu
[
3
]);
dci_alloc
.
dci_pdu
[
0
],
dci_alloc
.
dci_pdu
[
1
],
dci_alloc
.
dci_pdu
[
2
],
dci_alloc
.
dci_pdu
[
3
]);
nr_bit2byte
(
dci_alloc
.
dci_pdu
,
dci_alloc
.
size
,
encoderInput
);
nr_bit2byte
(
dci_alloc
.
dci_pdu
,
dci_alloc
.
size
,
encoderInput
);
for
(
int
i
=
0
;
i
<
dci_alloc
.
size
;
i
++
)
for
(
int
i
=
0
;
i
<
dci_alloc
.
size
;
i
++
)
printf
(
"encoderInput[%d]=%d
\n
"
,
i
,
encoderInput
[
i
]);
printf
(
"encoderInput[%d]=%d
\n
"
,
i
,
encoderInput
[
i
]);
nr_byte2bit
(
encoderInput
,
dci_alloc
.
size
,
dci_alloc
.
dci_pdu
);
nr_byte2bit
(
encoderInput
,
dci_alloc
.
size
,
dci_alloc
.
dci_pdu
);
printf
(
"
\n
[TY]DCI PDU: [0]->0x%08x
\t
[1]->0x%08x
\t
[2]->0x%08x
\t
[3]->0x%08x
\n
"
,
printf
(
"[TY]DCI PDU: [0]->0x%08x
\t
[1]->0x%08x
\t
[2]->0x%08x
\t
[3]->0x%08x
\n
"
,
dci_alloc
.
dci_pdu
[
0
],
dci_alloc
.
dci_pdu
[
1
],
dci_alloc
.
dci_pdu
[
2
],
dci_alloc
.
dci_pdu
[
3
]);
dci_alloc
.
dci_pdu
[
0
],
dci_alloc
.
dci_pdu
[
1
],
dci_alloc
.
dci_pdu
[
2
],
dci_alloc
.
dci_pdu
[
3
]);
return
(
0
);
return
(
0
);
...
...
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