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
4c2c1a36
Commit
4c2c1a36
authored
Jul 31, 2017
by
tct-labo4
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix dlsim
parent
96db5ea5
Changes
7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
369 additions
and
349 deletions
+369
-349
openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
+3
-2
openair1/PHY/LTE_TRANSPORT/proto.h
openair1/PHY/LTE_TRANSPORT/proto.h
+0
-1
openair1/PHY/defs.h
openair1/PHY/defs.h
+3
-2
openair1/SCHED/phy_procedures_lte_ue.c
openair1/SCHED/phy_procedures_lte_ue.c
+5
-6
openair1/SIMULATION/LTE_PHY/dlsim.c
openair1/SIMULATION/LTE_PHY/dlsim.c
+16
-14
openair1/SIMULATION/LTE_PHY/dlsim_tm4.c
openair1/SIMULATION/LTE_PHY/dlsim_tm4.c
+239
-229
openair1/SIMULATION/LTE_PHY/dlsim_tm7.c
openair1/SIMULATION/LTE_PHY/dlsim_tm7.c
+103
-95
No files found.
openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c
View file @
4c2c1a36
...
...
@@ -89,7 +89,6 @@ extern void print_shorts(char *s,int16_t *x);
int
rx_pdsch
(
PHY_VARS_UE
*
ue
,
UE_rxtx_proc_t
*
proc
,
PDSCH_t
type
,
unsigned
char
eNB_id
,
unsigned
char
eNB_id_i
,
//if this == ue->n_connected_eNB, we assume MU interference
...
...
@@ -519,15 +518,17 @@ int rx_pdsch(PHY_VARS_UE *ue,
#endif
//wait until pdcch is decoded
proc
->
channel_level
=
1
;
//
proc->channel_level = 1;
}
/*
uint32_t wait = 0;
while(proc->channel_level == 0)
{
usleep(1);
wait++;
}
*/
#if T_TRACER
if
(
type
==
PDSCH
)
...
...
openair1/PHY/LTE_TRANSPORT/proto.h
View file @
4c2c1a36
...
...
@@ -1348,7 +1348,6 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
@param i_mod Modulation order of the interfering stream
*/
int32_t
rx_pdsch
(
PHY_VARS_UE
*
phy_vars_ue
,
UE_rxtx_proc_t
*
proc
,
PDSCH_t
type
,
uint8_t
eNB_id
,
uint8_t
eNB_id_i
,
...
...
openair1/PHY/defs.h
View file @
4c2c1a36
...
...
@@ -418,7 +418,7 @@ typedef struct {
uint8_t
llr_slot1_available
;
uint8_t
dci_slot0_available
;
uint8_t
first_symbol_available
;
uint8_t
channel_level
;
//
uint8_t channel_level;
/// scheduling parameters for fep_slot1 thread
struct
sched_param
sched_param_fep_slot1
;
...
...
@@ -940,7 +940,8 @@ typedef struct {
time_stats_t
dlsch_rate_unmatching_stats
;
time_stats_t
dlsch_turbo_decoding_stats
;
time_stats_t
dlsch_deinterleaving_stats
;
time_stats_t
dlsch_llr_stats
[
RX_NB_TH
][
LTE_SLOTS_PER_SUBFRAME
];
time_stats_t
dlsch_llr_stats
;
time_stats_t
dlsch_llr_stats_parallelization
[
RX_NB_TH
][
LTE_SLOTS_PER_SUBFRAME
];
time_stats_t
dlsch_unscrambling_stats
;
time_stats_t
dlsch_rate_matching_stats
;
time_stats_t
dlsch_turbo_encoding_stats
;
...
...
openair1/SCHED/phy_procedures_lte_ue.c
View file @
4c2c1a36
...
...
@@ -3721,11 +3721,10 @@ void ue_pdsch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, int eNB_id, PDSC
uint8_t
slot
=
0
;
if
(
m
>=
ue
->
frame_parms
.
symbols_per_tti
>>
1
)
slot
=
1
;
start_meas
(
&
ue
->
dlsch_llr_stats
[
ue
->
current_thread_id
[
subframe_rx
]][
slot
]);
start_meas
(
&
ue
->
dlsch_llr_stats
_parallelization
[
ue
->
current_thread_id
[
subframe_rx
]][
slot
]);
#endif
// process DLSCH received in first slot
rx_pdsch
(
ue
,
proc
,
pdsch
,
eNB_id
,
eNB_id_i
,
...
...
@@ -3737,11 +3736,11 @@ void ue_pdsch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, int eNB_id, PDSC
i_mod
,
dlsch0
->
current_harq_pid
);
#if UE_TIMING_TRACE
stop_meas
(
&
ue
->
dlsch_llr_stats
[
ue
->
current_thread_id
[
subframe_rx
]][
slot
]);
stop_meas
(
&
ue
->
dlsch_llr_stats
_parallelization
[
ue
->
current_thread_id
[
subframe_rx
]][
slot
]);
#if DISABLE_LOG_X
printf
(
"[AbsSFN %d.%d] LLR Computation Symbol %d %5.2f
\n
"
,
proc
->
frame_rx
,
subframe_rx
,
m
,
ue
->
dlsch_llr_stats
[
ue
->
current_thread_id
[
subframe_rx
]][
slot
].
p_time
/
(
cpuf
*
1000
.
0
));
printf
(
"[AbsSFN %d.%d] LLR Computation Symbol %d %5.2f
\n
"
,
proc
->
frame_rx
,
subframe_rx
,
m
,
ue
->
dlsch_llr_stats
_parallelization
[
ue
->
current_thread_id
[
subframe_rx
]][
slot
].
p_time
/
(
cpuf
*
1000
.
0
));
#else
LOG_D
(
PHY
,
"[AbsSFN %d.%d] LLR Computation Symbol %d %5.2f
\n
"
,
proc
->
frame_rx
,
subframe_rx
,
m
,
ue
->
dlsch_llr_stats
[
ue
->
current_thread_id
[
subframe_rx
]][
slot
].
p_time
/
(
cpuf
*
1000
.
0
));
LOG_D
(
PHY
,
"[AbsSFN %d.%d] LLR Computation Symbol %d %5.2f
\n
"
,
proc
->
frame_rx
,
subframe_rx
,
m
,
ue
->
dlsch_llr_stats
_parallelization
[
ue
->
current_thread_id
[
subframe_rx
]][
slot
].
p_time
/
(
cpuf
*
1000
.
0
));
#endif
#endif
...
...
@@ -4622,7 +4621,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
proc
->
dci_slot0_available
=
0
;
proc
->
first_symbol_available
=
0
;
proc
->
chan_est_slot1_available
=
0
;
proc
->
channel_level
=
0
;
//
proc->channel_level=0;
if
(
pthread_mutex_lock
(
&
proc
->
mutex_slot1_dl_processing
)
!=
0
)
{
LOG_E
(
PHY
,
"[SCHED][UE %d][Slot0] error locking mutex for UE slot1 dl processing
\n
"
,
ue
->
Mod_id
);
...
...
openair1/SIMULATION/LTE_PHY/dlsim.c
View file @
4c2c1a36
...
...
@@ -2263,7 +2263,7 @@ int main(int argc, char **argv)
}
for
(
SNR
=
snr0
;
SNR
<
snr1
;
SNR
+=
snr_step
)
{
UE
->
proc
.
proc_rxtx
[
subframe
&
1
].
frame_rx
=
0
;
UE
->
proc
.
proc_rxtx
[
UE
->
current_thread_id
[
subframe
]
].
frame_rx
=
0
;
errs
[
0
]
=
0
;
errs
[
1
]
=
0
;
errs
[
2
]
=
0
;
...
...
@@ -2332,7 +2332,7 @@ int main(int argc, char **argv)
struct
list
time_vector_rx_dec
;
initialize
(
&
time_vector_rx_dec
);
eNB_rxtx_proc_t
*
proc_eNB
=
&
eNB
->
proc
.
proc_rxtx
[
subframe
&
1
];
eNB_rxtx_proc_t
*
proc_eNB
=
&
eNB
->
proc
.
proc_rxtx
[
UE
->
current_thread_id
[
subframe
]
];
for
(
trials
=
0
;
trials
<
n_frames
;
trials
++
)
{
//printf("Trial %d\n",trials);
...
...
@@ -2517,7 +2517,7 @@ int main(int argc, char **argv)
DL_channel
(
eNB
,
UE
,
subframe
,
awgn_flag
,
SNR
,
tx_lev
,
hold_channel
,
abstx
,
num_rounds
,
trials
,
round
,
eNB2UE
,
s_re
,
s_im
,
r_re
,
r_im
,
csv_fd
);
UE_rxtx_proc_t
*
proc
=
&
UE
->
proc
.
proc_rxtx
[
subframe
&
1
];
UE_rxtx_proc_t
*
proc
=
&
UE
->
proc
.
proc_rxtx
[
UE
->
current_thread_id
[
subframe
]
];
proc
->
subframe_rx
=
subframe
;
UE
->
UE_mode
[
0
]
=
PUSCH
;
...
...
@@ -2539,7 +2539,9 @@ int main(int argc, char **argv)
(
void
*
)
&
dci_alloc
[
0
].
dci_pdu
,
n_rnti
,
dci_alloc
[
0
].
format
,
UE
->
dlsch
[
proc
->
subframe_rx
&
0x1
][
eNB_id
],
UE
->
pdcch_vars
[
UE
->
current_thread_id
[
proc
->
subframe_rx
]][
eNB_id
],
UE
->
pdsch_vars
[
UE
->
current_thread_id
[
proc
->
subframe_rx
]][
eNB_id
],
UE
->
dlsch
[
UE
->
current_thread_id
[
proc
->
subframe_rx
]][
0
],
&
UE
->
frame_parms
,
UE
->
pdsch_config_dedicated
,
SI_RNTI
,
...
...
@@ -2756,7 +2758,7 @@ int main(int argc, char **argv)
subframe
);
}
UE
->
proc
.
proc_rxtx
[
subframe
&
1
].
frame_rx
++
;
UE
->
proc
.
proc_rxtx
[
UE
->
current_thread_id
[
subframe
]
].
frame_rx
++
;
}
//round
// printf("\n");
...
...
@@ -2767,7 +2769,7 @@ int main(int argc, char **argv)
//len = chbch_stats_read(stats_buffer,NULL,0,4096);
//printf("%s\n\n",stats_buffer);
if
(
UE
->
proc
.
proc_rxtx
[
subframe
&
1
].
frame_rx
%
10
==
0
)
{
if
(
UE
->
proc
.
proc_rxtx
[
UE
->
current_thread_id
[
subframe
]
].
frame_rx
%
10
==
0
)
{
UE
->
bitrate
[
eNB_id
]
=
(
UE
->
total_TBS
[
eNB_id
]
-
UE
->
total_TBS_last
[
eNB_id
])
*
10
;
LOG_D
(
PHY
,
"[UE %d] Calculating bitrate: total_TBS = %d, total_TBS_last = %d, bitrate = %d kbits/s
\n
"
,
UE
->
Mod_id
,
UE
->
total_TBS
[
eNB_id
],
UE
->
total_TBS_last
[
eNB_id
],
UE
->
bitrate
[
eNB_id
]
/
1000
);
...
...
@@ -2789,7 +2791,7 @@ int main(int argc, char **argv)
double
t_rx
=
(
double
)
UE
->
phy_proc_rx
[
subframe
&
0x1
].
p_time
/
cpu_freq_GHz
/
1000
.
0
;
double
t_rx_fft
=
(
double
)
UE
->
ofdm_demod_stats
.
p_time
/
cpu_freq_GHz
/
1000
.
0
;
double
t_rx_demod
=
(
double
)
UE
->
dlsch_rx_pdcch_stats
.
p_time
/
cpu_freq_GHz
/
1000
.
0
;
double
t_rx_dec
=
(
double
)
UE
->
dlsch_decoding_stats
[
subframe
&
1
].
p_time
/
cpu_freq_GHz
/
1000
.
0
;
double
t_rx_dec
=
(
double
)
UE
->
dlsch_decoding_stats
[
UE
->
current_thread_id
[
subframe
]
].
p_time
/
cpu_freq_GHz
/
1000
.
0
;
if
(
t_tx
>
t_tx_max
)
t_tx_max
=
t_tx
;
...
...
@@ -3002,12 +3004,12 @@ int main(int argc, char **argv)
printf
(
"|__ Statistcs std: %fus median %fus q1 %fus q3 %fus
\n
"
,
std_phy_proc_rx_demod
,
rx_demod_median
,
rx_demod_q1
,
rx_demod_q3
);
printf
(
"DLSCH unscrambling time :%f us (%d trials)
\n
"
,(
double
)
UE
->
dlsch_unscrambling_stats
.
diff
/
UE
->
dlsch_unscrambling_stats
.
trials
/
cpu_freq_GHz
/
1000
.
0
,
UE
->
dlsch_unscrambling_stats
.
trials
);
std_phy_proc_rx_dec
=
sqrt
((
double
)
UE
->
dlsch_decoding_stats
[
subframe
&
1
].
diff_square
/
pow
(
cpu_freq_GHz
,
2
)
/
pow
(
1000
,
2
)
/
UE
->
dlsch_decoding_stats
[
subframe
&
1
].
trials
-
pow
((
double
)
UE
->
dlsch_decoding_stats
[
subframe
&
1
].
diff
/
UE
->
dlsch_decoding_stats
[
subframe
&
1
].
trials
/
cpu_freq_GHz
/
1000
,
2
));
std_phy_proc_rx_dec
=
sqrt
((
double
)
UE
->
dlsch_decoding_stats
[
UE
->
current_thread_id
[
subframe
]
].
diff_square
/
pow
(
cpu_freq_GHz
,
2
)
/
pow
(
1000
,
2
)
/
UE
->
dlsch_decoding_stats
[
UE
->
current_thread_id
[
subframe
]].
trials
-
pow
((
double
)
UE
->
dlsch_decoding_stats
[
UE
->
current_thread_id
[
subframe
]].
diff
/
UE
->
dlsch_decoding_stats
[
UE
->
current_thread_id
[
subframe
]
].
trials
/
cpu_freq_GHz
/
1000
,
2
));
printf
(
"DLSCH Decoding time (%02.2f Mbit/s, avg iter %1.2f) :%f us (%d trials, max %f)
\n
"
,
eNB
->
dlsch
[
0
][
0
]
->
harq_processes
[
0
]
->
TBS
/
1000
.
0
,(
double
)
avg_iter
/
iter_trials
,
(
double
)
UE
->
dlsch_decoding_stats
[
subframe
&
1
].
diff
/
UE
->
dlsch_decoding_stats
[
subframe
&
1
].
trials
/
cpu_freq_GHz
/
1000
.
0
,
UE
->
dlsch_decoding_stats
[
subframe
&
1
].
trials
,
(
double
)
UE
->
dlsch_decoding_stats
[
subframe
&
1
].
max
/
cpu_freq_GHz
/
1000
.
0
);
(
double
)
UE
->
dlsch_decoding_stats
[
UE
->
current_thread_id
[
subframe
]].
diff
/
UE
->
dlsch_decoding_stats
[
UE
->
current_thread_id
[
subframe
]].
trials
/
cpu_freq_GHz
/
1000
.
0
,
UE
->
dlsch_decoding_stats
[
UE
->
current_thread_id
[
subframe
]
].
trials
,
(
double
)
UE
->
dlsch_decoding_stats
[
UE
->
current_thread_id
[
subframe
]
].
max
/
cpu_freq_GHz
/
1000
.
0
);
printf
(
"|__ Statistcs std: %fus median %fus q1 %fus q3 %fus
\n
"
,
std_phy_proc_rx_dec
,
rx_dec_median
,
rx_dec_q1
,
rx_dec_q3
);
printf
(
"|__ DLSCH Rate Unmatching :%f us (%d trials)
\n
"
,
(
double
)
UE
->
dlsch_rate_unmatching_stats
.
diff
/
UE
->
dlsch_rate_unmatching_stats
.
trials
/
cpu_freq_GHz
/
1000
.
0
,
UE
->
dlsch_rate_unmatching_stats
.
trials
);
...
...
@@ -3195,7 +3197,7 @@ int main(int argc, char **argv)
UE
->
dlsch_rx_pdcch_stats
.
trials
,
UE
->
dlsch_llr_stats
.
trials
,
UE
->
dlsch_unscrambling_stats
.
trials
,
UE
->
dlsch_decoding_stats
[
subframe
&
1
].
trials
UE
->
dlsch_decoding_stats
[
UE
->
current_thread_id
[
subframe
]
].
trials
);
fprintf
(
time_meas_fd
,
"%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;"
,
get_time_meas_us
(
&
eNB
->
phy_proc_tx
),
...
...
@@ -3208,7 +3210,7 @@ int main(int argc, char **argv)
get_time_meas_us
(
&
UE
->
dlsch_rx_pdcch_stats
),
3
*
get_time_meas_us
(
&
UE
->
dlsch_llr_stats
),
get_time_meas_us
(
&
UE
->
dlsch_unscrambling_stats
),
get_time_meas_us
(
&
UE
->
dlsch_decoding_stats
[
subframe
&
1
])
get_time_meas_us
(
&
UE
->
dlsch_decoding_stats
[
UE
->
current_thread_id
[
subframe
]
])
);
//fprintf(time_meas_fd,"eNB_PROC_TX_STD;eNB_PROC_TX_MAX;eNB_PROC_TX_MIN;eNB_PROC_TX_MED;eNB_PROC_TX_Q1;eNB_PROC_TX_Q3;eNB_PROC_TX_DROPPED;\n");
fprintf
(
time_meas_fd
,
"%f;%f;%f;%f;%f;%f;%d;"
,
std_phy_proc_tx
,
t_tx_max
,
t_tx_min
,
tx_median
,
tx_q1
,
tx_q3
,
n_tx_dropped
);
...
...
@@ -3248,7 +3250,7 @@ int main(int argc, char **argv)
UE->dlsch_rx_pdcch_stats.trials,
UE->dlsch_llr_stats.trials,
UE->dlsch_unscrambling_stats.trials,
UE->dlsch_decoding_stats[
subframe&1
].trials);
UE->dlsch_decoding_stats[
UE->current_thread_id[subframe]
].trials);
*/
printf
(
"[passed] effective rate : %f (%2.1f%%,%f)): log and break
\n
"
,
rate
*
effective_rate
,
100
*
effective_rate
,
rate
);
test_passed
=
1
;
...
...
openair1/SIMULATION/LTE_PHY/dlsim_tm4.c
View file @
4c2c1a36
This diff is collapsed.
Click to expand it.
openair1/SIMULATION/LTE_PHY/dlsim_tm7.c
View file @
4c2c1a36
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