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
lizhongxiao
OpenXG-RAN
Commits
142249d8
Commit
142249d8
authored
Sep 02, 2020
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added ulsch statistics
parent
73c7bee0
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
58 additions
and
15 deletions
+58
-15
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+2
-2
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
+1
-1
openair1/PHY/NR_TRANSPORT/nr_ulsch.c
openair1/PHY/NR_TRANSPORT/nr_ulsch.c
+30
-0
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
+16
-9
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+2
-1
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+2
-0
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+5
-2
No files found.
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
142249d8
...
...
@@ -340,7 +340,7 @@ void dump_pdsch_stats(PHY_VARS_gNB *gNB) {
for
(
int
i
=
0
;
i
<
NUMBER_OF_NR_DLSCH_MAX
;
i
++
)
if
(
gNB
->
dlsch
[
i
][
0
]
->
harq_mask
>
0
)
LOG_I
(
PHY
,
"DLSCH RNTI %x: round_trials %d(%1.1e)/%d(%1.1e)/%d(%1.1e)/%d/%d/%d/%d/%d, current_Qm %d, current_RI %d, total_bytes %d
\n
"
,
LOG_I
(
PHY
,
"DLSCH RNTI %x: round_trials %d(%1.1e)/%d(%1.1e)/%d(%1.1e)/%d/%d/%d/%d/%d, current_Qm %d, current_RI %d, total_bytes
TX
%d
\n
"
,
gNB
->
dlsch
[
i
][
0
]
->
rnti
,
gNB
->
dlsch
[
i
][
0
]
->
stats
.
round_trials
[
0
],
(
double
)
gNB
->
dlsch
[
i
][
0
]
->
stats
.
round_trials
[
1
]
/
gNB
->
dlsch
[
i
][
0
]
->
stats
.
round_trials
[
0
],
...
...
@@ -355,7 +355,7 @@ void dump_pdsch_stats(PHY_VARS_gNB *gNB) {
gNB
->
dlsch
[
i
][
0
]
->
stats
.
round_trials
[
7
],
gNB
->
dlsch
[
i
][
0
]
->
stats
.
current_Qm
,
gNB
->
dlsch
[
i
][
0
]
->
stats
.
current_RI
,
gNB
->
dlsch
[
i
][
0
]
->
stats
.
total_bytes
);
gNB
->
dlsch
[
i
][
0
]
->
stats
.
total_bytes
_tx
);
}
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
View file @
142249d8
...
...
@@ -355,7 +355,7 @@ int nr_dlsch_encoding(unsigned char *a,
A
=
rel15
->
TBSize
[
0
]
<<
3
;
if
(
dlsch
->
harq_processes
[
harq_pid
]
->
round
==
0
){
dlsch
->
stats
.
total_bytes
+=
rel15
->
TBSize
[
0
];
dlsch
->
stats
.
total_bytes
_tx
+=
rel15
->
TBSize
[
0
];
dlsch
->
stats
.
current_RI
=
rel15
->
nrOfLayers
;
dlsch
->
stats
.
current_Qm
=
rel15
->
qamModOrder
[
0
];
}
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch.c
View file @
142249d8
...
...
@@ -137,3 +137,33 @@ void nr_ulsch_unscrambling_optim(int16_t* llr,
n_RNTI
);
#endif
}
void
dump_pusch_stats
(
PHY_VARS_gNB
*
gNB
)
{
for
(
int
i
=
0
;
i
<
NUMBER_OF_NR_ULSCH_MAX
;
i
++
)
if
(
gNB
->
ulsch
[
i
][
0
]
->
rnti
>
0
)
LOG_I
(
PHY
,
"ULSCH RNTI %x: round_trials %d(%1.1e)/%d(%1.1e)/%d(%1.1e)/%d/%d/%d/%d/%d, current_Qm %d, current_RI %d, total_bytes RX/TX %d/%d
\n
"
,
gNB
->
ulsch
[
i
][
0
]
->
rnti
,
gNB
->
ulsch
[
i
][
0
]
->
stats
.
round_trials
[
0
],
(
double
)
gNB
->
ulsch
[
i
][
0
]
->
stats
.
round_trials
[
1
]
/
gNB
->
ulsch
[
i
][
0
]
->
stats
.
round_trials
[
0
],
gNB
->
ulsch
[
i
][
0
]
->
stats
.
round_trials
[
1
],
(
double
)
gNB
->
ulsch
[
i
][
0
]
->
stats
.
round_trials
[
2
]
/
gNB
->
ulsch
[
i
][
0
]
->
stats
.
round_trials
[
1
],
gNB
->
ulsch
[
i
][
0
]
->
stats
.
round_trials
[
2
],
(
double
)
gNB
->
ulsch
[
i
][
0
]
->
stats
.
round_trials
[
3
]
/
gNB
->
ulsch
[
i
][
0
]
->
stats
.
round_trials
[
2
],
gNB
->
ulsch
[
i
][
0
]
->
stats
.
round_trials
[
3
],
gNB
->
ulsch
[
i
][
0
]
->
stats
.
round_trials
[
4
],
gNB
->
ulsch
[
i
][
0
]
->
stats
.
round_trials
[
5
],
gNB
->
ulsch
[
i
][
0
]
->
stats
.
round_trials
[
6
],
gNB
->
ulsch
[
i
][
0
]
->
stats
.
round_trials
[
7
],
gNB
->
ulsch
[
i
][
0
]
->
stats
.
current_Qm
,
gNB
->
ulsch
[
i
][
0
]
->
stats
.
current_RI
,
gNB
->
ulsch
[
i
][
0
]
->
stats
.
total_bytes_rx
,
gNB
->
ulsch
[
i
][
0
]
->
stats
.
total_bytes_tx
);
}
void
clear_pusch_stats
(
PHY_VARS_gNB
*
gNB
)
{
for
(
int
i
=
0
;
i
<
NUMBER_OF_NR_ULSCH_MAX
;
i
++
)
memset
((
void
*
)
&
gNB
->
ulsch
[
i
][
0
]
->
stats
,
0
,
sizeof
(
gNB
->
ulsch
[
i
][
0
]
->
stats
));
}
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
View file @
142249d8
...
...
@@ -363,15 +363,14 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
LOG_D
(
PHY
,
"ULSCH Decoding, harq_pid %d TBS %d G %d mcs %d Nl %d nb_rb %d, Qm %d, n_layers %d
\n
"
,
harq_pid
,
A
,
G
,
mcs
,
n_layers
,
nb_rb
,
Qm
,
n_layers
);
if
(
R
<
1024
)
Coderate
=
(
float
)
R
/
(
float
)
1024
;
else
Coderate
=
(
float
)
R
/
(
float
)
2048
;
if
((
A
<=
292
)
||
((
A
<=
3824
)
&&
(
Coderate
<=
0
.
6667
))
||
Coderate
<=
0
.
25
){
p_decParams
->
BG
=
2
;
if
(
Coderate
<
0
.
3333
)
{
if
(
R
<
1024
)
Coderate
=
(
float
)
R
/
(
float
)
1024
;
else
Coderate
=
(
float
)
R
/
(
float
)
2048
;
if
((
A
<=
292
)
||
((
A
<=
3824
)
&&
(
Coderate
<=
0
.
6667
))
||
Coderate
<=
0
.
25
){
p_decParams
->
BG
=
2
;
if
(
Coderate
<
0
.
3333
)
{
p_decParams
->
R
=
15
;
kc
=
52
;
}
...
...
@@ -398,8 +397,15 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
kc
=
27
;
}
}
ulsch
->
stats
.
round_trials
[
harq_process
->
round
]
++
;
if
(
harq_process
->
round
==
0
)
{
ulsch
->
stats
.
current_Qm
=
Qm
;
ulsch
->
stats
.
current_RI
=
n_layers
;
ulsch
->
stats
.
total_bytes_tx
+=
harq_process
->
TBS
;
// This is a new packet, so compute quantities regarding segmentation
if
(
A
>
3824
)
harq_process
->
B
=
A
+
24
;
...
...
@@ -597,6 +603,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
LOG_I
(
PHY
,
"Segment %d CRC OK
\n
"
,
r
);
#endif
ret
=
no_iteration_ldpc
;
ulsch
->
stats
.
total_bytes_rx
+=
harq_process
->
TBS
;
}
else
{
#ifdef PRINT_CRC_CHECK
//if (prnt_crc_cnt%10 == 0)
...
...
openair1/PHY/defs_gNB.h
View file @
142249d8
...
...
@@ -126,7 +126,8 @@ typedef struct {
typedef
struct
{
int
round_trials
[
8
];
int
total_bytes
;
int
total_bytes_tx
;
int
total_bytes_rx
;
int
current_Qm
;
int
current_RI
;
}
NR_gNB_SCH_STATS_t
;
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
142249d8
...
...
@@ -574,5 +574,7 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
}
}
}
if
((
frame_rx
&
127
)
==
0
)
dump_pusch_stats
(
gNB
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_UESPEC_RX
,
0
);
}
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
142249d8
...
...
@@ -55,7 +55,6 @@
//#include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c"
#include "openair2/LAYER2/NR_MAC_UE/mac_proto.h"
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
#include "openair1/NR_REFSIG/pss_nr.h"
#define inMicroS(a) (((double)(a))/(cpu_freq_GHz*1000.0))
#include "SIMULATION/LTE_PHY/common_sim.h"
...
...
@@ -119,7 +118,7 @@ int main(int argc, char **argv)
double
sigma
,
sigma_dB
;
double
snr_step
=
.
2
;
uint8_t
snr1set
=
0
;
int
slot
=
8
,
frame
=
0
;
int
slot
=
8
,
frame
=
1
;
FILE
*
output_fd
=
NULL
;
double
*
s_re
[
2
]
=
{
s_re0
,
s_re1
};
double
*
s_im
[
2
]
=
{
s_im0
,
s_im1
};
...
...
@@ -702,6 +701,7 @@ int main(int argc, char **argv)
int
round_trials
[
4
]
=
{
0
,
0
,
0
,
0
};
uint32_t
errors_scrambling
[
4
]
=
{
0
,
0
,
0
,
0
};
clear_pusch_stats
(
gNB
);
for
(
trial
=
0
;
trial
<
n_trials
;
trial
++
)
{
uint8_t
round
=
0
;
...
...
@@ -1040,6 +1040,9 @@ int main(int argc, char **argv)
(
double
)
errors_scrambling
[
2
]
/
available_bits
/
round_trials
[
0
],
(
double
)
errors_scrambling
[
3
]
/
available_bits
/
round_trials
[
0
],
roundStats
[
snrRun
],
effRate
,
effRate
/
TBS
*
100
,
TBS
);
dump_pusch_stats
(
gNB
);
printf
(
"*****************************************
\n
"
);
printf
(
"
\n
"
);
...
...
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