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
promise
OpenXG-RAN
Commits
09c1f062
Commit
09c1f062
authored
Feb 24, 2018
by
Luis Ariza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SIMD sincos function implemented and working
parent
c77b8600
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
186 additions
and
56 deletions
+186
-56
openair1/PHY/TOOLS/signal_energy.c
openair1/PHY/TOOLS/signal_energy.c
+10
-5
openair1/SIMULATION/RF/rf.c
openair1/SIMULATION/RF/rf.c
+2
-2
openair1/SIMULATION/TOOLS/abstraction.c
openair1/SIMULATION/TOOLS/abstraction.c
+146
-25
openair1/SIMULATION/TOOLS/defs.h
openair1/SIMULATION/TOOLS/defs.h
+5
-1
openair1/SIMULATION/TOOLS/multipath_channel.c
openair1/SIMULATION/TOOLS/multipath_channel.c
+3
-3
openair1/SIMULATION/TOOLS/random_channel.c
openair1/SIMULATION/TOOLS/random_channel.c
+20
-20
No files found.
openair1/PHY/TOOLS/signal_energy.c
View file @
09c1f062
...
...
@@ -335,14 +335,19 @@ float signal_energy_fp_SSE_float(float *s_re[2],float *s_im[2],uint32_t nb_anten
{
int32_t
aa
,
i
;
float
V
=
0
.
0
;
for
(
i
=
0
;
i
<
length
;
i
++
)
{
__m128
V128
,
s_re128
,
s_im128
;
V128
=
_mm_setzero_ps
();
for
(
i
=
0
;
i
<
(
length
>>
2
)
;
i
++
)
{
for
(
aa
=
0
;
aa
<
nb_antennas
;
aa
++
)
{
V
=
V
+
(
s_re
[
aa
][
i
+
offset
]
*
s_re
[
aa
][
i
+
offset
])
+
(
s_im
[
aa
][
i
+
offset
]
*
s_im
[
aa
][
i
+
offset
]);
// V= V + (s_re[aa][i+offset]*s_re[aa][i+offset]) + (s_im[aa][i+offset]*s_im[aa][i+offset]);
s_re128
=
_mm_loadu_ps
(
&
s_re
[
aa
][
4
*
i
+
offset
]);
s_im128
=
_mm_loadu_ps
(
&
s_im
[
aa
][
4
*
i
+
offset
]);
s_re128
=
_mm_mul_ps
(
s_re128
,
s_re128
);
s_im128
=
_mm_mul_ps
(
s_im128
,
s_im128
);
V128
=
_mm_add_ps
(
V128
,
_mm_add_ps
(
s_re128
,
s_im128
));
}
}
return
(
V
/
length
/
nb_antennas
);
return
(
(
V128
[
0
]
+
V128
[
1
]
+
V128
[
2
]
+
V128
[
3
])
/
length
/
nb_antennas
);
}
double
signal_energy_fp2
(
struct
complex
*
s
,
uint32_t
length
)
...
...
openair1/SIMULATION/RF/rf.c
View file @
09c1f062
...
...
@@ -206,7 +206,7 @@ void rf_rx_simple(double *r_re[2],
double
s_time
,
double
rx_gain_dB
)
{
static
int
first_run
=
0
;
/*
static int first_run=0;
static double sum;
static int count;
if (!first_run)
...
...
@@ -214,7 +214,7 @@ void rf_rx_simple(double *r_re[2],
first_run=1;
sum=0;
count=0;
}
}
*/
int
i
,
a
;
double
rx_gain_lin
=
pow
(
10
.
0
,.
05
*
rx_gain_dB
);
//double rx_gain_lin = 1.0;
...
...
openair1/SIMULATION/TOOLS/abstraction.c
View file @
09c1f062
This diff is collapsed.
Click to expand it.
openair1/SIMULATION/TOOLS/defs.h
View file @
09c1f062
...
...
@@ -61,7 +61,7 @@ typedef struct {
struct
complex
**
chF
;
struct
complexf
*
chFf
;
///Sampled prach frequency response (frequency analysis)
struct
complex
*
*
chF_prach
;
struct
complex
f
*
chF_prach
;
///Maximum path delay in mus.
double
Td
;
///Channel bandwidth in MHz.
...
...
@@ -478,9 +478,13 @@ double ziggurat(double mean, double variance);
int
freq_channel
(
channel_desc_t
*
desc
,
uint16_t
nb_rb
,
int16_t
n_samples
);
int
freq_channel_SSE_float
(
channel_desc_t
*
desc
,
uint16_t
nb_rb
,
int16_t
n_samples
);
int
freq_channel_prach
(
channel_desc_t
*
desc
,
uint16_t
nb_rb
,
int16_t
n_samples
,
int16_t
prach_fmt
,
int16_t
n_ra_prb
);
int
freq_channel_prach_SSE_float
(
channel_desc_t
*
desc
,
uint16_t
nb_rb
,
int16_t
n_samples
,
int16_t
prach_fmt
,
int16_t
n_ra_prb
);
int
init_freq_channel
(
channel_desc_t
*
desc
,
uint16_t
nb_rb
,
int16_t
n_samples
);
int
init_freq_channel_SSE_float
(
channel_desc_t
*
desc
,
uint16_t
nb_rb
,
int16_t
n_samples
);
int
init_freq_channel_prach
(
channel_desc_t
*
desc
,
uint16_t
nb_rb
,
int16_t
n_samples
,
int16_t
prach_fmt
,
int16_t
n_ra_prb
);
int
init_freq_channel_prach_SSE_float
(
channel_desc_t
*
desc
,
uint16_t
nb_rb
,
int16_t
n_samples
,
int16_t
prach_fmt
,
int16_t
n_ra_prb
);
void
sincos_ps
(
__m128
x
,
__m128
*
s
,
__m128
*
c
);
uint8_t
multipath_channel_nosigconv
(
channel_desc_t
*
desc
);
void
multipath_tv_channel
(
channel_desc_t
*
desc
,
...
...
openair1/SIMULATION/TOOLS/multipath_channel.c
View file @
09c1f062
...
...
@@ -763,7 +763,7 @@ void multipath_channel_prach_SSE_float(channel_desc_t *desc,
// do nothing - keep channel
}
else
{
random_channel_freq
(
desc
,
0
);
freq_channel_prach
(
desc
,
nb_rb
,
n_samples
,
prach_fmt
,
n_ra_prb
);
//Find desc->chF_prach
freq_channel_prach
_SSE_float
(
desc
,
nb_rb
,
n_samples
,
prach_fmt
,
n_ra_prb
);
//Find desc->chF_prach
}
for
(
f
=
0
;
f
<
(
length
>>
2
);
f
++
)
{
//rx_tmp.x = 0;
...
...
@@ -776,8 +776,8 @@ void multipath_channel_prach_SSE_float(channel_desc_t *desc,
//RX_IM(k) = TX_IM(k).chF(k).x + TX_RE(k).chF(k).y
tx128_re
=
_mm_loadu_ps
(
&
tx_sig_re
[
j
][(
4
*
f
)]);
tx128_im
=
_mm_loadu_ps
(
&
tx_sig_im
[
j
][(
4
*
f
)]);
chF128_x
=
_mm_set1_ps
(
desc
->
chF
f
[
ii
+
(
j
*
desc
->
nb_rx
)].
x
[
4
*
f
+
(
prach_fmt
<
4
)
?
13
:
3
]);
chF128_y
=
_mm_set1_ps
(
desc
->
chF
f
[
ii
+
(
j
*
desc
->
nb_rx
)].
y
[
4
*
f
+
(
prach_fmt
<
4
)
?
13
:
3
]);
chF128_x
=
_mm_set1_ps
(
desc
->
chF
_prach
[
ii
+
(
j
*
desc
->
nb_rx
)].
x
[
4
*
f
+
(
prach_fmt
<
4
)
?
13
:
3
]);
chF128_y
=
_mm_set1_ps
(
desc
->
chF
_prach
[
ii
+
(
j
*
desc
->
nb_rx
)].
y
[
4
*
f
+
(
prach_fmt
<
4
)
?
13
:
3
]);
//rx_tmp.x += (tx_sig_re[ii][f] * desc->chF_prach[ii+(j*desc->nb_rx)][f+(prach_fmt<4)?13:3].x)-(tx_sig_im[ii][f] * desc->chF_prach[ii+(j*desc->nb_rx)][f+(prach_fmt<4)?13:3].y);
//rx_tmp.y += (tx_sig_im[ii][f] * desc->chF_prach[ii+(j*desc->nb_rx)][f+(prach_fmt<4)?13:3].x)+(tx_sig_re[ii][f] * desc->chF_prach[ii+(j*desc->nb_rx)][f+(prach_fmt<4)?13:3].y);
rx_tmp128_1
=
_mm_mul_ps
(
tx128_re
,
chF128_x
);
...
...
openair1/SIMULATION/TOOLS/random_channel.c
View file @
09c1f062
This diff is collapsed.
Click to expand it.
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