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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG-RAN
Commits
98483050
Commit
98483050
authored
Mar 28, 2022
by
Sagar Parsawar
Committed by
Eurecom
Mar 28, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
256-bit alignment fix in trx_usrp_write/trx_usrp_write_thread functions
parent
5679e4a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
4 deletions
+25
-4
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
+25
-4
No files found.
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
View file @
98483050
...
@@ -402,7 +402,14 @@ static int trx_usrp_write(openair0_device *device,
...
@@ -402,7 +402,14 @@ static int trx_usrp_write(openair0_device *device,
for
(
int
j
=
0
;
j
<
nsamps2
;
j
++
)
{
for
(
int
j
=
0
;
j
<
nsamps2
;
j
++
)
{
#if defined(__x86_64__) || defined(__i386__)
#if defined(__x86_64__) || defined(__i386__)
#ifdef __AVX2__
#ifdef __AVX2__
buff_tx
[
i
][
j
]
=
_mm256_slli_epi16
(((
__m256i
*
)
buff
[
i
])[
j
],
4
);
if
((((
uintptr_t
)
buff
[
i
])
&
0x1F
)
==
0
)
{
buff_tx
[
i
][
j
]
=
_mm256_slli_epi16
(((
__m256i
*
)
buff
[
i
])[
j
],
4
);
}
else
{
((
__m128i
*
)
buff_tx
[
i
])[
2
*
j
]
=
_mm_slli_epi16
(((
__m128i
*
)
buff
[
i
])[
2
*
j
],
4
);
((
__m128i
*
)
buff_tx
[
i
])[
2
*
j
+
1
]
=
_mm_slli_epi16
(((
__m128i
*
)
buff
[
i
])[
2
*
j
+
1
],
4
);
}
#else
#else
buff_tx
[
i
][
j
]
=
_mm_slli_epi16
(((
__m128i
*
)
buff
[
i
])[
j
],
4
);
buff_tx
[
i
][
j
]
=
_mm_slli_epi16
(((
__m128i
*
)
buff
[
i
])[
j
],
4
);
#endif
#endif
...
@@ -540,7 +547,14 @@ void *trx_usrp_write_thread(void * arg){
...
@@ -540,7 +547,14 @@ void *trx_usrp_write_thread(void * arg){
for
(
int
j
=
0
;
j
<
nsamps2
;
j
++
)
{
for
(
int
j
=
0
;
j
<
nsamps2
;
j
++
)
{
#if defined(__x86_64__) || defined(__i386__)
#if defined(__x86_64__) || defined(__i386__)
#ifdef __AVX2__
#ifdef __AVX2__
buff_tx
[
i
][
j
]
=
_mm256_slli_epi16
(((
__m256i
*
)
buff
[
i
])[
j
],
4
);
if
((((
uintptr_t
)
buff
[
i
])
&
0x1F
)
==
0
)
{
buff_tx
[
i
][
j
]
=
_mm256_slli_epi16
(((
__m256i
*
)
buff
[
i
])[
j
],
4
);
}
else
{
((
__m128i
*
)
buff_tx
[
i
])[
2
*
j
]
=
_mm_slli_epi16
(((
__m128i
*
)
buff
[
i
])[
2
*
j
],
4
);
((
__m128i
*
)
buff_tx
[
i
])[
2
*
j
+
1
]
=
_mm_slli_epi16
(((
__m128i
*
)
buff
[
i
])[
2
*
j
+
1
],
4
);
}
#else
#else
buff_tx
[
i
][
j
]
=
_mm_slli_epi16
(((
__m128i
*
)
buff
[
i
])[
j
],
4
);
buff_tx
[
i
][
j
]
=
_mm_slli_epi16
(((
__m128i
*
)
buff
[
i
])[
j
],
4
);
#endif
#endif
...
@@ -1127,8 +1141,8 @@ extern "C" {
...
@@ -1127,8 +1141,8 @@ extern "C" {
// from usrp_time_offset
// from usrp_time_offset
//openair0_cfg[0].samples_per_packet = 2048;
//openair0_cfg[0].samples_per_packet = 2048;
openair0_cfg
[
0
].
tx_sample_advance
=
15
;
//to be checked
openair0_cfg
[
0
].
tx_sample_advance
=
15
;
//to be checked
openair0_cfg
[
0
].
tx_bw
=
80e6
;
//
openair0_cfg[0].tx_bw = 80e6;
openair0_cfg
[
0
].
rx_bw
=
80e6
;
//
openair0_cfg[0].rx_bw = 80e6;
break
;
break
;
case
61440000
:
case
61440000
:
...
@@ -1154,6 +1168,13 @@ extern "C" {
...
@@ -1154,6 +1168,13 @@ extern "C" {
openair0_cfg
[
0
].
rx_bw
=
20e6
;
openair0_cfg
[
0
].
rx_bw
=
20e6
;
break
;
break
;
case
23040000
:
//openair0_cfg[0].samples_per_packet = 2048;
openair0_cfg
[
0
].
tx_sample_advance
=
15
;
openair0_cfg
[
0
].
tx_bw
=
20e6
;
openair0_cfg
[
0
].
rx_bw
=
20e6
;
break
;
case
15360000
:
case
15360000
:
//openair0_cfg[0].samples_per_packet = 2048;
//openair0_cfg[0].samples_per_packet = 2048;
openair0_cfg
[
0
].
tx_sample_advance
=
45
;
openair0_cfg
[
0
].
tx_sample_advance
=
45
;
...
...
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