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
wangjie
OpenXG-RAN
Commits
20eb8dc6
Commit
20eb8dc6
authored
Jan 11, 2016
by
Rohit Gupta
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into feature-34-test_framework
parents
d0859595
1d390bd4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
20 deletions
+39
-20
cmake_targets/lte-simulators/CMakeLists.txt
cmake_targets/lte-simulators/CMakeLists.txt
+1
-1
openair1/SIMULATION/LTE_PHY/dlsim.c
openair1/SIMULATION/LTE_PHY/dlsim.c
+10
-7
openair1/SIMULATION/TOOLS/abstraction.c
openair1/SIMULATION/TOOLS/abstraction.c
+26
-10
openair1/SIMULATION/TOOLS/defs.h
openair1/SIMULATION/TOOLS/defs.h
+2
-2
No files found.
cmake_targets/lte-simulators/CMakeLists.txt
View file @
20eb8dc6
...
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8)
...
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8)
set
(
PACKAGE_NAME
"unitary_tests_simulators"
)
set
(
PACKAGE_NAME
"unitary_tests_simulators"
)
set
(
PHYSIM True
)
set
(
PHYSIM True
)
set
(
RF_BOARD None
)
set
(
RF_BOARD None
)
set
(
XFORMS
Fals
e
)
set
(
XFORMS
Tru
e
)
set
(
DEBUG_PHY False
)
set
(
DEBUG_PHY False
)
set
(
MU_RECIEVER False
)
set
(
MU_RECIEVER False
)
...
...
openair1/SIMULATION/LTE_PHY/dlsim.c
View file @
20eb8dc6
...
@@ -2791,8 +2791,16 @@ PMI_FEEDBACK:
...
@@ -2791,8 +2791,16 @@ PMI_FEEDBACK:
random_channel
(
eNB2UE
[
2
],
0
);
random_channel
(
eNB2UE
[
2
],
0
);
random_channel
(
eNB2UE
[
3
],
0
);
random_channel
(
eNB2UE
[
3
],
0
);
}
}
}
if
(
PHY_vars_UE
->
perfect_ce
==
1
)
{
// fill in perfect channel estimates
freq_channel
(
eNB2UE
[
round
],
PHY_vars_UE
->
lte_frame_parms
.
N_RB_DL
,
12
*
PHY_vars_UE
->
lte_frame_parms
.
N_RB_DL
+
1
);
/*
write_output("channel.m","ch",eNB2UE[round]->ch[0],eNB2UE[round]->channel_length,1,8);
write_output("channelF.m","chF",eNB2UE[round]->chF[0],12*PHY_vars_UE->lte_frame_parms.N_RB_DL + 1,1,8);
*/
}
}
if
(
abstx
)
{
if
(
abstx
)
{
if
(
trials
==
0
&&
round
==
0
)
{
if
(
trials
==
0
&&
round
==
0
)
{
...
@@ -2938,11 +2946,6 @@ PMI_FEEDBACK:
...
@@ -2938,11 +2946,6 @@ PMI_FEEDBACK:
if
(
PHY_vars_UE
->
perfect_ce
==
1
)
{
if
(
PHY_vars_UE
->
perfect_ce
==
1
)
{
if
(
awgn_flag
==
0
)
{
if
(
awgn_flag
==
0
)
{
// fill in perfect channel estimates
freq_channel
(
eNB2UE
[
round
],
PHY_vars_UE
->
lte_frame_parms
.
N_RB_DL
,
12
*
PHY_vars_UE
->
lte_frame_parms
.
N_RB_DL
+
1
);
//write_output("channel.m","ch",desc1->ch[0],desc1->channel_length,1,8);
//write_output("channelF.m","chF",desc1->chF[0],nb_samples,1,8);
for
(
k
=
0
;
k
<
NUMBER_OF_eNB_MAX
;
k
++
)
{
for
(
k
=
0
;
k
<
NUMBER_OF_eNB_MAX
;
k
++
)
{
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
for
(
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
for
(
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
...
...
openair1/SIMULATION/TOOLS/abstraction.c
View file @
20eb8dc6
...
@@ -45,7 +45,7 @@ double **cos_lut=NULL,**sin_lut=NULL;
...
@@ -45,7 +45,7 @@ double **cos_lut=NULL,**sin_lut=NULL;
void
init_freq_channel
(
channel_desc_t
*
desc
,
uint16_t
nb_rb
,
int16_t
n_samples
)
int
init_freq_channel
(
channel_desc_t
*
desc
,
uint16_t
nb_rb
,
int16_t
n_samples
)
{
{
...
@@ -54,15 +54,17 @@ void init_freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples)
...
@@ -54,15 +54,17 @@ void init_freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples)
int16_t
f
;
int16_t
f
;
uint8_t
l
;
uint8_t
l
;
if
((
n_samples
&
1
)
==
0
)
{
fprintf
(
stderr
,
"freq_channel_init: n_samples has to be odd
\n
"
);
return
(
-
1
);
}
cos_lut
=
(
double
**
)
malloc
(
n_samples
*
sizeof
(
double
*
));
cos_lut
=
(
double
**
)
malloc
(
n_samples
*
sizeof
(
double
*
));
sin_lut
=
(
double
**
)
malloc
(
n_samples
*
sizeof
(
double
*
));
sin_lut
=
(
double
**
)
malloc
(
n_samples
*
sizeof
(
double
*
));
delta_f
=
nb_rb
*
180000
/
(
n_samples
-
1
);
delta_f
=
nb_rb
*
180000
/
(
n_samples
-
1
);
for
(
f
=-
(
n_samples
>>
1
);
f
<
(
n_samples
>>
1
);
f
++
)
{
for
(
f
=-
(
n_samples
>>
1
);
f
<
=
(
n_samples
>>
1
);
f
++
)
{
freq
=
delta_f
*
(
double
)
f
*
1e-6
;
// due to the fact that delays is in mus
freq
=
delta_f
*
(
double
)
f
*
1e-6
;
// due to the fact that delays is in mus
cos_lut
[
f
+
(
n_samples
>>
1
)]
=
(
double
*
)
malloc
((
int
)
desc
->
nb_taps
*
sizeof
(
double
));
cos_lut
[
f
+
(
n_samples
>>
1
)]
=
(
double
*
)
malloc
((
int
)
desc
->
nb_taps
*
sizeof
(
double
));
...
@@ -81,9 +83,11 @@ void init_freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples)
...
@@ -81,9 +83,11 @@ void init_freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples)
}
}
}
}
return
(
0
);
}
}
void
freq_channel
(
channel_desc_t
*
desc
,
uint16_t
nb_rb
,
int16_t
n_samples
)
int
freq_channel
(
channel_desc_t
*
desc
,
uint16_t
nb_rb
,
int16_t
n_samples
)
{
{
...
@@ -93,22 +97,32 @@ void freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples)
...
@@ -93,22 +97,32 @@ void freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples)
static
int
freq_channel_init
=
0
;
static
int
freq_channel_init
=
0
;
static
int
n_samples_max
=
0
;
static
int
n_samples_max
=
0
;
// printf("no of samples:%d,",n_samples);
// do some error checking
// n_samples has to be a odd number because we assume the spectrum is symmetric around the DC and includes the DC
if
((
n_samples
&
1
)
==
0
)
{
fprintf
(
stderr
,
"freq_channel: n_samples has to be odd
\n
"
);
return
(
-
1
);
}
// printf("no of taps:%d,",(int)desc->nb_taps);
// printf("no of taps:%d,",(int)desc->nb_taps);
if
(
freq_channel_init
==
0
)
{
if
(
freq_channel_init
==
0
)
{
// we are initializing the lut for the largets possible n_samples=12*nb_rb+1
// we are initializing the lut for the largets possible n_samples=12*nb_rb+1
// if called with n_samples<12*nb_rb+1, we decimate the lut
// if called with n_samples<12*nb_rb+1, we decimate the lut
n_samples_max
=
12
*
nb_rb
+
1
;
n_samples_max
=
12
*
nb_rb
+
1
;
init_freq_channel
(
desc
,
nb_rb
,
n_samples_max
);
if
(
init_freq_channel
(
desc
,
nb_rb
,
n_samples_max
)
==
0
)
freq_channel_init
=
1
;
freq_channel_init
=
1
;
else
return
(
-
1
);
}
}
d
=
n_samples_max
/
n_samples
;
d
=
(
n_samples_max
-
1
)
/
(
n_samples
-
1
);
//printf("no_samples=%d, n_samples_max=%d, d=%d\n",n_samples,n_samples_max,d);
start_meas
(
&
desc
->
interp_freq
);
start_meas
(
&
desc
->
interp_freq
);
for
(
f
=-
n_samples_max
/
2
,
f2
=-
n_samples
/
2
;
f
<
n_samples_max
/
2
;
f
+=
d
,
f2
++
)
{
for
(
f
=-
n_samples_max
/
2
,
f2
=-
n_samples
/
2
;
f
<
=
n_samples_max
/
2
;
f
+=
d
,
f2
++
)
{
clut
=
cos_lut
[
n_samples_max
/
2
+
f
];
clut
=
cos_lut
[
n_samples_max
/
2
+
f
];
slut
=
sin_lut
[
n_samples_max
/
2
+
f
];
slut
=
sin_lut
[
n_samples_max
/
2
+
f
];
...
@@ -129,6 +143,8 @@ void freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples)
...
@@ -129,6 +143,8 @@ void freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples)
}
}
stop_meas
(
&
desc
->
interp_freq
);
stop_meas
(
&
desc
->
interp_freq
);
return
(
0
);
}
}
double
compute_pbch_sinr
(
channel_desc_t
*
desc
,
double
compute_pbch_sinr
(
channel_desc_t
*
desc
,
...
...
openair1/SIMULATION/TOOLS/defs.h
View file @
20eb8dc6
...
@@ -354,8 +354,8 @@ int gauss(unsigned int *gauss_LUT,unsigned char Nbits);
...
@@ -354,8 +354,8 @@ int gauss(unsigned int *gauss_LUT,unsigned char Nbits);
double
gaussdouble
(
double
,
double
);
double
gaussdouble
(
double
,
double
);
void
randominit
(
unsigned
int
seed_init
);
void
randominit
(
unsigned
int
seed_init
);
double
uniformrandom
(
void
);
double
uniformrandom
(
void
);
void
freq_channel
(
channel_desc_t
*
desc
,
uint16_t
nb_rb
,
int16_t
n_samples
);
int
freq_channel
(
channel_desc_t
*
desc
,
uint16_t
nb_rb
,
int16_t
n_samples
);
void
init_freq_channel
(
channel_desc_t
*
desc
,
uint16_t
nb_rb
,
int16_t
n_samples
);
int
init_freq_channel
(
channel_desc_t
*
desc
,
uint16_t
nb_rb
,
int16_t
n_samples
);
uint8_t
multipath_channel_nosigconv
(
channel_desc_t
*
desc
);
uint8_t
multipath_channel_nosigconv
(
channel_desc_t
*
desc
);
void
multipath_tv_channel
(
channel_desc_t
*
desc
,
void
multipath_tv_channel
(
channel_desc_t
*
desc
,
double
**
tx_sig_re
,
double
**
tx_sig_re
,
...
...
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