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
2a5109d6
Commit
2a5109d6
authored
Nov 05, 2019
by
Francesco Mani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crc ones added also ar UE side
parent
13f4acd5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
19 deletions
+36
-19
openair1/PHY/CODING/TESTBENCH/polartest.c
openair1/PHY/CODING/TESTBENCH/polartest.c
+1
-1
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
+32
-17
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
+1
-0
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
+1
-0
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
+1
-1
No files found.
openair1/PHY/CODING/TESTBENCH/polartest.c
View file @
2a5109d6
...
@@ -278,7 +278,7 @@ if (logFlag){
...
@@ -278,7 +278,7 @@ if (logFlag){
start_meas
(
&
timeDecoder
);
start_meas
(
&
timeDecoder
);
if
(
decoder_int16
==
1
)
{
if
(
decoder_int16
==
1
)
{
decoderState
=
polar_decoder_int16
(
channelOutput_int16
,
(
uint64_t
*
)
estimatedOutput
,
currentPtr
);
decoderState
=
polar_decoder_int16
(
channelOutput_int16
,
(
uint64_t
*
)
estimatedOutput
,
0
,
currentPtr
);
}
else
{
//0 --> PBCH, 1 --> DCI, -1 --> UCI
}
else
{
//0 --> PBCH, 1 --> DCI, -1 --> UCI
if
(
polarMessageType
==
0
)
{
if
(
polarMessageType
==
0
)
{
decoderState
=
polar_decoder
(
channelOutput
,
decoderState
=
polar_decoder
(
channelOutput
,
...
...
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
View file @
2a5109d6
...
@@ -601,6 +601,7 @@ void init_polar_deinterleaver_table(t_nrPolar_params *polarParams) {
...
@@ -601,6 +601,7 @@ void init_polar_deinterleaver_table(t_nrPolar_params *polarParams) {
uint32_t
polar_decoder_int16
(
int16_t
*
input
,
uint32_t
polar_decoder_int16
(
int16_t
*
input
,
uint64_t
*
out
,
uint64_t
*
out
,
uint8_t
ones_flag
,
const
t_nrPolar_params
*
polarParams
)
const
t_nrPolar_params
*
polarParams
)
{
{
int16_t
d_tilde
[
polarParams
->
N
];
// = malloc(sizeof(double) * polarParams->N);
int16_t
d_tilde
[
polarParams
->
N
];
// = malloc(sizeof(double) * polarParams->N);
...
@@ -650,28 +651,42 @@ uint32_t polar_decoder_int16(int16_t *input,
...
@@ -650,28 +651,42 @@ uint32_t polar_decoder_int16(int16_t *input,
uint64_t
Ar
=
0
;
uint64_t
Ar
=
0
;
AssertFatal
(
len
<
65
,
"A must be less than 65 bits
\n
"
);
AssertFatal
(
len
<
65
,
"A must be less than 65 bits
\n
"
);
// appending 24 ones before a0 for DCI as stated in 38.212 7.3.2
uint8_t
offset
=
0
;
if
(
ones_flag
)
offset
=
3
;
if
(
len
<=
32
)
{
if
(
len
<=
32
)
{
Ar
=
(
uint32_t
)(
B
[
0
]
>>
crclen
);
Ar
=
(
uint32_t
)(
B
[
0
]
>>
crclen
);
uint8_t
A32_flip
[
4
];
uint8_t
A32_flip
[
4
+
offset
];
if
(
ones_flag
)
{
A32_flip
[
0
]
=
0xff
;
A32_flip
[
1
]
=
0xff
;
A32_flip
[
2
]
=
0xff
;
}
uint32_t
Aprime
=
(
uint32_t
)(
Ar
<<
(
32
-
len
));
uint32_t
Aprime
=
(
uint32_t
)(
Ar
<<
(
32
-
len
));
A32_flip
[
0
]
=
((
uint8_t
*
)
&
Aprime
)[
3
];
A32_flip
[
0
+
offset
]
=
((
uint8_t
*
)
&
Aprime
)[
3
];
A32_flip
[
1
]
=
((
uint8_t
*
)
&
Aprime
)[
2
];
A32_flip
[
1
+
offset
]
=
((
uint8_t
*
)
&
Aprime
)[
2
];
A32_flip
[
2
]
=
((
uint8_t
*
)
&
Aprime
)[
1
];
A32_flip
[
2
+
offset
]
=
((
uint8_t
*
)
&
Aprime
)[
1
];
A32_flip
[
3
]
=
((
uint8_t
*
)
&
Aprime
)[
0
];
A32_flip
[
3
+
offset
]
=
((
uint8_t
*
)
&
Aprime
)[
0
];
crc
=
(
uint64_t
)(
crc24c
(
A32_flip
,
len
)
>>
8
);
crc
=
(
uint64_t
)(
crc24c
(
A32_flip
,
8
*
offset
+
len
)
>>
8
);
}
else
if
(
len
<=
64
)
{
}
else
if
(
len
<=
64
)
{
Ar
=
(
B
[
0
]
>>
crclen
)
|
(
B
[
1
]
<<
(
64
-
crclen
));;
Ar
=
(
B
[
0
]
>>
crclen
)
|
(
B
[
1
]
<<
(
64
-
crclen
));;
uint8_t
A64_flip
[
8
];
uint8_t
A64_flip
[
8
+
offset
];
uint64_t
Aprime
=
(
uint32_t
)(
Ar
<<
(
64
-
len
));
if
(
ones_flag
)
{
A64_flip
[
0
]
=
((
uint8_t
*
)
&
Aprime
)[
7
];
A64_flip
[
0
]
=
0xff
;
A64_flip
[
1
]
=
((
uint8_t
*
)
&
Aprime
)[
6
];
A64_flip
[
1
]
=
0xff
;
A64_flip
[
2
]
=
((
uint8_t
*
)
&
Aprime
)[
5
];
A64_flip
[
2
]
=
0xff
;
A64_flip
[
3
]
=
((
uint8_t
*
)
&
Aprime
)[
4
];
}
A64_flip
[
4
]
=
((
uint8_t
*
)
&
Aprime
)[
3
];
uint64_t
Aprime
=
(
uint64_t
)(
Ar
<<
(
64
-
len
));
A64_flip
[
5
]
=
((
uint8_t
*
)
&
Aprime
)[
2
];
A64_flip
[
0
+
offset
]
=
((
uint8_t
*
)
&
Aprime
)[
7
];
A64_flip
[
6
]
=
((
uint8_t
*
)
&
Aprime
)[
1
];
A64_flip
[
1
+
offset
]
=
((
uint8_t
*
)
&
Aprime
)[
6
];
A64_flip
[
7
]
=
((
uint8_t
*
)
&
Aprime
)[
0
];
A64_flip
[
2
+
offset
]
=
((
uint8_t
*
)
&
Aprime
)[
5
];
crc
=
(
uint64_t
)(
crc24c
(
A64_flip
,
len
)
>>
8
);
A64_flip
[
3
+
offset
]
=
((
uint8_t
*
)
&
Aprime
)[
4
];
A64_flip
[
4
+
offset
]
=
((
uint8_t
*
)
&
Aprime
)[
3
];
A64_flip
[
5
+
offset
]
=
((
uint8_t
*
)
&
Aprime
)[
2
];
A64_flip
[
6
+
offset
]
=
((
uint8_t
*
)
&
Aprime
)[
1
];
A64_flip
[
7
+
offset
]
=
((
uint8_t
*
)
&
Aprime
)[
0
];
crc
=
(
uint64_t
)(
crc24c
(
A64_flip
,
8
*
offset
+
len
)
>>
8
);
}
}
#if 0
#if 0
...
...
openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h
View file @
2a5109d6
...
@@ -158,6 +158,7 @@ int8_t polar_decoder(double *input,
...
@@ -158,6 +158,7 @@ int8_t polar_decoder(double *input,
uint32_t
polar_decoder_int16
(
int16_t
*
input
,
uint32_t
polar_decoder_int16
(
int16_t
*
input
,
uint64_t
*
out
,
uint64_t
*
out
,
uint8_t
ones_flag
,
const
t_nrPolar_params
*
polarParams
);
const
t_nrPolar_params
*
polarParams
);
int8_t
polar_decoder_dci
(
double
*
input
,
int8_t
polar_decoder_dci
(
double
*
input
,
...
...
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
View file @
2a5109d6
...
@@ -1338,6 +1338,7 @@ void nr_dci_decoding_procedure0(int s,
...
@@ -1338,6 +1338,7 @@ void nr_dci_decoding_procedure0(int s,
const
t_nrPolar_params
*
currentPtrDCI
=
nr_polar_params
(
1
,
sizeof_bits
,
L2
);
const
t_nrPolar_params
*
currentPtrDCI
=
nr_polar_params
(
1
,
sizeof_bits
,
L2
);
decoderState
=
polar_decoder_int16
(
&
pdcch_vars
[
eNB_id
]
->
e_rx
[
CCEind
*
9
*
6
*
2
],
decoderState
=
polar_decoder_int16
(
&
pdcch_vars
[
eNB_id
]
->
e_rx
[
CCEind
*
9
*
6
*
2
],
dci_estimation
,
dci_estimation
,
1
,
currentPtrDCI
);
currentPtrDCI
);
crc
=
decoderState
;
crc
=
decoderState
;
//crc = (crc16(&dci_decoded_output[current_thread_id][0], sizeof_bits) >> 16) ^ extract_crc(&dci_decoded_output[current_thread_id][0], sizeof_bits);
//crc = (crc16(&dci_decoded_output[current_thread_id][0], sizeof_bits) >> 16) ^ extract_crc(&dci_decoded_output[current_thread_id][0], sizeof_bits);
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
View file @
2a5109d6
...
@@ -538,7 +538,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
...
@@ -538,7 +538,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
nr_pbch_unscrambling
(
nr_ue_pbch_vars
,
frame_parms
->
Nid_cell
,
nushift
,
M
,
NR_POLAR_PBCH_E
,
0
,
0
);
nr_pbch_unscrambling
(
nr_ue_pbch_vars
,
frame_parms
->
Nid_cell
,
nushift
,
M
,
NR_POLAR_PBCH_E
,
0
,
0
);
//polar decoding de-rate matching
//polar decoding de-rate matching
const
t_nrPolar_params
*
currentPtr
=
nr_polar_params
(
NR_POLAR_PBCH_MESSAGE_TYPE
,
NR_POLAR_PBCH_PAYLOAD_BITS
,
NR_POLAR_PBCH_AGGREGATION_LEVEL
);
const
t_nrPolar_params
*
currentPtr
=
nr_polar_params
(
NR_POLAR_PBCH_MESSAGE_TYPE
,
NR_POLAR_PBCH_PAYLOAD_BITS
,
NR_POLAR_PBCH_AGGREGATION_LEVEL
);
decoderState
=
polar_decoder_int16
(
pbch_e_rx
,(
uint64_t
*
)
&
nr_ue_pbch_vars
->
pbch_a_prime
,
currentPtr
);
decoderState
=
polar_decoder_int16
(
pbch_e_rx
,(
uint64_t
*
)
&
nr_ue_pbch_vars
->
pbch_a_prime
,
0
,
currentPtr
);
if
(
decoderState
)
return
(
decoderState
);
if
(
decoderState
)
return
(
decoderState
);
...
...
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