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
alex037yang
OpenXG-RAN
Commits
3124cb2c
Commit
3124cb2c
authored
Sep 25, 2016
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more fixes for oaisim, TM2.
parent
7df5c381
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
98 additions
and
55 deletions
+98
-55
openair1/PHY/TOOLS/defs.h
openair1/PHY/TOOLS/defs.h
+2
-2
openair1/PHY/TOOLS/signal_energy.c
openair1/PHY/TOOLS/signal_energy.c
+1
-1
openair1/SIMULATION/RF/adc.c
openair1/SIMULATION/RF/adc.c
+2
-2
openair1/SIMULATION/RF/dac.c
openair1/SIMULATION/RF/dac.c
+4
-4
openair1/SIMULATION/RF/defs.h
openair1/SIMULATION/RF/defs.h
+8
-8
openair1/SIMULATION/RF/rf.c
openair1/SIMULATION/RF/rf.c
+2
-2
openair1/SIMULATION/TOOLS/defs.h
openair1/SIMULATION/TOOLS/defs.h
+8
-8
openair1/SIMULATION/TOOLS/multipath_channel.c
openair1/SIMULATION/TOOLS/multipath_channel.c
+4
-4
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.generic.oaisim.local_no_mme.conf
...E-EPC/CONF/enb.band7.tm1.generic.oaisim.local_no_mme.conf
+3
-0
targets/SIMU/USER/channel_sim.c
targets/SIMU/USER/channel_sim.c
+64
-23
targets/SIMU/USER/oaisim_functions.c
targets/SIMU/USER/oaisim_functions.c
+0
-1
No files found.
openair1/PHY/TOOLS/defs.h
View file @
3124cb2c
...
...
@@ -296,10 +296,10 @@ int32_t subcarrier_energy(int32_t *,uint32_t, int32_t* subcarrier_energy, uint16
*/
int32_t
signal_energy_nodc
(
int32_t
*
,
uint32_t
);
/*!\fn double signal_energy_fp(double
s_re[2][30720], double s_im[2][30720
],uint32_t, uint32_t,uint32_t);
/*!\fn double signal_energy_fp(double
*s_re[2], double *s_im[2
],uint32_t, uint32_t,uint32_t);
\brief Computes the signal energy per subcarrier
*/
double
signal_energy_fp
(
double
s_re
[
2
][
30720
],
double
s_im
[
2
][
30720
],
uint32_t
nb_antennas
,
uint32_t
length
,
uint32_t
offset
);
double
signal_energy_fp
(
double
*
s_re
[
2
],
double
*
s_im
[
2
],
uint32_t
nb_antennas
,
uint32_t
length
,
uint32_t
offset
);
/*!\fn double signal_energy_fp2(struct complex *, uint32_t);
\brief Computes the signal energy per subcarrier
...
...
openair1/PHY/TOOLS/signal_energy.c
View file @
3124cb2c
...
...
@@ -255,7 +255,7 @@ int32_t signal_energy_nodc(int32_t *input,uint32_t length)
}
#endif
double
signal_energy_fp
(
double
s_re
[
2
][
30720
],
double
s_im
[
2
][
30720
],
uint32_t
nb_antennas
,
uint32_t
length
,
uint32_t
offset
)
double
signal_energy_fp
(
double
*
s_re
[
2
],
double
*
s_im
[
2
],
uint32_t
nb_antennas
,
uint32_t
length
,
uint32_t
offset
)
{
int32_t
aa
,
i
;
...
...
openair1/SIMULATION/RF/adc.c
View file @
3124cb2c
...
...
@@ -26,8 +26,8 @@
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
void
adc
(
double
r_re
[
2
][
30720
],
double
r_im
[
2
][
30720
],
void
adc
(
double
*
r_re
[
2
],
double
*
r_im
[
2
],
unsigned
int
input_offset
,
unsigned
int
output_offset
,
unsigned
int
**
output
,
...
...
openair1/SIMULATION/RF/dac.c
View file @
3124cb2c
...
...
@@ -31,8 +31,8 @@
#include <stdio.h>
#include "PHY/TOOLS/defs.h"
void
dac
(
double
s_re
[
2
][
30720
],
double
s_im
[
2
][
30720
],
void
dac
(
double
*
s_re
[
2
],
double
*
s_im
[
2
],
uint32_t
**
input
,
uint32_t
input_offset
,
uint32_t
nb_tx_antennas
,
...
...
@@ -81,8 +81,8 @@ void dac(double s_re[2][30720],
}
}
double
dac_fixed_gain
(
double
s_re
[
2
][
30720
],
double
s_im
[
2
][
30720
],
double
dac_fixed_gain
(
double
*
s_re
[
2
],
double
*
s_im
[
2
],
uint32_t
**
input
,
uint32_t
input_offset
,
uint32_t
nb_tx_antennas
,
...
...
openair1/SIMULATION/RF/defs.h
View file @
3124cb2c
...
...
@@ -64,16 +64,16 @@ void rf_rx(double **r_re,
double
IQ_imb_dB
,
double
IQ_phase
);
void
rf_rx_simple
(
double
r_re
[
2
][
30720
],
double
r_im
[
2
][
30720
],
void
rf_rx_simple
(
double
*
r_re
[
2
],
double
*
r_im
[
2
],
unsigned
int
nb_rx_antennas
,
unsigned
int
length
,
double
s_time
,
double
rx_gain_dB
);
void
adc
(
double
r_re
[
2
][
30720
],
double
r_im
[
2
][
30720
],
void
adc
(
double
*
r_re
[
2
],
double
*
r_im
[
2
],
unsigned
int
input_offset
,
unsigned
int
output_offset
,
int
**
output
,
...
...
@@ -81,8 +81,8 @@ void adc(double r_re[2][30720],
unsigned
int
length
,
unsigned
char
B
);
void
dac
(
double
s_re
[
2
][
30720
],
double
s_im
[
2
][
30720
],
void
dac
(
double
*
s_re
[
2
],
double
*
s_im
[
2
],
int
**
input
,
unsigned
int
input_offset
,
unsigned
int
nb_tx_antennas
,
...
...
@@ -92,8 +92,8 @@ void dac(double s_re[2][30720],
unsigned
int
meas_length
,
unsigned
int
meas_offset
);
double
dac_fixed_gain
(
double
s_re
[
2
][
30720
],
double
s_im
[
2
][
30720
],
double
dac_fixed_gain
(
double
*
s_re
[
2
],
double
*
s_im
[
2
],
int
**
input
,
unsigned
int
input_offset
,
unsigned
int
nb_tx_antennas
,
...
...
openair1/SIMULATION/RF/rf.c
View file @
3124cb2c
...
...
@@ -206,8 +206,8 @@ void rf_rx(double **r_re,
}
}
void
rf_rx_simple
(
double
r_re
[
2
][
30720
],
double
r_im
[
2
][
30720
],
void
rf_rx_simple
(
double
*
r_re
[
2
],
double
*
r_im
[
2
],
unsigned
int
nb_rx_antennas
,
unsigned
int
length
,
double
s_time
,
...
...
openair1/SIMULATION/TOOLS/defs.h
View file @
3124cb2c
...
...
@@ -219,10 +219,10 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx,
int
random_channel
(
channel_desc_t
*
desc
,
uint8_t
abstraction_flag
);
/**\fn void multipath_channel(channel_desc_t *desc,
double tx_sig_re[2]
[30720*2]
,
double tx_sig_im[2]
[30720*2]
,
double rx_sig_re[2]
[30720*2]
,
double rx_sig_im[2]
[30720*2]
,
double tx_sig_re[2],
double tx_sig_im[2],
double rx_sig_re[2],
double rx_sig_im[2],
uint32_t length,
uint8_t keep_channel)
...
...
@@ -237,10 +237,10 @@ int random_channel(channel_desc_t *desc, uint8_t abstraction_flag);
*/
void
multipath_channel
(
channel_desc_t
*
desc
,
double
tx_sig_re
[
2
][
30720
*
2
],
double
tx_sig_im
[
2
][
30720
*
2
],
double
rx_sig_re
[
2
][
30720
*
2
],
double
rx_sig_im
[
2
][
30720
*
2
],
double
*
tx_sig_re
[
2
],
double
*
tx_sig_im
[
2
],
double
*
rx_sig_re
[
2
],
double
*
rx_sig_im
[
2
],
uint32_t
length
,
uint8_t
keep_channel
);
/*
...
...
openair1/SIMULATION/TOOLS/multipath_channel.c
View file @
3124cb2c
...
...
@@ -150,10 +150,10 @@ void multipath_channel(channel_desc_t *desc,
#else
void
multipath_channel
(
channel_desc_t
*
desc
,
double
tx_sig_re
[
2
][
30720
*
2
],
double
tx_sig_im
[
2
][
30720
*
2
],
double
rx_sig_re
[
2
][
30720
*
2
],
double
rx_sig_im
[
2
][
30720
*
2
],
double
*
tx_sig_re
[
2
],
double
*
tx_sig_im
[
2
],
double
*
rx_sig_re
[
2
],
double
*
rx_sig_im
[
2
],
uint32_t
length
,
uint8_t
keep_channel
)
{
...
...
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.generic.oaisim.local_no_mme.conf
View file @
3124cb2c
...
...
@@ -23,6 +23,9 @@ eNBs =
component_carriers
= (
{
node_function
=
"eNodeB_3GPP"
;
node_timing
=
"synch_to_ext_device"
;
node_synch_ref
=
0
;
frame_type
=
"FDD"
;
tdd_config
=
3
;
tdd_config_s
=
0
;
...
...
targets/SIMU/USER/channel_sim.c
View file @
3124cb2c
...
...
@@ -108,12 +108,28 @@ void do_DL_sig(channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX][MAX_N
uint8_t
nb_antennas_rx
=
eNB2UE
[
0
][
0
][
CC_id
]
->
nb_rx
;
// number of rx antennas at UE
uint8_t
nb_antennas_tx
=
eNB2UE
[
0
][
0
][
CC_id
]
->
nb_tx
;
// number of tx antennas at eNB
double
s_re
[
2
][
30720
];
//PHY_vars_eNB_g[eNB_id][CC_id]->frame_parms.samples_per_tti];
double
s_im
[
2
][
30720
];
//PHY_vars_eNB_g[eNB_id][CC_id]->frame_parms.samples_per_tti];
double
r_re0
[
2
][
30720
];
//PHY_vars_eNB_g[eNB_id][CC_id]->frame_parms.samples_per_tti];
double
r_im0
[
2
][
30720
];
//PHY_vars_eNB_g[eNB_id][CC_id]->frame_parms.samples_per_tti];
double
s_re0
[
30720
];
//PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti];
double
s_re1
[
30720
];
//PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti];
double
*
s_re
[
2
];
double
s_im0
[
30720
];
//PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti];
double
s_im1
[
30720
];
//PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti];
double
*
s_im
[
2
];
double
r_re00
[
30720
];
//PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti];
double
r_re01
[
30720
];
//PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti];
double
*
r_re0
[
2
];
double
r_im00
[
30720
];
//PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti];
double
r_im01
[
30720
];
//PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti];
double
*
r_im0
[
2
];
s_re
[
0
]
=
s_re0
;
s_im
[
0
]
=
s_im0
;
s_re
[
1
]
=
s_re1
;
s_im
[
1
]
=
s_im1
;
r_re0
[
0
]
=
r_re00
;
r_im0
[
0
]
=
r_im00
;
r_re0
[
1
]
=
r_re01
;
r_im0
[
1
]
=
r_im01
;
if
(
subframe
==
0
)
hold_channel
=
0
;
...
...
@@ -318,17 +334,21 @@ void do_DL_sig(channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX][MAX_N
if
(
eNB_output_mask
[
UE_id
]
==
(
1
<<
NB_eNB_INST
)
-
1
)
{
eNB_output_mask
[
UE_id
]
=
0
;
double
*
r_re_p
[
2
]
=
{
r_re_DL
[
eNB_id
][
0
],
r_re_DL
[
eNB_id
][
1
]};
double
*
r_im_p
[
2
]
=
{
r_im_DL
[
eNB_id
][
0
],
r_im_DL
[
eNB_id
][
1
]};
#ifdef DEBUG_SIM
rx_pwr
=
signal_energy_fp
(
(
double
**
)
r_re_DL
[
UE_id
],(
double
**
)
r_im_DL
[
UE_id
]
,
nb_antennas_rx
,
frame_parms
->
ofdm_symbol_size
,
sf_offset
)
/
(
12
.
0
*
frame_parms
->
N_RB_DL
);
rx_pwr
=
signal_energy_fp
(
r_re_p
,
r_im_p
,
nb_antennas_rx
,
frame_parms
->
ofdm_symbol_size
,
sf_offset
)
/
(
12
.
0
*
frame_parms
->
N_RB_DL
);
LOG_D
(
OCM
,
"[SIM][DL] UE %d : ADC in %f dBm for subframe %d
\n
"
,
UE_id
,
10
*
log10
(
rx_pwr
),
subframe
);
#endif
rxdata
=
PHY_vars_UE_g
[
UE_id
][
CC_id
]
->
common_vars
.
rxdata
;
sf_offset
=
subframe
*
frame_parms
->
samples_per_tti
;
adc
(
r_re_DL
[
UE_id
],
r_im_DL
[
UE_id
],
adc
(
r_re_p
,
r_im_p
,
0
,
sf_offset
,
rxdata
,
...
...
@@ -384,10 +404,28 @@ void do_UL_sig(channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX][MAX_N
int
ulfrrb2
;
uint8_t
harq_pid
;
#endif
double
s_re
[
2
][
30720
];
//PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti];
double
s_im
[
2
][
30720
];
//PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti];
double
r_re0
[
2
][
30720
];
//PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti];
double
r_im0
[
2
][
30720
];
//PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti];
double
s_re0
[
30720
];
//PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti];
double
s_re1
[
30720
];
//PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti];
double
*
s_re
[
2
];
double
s_im0
[
30720
];
//PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti];
double
s_im1
[
30720
];
//PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti];
double
*
s_im
[
2
];
double
r_re00
[
30720
];
//PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti];
double
r_re01
[
30720
];
//PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti];
double
*
r_re0
[
2
];
double
r_im00
[
30720
];
//PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti];
double
r_im01
[
30720
];
//PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti];
double
*
r_im0
[
2
];
s_re
[
0
]
=
s_re0
;
s_im
[
0
]
=
s_im0
;
s_re
[
1
]
=
s_re1
;
s_im
[
1
]
=
s_im1
;
r_re0
[
0
]
=
r_re00
;
r_im0
[
0
]
=
r_im00
;
r_re0
[
1
]
=
r_re01
;
r_im0
[
1
]
=
r_im01
;
if
(
abstraction_flag
!=
0
)
{
#ifdef PHY_ABSTRACTION_UL
...
...
@@ -447,7 +485,6 @@ void do_UL_sig(channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX][MAX_N
PHY_vars_UE_g
[
UE_id
][
CC_id
]
->
tx_total_RE
[
subframe
],
subframe
,
sf_offset
);
}
else
{
tx_pwr
=
dac_fixed_gain
((
double
**
)
s_re
,
(
double
**
)
s_im
,
txdata
,
...
...
@@ -466,8 +503,8 @@ void do_UL_sig(channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX][MAX_N
PHY_vars_UE_g
[
UE_id
][
CC_id
]
->
tx_total_RE
[
subframe
],
subframe
,
sf_offset
);
multipath_channel
(
UE2eNB
[
UE_id
][
eNB_id
][
CC_id
],
(
double
**
)
s_re
,(
double
**
)
s_im
,(
double
**
)
r_re0
,(
double
**
)
r_im0
,
multipath_channel
(
UE2eNB
[
UE_id
][
eNB_id
][
CC_id
],
s_re
,
s_im
,
r_re0
,
r_im0
,
frame_parms
->
samples_per_tti
,
hold_channel
);
...
...
@@ -498,23 +535,27 @@ void do_UL_sig(channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX][MAX_N
}
}
//UE_id
rf_rx_simple
(
r_re_UL
[
eNB_id
],
r_im_UL
[
eNB_id
],
double
*
r_re_p
[
2
]
=
{
r_re_UL
[
eNB_id
][
0
],
r_re_UL
[
eNB_id
][
1
]};
double
*
r_im_p
[
2
]
=
{
r_im_UL
[
eNB_id
][
0
],
r_im_UL
[
eNB_id
][
1
]};
rf_rx_simple
(
r_re_p
,
r_im_p
,
nb_antennas_rx
,
frame_parms
->
samples_per_tti
,
1e3
/
UE2eNB
[
0
][
eNB_id
][
CC_id
]
->
sampling_rate
,
// sampling time (ns)
(
double
)
PHY_vars_eNB_g
[
eNB_id
][
CC_id
]
->
rx_total_gain_dB
-
66
.
227
);
// rx_gain (dB) (66.227 = 20*log10(pow2(11)) = gain from the adc that will be applied later)
#ifdef DEBUG_SIM
rx_pwr
=
signal_energy_fp
(
r_re_
UL
[
eNB_id
],
r_im_UL
[
eNB_id
]
,
nb_antennas_rx
,
frame_parms
->
samples_per_tti
,
0
)
*
(
double
)
frame_parms
->
ofdm_symbol_size
/
(
12
.
0
*
frame_parms
->
N_RB_DL
);
rx_pwr
=
signal_energy_fp
(
r_re_
p
,
r_im_p
,
nb_antennas_rx
,
frame_parms
->
samples_per_tti
,
0
)
*
(
double
)
frame_parms
->
ofdm_symbol_size
/
(
12
.
0
*
frame_parms
->
N_RB_DL
);
LOG_D
(
OCM
,
"[SIM][UL] rx_pwr (ADC in) %f dB for subframe %d
\n
"
,
10
*
log10
(
rx_pwr
),
subframe
);
#endif
rxdata
=
PHY_vars_eNB_g
[
eNB_id
][
CC_id
]
->
common_vars
.
rxdata
[
0
];
sf_offset
=
subframe
*
frame_parms
->
samples_per_tti
;
adc
(
r_re_
UL
[
eNB_id
]
,
r_im_
UL
[
eNB_id
]
,
adc
(
r_re_
p
,
r_im_
p
,
0
,
sf_offset
,
rxdata
,
...
...
targets/SIMU/USER/oaisim_functions.c
View file @
3124cb2c
...
...
@@ -1120,7 +1120,6 @@ int UE_trx_read(openair0_device *device, openair0_timestamp *ptimestamp, void **
UE_id
,
CC_id
);
printf
(
"Signaling main thread: UE subframe mask %x
\n
"
,
subframe_UE_mask
);
}
...
...
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