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
c77b8600
Commit
c77b8600
authored
7 years ago
by
Luis Ariza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resolving SIMD channel problems
parent
be57a411
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
191 additions
and
156 deletions
+191
-156
openair1/PHY/TOOLS/defs.h
openair1/PHY/TOOLS/defs.h
+2
-2
openair1/PHY/TOOLS/lte_phy_scope.c
openair1/PHY/TOOLS/lte_phy_scope.c
+4
-1
openair1/SIMULATION/RF/rf.c
openair1/SIMULATION/RF/rf.c
+4
-2
openair1/SIMULATION/TOOLS/abstraction.c
openair1/SIMULATION/TOOLS/abstraction.c
+126
-121
openair1/SIMULATION/TOOLS/defs.h
openair1/SIMULATION/TOOLS/defs.h
+6
-0
openair1/SIMULATION/TOOLS/multipath_channel.c
openair1/SIMULATION/TOOLS/multipath_channel.c
+15
-15
openair1/SIMULATION/TOOLS/random_channel.c
openair1/SIMULATION/TOOLS/random_channel.c
+11
-1
targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.band7.tm1.if4p5.50PRB.oaisim.conf
...ENERIC-LTE-EPC/CONF/rru.band7.tm1.if4p5.50PRB.oaisim.conf
+8
-8
targets/SIMU/USER/channel_sim.c
targets/SIMU/USER/channel_sim.c
+2
-2
targets/SIMU/USER/oaisim.c
targets/SIMU/USER/oaisim.c
+9
-0
targets/SIMU/USER/oaisim_functions.c
targets/SIMU/USER/oaisim_functions.c
+4
-4
No files found.
openair1/PHY/TOOLS/defs.h
View file @
c77b8600
...
...
@@ -43,8 +43,8 @@ struct complex {
#endif
struct
complexf
{
float
r
;
float
i
;
float
x
[
1200
]
;
float
y
[
1200
]
;
};
struct
complex16
{
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/TOOLS/lte_phy_scope.c
View file @
c77b8600
...
...
@@ -562,7 +562,10 @@ void phy_scope_UE(FD_lte_phy_scope_ue *form,
llr_pdcch
=
(
float
*
)
calloc
(
12
*
frame_parms
->
N_RB_DL
*
num_pdcch_symbols
*
2
,
sizeof
(
float
));
// init to zero
bit_pdcch
=
(
float
*
)
calloc
(
12
*
frame_parms
->
N_RB_DL
*
num_pdcch_symbols
*
2
,
sizeof
(
float
));
rxsig_t
=
(
int16_t
**
)
phy_vars_ue
->
common_vars
.
rxdata
;
if
(
phy_vars_ue
->
do_ofdm_mod
)
rxsig_t
=
(
int16_t
**
)
phy_vars_ue
->
common_vars
.
common_vars_rx_data_per_thread
[
subframe
&
0x1
].
rxdataF
;
else
rxsig_t
=
(
int16_t
**
)
phy_vars_ue
->
common_vars
.
rxdata
;
chest_t
=
(
int16_t
**
)
phy_vars_ue
->
common_vars
.
common_vars_rx_data_per_thread
[
phy_vars_ue
->
current_thread_id
[
subframe
]].
dl_ch_estimates_time
[
eNB_id
];
chest_f
=
(
int16_t
**
)
phy_vars_ue
->
common_vars
.
common_vars_rx_data_per_thread
[
phy_vars_ue
->
current_thread_id
[
subframe
]].
dl_ch_estimates
[
eNB_id
];
pbch_llr
=
(
int8_t
*
)
phy_vars_ue
->
pbch_vars
[
eNB_id
]
->
llr
;
...
...
This diff is collapsed.
Click to expand it.
openair1/SIMULATION/RF/rf.c
View file @
c77b8600
...
...
@@ -419,8 +419,10 @@ clock_t start=clock();*/
rx128_re
=
_mm_loadu_ps
(
&
r_re
[
a
][
4
*
i
]);
//r_re[a][i],r_re[a][i+1]
rx128_im
=
_mm_loadu_ps
(
&
r_im
[
a
][
4
*
i
]);
//r_im[a][i],r_im[a][i+1]
rx128_gain_lin
=
_mm_set1_ps
(
rx_gain_lin
);
gauss_0_128_sqrt_NOW
=
_mm_set1_ps
(
ziggurat
(
0
.
0
,
1
.
0
));
gauss_1_128_sqrt_NOW
=
_mm_set1_ps
(
ziggurat
(
0
.
0
,
1
.
0
));
//start_meas(&desc->ziggurat);
gauss_0_128_sqrt_NOW
=
_mm_set_ps
(
ziggurat
(
0
.
0
,
1
.
0
),
ziggurat
(
0
.
0
,
1
.
0
),
ziggurat
(
0
.
0
,
1
.
0
),
ziggurat
(
0
.
0
,
1
.
0
));
gauss_1_128_sqrt_NOW
=
_mm_set_ps
(
ziggurat
(
0
.
0
,
1
.
0
),
ziggurat
(
0
.
0
,
1
.
0
),
ziggurat
(
0
.
0
,
1
.
0
),
ziggurat
(
0
.
0
,
1
.
0
));
//stop_meas(&desc->ziggurat);
gauss_0_128_sqrt_NOW
=
_mm_mul_ps
(
gauss_0_128_sqrt_NOW
,
_mm_set1_ps
(
sqrt_NOW
));
gauss_1_128_sqrt_NOW
=
_mm_mul_ps
(
gauss_1_128_sqrt_NOW
,
_mm_set1_ps
(
sqrt_NOW
));
// Amplify by receiver gain and apply 3rd order non-linearity
...
...
This diff is collapsed.
Click to expand it.
openair1/SIMULATION/TOOLS/abstraction.c
View file @
c77b8600
This diff is collapsed.
Click to expand it.
openair1/SIMULATION/TOOLS/defs.h
View file @
c77b8600
...
...
@@ -59,6 +59,7 @@ typedef struct {
struct
complex
**
ch
;
///Sampled frequency response (90 kHz resolution)
struct
complex
**
chF
;
struct
complexf
*
chFf
;
///Sampled prach frequency response (frequency analysis)
struct
complex
**
chF_prach
;
///Maximum path delay in mus.
...
...
@@ -95,6 +96,8 @@ typedef struct {
time_stats_t
interp_freq
;
time_stats_t
interp_freq_PRACH
;
time_stats_t
convolution
;
time_stats_t
ziggurat
;
time_stats_t
ziggurat_PRACH
;
/// frequency measurements
time_stats_t
DL_multipath_channel_freq
;
time_stats_t
DL_dac_fixed_gain
;
...
...
@@ -473,9 +476,12 @@ double uniformrandom(void);
void
uniformrandomSSE
(
__m128d
*
d1
,
__m128d
*
d2
);
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
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
);
uint8_t
multipath_channel_nosigconv
(
channel_desc_t
*
desc
);
void
multipath_tv_channel
(
channel_desc_t
*
desc
,
double
**
tx_sig_re
,
...
...
This diff is collapsed.
Click to expand it.
openair1/SIMULATION/TOOLS/multipath_channel.c
View file @
c77b8600
...
...
@@ -294,6 +294,7 @@ void multipath_channel_freq(channel_desc_t *desc,
sum=(sum+stop-start);*/
random_channel_freq
(
desc
,
0
);
freq_channel
(
desc
,
nb_rb
,
n_samples
);
//Find desc->chF
printf
(
"MULTICHANNEL
\n
"
);
//freq_channel_prach(desc,nb_rb,n_samples,1,44);//Find desc->chF
}
//clock_t start=clock();
...
...
@@ -319,8 +320,8 @@ void multipath_channel_freq(channel_desc_t *desc,
//RX_IM(k) += TX_IM(k).chF(k).x + TX_RE(k).chF(k).y
tx128_re
=
_mm_loadu_pd
(
&
tx_sig_re
[
j
][(
2
*
f
+
1
)]);
tx128_im
=
_mm_loadu_pd
(
&
tx_sig_im
[
j
][(
2
*
f
+
1
)]);
chF128_x
=
_mm_set1_pd
(
desc
->
ch
[
ii
+
(
j
*
desc
->
nb_rx
)][(
2
*
(
f
%
(
ofdm_symbol_size
>>
1
)))
+
(
n_samples
>>
1
)].
x
);
chF128_y
=
_mm_set1_pd
(
desc
->
ch
[
ii
+
(
j
*
desc
->
nb_rx
)][(
2
*
(
f
%
(
ofdm_symbol_size
>>
1
)))
+
(
n_samples
>>
1
)].
y
);
chF128_x
=
_mm_set1_pd
(
desc
->
ch
Ff
[
ii
+
(
j
*
desc
->
nb_rx
)].
x
[(
2
*
(
f
%
(
ofdm_symbol_size
>>
1
)))
+
(
n_samples
>>
1
)]
);
chF128_y
=
_mm_set1_pd
(
desc
->
ch
Ff
[
ii
+
(
j
*
desc
->
nb_rx
)].
y
[(
2
*
(
f
%
(
ofdm_symbol_size
>>
1
)))
+
(
n_samples
>>
1
)]
);
//rx_tmp.x += (tx_sig_re[j][f+k*ofdm_symbol_size] * desc->chF[ii+(j*desc->nb_rx)][f+(n_samples>>1)-1].x)//tx128_re*ch128_x
// -(tx_sig_im[j][f+k*ofdm_symbol_size] * desc->chF[ii+(j*desc->nb_rx)][f+(n_samples>>1)-1].y);//-tx128_im*ch128_y
//rx_tmp.y += (tx_sig_im[j][f+k*ofdm_symbol_size] * desc->chF[ii+(j*desc->nb_rx)][f+(n_samples>>1)-1].x)//tx128_im*ch128_x
...
...
@@ -357,8 +358,8 @@ void multipath_channel_freq(channel_desc_t *desc,
//RX_IM(k) += TX_IM(k).chF(k).x + TX_RE(k).chF(k).y
tx128_re
=
_mm_loadu_pd
(
&
tx_sig_re
[
j
][
2
*
f
]);
tx128_im
=
_mm_loadu_pd
(
&
tx_sig_im
[
j
][
2
*
f
]);
chF128_x
=
_mm_set1_pd
(
desc
->
ch
[
ii
+
(
j
*
desc
->
nb_rx
)][
2
*
(
f
%
(
ofdm_symbol_size
>>
1
)
-
((
ofdm_symbol_size
>>
1
)
-
(
n_samples
>>
1
)))].
x
);
chF128_y
=
_mm_set1_pd
(
desc
->
ch
[
ii
+
(
j
*
desc
->
nb_rx
)][
2
*
(
f
%
(
ofdm_symbol_size
>>
1
)
-
((
ofdm_symbol_size
>>
1
)
-
(
n_samples
>>
1
)))].
y
);
chF128_x
=
_mm_set1_pd
(
desc
->
ch
Ff
[
ii
+
(
j
*
desc
->
nb_rx
)].
x
[
2
*
(
f
%
(
ofdm_symbol_size
>>
1
)
-
((
ofdm_symbol_size
>>
1
)
-
(
n_samples
>>
1
)))]
);
chF128_y
=
_mm_set1_pd
(
desc
->
ch
Ff
[
ii
+
(
j
*
desc
->
nb_rx
)].
y
[
2
*
(
f
%
(
ofdm_symbol_size
>>
1
)
-
((
ofdm_symbol_size
>>
1
)
-
(
n_samples
>>
1
)))]
);
//rx_tmp.x += (tx_sig_re[j][f+k*ofdm_symbol_size] * desc->chF[ii+(j*desc->nb_rx)][f2].x)
// -(tx_sig_im[j][f+k*ofdm_symbol_size] * desc->chF[ii+(j*desc->nb_rx)][f2].y);
//rx_tmp.y += (tx_sig_im[j][f+k*ofdm_symbol_size] * desc->chF[ii+(j*desc->nb_rx)][f2].x)
...
...
@@ -427,6 +428,7 @@ void multipath_channel_freq(channel_desc_t *desc,
}
else
{
random_channel_freq
(
desc
,
0
);
freq_channel
(
desc
,
nb_rb
,
n_samples
);
//Find desc->chF
printf
(
"MULTICHANNEL
\n
"
);
}
//clock_t start=clock();
//printf("symbols_per_tti is %d\n",symbols_per_tti);
...
...
@@ -526,7 +528,7 @@ void multipath_channel_freq_SSE_float(channel_desc_t *desc,
// do nothing - keep channel
}
else
{
random_channel_freq
(
desc
,
0
);
freq_channel
(
desc
,
nb_rb
,
n_samples
);
//Find desc->chF
freq_channel
_SSE_float
(
desc
,
nb_rb
,
n_samples
);
//Find desc->chF
}
for
(
j
=
0
;
j
<
(
symbols_per_tti
>>
2
);
j
++
){
for
(
ii
=
0
;
ii
<
desc
->
nb_rx
;
ii
++
)
{
...
...
@@ -549,8 +551,8 @@ void multipath_channel_freq_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
+
1
)]);
tx128_im
=
_mm_loadu_ps
(
&
tx_sig_im
[
j
][(
4
*
f
+
1
)]);
chF128_x
=
_mm_set1_ps
(
desc
->
ch
[
ii
+
(
j
*
desc
->
nb_rx
)][(
4
*
(
f
%
(
ofdm_symbol_size
>>
2
)))
+
(
n_samples
>>
2
)].
x
);
chF128_y
=
_mm_set1_ps
(
desc
->
ch
[
ii
+
(
j
*
desc
->
nb_rx
)][(
4
*
(
f
%
(
ofdm_symbol_size
>>
2
)))
+
(
n_samples
>>
2
)].
y
);
chF128_x
=
_mm_set1_ps
(
desc
->
ch
Ff
[
ii
+
(
j
*
desc
->
nb_rx
)].
x
[(
4
*
(
f
%
(
ofdm_symbol_size
>>
2
)))
+
(
n_samples
>>
2
)]
);
chF128_y
=
_mm_set1_ps
(
desc
->
ch
Ff
[
ii
+
(
j
*
desc
->
nb_rx
)].
y
[(
4
*
(
f
%
(
ofdm_symbol_size
>>
2
)))
+
(
n_samples
>>
2
)]
);
//rx_tmp.x += (tx_sig_re[j][f+k*ofdm_symbol_size] * desc->chF[ii+(j*desc->nb_rx)][f+(n_samples>>1)-1].x)//tx128_re*ch128_x
// -(tx_sig_im[j][f+k*ofdm_symbol_size] * desc->chF[ii+(j*desc->nb_rx)][f+(n_samples>>1)-1].y);//-tx128_im*ch128_y
//rx_tmp.y += (tx_sig_im[j][f+k*ofdm_symbol_size] * desc->chF[ii+(j*desc->nb_rx)][f+(n_samples>>1)-1].x)//tx128_im*ch128_x
...
...
@@ -587,8 +589,8 @@ void multipath_channel_freq_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
->
ch
[
ii
+
(
j
*
desc
->
nb_rx
)][
4
*
(
f
%
(
ofdm_symbol_size
>>
2
)
-
((
ofdm_symbol_size
>>
2
)
-
(
n_samples
>>
2
)))].
x
);
chF128_y
=
_mm_set1_ps
(
desc
->
ch
[
ii
+
(
j
*
desc
->
nb_rx
)][
4
*
(
f
%
(
ofdm_symbol_size
>>
2
)
-
((
ofdm_symbol_size
>>
2
)
-
(
n_samples
>>
2
)))].
y
);
chF128_x
=
_mm_set1_ps
(
desc
->
ch
Ff
[
ii
+
(
j
*
desc
->
nb_rx
)].
x
[
4
*
(
f
%
(
ofdm_symbol_size
>>
2
)
-
((
ofdm_symbol_size
>>
2
)
-
(
n_samples
>>
2
)))]
);
chF128_y
=
_mm_set1_ps
(
desc
->
ch
Ff
[
ii
+
(
j
*
desc
->
nb_rx
)].
y
[
4
*
(
f
%
(
ofdm_symbol_size
>>
2
)
-
((
ofdm_symbol_size
>>
2
)
-
(
n_samples
>>
2
)))]
);
//rx_tmp.x += (tx_sig_re[j][f+k*ofdm_symbol_size] * desc->chF[ii+(j*desc->nb_rx)][f2].x)
// -(tx_sig_im[j][f+k*ofdm_symbol_size] * desc->chF[ii+(j*desc->nb_rx)][f2].y);
//rx_tmp.y += (tx_sig_im[j][f+k*ofdm_symbol_size] * desc->chF[ii+(j*desc->nb_rx)][f2].x)
...
...
@@ -630,7 +632,6 @@ void multipath_channel_prach(channel_desc_t *desc,
int
ii
,
j
,
f
;
__m128d
rx_tmp128_re_f
,
rx_tmp128_im_f
,
rx_tmp128_re
,
rx_tmp128_im
,
rx_tmp128_1
,
rx_tmp128_2
,
rx_tmp128_3
,
rx_tmp128_4
,
tx128_re
,
tx128_im
,
chF128_x
,
chF128_y
,
pathloss128
;
struct
complex
rx_tmp
;
double
path_loss
=
pow
(
10
,
desc
->
path_loss_dB
/
20
);
pathloss128
=
_mm_set1_pd
(
path_loss
);
int
nb_rb
,
n_samples
;
...
...
@@ -658,8 +659,8 @@ void multipath_channel_prach(channel_desc_t *desc,
//RX_IM(k) = TX_IM(k).chF(k).x + TX_RE(k).chF(k).y
tx128_re
=
_mm_loadu_pd
(
&
tx_sig_re
[
j
][(
2
*
f
)]);
tx128_im
=
_mm_loadu_pd
(
&
tx_sig_im
[
j
][(
2
*
f
)]);
chF128_x
=
_mm_set1_pd
(
desc
->
ch
[
ii
+
(
j
*
desc
->
nb_rx
)][
2
*
f
+
(
prach_fmt
<
4
)
?
13
:
3
].
x
);
chF128_y
=
_mm_set1_pd
(
desc
->
ch
[
ii
+
(
j
*
desc
->
nb_rx
)][
2
*
f
+
(
prach_fmt
<
4
)
?
13
:
3
].
y
);
chF128_x
=
_mm_set1_pd
(
desc
->
ch
Ff
[
ii
+
(
j
*
desc
->
nb_rx
)].
x
[
2
*
f
+
(
prach_fmt
<
4
)
?
13
:
3
]
);
chF128_y
=
_mm_set1_pd
(
desc
->
ch
Ff
[
ii
+
(
j
*
desc
->
nb_rx
)].
y
[
2
*
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_pd
(
tx128_re
,
chF128_x
);
...
...
@@ -748,7 +749,6 @@ void multipath_channel_prach_SSE_float(channel_desc_t *desc,
int
ii
,
j
,
f
;
__m128
rx_tmp128_re_f
,
rx_tmp128_im_f
,
rx_tmp128_re
,
rx_tmp128_im
,
rx_tmp128_1
,
rx_tmp128_2
,
rx_tmp128_3
,
rx_tmp128_4
,
tx128_re
,
tx128_im
,
chF128_x
,
chF128_y
,
pathloss128
;
struct
complex
rx_tmp
;
float
path_loss
=
pow
(
10
,
desc
->
path_loss_dB
/
20
);
pathloss128
=
_mm_set1_ps
(
path_loss
);
int
nb_rb
,
n_samples
;
...
...
@@ -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
->
ch
[
ii
+
(
j
*
desc
->
nb_rx
)][
4
*
f
+
(
prach_fmt
<
4
)
?
13
:
3
].
x
);
chF128_y
=
_mm_set1_ps
(
desc
->
ch
[
ii
+
(
j
*
desc
->
nb_rx
)][
4
*
f
+
(
prach_fmt
<
4
)
?
13
:
3
].
y
);
chF128_x
=
_mm_set1_ps
(
desc
->
ch
Ff
[
ii
+
(
j
*
desc
->
nb_rx
)].
x
[
4
*
f
+
(
prach_fmt
<
4
)
?
13
:
3
]
);
chF128_y
=
_mm_set1_ps
(
desc
->
ch
Ff
[
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
);
...
...
This diff is collapsed.
Click to expand it.
openair1/SIMULATION/TOOLS/random_channel.c
View file @
c77b8600
...
...
@@ -89,6 +89,7 @@ void fill_channel_desc(channel_desc_t *chan_desc,
chan_desc
->
max_Doppler
=
max_Doppler
;
chan_desc
->
ch
=
(
struct
complex
**
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complex
*
));
chan_desc
->
chF
=
(
struct
complex
**
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complex
*
));
chan_desc
->
chFf
=
(
struct
complexf
*
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complexf
));
chan_desc
->
chF_prach
=
(
struct
complex
**
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complex
*
));
chan_desc
->
a
=
(
struct
complex
**
)
malloc
(
nb_taps
*
sizeof
(
struct
complex
*
));
...
...
@@ -302,6 +303,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx,
chan_desc
->
random_aoa
=
0
;
chan_desc
->
ch
=
(
struct
complex
**
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complex
*
));
chan_desc
->
chF
=
(
struct
complex
**
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complex
*
));
chan_desc
->
chFf
=
(
struct
complexf
*
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complexf
));
chan_desc
->
chF_prach
=
(
struct
complex
**
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complex
*
));
chan_desc
->
a
=
(
struct
complex
**
)
malloc
(
chan_desc
->
nb_taps
*
sizeof
(
struct
complex
*
));
for
(
i
=
0
;
i
<
nb_tx
*
nb_rx
;
i
++
)
...
...
@@ -356,6 +358,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx,
chan_desc
->
random_aoa
=
0
;
chan_desc
->
ch
=
(
struct
complex
**
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complex
*
));
chan_desc
->
chF
=
(
struct
complex
**
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complex
*
));
chan_desc
->
chFf
=
(
struct
complexf
*
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complexf
));
chan_desc
->
chF_prach
=
(
struct
complex
**
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complex
*
));
chan_desc
->
a
=
(
struct
complex
**
)
malloc
(
chan_desc
->
nb_taps
*
sizeof
(
struct
complex
*
));
for
(
i
=
0
;
i
<
nb_tx
*
nb_rx
;
i
++
)
...
...
@@ -409,6 +412,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx,
chan_desc
->
random_aoa
=
0
;
chan_desc
->
ch
=
(
struct
complex
**
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complex
*
));
chan_desc
->
chF
=
(
struct
complex
**
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complex
*
));
chan_desc
->
chFf
=
(
struct
complexf
*
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complexf
));
chan_desc
->
chF_prach
=
(
struct
complex
**
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complex
*
));
chan_desc
->
a
=
(
struct
complex
**
)
malloc
(
chan_desc
->
nb_taps
*
sizeof
(
struct
complex
*
));
for
(
i
=
0
;
i
<
nb_tx
*
nb_rx
;
i
++
)
...
...
@@ -454,6 +458,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx,
chan_desc
->
random_aoa
=
0
;
chan_desc
->
ch
=
(
struct
complex
**
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complex
*
));
chan_desc
->
chF
=
(
struct
complex
**
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complex
*
));
chan_desc
->
chFf
=
(
struct
complexf
*
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complexf
));
chan_desc
->
chF_prach
=
(
struct
complex
**
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complex
*
));
chan_desc
->
a
=
(
struct
complex
**
)
malloc
(
chan_desc
->
nb_taps
*
sizeof
(
struct
complex
*
));
for
(
i
=
0
;
i
<
nb_tx
*
nb_rx
;
i
++
)
...
...
@@ -502,6 +507,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx,
chan_desc
->
random_aoa
=
0
;
chan_desc
->
ch
=
(
struct
complex
**
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complex
*
));
chan_desc
->
chF
=
(
struct
complex
**
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complex
*
));
chan_desc
->
chFf
=
(
struct
complexf
*
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complexf
));
chan_desc
->
chF_prach
=
(
struct
complex
**
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complex
*
));
chan_desc
->
a
=
(
struct
complex
**
)
malloc
(
chan_desc
->
nb_taps
*
sizeof
(
struct
complex
*
));
for
(
i
=
0
;
i
<
nb_tx
*
nb_rx
;
i
++
)
...
...
@@ -550,6 +556,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx,
chan_desc
->
random_aoa
=
0
;
chan_desc
->
ch
=
(
struct
complex
**
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complex
*
));
chan_desc
->
chF
=
(
struct
complex
**
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complex
*
));
chan_desc
->
chFf
=
(
struct
complexf
*
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complexf
));
chan_desc
->
chF_prach
=
(
struct
complex
**
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complex
*
));
chan_desc
->
a
=
(
struct
complex
**
)
malloc
(
chan_desc
->
nb_taps
*
sizeof
(
struct
complex
*
));
for
(
i
=
0
;
i
<
nb_tx
*
nb_rx
;
i
++
)
...
...
@@ -597,6 +604,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx,
chan_desc
->
random_aoa
=
0
;
chan_desc
->
ch
=
(
struct
complex
**
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complex
*
));
chan_desc
->
chF
=
(
struct
complex
**
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complex
*
));
chan_desc
->
chFf
=
(
struct
complexf
*
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complexf
));
chan_desc
->
chF_prach
=
(
struct
complex
**
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complex
*
));
chan_desc
->
a
=
(
struct
complex
**
)
malloc
(
chan_desc
->
nb_taps
*
sizeof
(
struct
complex
*
));
for
(
i
=
0
;
i
<
nb_tx
*
nb_rx
;
i
++
)
...
...
@@ -642,6 +650,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx,
chan_desc
->
random_aoa
=
0
;
chan_desc
->
ch
=
(
struct
complex
**
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complex
*
));
chan_desc
->
chF
=
(
struct
complex
**
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complex
*
));
chan_desc
->
chFf
=
(
struct
complexf
*
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complexf
));
chan_desc
->
chF_prach
=
(
struct
complex
**
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complex
*
));
chan_desc
->
a
=
(
struct
complex
**
)
malloc
(
chan_desc
->
nb_taps
*
sizeof
(
struct
complex
*
));
for
(
i
=
0
;
i
<
nb_tx
*
nb_rx
;
i
++
)
...
...
@@ -687,6 +696,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx,
chan_desc
->
random_aoa
=
0
;
chan_desc
->
ch
=
(
struct
complex
**
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complex
*
));
chan_desc
->
chF
=
(
struct
complex
**
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complex
*
));
chan_desc
->
chFf
=
(
struct
complexf
*
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complexf
));
chan_desc
->
chF_prach
=
(
struct
complex
**
)
malloc
(
nb_tx
*
nb_rx
*
sizeof
(
struct
complex
*
));
chan_desc
->
a
=
(
struct
complex
**
)
malloc
(
chan_desc
->
nb_taps
*
sizeof
(
struct
complex
*
));
for
(
i
=
0
;
i
<
nb_tx
*
nb_rx
;
i
++
)
...
...
@@ -1398,7 +1408,7 @@ int random_channel(channel_desc_t *desc, uint8_t abstraction_flag) {
int
random_channel_freq
(
channel_desc_t
*
desc
,
uint8_t
abstraction_flag
)
{
int
i
,
k
,
l
,
aarx
,
aatx
;
int
i
,
aarx
,
aatx
;
struct
complex
anew
[
NB_ANTENNAS_TX
*
NB_ANTENNAS_RX
],
acorr
[
NB_ANTENNAS_TX
*
NB_ANTENNAS_RX
];
struct
complex
phase
,
alpha
,
beta
;
...
...
This diff is collapsed.
Click to expand it.
targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.band7.tm1.if4p5.50PRB.oaisim.conf
View file @
c77b8600
...
...
@@ -139,7 +139,7 @@ eNBs =
//////////
MME
parameters
:
mme_ip_address
= ( {
ipv4
=
"1
68.176.26.144
"
;
mme_ip_address
= ( {
ipv4
=
"1
92.168.13.11
"
;
ipv6
=
"192:168:30::17"
;
active
=
"yes"
;
preference
=
"ipv4"
;
...
...
@@ -149,18 +149,18 @@ eNBs =
NETWORK_INTERFACES
:
{
ENB_INTERFACE_NAME_FOR_S1_MME
=
"
eth0
"
;
ENB_IPV4_ADDRESS_FOR_S1_MME
=
"1
68.176.27.98
/24"
;
ENB_INTERFACE_NAME_FOR_S1U
=
"
eth0
"
;
ENB_IPV4_ADDRESS_FOR_S1U
=
"1
68.176.27.98
/24"
;
ENB_INTERFACE_NAME_FOR_S1_MME
=
"
lo
"
;
ENB_IPV4_ADDRESS_FOR_S1_MME
=
"1
92.168.12.170
/24"
;
ENB_INTERFACE_NAME_FOR_S1U
=
"
lo
"
;
ENB_IPV4_ADDRESS_FOR_S1U
=
"1
92.168.12.170
/24"
;
ENB_PORT_FOR_S1U
=
2152
;
# Spec 2152
};
rrh_gw_config
= (
{
local_if_name
=
"
eth0
"
;
remote_address
=
"1
68.176.27.114
"
;
local_address
=
"1
68.176.27.98
"
;
local_if_name
=
"
lo
"
;
remote_address
=
"1
92.168.12.171
"
;
local_address
=
"1
92.168.12.170
"
;
local_port
=
50000
;
#for raw option local port must be the same to remote
remote_port
=
50000
;
rrh_gw_active
=
"yes"
;
...
...
This diff is collapsed.
Click to expand it.
targets/SIMU/USER/channel_sim.c
View file @
c77b8600
...
...
@@ -406,9 +406,9 @@ void do_DL_sig_freq(channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX][
uint8_t
eNB_id
=
0
;
#ifdef SSE_float
double
tx_pwr
;
#else
float
tx_pwr
;
#else
double
tx_pwr
;
#endif
//double rx_pwr;
//int32_t rx_pwr0,rx_pwr1,rx_pwr2, rx_pwr3;
...
...
This diff is collapsed.
Click to expand it.
targets/SIMU/USER/oaisim.c
View file @
c77b8600
...
...
@@ -1478,11 +1478,14 @@ reset_opp_meas_oaisim (void)
reset_meas
(
&
eNB2UE
[
eNB_id
][
UE_id
][
0
]
->
interp_time
);
reset_meas
(
&
eNB2UE
[
eNB_id
][
UE_id
][
0
]
->
interp_freq
);
reset_meas
(
&
eNB2UE
[
eNB_id
][
UE_id
][
0
]
->
convolution
);
reset_meas
(
&
eNB2UE
[
eNB_id
][
UE_id
][
0
]
->
ziggurat
);
reset_meas
(
&
UE2eNB
[
UE_id
][
eNB_id
][
0
]
->
random_channel
);
reset_meas
(
&
UE2eNB
[
UE_id
][
eNB_id
][
0
]
->
interp_time
);
reset_meas
(
&
UE2eNB
[
UE_id
][
eNB_id
][
0
]
->
interp_freq
);
reset_meas
(
&
UE2eNB
[
UE_id
][
eNB_id
][
0
]
->
interp_freq_PRACH
);
reset_meas
(
&
UE2eNB
[
UE_id
][
eNB_id
][
0
]
->
convolution
);
reset_meas
(
&
UE2eNB
[
UE_id
][
eNB_id
][
0
]
->
ziggurat
);
reset_meas
(
&
UE2eNB
[
UE_id
][
eNB_id
][
0
]
->
ziggurat_PRACH
);
//Time consuming in Frequency analysis
//Downlink
reset_meas
(
&
eNB2UE
[
eNB_id
][
UE_id
][
0
]
->
DL_multipath_channel_freq
);
...
...
@@ -1591,6 +1594,8 @@ print_opp_meas_oaisim (void)
"[DL][interp_freq]"
,
&
oaisim_stats
,
&
oaisim_stats_f
);
print_meas
(
&
eNB2UE
[
eNB_id
][
UE_id
][
0
]
->
convolution
,
"[DL][convolution]"
,
&
oaisim_stats
,
&
oaisim_stats_f
);
print_meas
(
&
eNB2UE
[
eNB_id
][
UE_id
][
0
]
->
ziggurat
,
"[DL][ziggurat]"
,
&
oaisim_stats
,
&
oaisim_stats_f
);
print_meas
(
&
UE2eNB
[
UE_id
][
eNB_id
][
0
]
->
random_channel
,
"[UL][random_channel]"
,
&
oaisim_stats
,
&
oaisim_stats_f
);
...
...
@@ -1602,6 +1607,10 @@ print_opp_meas_oaisim (void)
"[UL][interp_freq_PRACH]"
,
&
oaisim_stats
,
&
oaisim_stats_f
);
print_meas
(
&
UE2eNB
[
UE_id
][
eNB_id
][
0
]
->
convolution
,
"[UL][convolution]"
,
&
oaisim_stats
,
&
oaisim_stats_f
);
print_meas
(
&
UE2eNB
[
UE_id
][
eNB_id
][
0
]
->
ziggurat
,
"[UL][ziggurat]"
,
&
oaisim_stats
,
&
oaisim_stats_f
);
print_meas
(
&
UE2eNB
[
UE_id
][
eNB_id
][
0
]
->
ziggurat_PRACH
,
"[UL][ziggurat]"
,
&
oaisim_stats
,
&
oaisim_stats_f
);
//Time consuming in Frequency analysis
//Downlink
...
...
This diff is collapsed.
Click to expand it.
targets/SIMU/USER/oaisim_functions.c
View file @
c77b8600
...
...
@@ -1701,8 +1701,8 @@ void init_ocm(void)
0
);
if
(
do_ofdm_mod
)
{
random_channel
(
eNB2UE
[
eNB_id
][
UE_id
][
CC_id
],
abstraction_flag
);
//Find a(l)
freq_channel
(
eNB2UE
[
eNB_id
][
UE_id
][
CC_id
],
nb_rb
,
n_samples
);
//Find desc->chF
random_channel
_freq
(
eNB2UE
[
eNB_id
][
UE_id
][
CC_id
],
abstraction_flag
);
//Find a(l)
freq_channel
_SSE_float
(
eNB2UE
[
eNB_id
][
UE_id
][
CC_id
],
nb_rb
,
n_samples
);
//Find desc->chF
}
else
...
...
@@ -1722,8 +1722,8 @@ void init_ocm(void)
0
);
if
(
do_ofdm_mod
)
{
random_channel
(
UE2eNB
[
UE_id
][
eNB_id
][
CC_id
],
abstraction_flag
);
//Find a(l)
freq_channel
(
UE2eNB
[
UE_id
][
eNB_id
][
CC_id
],
nb_rb
,
n_samples
);
//Find desc->chF
random_channel
_freq
(
UE2eNB
[
UE_id
][
eNB_id
][
CC_id
],
abstraction_flag
);
//Find a(l)
freq_channel
_SSE_float
(
UE2eNB
[
UE_id
][
eNB_id
][
CC_id
],
nb_rb
,
n_samples
);
//Find desc->chF
}
else
random_channel
(
UE2eNB
[
UE_id
][
eNB_id
][
CC_id
],
abstraction_flag
);
...
...
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