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
59b0b394
Commit
59b0b394
authored
Nov 08, 2017
by
lfarizav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rar uplink
parent
2e29a27c
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
441 additions
and
108 deletions
+441
-108
openair1/PHY/LTE_TRANSPORT/prach.c
openair1/PHY/LTE_TRANSPORT/prach.c
+391
-55
openair1/PHY/LTE_TRANSPORT/proto.h
openair1/PHY/LTE_TRANSPORT/proto.h
+0
-1
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+1
-2
openair1/SIMULATION/RF/adc.c
openair1/SIMULATION/RF/adc.c
+15
-11
openair1/SIMULATION/RF/dac.c
openair1/SIMULATION/RF/dac.c
+10
-4
openair1/SIMULATION/RF/defs.h
openair1/SIMULATION/RF/defs.h
+1
-13
openair1/SIMULATION/TOOLS/abstraction.c
openair1/SIMULATION/TOOLS/abstraction.c
+4
-3
openair1/SIMULATION/TOOLS/multipath_channel.c
openair1/SIMULATION/TOOLS/multipath_channel.c
+1
-3
targets/SIMU/USER/channel_sim.c
targets/SIMU/USER/channel_sim.c
+18
-16
No files found.
openair1/PHY/LTE_TRANSPORT/prach.c
View file @
59b0b394
This diff is collapsed.
Click to expand it.
openair1/PHY/LTE_TRANSPORT/proto.h
View file @
59b0b394
...
...
@@ -2164,7 +2164,6 @@ int32_t generate_prach_freq(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t subf
*/
void
rx_prach
(
PHY_VARS_eNB
*
phy_vars_eNB
,
uint16_t
*
preamble_energy_list
,
uint16_t
*
preamble_delay_list
,
uint16_t
Nf
,
uint8_t
tdd_mapindex
);
void
rx_prach_freq
(
PHY_VARS_eNB
*
phy_vars_eNB
,
uint16_t
*
preamble_energy_list
,
uint16_t
*
preamble_delay_list
,
uint16_t
Nf
,
uint8_t
tdd_mapindex
);
/*!
\brief Helper for MAC, returns number of available PRACH in TDD for a particular configuration index
@param frame_parms Pointer to LTE_DL_FRAME_PARMS structure
...
...
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
59b0b394
...
...
@@ -2005,7 +2005,7 @@ void prach_procedures(PHY_VARS_eNB *eNB) {
if
(
eNB
->
abstraction_flag
==
0
)
{
if
(
do_ofdm_mod
)
{
LOG_D
(
PHY
,
"[eNB %d][RAPROC] Frame %d, Subframe %d : PRACH RX Signal Power : %d dBm
\n
"
,
eNB
->
Mod_id
,
LOG_D
(
PHY
,
"[eNB %d][RAPROC]
[Freq]
Frame %d, Subframe %d : PRACH RX Signal Power : %d dBm
\n
"
,
eNB
->
Mod_id
,
frame
,
subframe
,
dB_fixed
(
signal_energy
(
&
eNB
->
common_vars
.
rxdataF
[
0
][
0
][
subframe
*
fp
->
symbols_per_tti
*
fp
->
ofdm_symbol_size
],
512
))
-
eNB
->
rx_total_gain_dB
);
rx_prach_freq
(
eNB
,
preamble_energy_list
,
...
...
@@ -2023,7 +2023,6 @@ void prach_procedures(PHY_VARS_eNB *eNB) {
preamble_delay_list
,
frame
,
0
);
printf
(
"[prach] ook
\n
"
);
write_output
(
"prach_rxF_comp1.m"
,
"prach_rxF_comp1"
,
eNB
->
prach_vars
.
prachF
,
1024
,
1
,
1
);
}
}
else
{
...
...
openair1/SIMULATION/RF/adc.c
View file @
59b0b394
...
...
@@ -18,7 +18,7 @@
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#define DEBUG_ADC
void
adc
(
double
*
r_re
[
2
],
double
*
r_im
[
2
],
unsigned
int
input_offset
,
...
...
@@ -47,7 +47,7 @@ void adc(double *r_re[2],
//printf("Adc outputs %d %e %d \n",i,((short *)output[0])[((i+output_offset)<<1)], ((i+output_offset)<<1) );
}
}
void
adc_freq
(
double
*
r_re
[
2
],
/*
void adc_freq(double *r_re[2],
double *r_im[2],
unsigned int input_offset,
unsigned int output_offset,
...
...
@@ -62,7 +62,7 @@ void adc_freq(double *r_re[2],
int i;
//int th_id;
int aa;
double
gain
=
(
double
)(
1
<<
(
B
-
1
));
double gain = (double)(1<<(B-1));
*/
/*int dummy_rx[nb_rx_antennas][length] __attribute__((aligned(32)));
for (aa=0; aa<nb_rx_antennas; aa++) {
...
...
@@ -70,7 +70,7 @@ void adc_freq(double *r_re[2],
}*/
//double gain = 1.0;
for
(
i
=
0
;
i
<
length
;
i
++
)
{
/*
for (i=0; i<length; i++) {
for (aa=0; aa<nb_rx_antennas; aa++) {
((short *)output1[aa])[((i+output_offset)<<1)] = (short)(r_re[aa][i+input_offset]*gain);
((short *)output1[aa])[1+((i+output_offset)<<1)] = (short)(r_im[aa][i+input_offset]*gain);
...
...
@@ -86,7 +86,7 @@ void adc_freq(double *r_re[2],
printf("rxdataF (thread[0]) %d: (%d,%d) \n",i,((short *)output2[aa])[((i+output_offset+length+4)<<1)],((short *)output2[aa])[1+((i+output_offset+length+4)<<1)]);
}
}
}
*/
/*for (aa=0; aa<nb_rx_antennas; aa++) {
for (th_id=1; th_id<2; th_id++)
{
...
...
@@ -95,16 +95,16 @@ void adc_freq(double *r_re[2],
length*sizeof(int));
}
}*/
}
/*
}
printf("thread %d\n",(unsigned int)thread);
//write_output("adc_rxsigF_frame0.m","adc_rxsF0", output1[0],10*length,1,16);
//write_output("adc_rxsigF_frame1.m","adc_rxsF1", output2[0],10*length,1,16);
}
}
*/
void
adc_prach
(
double
*
r_re
[
2
],
double
*
r_im
[
2
],
unsigned
int
input_offset
,
unsigned
int
output_offset
,
unsigned
int
*
output
,
unsigned
int
*
*
output
,
unsigned
int
nb_rx_antennas
,
unsigned
int
length
,
unsigned
char
B
)
...
...
@@ -117,9 +117,13 @@ void adc_prach(double *r_re[2],
for
(
i
=
0
;
i
<
length
;
i
++
)
{
for
(
aa
=
0
;
aa
<
nb_rx_antennas
;
aa
++
)
{
((
short
*
)
output
)[((
i
+
output_offset
)
<<
1
)]
=
(
short
)(
r_re
[
aa
][
i
+
input_offset
]
*
gain
);
((
short
*
)
output
)[
1
+
((
i
+
output_offset
)
<<
1
)]
=
(
short
)(
r_im
[
aa
][
i
+
input_offset
]
*
gain
);
printf
(
"[adc_prach]i %d output (%d,%d)
\n
"
,
i
,((
short
*
)
output
)[((
i
+
output_offset
)
<<
1
)],((
short
*
)
output
)[
1
+
((
i
+
output_offset
)
<<
1
)]);
((
short
*
)
output
[
aa
])[((
i
+
output_offset
/
2
)
<<
1
)]
=
(
short
)(
r_re
[
aa
][
i
+
input_offset
]
*
gain
);
((
short
*
)
output
[
aa
])[
1
+
((
i
+
output_offset
/
2
)
<<
1
)]
=
(
short
)(
r_im
[
aa
][
i
+
input_offset
]
*
gain
);
#ifdef DEBUG_ADC
if
(
i
<
10
)
printf
(
"[adc_prach]i %d. input (%d,%d), output (%d,%d)
\n
"
,
i
,(
short
)(
r_re
[
aa
][
i
+
input_offset
]),(
short
)(
r_im
[
aa
][
i
+
input_offset
]),((
short
*
)
output
[
aa
])[((
i
+
output_offset
/
2
)
<<
1
)],((
short
*
)
output
[
aa
])[
1
+
((
i
+
output_offset
/
2
)
<<
1
)]);
if
(
i
>
length
-
10
&&
i
<
length
)
#endif
if
((
r_re
[
aa
][
i
+
input_offset
]
*
gain
)
>
30000
)
{
//("Adc outputs %d %e %d \n",i,((short *)output[0])[((i+output_offset)<<1)], ((i+output_offset)<<1) );
}
...
...
openair1/SIMULATION/RF/dac.c
View file @
59b0b394
...
...
@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
//#define DEBUG_DAC
1
//#define DEBUG_DAC
#include <math.h>
#include <stdio.h>
#include "PHY/TOOLS/defs.h"
...
...
@@ -165,13 +165,19 @@ double dac_fixed_gain_prach(double *s_re[2],
amp1 = amp1*sqrt(512.0/300.0); //account for loss due to null carriers
//printf("DL: amp1 %f dB (%d,%d), tx_power %f\n",20*log10(amp1),input_offset,input_offset_meas,txpwr_dBm);
*/
printf
(
"[dac_fixed_gain_prach] input_offset %d
\n
"
,
input_offset
);
#ifdef DEBUG_DAC
printf
(
"DAC: input_offset %d, amp %e, amp1 %e
\n
"
,
input_offset
,
amp
,
amp1
);
#endif
for
(
i
=
0
;
i
<
length
*
2
;
i
+=
2
)
{
for
(
aa
=
0
;
aa
<
nb_tx_antennas
;
aa
++
)
{
printf
(
"[dac_fixed_gain_prach] input (%d,%d)
\n
"
,(((
short
*
)
input
))[((
i
+
input_offset
))],(((
short
*
)
input
))[((
i
+
input_offset
))
+
1
]);
s_re
[
aa
][
i
/
2
]
=
amp
*
((
double
)(((
short
*
)
input
))[((
i
+
input_offset
))])
/
amp1
;
///(1<<(B-1));
s_im
[
aa
][
i
/
2
]
=
amp
*
((
double
)(((
short
*
)
input
))[((
i
+
input_offset
))
+
1
])
/
amp1
;
///(1<<(B-1));
#ifdef DEBUG_DAC
if
(
i
<
20
)
printf
(
"DAC[%d]: input (%d,%d). output (%e,%e)
\n
"
,
i
/
2
,(((
short
*
)
input
))[((
i
+
input_offset
))],(((
short
*
)
input
))[((
i
+
input_offset
))
+
1
],
s_re
[
aa
][
i
/
2
],
s_im
[
aa
][
i
/
2
]);
if
(
i
>
length
*
2
-
20
&&
i
<
length
*
2
)
printf
(
"DAC[%d]: input (%d,%d). output (%e,%e)
\n
"
,
i
/
2
,(((
short
*
)
input
))[((
i
+
input_offset
))],(((
short
*
)
input
))[((
i
+
input_offset
))
+
1
],
s_re
[
aa
][
i
/
2
],
s_im
[
aa
][
i
/
2
]);
#endif
}
}
...
...
openair1/SIMULATION/RF/defs.h
View file @
59b0b394
...
...
@@ -74,23 +74,11 @@ void adc(double *r_re[2],
unsigned
int
length
,
unsigned
char
B
);
void
adc_freq
(
double
*
r_re
[
2
],
double
*
r_im
[
2
],
unsigned
int
input_offset
,
unsigned
int
output_offset
,
unsigned
int
**
output1
,
//ue->current_thread_id[subframe]
unsigned
int
**
output2
,
//thread 0
unsigned
int
**
output3
,
//thread 1
unsigned
int
nb_rx_antennas
,
unsigned
int
length
,
unsigned
char
B
,
int
thread
);
void
adc_prach
(
double
*
r_re
[
2
],
double
*
r_im
[
2
],
unsigned
int
input_offset
,
unsigned
int
output_offset
,
unsigned
int
*
output
,
int
*
*
output
,
unsigned
int
nb_rx_antennas
,
unsigned
int
length
,
unsigned
char
B
);
...
...
openair1/SIMULATION/TOOLS/abstraction.c
View file @
59b0b394
...
...
@@ -181,8 +181,8 @@ int init_freq_channel_prach(channel_desc_t *desc,uint16_t nb_rb,int16_t n_sample
cos_lut
[
f1
][
l
]
=
cos
(
2
*
M_PI
*
freq
*
delay
);
sin_lut
[
f1
][
l
]
=
sin
(
2
*
M_PI
*
freq
*
delay
);
if
(
f
<
max_nb_rb_samples
/
2
-
prach_pbr_offset_samples
+
10
)
printf
(
"freq: %e, f1: %d, f: %d, arg_sin_cos = %e, cos () = %e, sin () =n %e)
\n
"
,
freq
,
f1
,
f
,
2
*
M_PI
*
freq
*
delay
,
cos_lut
[
f1
][
l
],
sin_lut
[
f1
][
l
]);
}
}
...
...
@@ -238,6 +238,7 @@ int freq_channel_prach(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples,int
}
}
}
if
(
f
<
10
||
(
f
>
829
&&
f
<
839
))
printf
(
"chF_prach[0][%d], (x,y) = (%e,%e)
\n
"
,
f
,
desc
->
chF_prach
[
0
][
f
].
x
,
desc
->
chF_prach
[
0
][
f
].
y
);
}
stop_meas
(
&
desc
->
interp_freq
);
...
...
openair1/SIMULATION/TOOLS/multipath_channel.c
View file @
59b0b394
...
...
@@ -359,7 +359,7 @@ void multipath_channel_prach(channel_desc_t *desc,
uint8_t
prach_ConfigIndex
=
PHY_vars_UE_g
[
UE_id
][
CC_id
]
->
frame_parms
.
prach_config_common
.
prach_ConfigInfo
.
prach_ConfigIndex
;
uint8_t
prach_fmt
=
get_prach_fmt
(
prach_ConfigIndex
,
frame_type
);
int
n_ra_prb
;
int
ii
,
j
,
k
,
f
,
l
;
int
ii
,
j
,
f
;
struct
complex
rx_tmp
;
double
delta_f
;
prach_samples
=
(
prach_fmt
<
4
)
?
13
+
839
+
12
:
3
+
139
+
2
;
...
...
@@ -399,5 +399,3 @@ void multipath_channel_prach(channel_desc_t *desc,
}
// ii
}
// f
}
targets/SIMU/USER/channel_sim.c
View file @
59b0b394
...
...
@@ -1029,7 +1029,7 @@ void do_UL_prach(channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX][MAX
int32_t
att_eNB_id
=-
1
;
#endif
uint8_t
UE_id
=
0
;
int16_t
*
rx_prachF
;
int16_t
*
*
rx_prachF
;
int16_t
*
tx_prachF
;
uint8_t
nb_antennas_rx
=
UE2eNB
[
0
][
0
][
CC_id
]
->
nb_rx
;
// number of rx antennas at eNB
uint8_t
nb_antennas_tx
=
UE2eNB
[
0
][
0
][
CC_id
]
->
nb_tx
;
// number of tx antennas at UE
...
...
@@ -1106,10 +1106,11 @@ void do_UL_prach(channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX][MAX
tx_prachF
=
PHY_vars_UE_g
[
UE_id
][
CC_id
]
->
prach_vars
[
eNB_id
]
->
prachF
;
//write_output("txprachF.m","prach_txF", PHY_vars_UE_g[0][0]->prach_vars[0]->prachF,frame_parms->ofdm_symbol_size*frame_parms->symbols_per_tti*12,1,1);
//sf_offset = subframe*frame_parms->ofdm_symbol_size*frame_parms->symbols_per_tti*12;
//for (int idx=0;idx<10;idx++) printf("dumping DL raw subframe %d: txdataF[%d] = (%d,%d)\n", subframe, idx, ((short*)&txdataF[0][sf_offset+idx])[0], ((short*)&txdataF[0][sf_offset+idx])[1]);
pointer_firstvalue_PRACH
=
((
12
*
n_ra_prb
)
-
6
*
PHY_vars_UE_g
[
UE_id
][
CC_id
]
->
frame_parms
.
N_RB_UL
<
0
)
?
(((
12
*
n_ra_prb
)
-
6
*
PHY_vars_UE_g
[
UE_id
][
CC_id
]
->
frame_parms
.
N_RB_UL
+
PHY_vars_UE_g
[
UE_id
][
CC_id
]
->
frame_parms
.
ofdm_symbol_size
)
*
12
+
13
)
*
2
:
(((
12
*
n_ra_prb
)
-
6
*
PHY_vars_UE_g
[
UE_id
][
CC_id
]
->
frame_parms
.
N_RB_UL
)
*
12
+
13
)
*
2
;
sf_offset
=
pointer_firstvalue_PRACH
;
for
(
int
idx
=
pointer_firstvalue_PRACH
;
idx
<
pointer_firstvalue_PRACH
+
20
;
idx
+=
2
)
printf
(
"dumping PRACH UL raw, subframe %d: ue->prachF[%d] = (%d,%d)
\n
"
,
subframe
,
idx
/
2
,
(
short
)
tx_prachF
[
idx
],
(
short
)
tx_prachF
[
idx
+
1
]);
...
...
@@ -1137,6 +1138,8 @@ void do_UL_prach(channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX][MAX
14
,
(
double
)
PHY_vars_UE_g
[
UE_id
][
CC_id
]
->
tx_power_dBm
[
subframe
]
-
10
*
log10
((
double
)
PHY_vars_UE_g
[
UE_id
][
CC_id
]
->
tx_total_RE
[
subframe
]),
PHY_vars_UE_g
[
UE_id
][
CC_id
]
->
tx_total_RE
[
subframe
]);
// This make the previous argument the total power
for
(
int
idx
=
0
;
idx
<
10
;
idx
++
)
printf
(
"dumping raw PRACH UL tx subframe (input) %d: s_f[%d] = (%f,%f)
\n
"
,
subframe
,
idx
,
s_re_f_prach
[
0
][
idx
],
s_im_f_prach
[
0
][
idx
]);
for
(
int
idx
=
829
;
idx
<
839
;
idx
++
)
printf
(
"dumping raw PRACH UL tx subframe (input) %d: s_f[%d] = (%f,%f)
\n
"
,
subframe
,
idx
,
s_re_f_prach
[
0
][
idx
],
s_im_f_prach
[
0
][
idx
]);
LOG_D
(
OCM
,
"[SIM][UL] UE %d tx_pwr %f dBm (target %d dBm, num_RE %d) for subframe %d (sf_offset %d)
\n
"
,
UE_id
,
10
*
log10
(
tx_pwr
),
...
...
@@ -1147,8 +1150,6 @@ void do_UL_prach(channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX][MAX
// write_output("s_re_f_prach.m","s_re_f_prach_txF", s_re_f_prach,frame_parms->ofdm_symbol_size*12,1,1);
multipath_channel_prach
(
UE2eNB
[
UE_id
][
eNB_id
][
CC_id
],
s_re_f_prach
,
s_im_f_prach
,
r_re0_f_prach
,
r_im0_f_prach
,
frame_parms
->
ofdm_symbol_size
*
frame_parms
->
symbols_per_tti
*
12
,
hold_channel
,
eNB_id
,
UE_id
,
CC_id
,
subframe
&
0x1
,
subframe
);
for
(
int
idx
=
0
;
idx
<
10
;
idx
++
)
printf
(
"dumping raw PRACH UL tx subframe (input) %d: s_f[%d] = (%f,%f)
\n
"
,
subframe
,
idx
,
s_re_f_prach
[
0
][
idx
],
s_im_f_prach
[
0
][
idx
]);
for
(
int
idx
=
829
;
idx
<
839
;
idx
++
)
printf
(
"dumping raw PRACH UL tx subframe (input) %d: s_f[%d] = (%f,%f)
\n
"
,
subframe
,
idx
,
s_re_f_prach
[
0
][
idx
],
s_im_f_prach
[
0
][
idx
]);
for
(
int
idx
=
0
;
idx
<
10
;
idx
++
)
printf
(
"dumping raw PRACH UL tx subframe (output) %d: r_f[%d] = (%f,%f)
\n
"
,
subframe
,
idx
,
r_re0_f_prach
[
0
][
idx
],
r_im0_f_prach
[
0
][
idx
]);
for
(
int
idx
=
829
;
idx
<
839
;
idx
++
)
printf
(
"dumping raw PRACH UL tx subframe (output) %d: r_f[%d] = (%f,%f)
\n
"
,
subframe
,
idx
,
r_re0_f_prach
[
0
][
idx
],
r_im0_f_prach
[
0
][
idx
]);
//write_output("txprachF.m","prach_txF", PHY_vars_UE_g[0][0]->prach_vars[0]->prachF,frame_parms->ofdm_symbol_size*frame_parms->symbols_per_tti,1,1);
...
...
@@ -1163,12 +1164,12 @@ void do_UL_prach(channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX][MAX
#ifdef DEBUG_SIM
for
(
i
=
0
;
i
<
864
;
i
++
)
LOG_D
(
OCM
,
"do_UL_prach channel(%d,%d)[%d] : (%f,%f)
\n
"
,
UE_id
,
eNB_id
,
i
,
UE2eNB
[
UE_id
][
eNB_id
][
CC_id
]
->
ch
[
0
][
i
].
x
,
UE2eNB
[
UE_id
][
eNB_id
][
CC_id
]
->
ch
[
0
][
i
].
y
);
LOG_D
(
OCM
,
"do_UL_prach channel(%d,%d)[%d] : (%f,%f)
\n
"
,
UE_id
,
eNB_id
,
i
,
UE2eNB
[
UE_id
][
eNB_id
][
CC_id
]
->
ch
F_prach
[
0
][
i
].
x
,
UE2eNB
[
UE_id
][
eNB_id
][
CC_id
]
->
chF_pra
ch
[
0
][
i
].
y
);
#endif
//
for (i=0; i<864; i++){
// LOG_D(OCM,"channel_prach(%d,%d)[%d] : (%f,%f)\n",eNB_id,UE_id,i,UE2eNB[UE_id][eNB_id][CC_id]->chF[0][i].x,UE2eNB[UE_id][eNB_id][CC_id]->chF
[0][i].y);
//
}
for
(
i
=
0
;
i
<
864
;
i
++
){
LOG_D
(
OCM
,
"channel_prach(%d,%d)[%d] : (%f,%f)
\n
"
,
eNB_id
,
UE_id
,
i
,
UE2eNB
[
UE_id
][
eNB_id
][
CC_id
]
->
chF_prach
[
0
][
i
].
x
,
UE2eNB
[
UE_id
][
eNB_id
][
CC_id
]
->
chF_prach
[
0
][
i
].
y
);
}
if
(
UE2eNB
[
UE_id
][
eNB_id
][
CC_id
]
->
first_run
==
1
)
UE2eNB
[
UE_id
][
eNB_id
][
CC_id
]
->
first_run
=
0
;
...
...
@@ -1186,7 +1187,8 @@ void do_UL_prach(channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX][MAX
double
*
r_re_p_f_prach
[
2
]
=
{
r_re_UL_f_prach
[
eNB_id
][
0
],
r_re_UL_f_prach
[
eNB_id
][
1
]};
double
*
r_im_p_f_prach
[
2
]
=
{
r_im_UL_f_prach
[
eNB_id
][
0
],
r_im_UL_f_prach
[
eNB_id
][
1
]};
for
(
int
idx
=
0
;
idx
<
10
;
idx
++
)
printf
(
"dumping raw PRACH UL tx subframe (output) %d: r_re_im_p_f_prach[%d] = (%d,%d)
\n
"
,
subframe
,
idx
,
(
short
)(
r_re_p_f_prach
[
0
][
idx
]),(
short
)(
r_im_p_f_prach
[
0
][
idx
]));
for
(
int
idx
=
829
;
idx
<
839
;
idx
++
)
printf
(
"dumping raw PRACH UL tx subframe (output) %d: r_re_im_p_f_prach[%d] = (%d,%d)
\n
"
,
subframe
,
idx
,
(
short
)(
r_re_p_f_prach
[
0
][
idx
]),(
short
)(
r_im_p_f_prach
[
0
][
idx
]));
rf_rx_simple
(
r_re_p_f_prach
,
r_im_p_f_prach
,
nb_antennas_rx
,
...
...
@@ -1201,17 +1203,17 @@ void do_UL_prach(channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX][MAX
LOG_D
(
OCM
,
"[SIM][UL] rx_pwr (ADC in) %f dB for subframe %d
\n
"
,
10
*
log10
(
rx_pwr
),
subframe
);
#endif
rx_prachF
=
PHY_vars_eNB_g
[
eNB_id
][
CC_id
]
->
prach_vars
.
prach
F
;
//sf_offset = subframe*frame_parms->ofdm_symbol_size*frame_parms->symbols_per_tti*12
;
rx_prachF
=
PHY_vars_eNB_g
[
eNB_id
][
CC_id
]
->
prach_vars
.
rxsig
F
;
sf_offset
=
pointer_firstvalue_PRACH
;
adc_prach
(
r_re_p_f_prach
,
r_im_p_f_prach
,
0
,
0
,
(
unsigned
int
*
)
rx_prachF
,
sf_offset
,
(
int
*
*
)
rx_prachF
,
nb_antennas_rx
,
(
prach_fmt
<
4
)
?
839
:
139
,
12
);
write_output
(
"
rxprachF.m"
,
"prach_rxF"
,
PHY_vars_eNB_g
[
eNB_id
][
CC_id
]
->
prach_vars
.
prachF
,
4
*
frame_parms
->
ofdm_symbol_size
*
frame_parms
->
symbols_per_tti
,
1
,
16
);
write_output
(
"
chsim_rxsigF.m"
,
"chsim_rx_sigF"
,
PHY_vars_eNB_g
[
eNB_id
][
CC_id
]
->
prach_vars
.
rxsigF
[
0
]
,
4
*
frame_parms
->
ofdm_symbol_size
*
frame_parms
->
symbols_per_tti
,
1
,
16
);
#ifdef DEBUG_SIM
//rx_pwr2 = signal_energy(rxdataF[0]+sf_offset,subframe*frame_parms->ofdm_symbol_size*frame_parms->symbols_per_tti)*(double)frame_parms->ofdm_symbol_size/(12.0*frame_parms->N_RB_DL);
...
...
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