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
zzha zzha
OpenXG-RAN
Commits
1ada5382
Commit
1ada5382
authored
Mar 31, 2020
by
Francesco Mani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ulsch rx measurements in dlsim
parent
6f001d3e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
85 additions
and
49 deletions
+85
-49
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
+11
-21
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
+8
-3
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
+10
-7
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+10
-9
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+4
-2
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+1
-1
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+41
-6
No files found.
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
View file @
1ada5382
...
@@ -458,9 +458,8 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
...
@@ -458,9 +458,8 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
for
(
r
=
0
;
r
<
harq_process
->
C
;
r
++
)
{
for
(
r
=
0
;
r
<
harq_process
->
C
;
r
++
)
{
E
=
nr_get_E
(
G
,
harq_process
->
C
,
Qm
,
n_layers
,
r
);
E
=
nr_get_E
(
G
,
harq_process
->
C
,
Qm
,
n_layers
,
r
);
#if gNB_TIMING_TRACE
start_meas
(
ulsch_deinterleaving_stats
);
start_meas
(
&
phy_vars_gNB
->
ulsch_deinterleaving_stats
);
#endif
////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////// nr_deinterleaving_ldpc ///////////////////////////////////
///////////////////////////////// nr_deinterleaving_ldpc ///////////////////////////////////
...
@@ -476,13 +475,8 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
...
@@ -476,13 +475,8 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
//for (int i =0; i<16; i++)
//for (int i =0; i<16; i++)
// printf("rx output deinterleaving w[%d]= %d r_offset %d\n", i,harq_process->w[r][i], r_offset);
// printf("rx output deinterleaving w[%d]= %d r_offset %d\n", i,harq_process->w[r][i], r_offset);
#if gNB_TIMING_TRACE
stop_meas
(
&
phy_vars_gNB
->
ulsch_deinterleaving_stats
);
stop_meas
(
ulsch_deinterleaving_stats
);
#endif
#if gNB_TIMING_TRACE
start_meas
(
ulsch_rate_unmatching_stats
);
#endif
#ifdef DEBUG_ULSCH_DECODING
#ifdef DEBUG_ULSCH_DECODING
LOG_D
(
PHY
,
"HARQ_PID %d Rate Matching Segment %d (coded bits %d,unpunctured/repeated bits %d, TBS %d, mod_order %d, nb_rb %d, Nl %d, rv %d, round %d)...
\n
"
,
LOG_D
(
PHY
,
"HARQ_PID %d Rate Matching Segment %d (coded bits %d,unpunctured/repeated bits %d, TBS %d, mod_order %d, nb_rb %d, Nl %d, rv %d, round %d)...
\n
"
,
...
@@ -504,6 +498,8 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
...
@@ -504,6 +498,8 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
///////////////////////// harq_process->e =====> harq_process->d /////////////////////////
///////////////////////// harq_process->e =====> harq_process->d /////////////////////////
start_meas
(
&
phy_vars_gNB
->
ulsch_rate_unmatching_stats
);
Tbslbrm
=
nr_compute_tbslbrm
(
0
,
nb_rb
,
n_layers
,
harq_process
->
C
);
Tbslbrm
=
nr_compute_tbslbrm
(
0
,
nb_rb
,
n_layers
,
harq_process
->
C
);
if
(
nr_rate_matching_ldpc_rx
(
Ilbrm
,
if
(
nr_rate_matching_ldpc_rx
(
Ilbrm
,
...
@@ -518,15 +514,13 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
...
@@ -518,15 +514,13 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
E
,
E
,
harq_process
->
F
,
harq_process
->
F
,
Kr
-
harq_process
->
F
-
2
*
(
p_decParams
->
Z
))
==-
1
)
{
Kr
-
harq_process
->
F
-
2
*
(
p_decParams
->
Z
))
==-
1
)
{
#if gNB_TIMING_TRACE
stop_meas
(
ulsch_rate_unmatching_stats
);
stop_meas
(
&
phy_vars_gNB
->
ulsch_rate_unmatching_stats
);
#endif
LOG_E
(
PHY
,
"ulsch_decoding.c: Problem in rate_matching
\n
"
);
LOG_E
(
PHY
,
"ulsch_decoding.c: Problem in rate_matching
\n
"
);
return
(
ulsch
->
max_ldpc_iterations
+
1
);
return
(
ulsch
->
max_ldpc_iterations
+
1
);
}
else
{
}
else
{
#if gNB_TIMING_TRACE
stop_meas
(
&
phy_vars_gNB
->
ulsch_rate_unmatching_stats
);
stop_meas
(
ulsch_rate_unmatching_stats
);
#endif
}
}
r_offset
+=
E
;
r_offset
+=
E
;
...
@@ -564,9 +558,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
...
@@ -564,9 +558,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
if
(
err_flag
==
0
)
{
if
(
err_flag
==
0
)
{
#if gNB_TIMING_TRACE
start_meas
(
&
phy_vars_gNB
->
ulsch_ldpc_decoding_stats
);
start_meas
(
ulsch_turbo_decoding_stats
);
#endif
//LOG_E(PHY,"AbsSubframe %d.%d Start LDPC segment %d/%d A %d ",frame%1024,nr_tti_rx,r,harq_process->C-1, A);
//LOG_E(PHY,"AbsSubframe %d.%d Start LDPC segment %d/%d A %d ",frame%1024,nr_tti_rx,r,harq_process->C-1, A);
...
@@ -636,9 +628,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
...
@@ -636,9 +628,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
//write_output("dec_output.m","dec0",harq_process->c[0],Kr_bytes,1,4);
//write_output("dec_output.m","dec0",harq_process->c[0],Kr_bytes,1,4);
#endif
#endif
#if gNB_TIMING_TRACE
stop_meas
(
&
phy_vars_gNB
->
ulsch_ldpc_decoding_stats
);
stop_meas
(
ulsch_turbo_decoding_stats
);
#endif
}
}
if
((
err_flag
==
0
)
&&
(
ret
>=
(
ulsch
->
max_ldpc_iterations
+
1
)))
{
if
((
err_flag
==
0
)
&&
(
ret
>=
(
ulsch
->
max_ldpc_iterations
+
1
)))
{
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
View file @
1ada5382
...
@@ -1093,7 +1093,7 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
...
@@ -1093,7 +1093,7 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
//----------------------------------------------------------
//----------------------------------------------------------
//--------------------- Channel estimation ---------------------
//--------------------- Channel estimation ---------------------
//----------------------------------------------------------
//----------------------------------------------------------
start_meas
(
&
gNB
->
ulsch_channel_estimation_stats
);
if
(
dmrs_symbol_flag
==
1
)
if
(
dmrs_symbol_flag
==
1
)
nr_pusch_channel_estimation
(
gNB
,
nr_pusch_channel_estimation
(
gNB
,
nr_tti_rx
,
nr_tti_rx
,
...
@@ -1101,17 +1101,19 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
...
@@ -1101,17 +1101,19 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
symbol
,
symbol
,
bwp_start_subcarrier
,
bwp_start_subcarrier
,
rel15_ul
);
rel15_ul
);
stop_meas
(
&
gNB
->
ulsch_channel_estimation_stats
);
//----------------------------------------------------------
//----------------------------------------------------------
//--------------------- RBs extraction ---------------------
//--------------------- RBs extraction ---------------------
//----------------------------------------------------------
//----------------------------------------------------------
start_meas
(
&
gNB
->
ulsch_rbs_extraction_stats
);
nr_ulsch_extract_rbs_single
(
gNB
->
common_vars
.
rxdataF
,
nr_ulsch_extract_rbs_single
(
gNB
->
common_vars
.
rxdataF
,
gNB
->
pusch_vars
[
UE_id
],
gNB
->
pusch_vars
[
UE_id
],
symbol
,
symbol
,
dmrs_symbol_flag
,
dmrs_symbol_flag
,
rel15_ul
,
rel15_ul
,
frame_parms
);
frame_parms
);
stop_meas
(
&
gNB
->
ulsch_rbs_extraction_stats
);
nr_ulsch_scale_channel
(
gNB
->
pusch_vars
[
UE_id
]
->
ul_ch_estimates_ext
,
nr_ulsch_scale_channel
(
gNB
->
pusch_vars
[
UE_id
]
->
ul_ch_estimates_ext
,
frame_parms
,
frame_parms
,
...
@@ -1140,6 +1142,7 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
...
@@ -1140,6 +1142,7 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
}
}
start_meas
(
&
gNB
->
ulsch_channel_compensation_stats
);
nr_ulsch_channel_compensation
(
gNB
->
pusch_vars
[
UE_id
]
->
rxdataF_ext
,
nr_ulsch_channel_compensation
(
gNB
->
pusch_vars
[
UE_id
]
->
rxdataF_ext
,
gNB
->
pusch_vars
[
UE_id
]
->
ul_ch_estimates_ext
,
gNB
->
pusch_vars
[
UE_id
]
->
ul_ch_estimates_ext
,
gNB
->
pusch_vars
[
UE_id
]
->
ul_ch_mag0
,
gNB
->
pusch_vars
[
UE_id
]
->
ul_ch_mag0
,
...
@@ -1152,6 +1155,7 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
...
@@ -1152,6 +1155,7 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
rel15_ul
->
qam_mod_order
,
rel15_ul
->
qam_mod_order
,
rel15_ul
->
rb_size
,
rel15_ul
->
rb_size
,
gNB
->
pusch_vars
[
UE_id
]
->
log2_maxh
);
gNB
->
pusch_vars
[
UE_id
]
->
log2_maxh
);
stop_meas
(
&
gNB
->
ulsch_channel_compensation_stats
);
#ifdef NR_SC_FDMA
#ifdef NR_SC_FDMA
nr_idft
(
&
((
uint32_t
*
)
gNB
->
pusch_vars
[
UE_id
]
->
rxdataF_ext
[
0
])[
symbol
*
rel15_ul
->
rb_size
*
NR_NB_SC_PER_RB
],
nb_re_pusch
);
nr_idft
(
&
((
uint32_t
*
)
gNB
->
pusch_vars
[
UE_id
]
->
rxdataF_ext
[
0
])[
symbol
*
rel15_ul
->
rb_size
*
NR_NB_SC_PER_RB
],
nb_re_pusch
);
...
@@ -1160,7 +1164,7 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
...
@@ -1160,7 +1164,7 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
//----------------------------------------------------------
//----------------------------------------------------------
//-------------------- LLRs computation --------------------
//-------------------- LLRs computation --------------------
//----------------------------------------------------------
//----------------------------------------------------------
start_meas
(
&
gNB
->
ulsch_llr_stats
);
nr_ulsch_compute_llr
(
&
gNB
->
pusch_vars
[
UE_id
]
->
rxdataF_comp
[
0
][
symbol
*
rel15_ul
->
rb_size
*
NR_NB_SC_PER_RB
],
nr_ulsch_compute_llr
(
&
gNB
->
pusch_vars
[
UE_id
]
->
rxdataF_comp
[
0
][
symbol
*
rel15_ul
->
rb_size
*
NR_NB_SC_PER_RB
],
gNB
->
pusch_vars
[
UE_id
]
->
ul_ch_mag0
,
gNB
->
pusch_vars
[
UE_id
]
->
ul_ch_mag0
,
gNB
->
pusch_vars
[
UE_id
]
->
ul_ch_magb0
,
gNB
->
pusch_vars
[
UE_id
]
->
ul_ch_magb0
,
...
@@ -1169,6 +1173,7 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
...
@@ -1169,6 +1173,7 @@ void nr_rx_pusch(PHY_VARS_gNB *gNB,
nb_re_pusch
,
nb_re_pusch
,
symbol
,
symbol
,
rel15_ul
->
qam_mod_order
);
rel15_ul
->
qam_mod_order
);
stop_meas
(
&
gNB
->
ulsch_llr_stats
);
gNB
->
pusch_vars
[
UE_id
]
->
rxdataF_ext_offset
=
gNB
->
pusch_vars
[
UE_id
]
->
rxdataF_ext_offset
+
nb_re_pusch
-
gNB
->
pusch_vars
[
UE_id
]
->
ptrs_sc_per_ofdm_symbol
;
gNB
->
pusch_vars
[
UE_id
]
->
rxdataF_ext_offset
=
gNB
->
pusch_vars
[
UE_id
]
->
rxdataF_ext_offset
+
nb_re_pusch
-
gNB
->
pusch_vars
[
UE_id
]
->
ptrs_sc_per_ofdm_symbol
;
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
View file @
1ada5382
...
@@ -356,11 +356,6 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
...
@@ -356,11 +356,6 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
Kr_bytes
=
Kr
>>
3
;
Kr_bytes
=
Kr
>>
3
;
#endif
#endif
///////////
/////////////////////////////////////////////////////////////////////////////////////
opp_enabled
=
0
;
///////////////////////// c---->| LDCP coding |---->d /////////////////////////
///////////////////////// c---->| LDCP coding |---->d /////////////////////////
///////////
///////////
...
@@ -386,6 +381,12 @@ opp_enabled=0;
...
@@ -386,6 +381,12 @@ opp_enabled=0;
//for (int i=0;i<68*384;i++)
//for (int i=0;i<68*384;i++)
// printf("channel_input[%d]=%d\n",i,channel_input[i]);
// printf("channel_input[%d]=%d\n",i,channel_input[i]);
int
temp_opp
=
0
;
if
(
opp_enabled
)
{
opp_enabled
=
0
;
temp_opp
=
1
;
}
/*printf("output %d %d %d %d %d \n", harq_process->d[0][0], harq_process->d[0][1], harq_process->d[r][2],harq_process->d[0][3], harq_process->d[0][4]);
/*printf("output %d %d %d %d %d \n", harq_process->d[0][0], harq_process->d[0][1], harq_process->d[r][2],harq_process->d[0][3], harq_process->d[0][4]);
...
@@ -402,10 +403,12 @@ opp_enabled=0;
...
@@ -402,10 +403,12 @@ opp_enabled=0;
//stop_meas(te_stats);
//stop_meas(te_stats);
//printf("end ldpc encoder -- output\n");
//printf("end ldpc encoder -- output\n");
#ifdef DEBUG_DLSCH_CODING
#ifdef DEBUG_DLSCH_CODING
write_output
(
"ulsch_enc_input0.m"
,
"enc_in0"
,
&
harq_process
->
c
[
0
][
0
],
Kr_bytes
,
1
,
4
);
write_output
(
"ulsch_enc_input0.m"
,
"enc_in0"
,
&
harq_process
->
c
[
0
][
0
],
Kr_bytes
,
1
,
4
);
write_output
(
"ulsch_enc_output0.m"
,
"enc0"
,
&
harq_process
->
d
[
0
][
0
],(
3
*
8
*
Kr_bytes
)
+
12
,
1
,
4
);
write_output
(
"ulsch_enc_output0.m"
,
"enc0"
,
&
harq_process
->
d
[
0
][
0
],(
3
*
8
*
Kr_bytes
)
+
12
,
1
,
4
);
#endif
#endif
if
(
temp_opp
)
opp_enabled
=
1
;
///////////
///////////
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
...
...
openair1/PHY/defs_gNB.h
View file @
1ada5382
...
@@ -717,9 +717,7 @@ typedef struct PHY_VARS_gNB_s {
...
@@ -717,9 +717,7 @@ typedef struct PHY_VARS_gNB_s {
time_stats_t phy_proc;
time_stats_t phy_proc;
*/
*/
time_stats_t
phy_proc_tx
;
time_stats_t
phy_proc_tx
;
/*
time_stats_t
phy_proc_rx
;
time_stats_t
phy_proc_rx
;
*/
time_stats_t
rx_prach
;
time_stats_t
rx_prach
;
/*
/*
time_stats_t ofdm_mod_stats;
time_stats_t ofdm_mod_stats;
...
@@ -735,18 +733,21 @@ typedef struct PHY_VARS_gNB_s {
...
@@ -735,18 +733,21 @@ typedef struct PHY_VARS_gNB_s {
time_stats_t
dlsch_rate_matching_stats
;
time_stats_t
dlsch_rate_matching_stats
;
time_stats_t
dlsch_interleaving_stats
;
time_stats_t
dlsch_interleaving_stats
;
time_stats_t
dlsch_segmentation_stats
;
time_stats_t
dlsch_segmentation_stats
;
/*
time_stats_t rx_dft_stats;
time_stats_t ulsch_channel_estimation_stats;
time_stats_t ulsch_freq_offset_estimation_stats;
time_stats_t
ulsch_decoding_stats
;
time_stats_t
ulsch_decoding_stats
;
time_stats_t ulsch_demodulation_stats;
time_stats_t
ulsch_rate_unmatching_stats
;
time_stats_t
ulsch_rate_unmatching_stats
;
time_stats_t ulsch_
turbo
_decoding_stats;
time_stats_t
ulsch_
ldpc
_decoding_stats
;
time_stats_t
ulsch_deinterleaving_stats
;
time_stats_t
ulsch_deinterleaving_stats
;
time_stats_t ulsch_demultiplexing_stats;
time_stats_t
ulsch_unscrambling_stats
;
time_stats_t
ulsch_channel_estimation_stats
;
time_stats_t
ulsch_channel_compensation_stats
;
time_stats_t
ulsch_rbs_extraction_stats
;
time_stats_t
ulsch_llr_stats
;
time_stats_t
ulsch_llr_stats
;
/*
time_stats_t rx_dft_stats;
time_stats_t ulsch_freq_offset_estimation_stats;
*/
*/
}
PHY_VARS_gNB
;
}
PHY_VARS_gNB
;
#endif
#endif
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
1ada5382
...
@@ -242,16 +242,18 @@ void nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int ULSCH
...
@@ -242,16 +242,18 @@ void nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int ULSCH
//------------------- ULSCH unscrambling -------------------
//------------------- ULSCH unscrambling -------------------
//----------------------------------------------------------
//----------------------------------------------------------
start_meas
(
&
gNB
->
ulsch_unscrambling_stats
);
nr_ulsch_unscrambling
(
gNB
->
pusch_vars
[
ULSCH_id
]
->
llr
,
nr_ulsch_unscrambling
(
gNB
->
pusch_vars
[
ULSCH_id
]
->
llr
,
G
,
G
,
0
,
0
,
pusch_pdu
->
data_scrambling_id
,
pusch_pdu
->
data_scrambling_id
,
pusch_pdu
->
rnti
);
pusch_pdu
->
rnti
);
stop_meas
(
&
gNB
->
ulsch_unscrambling_stats
);
//----------------------------------------------------------
//----------------------------------------------------------
//--------------------- ULSCH decoding ---------------------
//--------------------- ULSCH decoding ---------------------
//----------------------------------------------------------
//----------------------------------------------------------
start_meas
(
&
gNB
->
ulsch_decoding_stats
);
ret
=
nr_ulsch_decoding
(
gNB
,
ret
=
nr_ulsch_decoding
(
gNB
,
ULSCH_id
,
ULSCH_id
,
gNB
->
pusch_vars
[
ULSCH_id
]
->
llr
,
gNB
->
pusch_vars
[
ULSCH_id
]
->
llr
,
...
@@ -261,8 +263,8 @@ void nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int ULSCH
...
@@ -261,8 +263,8 @@ void nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int ULSCH
slot_rx
,
slot_rx
,
harq_pid
,
harq_pid
,
G
);
G
);
stop_meas
(
&
gNB
->
ulsch_decoding_stats
);
if
(
ret
>
gNB
->
ulsch
[
ULSCH_id
][
0
]
->
max_ldpc_iterations
){
if
(
ret
>
gNB
->
ulsch
[
ULSCH_id
][
0
]
->
max_ldpc_iterations
){
LOG_I
(
PHY
,
"ULSCH %d in error
\n
"
,
ULSCH_id
);
LOG_I
(
PHY
,
"ULSCH %d in error
\n
"
,
ULSCH_id
);
nr_fill_indication
(
gNB
,
frame_rx
,
slot_rx
,
ULSCH_id
,
harq_pid
,
1
);
nr_fill_indication
(
gNB
,
frame_rx
,
slot_rx
,
ULSCH_id
,
harq_pid
,
1
);
...
...
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
1ada5382
...
@@ -412,6 +412,7 @@ int main(int argc, char **argv)
...
@@ -412,6 +412,7 @@ int main(int argc, char **argv)
printf
(
"-c Start symbol for PDSCH (fixed for now)
\n
"
);
printf
(
"-c Start symbol for PDSCH (fixed for now)
\n
"
);
printf
(
"-j Number of symbols for PDSCH (fixed for now)
\n
"
);
printf
(
"-j Number of symbols for PDSCH (fixed for now)
\n
"
);
printf
(
"-e MSC index
\n
"
);
printf
(
"-e MSC index
\n
"
);
printf
(
"-P Print DLSCH performances
\n
"
);
exit
(
-
1
);
exit
(
-
1
);
break
;
break
;
}
}
...
@@ -901,7 +902,6 @@ int main(int argc, char **argv)
...
@@ -901,7 +902,6 @@ int main(int argc, char **argv)
break
;
break
;
}
}
if
(
print_perf
==
1
)
{
if
(
print_perf
==
1
)
{
printf
(
"
\n
gNB TX function statistics (per %d us slot, NPRB %d, mcs %d, TBS %d, Kr %d (Zc %d))
\n
"
,
printf
(
"
\n
gNB TX function statistics (per %d us slot, NPRB %d, mcs %d, TBS %d, Kr %d (Zc %d))
\n
"
,
1000
>>*
scc
->
ssbSubcarrierSpacing
,
dlsch_config
.
rbSize
,
dlsch_config
.
mcsIndex
[
0
],
1000
>>*
scc
->
ssbSubcarrierSpacing
,
dlsch_config
.
rbSize
,
dlsch_config
.
mcsIndex
[
0
],
...
...
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
1ada5382
...
@@ -55,7 +55,8 @@
...
@@ -55,7 +55,8 @@
#include "openair2/RRC/NR/MESSAGES/asn1_msg.h"
#include "openair2/RRC/NR/MESSAGES/asn1_msg.h"
#include "openair2/LAYER2/NR_MAC_UE/mac_proto.h"
#include "openair2/LAYER2/NR_MAC_UE/mac_proto.h"
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
#define inMicroS(a) (((double)(a))/(cpu_freq_GHz*1000.0))
#include "SIMULATION/LTE_PHY/common_sim.h"
//#define DEBUG_ULSIM
//#define DEBUG_ULSIM
PHY_VARS_gNB
*
gNB
;
PHY_VARS_gNB
*
gNB
;
...
@@ -140,7 +141,7 @@ int main(int argc, char **argv)
...
@@ -140,7 +141,7 @@ int main(int argc, char **argv)
int
start_rb
=
0
;
int
start_rb
=
0
;
int
UE_id
=
0
;
// [hna] only works for UE_id = 0 because NUMBER_OF_NR_UE_MAX is set to 1 (phy_init_nr_gNB causes segmentation fault)
int
UE_id
=
0
;
// [hna] only works for UE_id = 0 because NUMBER_OF_NR_UE_MAX is set to 1 (phy_init_nr_gNB causes segmentation fault)
float
target_error_rate
=
0
.
01
;
float
target_error_rate
=
0
.
01
;
int
print_perf
=
0
;
cpuf
=
get_cpu_freq_GHz
();
cpuf
=
get_cpu_freq_GHz
();
...
@@ -155,7 +156,7 @@ int main(int argc, char **argv)
...
@@ -155,7 +156,7 @@ int main(int argc, char **argv)
//logInit();
//logInit();
randominit
(
0
);
randominit
(
0
);
while
((
c
=
getopt
(
argc
,
argv
,
"d:f:g:h:i:j:l:m:n:p:r:s:y:z:F:M:N:P
:
R:S:L:"
))
!=
-
1
)
{
while
((
c
=
getopt
(
argc
,
argv
,
"d:f:g:h:i:j:l:m:n:p:r:s:y:z:F:M:N:PR:S:L:"
))
!=
-
1
)
{
switch
(
c
)
{
switch
(
c
)
{
/*case 'd':
/*case 'd':
...
@@ -309,9 +310,14 @@ int main(int argc, char **argv)
...
@@ -309,9 +310,14 @@ int main(int argc, char **argv)
printf
(
"Setting SNR1 to %f
\n
"
,
snr1
);
printf
(
"Setting SNR1 to %f
\n
"
,
snr1
);
break
;
break
;
case
'L'
:
case
'P'
:
loglvl
=
atoi
(
optarg
);
print_perf
=
1
;
break
;
opp_enabled
=
1
;
break
;
case
'L'
:
loglvl
=
atoi
(
optarg
);
break
;
default:
default:
case
'h'
:
case
'h'
:
...
@@ -340,6 +346,7 @@ int main(int argc, char **argv)
...
@@ -340,6 +346,7 @@ int main(int argc, char **argv)
printf
(
"-O oversampling factor (1,2,4,8,16)
\n
"
);
printf
(
"-O oversampling factor (1,2,4,8,16)
\n
"
);
printf
(
"-R N_RB_DL
\n
"
);
printf
(
"-R N_RB_DL
\n
"
);
printf
(
"-S Ending SNR, runs from SNR0 to SNR1
\n
"
);
printf
(
"-S Ending SNR, runs from SNR0 to SNR1
\n
"
);
printf
(
"-P Print ULSCH performances
\n
"
);
exit
(
-
1
);
exit
(
-
1
);
break
;
break
;
}
}
...
@@ -524,6 +531,18 @@ int main(int argc, char **argv)
...
@@ -524,6 +531,18 @@ int main(int argc, char **argv)
for
(
SNR
=
snr0
;
SNR
<
snr1
;
SNR
+=
snr_step
)
{
for
(
SNR
=
snr0
;
SNR
<
snr1
;
SNR
+=
snr_step
)
{
varArray_t
*
table_rx
=
initVarArray
(
1000
,
sizeof
(
double
));
reset_meas
(
&
gNB
->
phy_proc_rx
);
reset_meas
(
&
gNB
->
ulsch_decoding_stats
);
reset_meas
(
&
gNB
->
ulsch_deinterleaving_stats
);
reset_meas
(
&
gNB
->
ulsch_rate_unmatching_stats
);
reset_meas
(
&
gNB
->
ulsch_ldpc_decoding_stats
);
reset_meas
(
&
gNB
->
ulsch_unscrambling_stats
);
reset_meas
(
&
gNB
->
ulsch_channel_estimation_stats
);
reset_meas
(
&
gNB
->
ulsch_llr_stats
);
reset_meas
(
&
gNB
->
ulsch_channel_compensation_stats
);
reset_meas
(
&
gNB
->
ulsch_rbs_extraction_stats
);
UE_proc
.
nr_tti_tx
=
slot
;
UE_proc
.
nr_tti_tx
=
slot
;
UE_proc
.
frame_tx
=
frame
;
UE_proc
.
frame_tx
=
frame
;
...
@@ -654,12 +673,14 @@ int main(int argc, char **argv)
...
@@ -654,12 +673,14 @@ int main(int argc, char **argv)
gNB
->
UL_INFO
.
rx_ind
.
number_of_pdus
=
0
;
gNB
->
UL_INFO
.
rx_ind
.
number_of_pdus
=
0
;
gNB
->
UL_INFO
.
crc_ind
.
number_crcs
=
0
;
gNB
->
UL_INFO
.
crc_ind
.
number_crcs
=
0
;
start_meas
(
&
gNB
->
phy_proc_rx
);
phy_procedures_gNB_common_RX
(
gNB
,
frame
,
slot
);
phy_procedures_gNB_common_RX
(
gNB
,
frame
,
slot
);
if
(
n_trials
==
1
)
if
(
n_trials
==
1
)
LOG_M
(
"rxsigF0.m"
,
"rxsF0"
,
gNB
->
common_vars
.
rxdataF
[
0
],
frame_length_complex_samples_no_prefix
,
1
,
1
);
LOG_M
(
"rxsigF0.m"
,
"rxsF0"
,
gNB
->
common_vars
.
rxdataF
[
0
],
frame_length_complex_samples_no_prefix
,
1
,
1
);
phy_procedures_gNB_uespec_RX
(
gNB
,
frame
,
slot
);
phy_procedures_gNB_uespec_RX
(
gNB
,
frame
,
slot
);
start_meas
(
&
gNB
->
phy_proc_rx
);
////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////
if
(
gNB
->
ulsch
[
0
][
0
]
->
last_iteration_cnt
>=
if
(
gNB
->
ulsch
[
0
][
0
]
->
last_iteration_cnt
>=
...
@@ -713,6 +734,20 @@ int main(int argc, char **argv)
...
@@ -713,6 +734,20 @@ int main(int argc, char **argv)
printf
(
"*****************************************
\n
"
);
printf
(
"*****************************************
\n
"
);
printf
(
"
\n
"
);
printf
(
"
\n
"
);
if
(
print_perf
==
1
)
{
printDistribution
(
&
gNB
->
phy_proc_rx
,
table_rx
,
"Total PHY proc rx"
);
printStatIndent
(
&
gNB
->
ulsch_channel_estimation_stats
,
"ULSCH channel estimation time"
);
printStatIndent
(
&
gNB
->
ulsch_rbs_extraction_stats
,
"ULSCH rbs extraction time"
);
printStatIndent
(
&
gNB
->
ulsch_channel_compensation_stats
,
"ULSCH channel compensation time"
);
printStatIndent
(
&
gNB
->
ulsch_llr_stats
,
"ULSCH llr computation"
);
printStatIndent
(
&
gNB
->
ulsch_unscrambling_stats
,
"ULSCH unscrambling"
);
printStatIndent
(
&
gNB
->
ulsch_decoding_stats
,
"ULSCH total decoding time"
);
printStatIndent2
(
&
gNB
->
ulsch_deinterleaving_stats
,
"ULSCH deinterleaving"
);
printStatIndent2
(
&
gNB
->
ulsch_rate_unmatching_stats
,
"ULSCH rate matching rx"
);
printStatIndent2
(
&
gNB
->
ulsch_ldpc_decoding_stats
,
"ULSCH ldpc decoding"
);
printf
(
"
\n
"
);
}
if
(
n_trials
==
1
)
if
(
n_trials
==
1
)
break
;
break
;
...
...
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