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
canghaiwuhen
OpenXG-RAN
Commits
cdde8830
Commit
cdde8830
authored
Jan 28, 2020
by
Francesco Mani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
completing previous fix
parent
0e550ff2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
11 deletions
+18
-11
openair1/PHY/NR_TRANSPORT/pucch_rx.c
openair1/PHY/NR_TRANSPORT/pucch_rx.c
+9
-5
openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c
openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c
+8
-6
openair1/SIMULATION/NR_PHY/pucchsim.c
openair1/SIMULATION/NR_PHY/pucchsim.c
+1
-0
No files found.
openair1/PHY/NR_TRANSPORT/pucch_rx.c
View file @
cdde8830
...
...
@@ -106,20 +106,24 @@ void nr_decode_pucch0( int32_t **rxdataF,
* Implementing TS 38.211 Subclause 6.3.2.3.2 Mapping to physical resources FIXME!
*/
uint32_t
re_offset
=
0
;
uint8_t
l2
;
for
(
l
=
0
;
l
<
nrofSymbols
;
l
++
)
{
re_offset
=
((
l
+
startingSymbolIndex
)
*
frame_parms
->
ofdm_symbol_size
)
+
(
12
*
startingPRB
)
+
frame_parms
->
first_carrier_offset
;
l2
=
l
+
startingSymbolIndex
;
re_offset
=
(
12
*
startingPRB
)
+
frame_parms
->
first_carrier_offset
;
if
(
re_offset
>=
frame_parms
->
ofdm_symbol_size
)
re_offset
-=
frame_parms
->
ofdm_symbol_size
;
for
(
n
=
0
;
n
<
12
;
n
++
){
r_re
[(
12
*
l
)
+
n
]
=
((
int16_t
*
)
&
rxdataF
[
0
][
re_offset
])[
0
];
r_im
[(
12
*
l
)
+
n
]
=
((
int16_t
*
)
&
rxdataF
[
0
][
re_offset
])[
1
];
r_re
[(
12
*
l
)
+
n
]
=
((
int16_t
*
)
&
rxdataF
[
0
][
(
l2
*
frame_parms
->
ofdm_symbol_size
)
+
re_offset
])[
0
];
r_im
[(
12
*
l
)
+
n
]
=
((
int16_t
*
)
&
rxdataF
[
0
][
(
l2
*
frame_parms
->
ofdm_symbol_size
)
+
re_offset
])[
1
];
#ifdef DEBUG_NR_PUCCH_RX
printf
(
"
\t
[nr_generate_pucch0] mapping to RE
\t
amp=%d
\t
ofdm_symbol_size=%d
\t
N_RB_DL=%d
\t
first_carrier_offset=%d
\t
txptr(%d)=(x_n(l=%d,n=%d)=(%d,%d))
\n
"
,
amp
,
frame_parms
->
ofdm_symbol_size
,
frame_parms
->
N_RB_DL
,
frame_parms
->
first_carrier_offset
,
re_offset
,
l
,
n
,((
int16_t
*
)
&
rxdataF
[
0
][
re_offset
])[
0
],((
int16_t
*
)
&
rxdataF
[
0
][
re_offset
])[
1
]);
amp
,
frame_parms
->
ofdm_symbol_size
,
frame_parms
->
N_RB_DL
,
frame_parms
->
first_carrier_offset
,(
l2
*
frame_parms
->
ofdm_symbol_size
)
+
re_offset
,
l
,
n
,((
int16_t
*
)
&
rxdataF
[
0
][(
l2
*
frame_parms
->
ofdm_symbol_size
)
+
re_offset
])[
0
],
((
int16_t
*
)
&
rxdataF
[
0
][(
l2
*
frame_parms
->
ofdm_symbol_size
)
+
re_offset
])[
1
]);
#endif
re_offset
++
;
if
(
re_offset
>=
frame_parms
->
ofdm_symbol_size
)
...
...
openair1/PHY/NR_UE_TRANSPORT/pucch_nr.c
View file @
cdde8830
...
...
@@ -266,25 +266,27 @@ void nr_generate_pucch0(PHY_VARS_NR_UE *ue,
*/
//int32_t *txptr;
uint32_t
re_offset
=
0
;
uint8_t
l2
;
for
(
int
l
=
0
;
l
<
nrofSymbols
;
l
++
)
{
re_offset
=
(
(
l
+
startingSymbolIndex
)
*
frame_parms
->
ofdm_symbol_size
)
+
(
12
*
startingPRB
)
+
frame_parms
->
first_carrier_offset
;
l2
=
l
+
startingSymbolIndex
;
re_offset
=
(
12
*
startingPRB
)
+
frame_parms
->
first_carrier_offset
;
if
(
re_offset
>=
frame_parms
->
ofdm_symbol_size
)
re_offset
-=
frame_parms
->
ofdm_symbol_size
;
//txptr = &txdataF[0][re_offset];
for
(
int
n
=
0
;
n
<
12
;
n
++
)
{
((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
0
]
=
(
int16_t
)(((
int32_t
)(
amp
)
*
x_n_re
[(
12
*
l
)
+
n
])
>>
15
);
((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
1
]
=
(
int16_t
)(((
int32_t
)(
amp
)
*
x_n_im
[(
12
*
l
)
+
n
])
>>
15
);
((
int16_t
*
)
&
txdataF
[
0
][
(
l2
*
frame_parms
->
ofdm_symbol_size
)
+
re_offset
])[
0
]
=
(
int16_t
)(((
int32_t
)(
amp
)
*
x_n_re
[(
12
*
l
)
+
n
])
>>
15
);
((
int16_t
*
)
&
txdataF
[
0
][
(
l2
*
frame_parms
->
ofdm_symbol_size
)
+
re_offset
])[
1
]
=
(
int16_t
)(((
int32_t
)(
amp
)
*
x_n_im
[(
12
*
l
)
+
n
])
>>
15
);
//((int16_t *)txptr[0][re_offset])[0] = (int16_t)((int32_t)amp * x_n_re[(12*l)+n])>>15;
//((int16_t *)txptr[0][re_offset])[1] = (int16_t)((int32_t)amp * x_n_im[(12*l)+n])>>15;
//txptr[re_offset] = (x_n_re[(12*l)+n]<<16) + x_n_im[(12*l)+n];
#ifdef DEBUG_NR_PUCCH_TX
printf
(
"
\t
[nr_generate_pucch0] mapping to RE
\t
amp=%d
\t
ofdm_symbol_size=%d
\t
N_RB_DL=%d
\t
first_carrier_offset=%d
\t
txptr(%u)=(x_n(l=%d,n=%d)=(%d,%d))
\n
"
,
amp
,
frame_parms
->
ofdm_symbol_size
,
frame_parms
->
N_RB_DL
,
frame_parms
->
first_carrier_offset
,
re_offset
,
l
,
n
,((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
0
],((
int16_t
*
)
&
txdataF
[
0
][
re_offset
])[
1
]);
amp
,
frame_parms
->
ofdm_symbol_size
,
frame_parms
->
N_RB_DL
,
frame_parms
->
first_carrier_offset
,(
l2
*
frame_parms
->
ofdm_symbol_size
)
+
re_offset
,
l2
,
n
,((
int16_t
*
)
&
txdataF
[
0
][(
l2
*
frame_parms
->
ofdm_symbol_size
)
+
re_offset
])[
0
],
((
int16_t
*
)
&
txdataF
[
0
][(
l2
*
frame_parms
->
ofdm_symbol_size
)
+
re_offset
])[
1
]);
#endif
re_offset
++
;
if
(
re_offset
>=
frame_parms
->
ofdm_symbol_size
)
...
...
openair1/SIMULATION/NR_PHY/pucchsim.c
View file @
cdde8830
...
...
@@ -305,6 +305,7 @@ int main(int argc, char **argv)
printf
(
"-f Output filename (.txt format) for Pe/SNR results
\n
"
);
printf
(
"-F Input filename (.txt format) for RX conformance testing
\n
"
);
printf
(
"-i Enter number of ofdm symbols for pucch
\n
"
);
printf
(
"-I Starting symbol index for pucch
\n
"
);
printf
(
"-r PUCCCH starting PRB
\n
"
);
printf
(
"-P Enter the format of PUCCH
\n
"
);
printf
(
"-b number of HARQ bits (1-2)
\n
"
);
...
...
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