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
spbro
OpenXG-RAN
Commits
cda82edf
Commit
cda82edf
authored
Aug 20, 2024
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adapt LLR unit test to a generic UL/DL scenario
parent
98a8e5dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
127 additions
and
146 deletions
+127
-146
openair1/PHY/NR_TRANSPORT/tests/test_llr.cpp
openair1/PHY/NR_TRANSPORT/tests/test_llr.cpp
+126
-145
openair1/PHY/nr_phy_common/CMakeLists.txt
openair1/PHY/nr_phy_common/CMakeLists.txt
+1
-1
No files found.
openair1/PHY/NR_TRANSPORT/tests/test_llr.cpp
View file @
cda82edf
...
...
@@ -25,20 +25,9 @@
#include <algorithm>
#include <numeric>
extern
"C"
{
void
nr_ulsch_16qam_llr
(
int32_t
*
rxdataF_comp
,
int32_t
*
ul_ch_mag
,
int16_t
*
ulsch_llr
,
uint32_t
nb_re
,
uint8_t
symbol
);
void
nr_ulsch_64qam_llr
(
int32_t
*
rxdataF_comp
,
int32_t
*
ul_ch_mag
,
int32_t
*
ul_ch_magb
,
int16_t
*
ulsch_llr
,
uint32_t
nb_re
,
uint8_t
symbol
);
void
nr_ulsch_256qam_llr
(
int32_t
*
rxdataF_comp
,
int32_t
*
ul_ch_mag
,
int32_t
*
ul_ch_magb
,
int32_t
*
ul_ch_magc
,
int16_t
*
ulsch_llr
,
uint32_t
nb_re
,
uint8_t
symbol
);
void
nr_16qam_llr
(
int32_t
*
rxdataF_comp
,
int32_t
*
ch_mag_in
,
int16_t
*
llr
,
uint32_t
nb_re
);
void
nr_64qam_llr
(
int32_t
*
rxdataF_comp
,
int32_t
*
ch_mag
,
int32_t
*
ch_mag2
,
int16_t
*
llr
,
uint32_t
nb_re
);
void
nr_256qam_llr
(
int32_t
*
rxdataF_comp
,
int32_t
*
ch_mag
,
int32_t
*
ch_mag2
,
int32_t
*
ch_mag3
,
int16_t
*
llr
,
uint32_t
nb_re
);
struct
configmodule_interface_s
;
struct
configmodule_interface_s
*
uniqCfg
=
NULL
;
...
...
@@ -72,74 +61,72 @@ int16_t saturating_sub(int16_t a, int16_t b)
}
}
void
nr_
ulsch_16qam_llr_ref
(
c16_t
*
rxdataF_comp
,
int32_t
*
ul_ch_mag
,
int16_t
*
ulsch_llr
,
uint32_t
nb_re
,
uint8_t
symbol
)
void
nr_
16qam_llr_ref
(
c16_t
*
rxdataF_comp
,
int32_t
*
ch_mag
,
int16_t
*
llr
,
uint32_t
nb_re
)
{
int16_t
*
ul_ch_mag_i16
=
(
int16_t
*
)
ul_
ch_mag
;
int16_t
*
ch_mag_i16
=
(
int16_t
*
)
ch_mag
;
for
(
auto
i
=
0U
;
i
<
nb_re
;
i
++
)
{
int16_t
real
=
rxdataF_comp
[
i
].
r
;
int16_t
imag
=
rxdataF_comp
[
i
].
i
;
int16_t
mag_real
=
ul_
ch_mag_i16
[
2
*
i
];
int16_t
mag_imag
=
ul_
ch_mag_i16
[
2
*
i
+
1
];
ulsch_
llr
[
4
*
i
]
=
real
;
ulsch_
llr
[
4
*
i
+
1
]
=
imag
;
ulsch_
llr
[
4
*
i
+
2
]
=
saturating_sub
(
mag_real
,
std
::
abs
(
real
));
ulsch_
llr
[
4
*
i
+
3
]
=
saturating_sub
(
mag_imag
,
std
::
abs
(
imag
));
int16_t
mag_real
=
ch_mag_i16
[
2
*
i
];
int16_t
mag_imag
=
ch_mag_i16
[
2
*
i
+
1
];
llr
[
4
*
i
]
=
real
;
llr
[
4
*
i
+
1
]
=
imag
;
llr
[
4
*
i
+
2
]
=
saturating_sub
(
mag_real
,
std
::
abs
(
real
));
llr
[
4
*
i
+
3
]
=
saturating_sub
(
mag_imag
,
std
::
abs
(
imag
));
}
}
void
nr_ulsch_64qam_llr_ref
(
c16_t
*
rxdataF_comp
,
int32_t
*
ul_ch_mag
,
int32_t
*
ul_ch_magb
,
int16_t
*
ulsch_llr
,
uint32_t
nb_re
,
uint8_t
symbol
)
void
nr_64qam_llr_ref
(
c16_t
*
rxdataF_comp
,
int32_t
*
ch_mag
,
int32_t
*
ch_magb
,
int16_t
*
llr
,
uint32_t
nb_re
)
{
int16_t
*
ul_ch_mag_i16
=
(
int16_t
*
)
ul_
ch_mag
;
int16_t
*
ul_ch_magb_i16
=
(
int16_t
*
)
ul_
ch_magb
;
int16_t
*
ch_mag_i16
=
(
int16_t
*
)
ch_mag
;
int16_t
*
ch_magb_i16
=
(
int16_t
*
)
ch_magb
;
for
(
auto
i
=
0U
;
i
<
nb_re
;
i
++
)
{
int16_t
real
=
rxdataF_comp
[
i
].
r
;
int16_t
imag
=
rxdataF_comp
[
i
].
i
;
int16_t
mag_real
=
ul_
ch_mag_i16
[
2
*
i
];
int16_t
mag_imag
=
ul_
ch_mag_i16
[
2
*
i
+
1
];
ulsch_
llr
[
6
*
i
]
=
real
;
ulsch_
llr
[
6
*
i
+
1
]
=
imag
;
ulsch_
llr
[
6
*
i
+
2
]
=
saturating_sub
(
mag_real
,
std
::
abs
(
real
));
ulsch_
llr
[
6
*
i
+
3
]
=
saturating_sub
(
mag_imag
,
std
::
abs
(
imag
));
int16_t
mag_realb
=
ul_
ch_magb_i16
[
2
*
i
];
int16_t
mag_imagb
=
ul_
ch_magb_i16
[
2
*
i
+
1
];
ulsch_llr
[
6
*
i
+
4
]
=
saturating_sub
(
mag_realb
,
std
::
abs
(
ulsch_
llr
[
6
*
i
+
2
]));
ulsch_llr
[
6
*
i
+
5
]
=
saturating_sub
(
mag_imagb
,
std
::
abs
(
ulsch_
llr
[
6
*
i
+
3
]));
int16_t
mag_real
=
ch_mag_i16
[
2
*
i
];
int16_t
mag_imag
=
ch_mag_i16
[
2
*
i
+
1
];
llr
[
6
*
i
]
=
real
;
llr
[
6
*
i
+
1
]
=
imag
;
llr
[
6
*
i
+
2
]
=
saturating_sub
(
mag_real
,
std
::
abs
(
real
));
llr
[
6
*
i
+
3
]
=
saturating_sub
(
mag_imag
,
std
::
abs
(
imag
));
int16_t
mag_realb
=
ch_magb_i16
[
2
*
i
];
int16_t
mag_imagb
=
ch_magb_i16
[
2
*
i
+
1
];
llr
[
6
*
i
+
4
]
=
saturating_sub
(
mag_realb
,
std
::
abs
(
llr
[
6
*
i
+
2
]));
llr
[
6
*
i
+
5
]
=
saturating_sub
(
mag_imagb
,
std
::
abs
(
llr
[
6
*
i
+
3
]));
}
}
void
nr_ulsch_256qam_llr_ref
(
c16_t
*
rxdataF_comp
,
int32_t
*
ul_ch_mag
,
int32_t
*
ul_ch_magb
,
int32_t
*
ul_ch_magc
,
int16_t
*
ulsch_llr
,
uint32_t
nb_re
,
uint8_t
symbol
)
void
nr_256qam_llr_ref
(
c16_t
*
rxdataF_comp
,
int32_t
*
ch_mag
,
int32_t
*
ch_magb
,
int32_t
*
ch_magc
,
int16_t
*
llr
,
uint32_t
nb_re
)
{
int16_t
*
ul_ch_mag_i16
=
(
int16_t
*
)
ul_
ch_mag
;
int16_t
*
ul_ch_magb_i16
=
(
int16_t
*
)
ul_
ch_magb
;
int16_t
*
ul_ch_magc_i16
=
(
int16_t
*
)
ul_
ch_magc
;
int16_t
*
ch_mag_i16
=
(
int16_t
*
)
ch_mag
;
int16_t
*
ch_magb_i16
=
(
int16_t
*
)
ch_magb
;
int16_t
*
ch_magc_i16
=
(
int16_t
*
)
ch_magc
;
for
(
auto
i
=
0U
;
i
<
nb_re
;
i
++
)
{
int16_t
real
=
rxdataF_comp
[
i
].
r
;
int16_t
imag
=
rxdataF_comp
[
i
].
i
;
int16_t
mag_real
=
ul_
ch_mag_i16
[
2
*
i
];
int16_t
mag_imag
=
ul_
ch_mag_i16
[
2
*
i
+
1
];
ulsch_
llr
[
8
*
i
]
=
real
;
ulsch_
llr
[
8
*
i
+
1
]
=
imag
;
ulsch_
llr
[
8
*
i
+
2
]
=
saturating_sub
(
mag_real
,
std
::
abs
(
real
));
ulsch_
llr
[
8
*
i
+
3
]
=
saturating_sub
(
mag_imag
,
std
::
abs
(
imag
));
int16_t
magb_real
=
ul_
ch_magb_i16
[
2
*
i
];
int16_t
magb_imag
=
ul_
ch_magb_i16
[
2
*
i
+
1
];
ulsch_llr
[
8
*
i
+
4
]
=
saturating_sub
(
magb_real
,
std
::
abs
(
ulsch_
llr
[
8
*
i
+
2
]));
ulsch_llr
[
8
*
i
+
5
]
=
saturating_sub
(
magb_imag
,
std
::
abs
(
ulsch_
llr
[
8
*
i
+
3
]));
int16_t
magc_real
=
ul_
ch_magc_i16
[
2
*
i
];
int16_t
magc_imag
=
ul_
ch_magc_i16
[
2
*
i
+
1
];
ulsch_llr
[
8
*
i
+
6
]
=
saturating_sub
(
magc_real
,
std
::
abs
(
ulsch_
llr
[
8
*
i
+
4
]));
ulsch_llr
[
8
*
i
+
7
]
=
saturating_sub
(
magc_imag
,
std
::
abs
(
ulsch_
llr
[
8
*
i
+
5
]));
int16_t
mag_real
=
ch_mag_i16
[
2
*
i
];
int16_t
mag_imag
=
ch_mag_i16
[
2
*
i
+
1
];
llr
[
8
*
i
]
=
real
;
llr
[
8
*
i
+
1
]
=
imag
;
llr
[
8
*
i
+
2
]
=
saturating_sub
(
mag_real
,
std
::
abs
(
real
));
llr
[
8
*
i
+
3
]
=
saturating_sub
(
mag_imag
,
std
::
abs
(
imag
));
int16_t
magb_real
=
ch_magb_i16
[
2
*
i
];
int16_t
magb_imag
=
ch_magb_i16
[
2
*
i
+
1
];
llr
[
8
*
i
+
4
]
=
saturating_sub
(
magb_real
,
std
::
abs
(
llr
[
8
*
i
+
2
]));
llr
[
8
*
i
+
5
]
=
saturating_sub
(
magb_imag
,
std
::
abs
(
llr
[
8
*
i
+
3
]));
int16_t
magc_real
=
ch_magc_i16
[
2
*
i
];
int16_t
magc_imag
=
ch_magc_i16
[
2
*
i
+
1
];
llr
[
8
*
i
+
6
]
=
saturating_sub
(
magc_real
,
std
::
abs
(
llr
[
8
*
i
+
4
]));
llr
[
8
*
i
+
7
]
=
saturating_sub
(
magc_imag
,
std
::
abs
(
llr
[
8
*
i
+
5
]));
}
}
...
...
@@ -149,21 +136,21 @@ void test_function_16_qam(AlignedVector512<uint32_t> nb_res)
uint32_t
nb_re
=
nb_res
[
i
];
auto
rf_data
=
generate_random_c16
(
nb_re
);
auto
magnitude_data
=
generate_random_uint16
(
nb_re
*
2
);
AlignedVector512
<
uint64_t
>
ulsch_
llr_ref
;
ulsch_
llr_ref
.
resize
(
nb_re
);
std
::
fill
(
ulsch_llr_ref
.
begin
(),
ulsch_
llr_ref
.
end
(),
0
);
nr_
ulsch_16qam_llr_ref
((
c16_t
*
)
rf_data
.
data
(),
(
int32_t
*
)
magnitude_data
.
data
(),
(
int16_t
*
)
ulsch_llr_ref
.
data
(),
nb_re
,
0
);
AlignedVector512
<
uint64_t
>
llr_ref
;
llr_ref
.
resize
(
nb_re
);
std
::
fill
(
llr_ref
.
begin
(),
llr_ref
.
end
(),
0
);
nr_
16qam_llr_ref
((
c16_t
*
)
rf_data
.
data
(),
(
int32_t
*
)
magnitude_data
.
data
(),
(
int16_t
*
)
llr_ref
.
data
(),
nb_re
);
AlignedVector512
<
uint64_t
>
ulsch_
llr
;
ulsch_
llr
.
resize
(
nb_re
);
std
::
fill
(
ulsch_llr
.
begin
(),
ulsch_
llr
.
end
(),
0
);
nr_
ulsch_16qam_llr
((
int32_t
*
)
rf_data
.
data
(),
(
int32_t
*
)
magnitude_data
.
data
(),
(
int16_t
*
)
ulsch_llr
.
data
(),
nb_re
,
0
);
AlignedVector512
<
uint64_t
>
llr
;
llr
.
resize
(
nb_re
);
std
::
fill
(
llr
.
begin
(),
llr
.
end
(),
0
);
nr_
16qam_llr
((
int32_t
*
)
rf_data
.
data
(),
(
int32_t
*
)
magnitude_data
.
data
(),
(
int16_t
*
)
llr
.
data
(),
nb_re
);
int
num_errors
=
0
;
for
(
auto
i
=
0U
;
i
<
nb_re
;
i
++
)
{
EXPECT_EQ
(
ulsch_llr_ref
[
i
],
ulsch_
llr
[
i
])
<<
"Mismatch 16qam REF "
<<
std
::
hex
<<
ulsch_llr_ref
[
i
]
<<
" != DUT "
<<
ulsch_
llr
[
i
]
<<
" at "
<<
std
::
dec
<<
i
;
if
(
ulsch_llr_ref
[
i
]
!=
ulsch_
llr
[
i
])
{
EXPECT_EQ
(
llr_ref
[
i
],
llr
[
i
])
<<
"Mismatch 16qam REF "
<<
std
::
hex
<<
llr_ref
[
i
]
<<
" != DUT "
<<
llr
[
i
]
<<
" at "
<<
std
::
dec
<<
i
;
if
(
llr_ref
[
i
]
!=
llr
[
i
])
{
num_errors
++
;
}
}
...
...
@@ -178,31 +165,29 @@ void test_function_64_qam(AlignedVector512<uint32_t> nb_res)
auto
rf_data
=
generate_random_c16
(
nb_re
);
auto
magnitude_data
=
generate_random_uint16
(
nb_re
*
2
);
auto
magnitude_b_data
=
generate_random_uint16
(
nb_re
*
2
);
AlignedVector512
<
uint32_t
>
ulsch_
llr_ref
;
ulsch_
llr_ref
.
resize
(
nb_re
*
3
);
std
::
fill
(
ulsch_llr_ref
.
begin
(),
ulsch_
llr_ref
.
end
(),
0
);
nr_
ulsch_
64qam_llr_ref
((
c16_t
*
)
rf_data
.
data
(),
AlignedVector512
<
uint32_t
>
llr_ref
;
llr_ref
.
resize
(
nb_re
*
3
);
std
::
fill
(
llr_ref
.
begin
(),
llr_ref
.
end
(),
0
);
nr_64qam_llr_ref
((
c16_t
*
)
rf_data
.
data
(),
(
int32_t
*
)
magnitude_data
.
data
(),
(
int32_t
*
)
magnitude_b_data
.
data
(),
(
int16_t
*
)
ulsch_llr_ref
.
data
(),
nb_re
,
0
);
AlignedVector512
<
uint32_t
>
ulsch_llr
;
ulsch_llr
.
resize
(
nb_re
*
3
);
std
::
fill
(
ulsch_llr
.
begin
(),
ulsch_llr
.
end
(),
0
);
nr_ulsch_64qam_llr
((
int32_t
*
)
rf_data
.
data
(),
(
int16_t
*
)
llr_ref
.
data
(),
nb_re
);
AlignedVector512
<
uint32_t
>
llr
;
llr
.
resize
(
nb_re
*
3
);
std
::
fill
(
llr
.
begin
(),
llr
.
end
(),
0
);
nr_64qam_llr
((
int32_t
*
)
rf_data
.
data
(),
(
int32_t
*
)
magnitude_data
.
data
(),
(
int32_t
*
)
magnitude_b_data
.
data
(),
(
int16_t
*
)
ulsch_llr
.
data
(),
nb_re
,
0
);
(
int16_t
*
)
llr
.
data
(),
nb_re
);
int
num_errors
=
0
;
for
(
auto
i
=
0U
;
i
<
nb_re
*
3
;
i
++
)
{
EXPECT_EQ
(
ulsch_llr_ref
[
i
],
ulsch_
llr
[
i
])
<<
"Mismatch 64qam REF "
<<
std
::
hex
<<
ulsch_llr_ref
[
i
]
<<
" != DUT "
<<
ulsch_
llr
[
i
]
<<
" at "
<<
std
::
dec
<<
i
;
if
(
ulsch_llr_ref
[
i
]
!=
ulsch_
llr
[
i
])
{
EXPECT_EQ
(
llr_ref
[
i
],
llr
[
i
])
<<
"Mismatch 64qam REF "
<<
std
::
hex
<<
llr_ref
[
i
]
<<
" != DUT "
<<
llr
[
i
]
<<
" at "
<<
std
::
dec
<<
i
;
if
(
llr_ref
[
i
]
!=
llr
[
i
])
{
num_errors
++
;
}
}
...
...
@@ -218,33 +203,31 @@ void test_function_256_qam(AlignedVector512<uint32_t> nb_res)
auto
magnitude_data
=
generate_random_uint16
(
nb_re
*
2
);
auto
magnitude_b_data
=
generate_random_uint16
(
nb_re
*
2
);
auto
magnitude_c_data
=
generate_random_uint16
(
nb_re
*
2
);
AlignedVector512
<
uint32_t
>
ulsch_
llr_ref
;
ulsch_
llr_ref
.
resize
(
nb_re
*
4
);
std
::
fill
(
ulsch_llr_ref
.
begin
(),
ulsch_
llr_ref
.
end
(),
0
);
nr_
ulsch_
256qam_llr_ref
((
c16_t
*
)
rf_data
.
data
(),
AlignedVector512
<
uint32_t
>
llr_ref
;
llr_ref
.
resize
(
nb_re
*
4
);
std
::
fill
(
llr_ref
.
begin
(),
llr_ref
.
end
(),
0
);
nr_256qam_llr_ref
((
c16_t
*
)
rf_data
.
data
(),
(
int32_t
*
)
magnitude_data
.
data
(),
(
int32_t
*
)
magnitude_b_data
.
data
(),
(
int32_t
*
)
magnitude_c_data
.
data
(),
(
int16_t
*
)
ulsch_llr_ref
.
data
(),
nb_re
,
0
);
AlignedVector512
<
uint32_t
>
ulsch_llr
;
ulsch_llr
.
resize
(
nb_re
*
4
);
std
::
fill
(
ulsch_llr
.
begin
(),
ulsch_llr
.
end
(),
0
);
nr_ulsch_256qam_llr
((
int32_t
*
)
rf_data
.
data
(),
(
int16_t
*
)
llr_ref
.
data
(),
nb_re
);
AlignedVector512
<
uint32_t
>
llr
;
llr
.
resize
(
nb_re
*
4
);
std
::
fill
(
llr
.
begin
(),
llr
.
end
(),
0
);
nr_256qam_llr
((
int32_t
*
)
rf_data
.
data
(),
(
int32_t
*
)
magnitude_data
.
data
(),
(
int32_t
*
)
magnitude_b_data
.
data
(),
(
int32_t
*
)
magnitude_c_data
.
data
(),
(
int16_t
*
)
ulsch_llr
.
data
(),
nb_re
,
0
);
(
int16_t
*
)
llr
.
data
(),
nb_re
);
int
num_errors
=
0
;
for
(
auto
i
=
0U
;
i
<
nb_re
*
4
;
i
++
)
{
EXPECT_EQ
(
ulsch_llr_ref
[
i
],
ulsch_
llr
[
i
])
<<
"Mismatch 256qam REF "
<<
std
::
hex
<<
ulsch_llr_ref
[
i
]
<<
" != DUT "
<<
ulsch_
llr
[
i
]
<<
" at "
<<
std
::
dec
<<
i
;
if
(
ulsch_llr_ref
[
i
]
!=
ulsch_
llr
[
i
])
{
EXPECT_EQ
(
llr_ref
[
i
],
llr
[
i
])
<<
"Mismatch 256qam REF "
<<
std
::
hex
<<
llr_ref
[
i
]
<<
" != DUT "
<<
llr
[
i
]
<<
" at "
<<
std
::
dec
<<
i
;
if
(
llr_ref
[
i
]
!=
llr
[
i
])
{
num_errors
++
;
}
}
...
...
@@ -370,59 +353,57 @@ TEST(test_llr, check_2_res_256_qam)
AlignedVector512
<
int16_t
>
magnitude_data
=
{
1
,
1
,
1
,
1
};
AlignedVector512
<
int16_t
>
magnitude_b_data
=
{
2
,
2
,
2
,
2
};
AlignedVector512
<
int16_t
>
magnitude_c_data
=
{
3
,
3
,
3
,
3
};
AlignedVector512
<
int16_t
>
ulsch_
llr_ref
;
ulsch_
llr_ref
.
resize
(
2
*
8
);
std
::
fill
(
ulsch_llr_ref
.
begin
(),
ulsch_
llr_ref
.
end
(),
0
);
nr_
ulsch_
256qam_llr_ref
((
c16_t
*
)
rf_data
.
data
(),
AlignedVector512
<
int16_t
>
llr_ref
;
llr_ref
.
resize
(
2
*
8
);
std
::
fill
(
llr_ref
.
begin
(),
llr_ref
.
end
(),
0
);
nr_256qam_llr_ref
((
c16_t
*
)
rf_data
.
data
(),
(
int32_t
*
)
magnitude_data
.
data
(),
(
int32_t
*
)
magnitude_b_data
.
data
(),
(
int32_t
*
)
magnitude_c_data
.
data
(),
(
int16_t
*
)
ulsch_llr_ref
.
data
(),
2
,
0
);
AlignedVector512
<
int16_t
>
ulsch_llr
;
ulsch_llr
.
resize
(
2
*
8
);
std
::
fill
(
ulsch_llr
.
begin
(),
ulsch_llr
.
end
(),
0
);
nr_ulsch_256qam_llr
((
int32_t
*
)
rf_data
.
data
(),
(
int16_t
*
)
llr_ref
.
data
(),
2
);
AlignedVector512
<
int16_t
>
llr
;
llr
.
resize
(
2
*
8
);
std
::
fill
(
llr
.
begin
(),
llr
.
end
(),
0
);
nr_256qam_llr
((
int32_t
*
)
rf_data
.
data
(),
(
int32_t
*
)
magnitude_data
.
data
(),
(
int32_t
*
)
magnitude_b_data
.
data
(),
(
int32_t
*
)
magnitude_c_data
.
data
(),
(
int16_t
*
)
ulsch_llr
.
data
(),
2
,
0
);
(
int16_t
*
)
llr
.
data
(),
2
);
printf
(
"
\n
DUT:
\n
"
);
for
(
auto
i
=
0U
;
i
<
2
;
i
++
)
{
printf
(
"%d %d %d %d %d %d %d %d
\n
"
,
ulsch_
llr
[
i
*
8
],
ulsch_
llr
[
i
*
8
+
1
],
ulsch_
llr
[
i
*
8
+
2
],
ulsch_
llr
[
i
*
8
+
3
],
ulsch_
llr
[
i
*
8
+
4
],
ulsch_
llr
[
i
*
8
+
5
],
ulsch_
llr
[
i
*
8
+
6
],
ulsch_
llr
[
i
*
8
+
7
]);
llr
[
i
*
8
],
llr
[
i
*
8
+
1
],
llr
[
i
*
8
+
2
],
llr
[
i
*
8
+
3
],
llr
[
i
*
8
+
4
],
llr
[
i
*
8
+
5
],
llr
[
i
*
8
+
6
],
llr
[
i
*
8
+
7
]);
}
printf
(
"
\n
REF:
\n
"
);
for
(
auto
i
=
0U
;
i
<
2
;
i
++
)
{
printf
(
"%d %d %d %d %d %d %d %d
\n
"
,
ulsch_
llr_ref
[
i
*
8
],
ulsch_
llr_ref
[
i
*
8
+
1
],
ulsch_
llr_ref
[
i
*
8
+
2
],
ulsch_
llr_ref
[
i
*
8
+
3
],
ulsch_
llr_ref
[
i
*
8
+
4
],
ulsch_
llr_ref
[
i
*
8
+
5
],
ulsch_
llr_ref
[
i
*
8
+
6
],
ulsch_
llr_ref
[
i
*
8
+
7
]);
llr_ref
[
i
*
8
],
llr_ref
[
i
*
8
+
1
],
llr_ref
[
i
*
8
+
2
],
llr_ref
[
i
*
8
+
3
],
llr_ref
[
i
*
8
+
4
],
llr_ref
[
i
*
8
+
5
],
llr_ref
[
i
*
8
+
6
],
llr_ref
[
i
*
8
+
7
]);
}
int
num_errors
=
0
;
for
(
auto
i
=
0U
;
i
<
2
*
8
;
i
++
)
{
EXPECT_EQ
(
ulsch_llr_ref
[
i
],
ulsch_
llr
[
i
])
<<
"Mismatch 256qam REF "
<<
std
::
hex
<<
ulsch_llr_ref
[
i
]
<<
" != DUT "
<<
ulsch_
llr
[
i
]
<<
" at "
<<
std
::
dec
<<
i
;
if
(
ulsch_llr_ref
[
i
]
!=
ulsch_
llr
[
i
])
{
EXPECT_EQ
(
llr_ref
[
i
],
llr
[
i
])
<<
"Mismatch 256qam REF "
<<
std
::
hex
<<
llr_ref
[
i
]
<<
" != DUT "
<<
llr
[
i
]
<<
" at "
<<
std
::
dec
<<
i
;
if
(
llr_ref
[
i
]
!=
llr
[
i
])
{
num_errors
++
;
}
}
...
...
openair1/PHY/nr_phy_common/CMakeLists.txt
View file @
cda82edf
add_library
(
nr_phy_common src/nr_phy_common.c
)
target_link_libraries
(
nr_phy_common PRIVATE UTIL
)
target_link_libraries
(
nr_phy_common PRIVATE UTIL
PHY_COMMON
)
target_include_directories
(
nr_phy_common PUBLIC inc/
)
add_library
(
nr_ue_phy_meas src/nr_ue_phy_meas.c
)
...
...
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