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
常顺宇
OpenXG-RAN
Commits
1a8e5314
Commit
1a8e5314
authored
Sep 05, 2020
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PUCCH2 3-11 bits with > 2 PRB. Will work for even number of PRBs up to 16
parent
21f5956f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
43 deletions
+57
-43
openair1/PHY/NR_TRANSPORT/pucch_rx.c
openair1/PHY/NR_TRANSPORT/pucch_rx.c
+46
-42
openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c
openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c
+11
-1
No files found.
openair1/PHY/NR_TRANSPORT/pucch_rx.c
View file @
1a8e5314
...
@@ -1440,12 +1440,15 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
...
@@ -1440,12 +1440,15 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
}
}
printf
(
"
\n
"
);
printf
(
"
\n
"
);
#endif
#endif
int64_t
corr_tmp
=
0
;
for
(
int
group
=
0
;
group
<
ngroup
;
group
++
)
{
// do complex correlation
// do complex correlation
for
(
int
aa
=
0
;
aa
<
Prx
;
aa
++
)
{
for
(
int
aa
=
0
;
aa
<
Prx
;
aa
++
)
{
prod_re
[
aa
]
=
_mm256_srai_epi16
(
_mm256_adds_epi16
(
_mm256_mullo_epi16
(
pucch2_lut
[
nb_bit
-
3
][
cw
<<
1
],
rp_re
[
aa
][
0
]),
prod_re
[
aa
]
=
_mm256_srai_epi16
(
_mm256_adds_epi16
(
_mm256_mullo_epi16
(
pucch2_lut
[
nb_bit
-
3
][
cw
<<
1
],
rp_re
[
aa
][
group
]),
_mm256_mullo_epi16
(
pucch2_lut
[
nb_bit
-
3
][(
cw
<<
1
)
+
1
],
rp_im
[
aa
][
0
])),
5
);
_mm256_mullo_epi16
(
pucch2_lut
[
nb_bit
-
3
][(
cw
<<
1
)
+
1
],
rp_im
[
aa
][
group
])),
5
);
prod_im
[
aa
]
=
_mm256_srai_epi16
(
_mm256_subs_epi16
(
_mm256_mullo_epi16
(
pucch2_lut
[
nb_bit
-
3
][
cw
<<
1
],
rp2_im
[
aa
][
0
]),
prod_im
[
aa
]
=
_mm256_srai_epi16
(
_mm256_subs_epi16
(
_mm256_mullo_epi16
(
pucch2_lut
[
nb_bit
-
3
][
cw
<<
1
],
rp2_im
[
aa
][
group
]),
_mm256_mullo_epi16
(
pucch2_lut
[
nb_bit
-
3
][(
cw
<<
1
)
+
1
],
rp2_re
[
aa
][
0
])),
5
);
_mm256_mullo_epi16
(
pucch2_lut
[
nb_bit
-
3
][(
cw
<<
1
)
+
1
],
rp2_re
[
aa
][
group
])),
5
);
#ifdef DEBUG_NR_PUCCH_RX
#ifdef DEBUG_NR_PUCCH_RX
printf
(
"prod_re[%d] => (%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d)"
,
aa
,
printf
(
"prod_re[%d] => (%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d)"
,
aa
,
((
int16_t
*
)
&
prod_re
[
aa
])[
0
],((
int16_t
*
)
&
prod_re
[
aa
])[
1
],((
int16_t
*
)
&
prod_re
[
aa
])[
2
],((
int16_t
*
)
&
prod_re
[
aa
])[
3
],
((
int16_t
*
)
&
prod_re
[
aa
])[
0
],((
int16_t
*
)
&
prod_re
[
aa
])[
1
],((
int16_t
*
)
&
prod_re
[
aa
])[
2
],((
int16_t
*
)
&
prod_re
[
aa
])[
3
],
...
@@ -1470,26 +1473,27 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
...
@@ -1470,26 +1473,27 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
}
}
int64_t
corr_re
=
0
,
corr_im
=
0
;
int64_t
corr_re
=
0
,
corr_im
=
0
;
int64_t
corr_tmp
=
0
;
for
(
int
aa
=
0
;
aa
<
Prx
;
aa
++
)
{
for
(
int
aa
=
0
;
aa
<
Prx
;
aa
++
)
{
LOG_D
(
PHY
,
"pucch2 cw %d aa %d: (%d,%d)+(%d,%d) = (%d,%d)
\n
"
,
cw
,
aa
,
LOG_D
(
PHY
,
"pucch2 cw %d group %d aa %d: (%d,%d)+(%d,%d) = (%d,%d)
\n
"
,
cw
,
group
,
aa
,
corr32_re
[
0
][
aa
],
corr32_im
[
0
][
aa
],
corr32_re
[
group
][
aa
],
corr32_im
[
0
][
aa
],
((
int16_t
*
)(
&
prod_re
[
aa
]))[
0
],
((
int16_t
*
)(
&
prod_re
[
aa
]))[
0
],
((
int16_t
*
)(
&
prod_im
[
aa
]))[
0
],
((
int16_t
*
)(
&
prod_im
[
aa
]))[
0
],
corr32_re
[
0
][
aa
]
+
((
int16_t
*
)(
&
prod_re
[
0
]))[
0
],
corr32_re
[
group
][
aa
]
+
((
int16_t
*
)(
&
prod_re
[
aa
]))[
0
],
corr32_im
[
0
][
aa
]
+
((
int16_t
*
)(
&
prod_im
[
0
]))[
0
]);
corr32_im
[
group
][
aa
]
+
((
int16_t
*
)(
&
prod_im
[
aa
]))[
0
]);
corr_re
=
(
corr32_re
[
0
][
aa
]
+
((
int16_t
*
)(
&
prod_re
[
0
]))[
0
]);
corr_re
=
(
corr32_re
[
group
][
aa
]
+
((
int16_t
*
)(
&
prod_re
[
aa
]))[
0
]);
corr_im
=
(
corr32_im
[
0
][
aa
]
+
((
int16_t
*
)(
&
prod_im
[
0
]))[
0
]);
corr_im
=
(
corr32_im
[
group
][
aa
]
+
((
int16_t
*
)(
&
prod_im
[
aa
]))[
0
]);
corr_tmp
+=
corr_re
*
corr_re
+
corr_im
*
corr_im
;
corr_tmp
+=
corr_re
*
corr_re
+
corr_im
*
corr_im
;
}
}
// aa loop
}
// group loop
if
(
corr_tmp
>
corr
)
{
if
(
corr_tmp
>
corr
)
{
corr
=
corr_tmp
;
corr
=
corr_tmp
;
cw_ML
=
cw
;
cw_ML
=
cw
;
}
}
}
}
// cw loop
corr_dB
=
dB_fixed64
((
uint64_t
)
corr
);
corr_dB
=
dB_fixed64
((
uint64_t
)
corr
);
LOG_D
(
PHY
,
"cw_ML %d, metric %d dB
\n
"
,
cw_ML
,
corr_dB
);
LOG_D
(
PHY
,
"cw_ML %d, metric %d dB
\n
"
,
cw_ML
,
corr_dB
);
decodedPayload
[
0
]
=
(
uint64_t
)
cw_ML
;
decodedPayload
[
0
]
=
(
uint64_t
)
cw_ML
;
...
...
openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c
View file @
1a8e5314
...
@@ -928,7 +928,17 @@ void nr_uci_encoding(uint64_t payload,
...
@@ -928,7 +928,17 @@ void nr_uci_encoding(uint64_t payload,
if
(
A
<=
11
)
{
if
(
A
<=
11
)
{
// procedure in subclause 6.3.1.2.2 (UCI encoded by channel coding of small block lengths -> subclause 6.3.1.3.2)
// procedure in subclause 6.3.1.2.2 (UCI encoded by channel coding of small block lengths -> subclause 6.3.1.3.2)
// CRC bits are not attached, and coding small block lengths (subclause 5.3.3)
// CRC bits are not attached, and coding small block lengths (subclause 5.3.3)
b
[
0
]
=
encodeSmallBlock
((
uint16_t
*
)
&
payload
,
A
);
uint64_t
b0
=
encodeSmallBlock
((
uint16_t
*
)
&
payload
,
A
);
// repetition for rate-matching up to 16 PRB
b
[
0
]
=
b0
|
(
b0
<<
32
);
b
[
1
]
=
b
[
0
];
b
[
2
]
=
b
[
0
];
b
[
3
]
=
b
[
0
];
b
[
4
]
=
b
[
0
];
b
[
5
]
=
b
[
0
];
b
[
6
]
=
b
[
0
];
b
[
7
]
=
b
[
0
];
AssertFatal
(
nrofPRB
<=
16
,
"Number of PRB >16
\n
"
);
}
else
if
(
A
>=
12
)
{
}
else
if
(
A
>=
12
)
{
AssertFatal
(
A
<
65
,
"Polar encoding not supported yet for UCI with more than 64 bits
\n
"
);
AssertFatal
(
A
<
65
,
"Polar encoding not supported yet for UCI with more than 64 bits
\n
"
);
t_nrPolar_params
*
currentPtr
=
nr_polar_params
(
NR_POLAR_UCI_PUCCH_MESSAGE_TYPE
,
t_nrPolar_params
*
currentPtr
=
nr_polar_params
(
NR_POLAR_UCI_PUCCH_MESSAGE_TYPE
,
...
...
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