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
littleBu
OpenXG-RAN
Commits
7394e4dc
Commit
7394e4dc
authored
4 years ago
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes to DLSCH/ULSCH statistics in PHY
parent
42f96710
Branches unavailable
2025.w08
2025.w07
2025.w06
2025.w05
2025.w04
2025.w03
2025.w02
2024.w51
2024.w50
2024.w49
2024.w48
2024.w47
2024.w46
2024.w45
2024.w44
2024.w43
2024.w42
2024.w41
2024.w40
2024.w39
2024.w38
2024.w36
2024.w35
2024.w34
2024.w33
2024.w32
2024.w31
2024.w30
2024.w29
2024.w28
2024.w27
2024.w26
2024.w25
2024.w24
2024.w23
2024.w22
2024.w21
2024.w18
2024.w17
2024.w16
2024.w15
2024.w14
2024.w13
2024.w12
2024.w11
2024.w10
2024.w09
2024.w08
2024.w06
2024.w05
2024.w04
2024.w03
2024.w02
2024.w01
2023.w51
2023.w50
2023.w49
2023.w48
2023.w47
2023.w45
2023.w43
2023.w42
2023.w41
2023.w40
2023.w39
2023.w38
2023.w37
2023.w36
2023.w34
2023.w33
2023.w32
2023.w31
2023.w30
2023.w29
2023.w28
2023.w27
2023.w26
2023.w25
2023.w24
2023.w23
2023.w22
2023.w21
2023.w20
2023.w19
2023.w18
2023.w18b
2023.w16
2023.w15
2023.w14
2023.w13
2023.w12
2023.w11
2023.w11b
2023.w10
2023.w10b
2023.w09
2023.w08
2023.w08b
2023.w07
2023.w06
2023.w05
2023.w03
2023.w02
2022.42
2022.41
2022.w51
2022.w50
2022.w49
2022.w48
2022.w47
2022.w46
2022.w45
2022.w43
2022.w42
2022.w42b
2022.w41
2022.w40
2022.w39
2022.w38
2022.w37
2022.w37b
2022.w36
2022.w35
2022.w33
2022.w32
2022.w31
2022.w31b
2022.w30
2022.w29
2022.w26
2022.w25
2022.w24
2022.w24b
2022.w23
2022.w22
2022.w21
2022.w20
2022.w19
2022.w18
2022.w17
2022.w15
2022.w15b
2022.w14a
2022.w13
2022.w13b
2022.w13a
2022.w12
2022.w10
2022.w09
2022.w09b
2022.w08
2022.w08b
2022.w07
2022.w07b
2022.w06
2022.w06a
2022.w05
2022.w05b
2022.w03_hotfix
2022.w03_b
2022.w02
2022.w01
2021.wk46
2021.wk14_a
2021.wk13_d
2021.wk13_c
2021.w51_c
2021.w51_a
2021.w50_a
2021.w49_b
2021.w49_a
2021.w48
2021.w47
2021.w46
2021.w46-powder
2021.w45
2021.w45_b
2021.w44
2021.w43
2021.w42
2021.w37
2021.w36
2021.w35
2021.w34
2021.w33
2021.w32
2021.w31
2021.w30
2021.w29
2021.w28
2021.w27
2021.w26
2021.w25
2021.w24
2021.w23
2021.w22
2021.w20
2021.w19
2021.w18_b
2021.w18_a
2021.w17_b
2021.w16
2021.w15
2021.w14
2021.w13_a
2021.w12
2021.w11
2021.w10
2021.w09
2021.w08
2021.w06
2021.w05
2021.w04
2021.w02
2020.w51_2
2020.w51
2020.w50
2020.w49
2020.w48_2
2020.w48
2020.w47
2020.w46_2
2020.w46
2020.w45_2
2020.w45
2020.w44
2020.w42_2
2020.w42
2020.w41
2020.w39
2020.w38
2020.w37
2020.w36
v2.2.0
v2.1.0
v2.0.0
setparam
flexran-eol
benetel_phase_rotation
benetel_gnb_rel_2.0
benetel_gnb_rel_1.0
benetel_enb_rel_2.0
benetel_enb_rel_1.0
ARC_1.3
No related merge requests found
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
96 additions
and
66 deletions
+96
-66
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+17
-20
openair1/PHY/NR_TRANSPORT/nr_dlsch.h
openair1/PHY/NR_TRANSPORT/nr_dlsch.h
+2
-1
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
+22
-6
openair1/PHY/NR_TRANSPORT/nr_ulsch.c
openair1/PHY/NR_TRANSPORT/nr_ulsch.c
+14
-14
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
+35
-21
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+6
-4
No files found.
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
7394e4dc
...
...
@@ -162,7 +162,8 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
/// CRC, coding, interleaving and rate matching
AssertFatal
(
harq
->
pdu
!=
NULL
,
"harq->pdu is null
\n
"
);
start_meas
(
dlsch_encoding_stats
);
nr_dlsch_encoding
(
harq
->
pdu
,
frame
,
slot
,
dlsch
,
frame_parms
,
tinput
,
tprep
,
tparity
,
toutput
,
nr_dlsch_encoding
(
gNB
,
harq
->
pdu
,
frame
,
slot
,
dlsch
,
frame_parms
,
tinput
,
tprep
,
tparity
,
toutput
,
dlsch_rate_matching_stats
,
dlsch_interleaving_stats
,
dlsch_segmentation_stats
);
...
...
@@ -338,29 +339,25 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
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 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
],
gNB
->
dlsch
[
i
][
0
]
->
stats
.
round_trials
[
1
],
(
double
)
gNB
->
dlsch
[
i
][
0
]
->
stats
.
round_trials
[
2
]
/
gNB
->
dlsch
[
i
][
0
]
->
stats
.
round_trials
[
1
],
gNB
->
dlsch
[
i
][
0
]
->
stats
.
round_trials
[
2
],
(
double
)
gNB
->
dlsch
[
i
][
0
]
->
stats
.
round_trials
[
3
]
/
gNB
->
dlsch
[
i
][
0
]
->
stats
.
round_trials
[
2
],
gNB
->
dlsch
[
i
][
0
]
->
stats
.
round_trials
[
3
],
gNB
->
dlsch
[
i
][
0
]
->
stats
.
round_trials
[
4
],
gNB
->
dlsch
[
i
][
0
]
->
stats
.
round_trials
[
5
],
gNB
->
dlsch
[
i
][
0
]
->
stats
.
round_trials
[
6
],
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_tx
);
for
(
int
i
=
0
;
i
<
NUMBER_OF_NR_SCH_STATS_MAX
;
i
++
)
if
(
gNB
->
dlsch_stats
[
i
].
rnti
>
0
)
LOG_I
(
PHY
,
"DLSCH RNTI %x: round_trials %d(%1.1e):%d(%1.1e):%d(%1.1e):%d, current_Qm %d, current_RI %d, total_bytes TX %d
\n
"
,
gNB
->
dlsch_stats
[
i
].
rnti
,
gNB
->
dlsch_stats
[
i
].
round_trials
[
0
],
(
double
)
gNB
->
dlsch_stats
[
i
].
round_trials
[
1
]
/
gNB
->
dlsch_stats
[
i
].
round_trials
[
0
],
gNB
->
dlsch_stats
[
i
].
round_trials
[
1
],
(
double
)
gNB
->
dlsch_stats
[
i
].
round_trials
[
2
]
/
gNB
->
dlsch_stats
[
i
].
round_trials
[
0
],
gNB
->
dlsch_stats
[
i
].
round_trials
[
2
],
(
double
)
gNB
->
dlsch_stats
[
i
].
round_trials
[
3
]
/
gNB
->
dlsch_stats
[
i
].
round_trials
[
0
],
gNB
->
dlsch_stats
[
i
].
round_trials
[
3
],
gNB
->
dlsch_stats
[
i
].
current_Qm
,
gNB
->
dlsch_stats
[
i
].
current_RI
,
gNB
->
dlsch_stats
[
i
].
total_bytes_tx
);
}
void
clear_pdsch_stats
(
PHY_VARS_gNB
*
gNB
)
{
for
(
int
i
=
0
;
i
<
NUMBER_OF_NR_DLSCH_MAX
;
i
++
)
memset
((
void
*
)
&
gNB
->
dlsch
[
i
][
0
]
->
stats
,
0
,
sizeof
(
gNB
->
dlsch
[
i
][
0
]
->
stats
));
memset
((
void
*
)
&
gNB
->
dlsch
_stats
[
i
],
0
,
sizeof
(
gNB
->
dlsch_stats
[
i
]
));
}
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_TRANSPORT/nr_dlsch.h
View file @
7394e4dc
...
...
@@ -82,7 +82,8 @@ int16_t find_nr_dlsch(uint16_t rnti, PHY_VARS_gNB *gNB,find_type_t type);
NR_gNB_SCH_STATS_t
*
find_nr_dlsch_stats
(
uint16_t
rnti
,
PHY_VARS_gNB
*
gNB
,
find_type_t
type
);
int
nr_dlsch_encoding
(
unsigned
char
*
a
,
int
frame
,
int
nr_dlsch_encoding
(
PHY_VARS_gNB
*
gNB
,
unsigned
char
*
a
,
int
frame
,
uint8_t
slot
,
NR_gNB_DLSCH_t
*
dlsch
,
NR_DL_FRAME_PARMS
*
frame_parms
,
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
View file @
7394e4dc
...
...
@@ -309,7 +309,8 @@ void clean_gNB_dlsch(NR_gNB_DLSCH_t *dlsch)
}
}
int
nr_dlsch_encoding
(
unsigned
char
*
a
,
int
nr_dlsch_encoding
(
PHY_VARS_gNB
*
gNB
,
unsigned
char
*
a
,
int
frame
,
uint8_t
slot
,
NR_gNB_DLSCH_t
*
dlsch
,
...
...
@@ -354,13 +355,28 @@ int nr_dlsch_encoding(unsigned char *a,
A
=
rel15
->
TBSize
[
0
]
<<
3
;
if
(
dlsch
->
harq_processes
[
harq_pid
]
->
round
==
0
){
dlsch
->
stats
.
total_bytes_tx
+=
rel15
->
TBSize
[
0
];
dlsch
->
stats
.
current_RI
=
rel15
->
nrOfLayers
;
dlsch
->
stats
.
current_Qm
=
rel15
->
qamModOrder
[
0
];
NR_gNB_SCH_STATS_t
*
stats
=
NULL
;
int
first_free
=-
1
;
for
(
int
i
=
0
;
i
<
NUMBER_OF_NR_SCH_STATS_MAX
;
i
++
)
{
if
(
gNB
->
dlsch_stats
[
i
].
rnti
==
0
&&
first_free
==
-
1
)
{
first_free
=
i
;
stats
=&
gNB
->
dlsch_stats
[
i
];
}
if
(
gNB
->
dlsch_stats
[
i
].
rnti
==
dlsch
->
rnti
)
{
stats
=&
gNB
->
dlsch_stats
[
i
];
break
;
}
}
dlsch
->
stats
.
round_trials
[
dlsch
->
harq_processes
[
harq_pid
]
->
round
]
++
;
if
(
stats
)
{
stats
->
round_trials
[
dlsch
->
harq_processes
[
harq_pid
]
->
round
]
++
;
stats
->
rnti
=
dlsch
->
rnti
;
if
(
dlsch
->
harq_processes
[
harq_pid
]
->
round
==
0
){
stats
->
total_bytes_tx
+=
rel15
->
TBSize
[
0
];
stats
->
current_RI
=
rel15
->
nrOfLayers
;
stats
->
current_Qm
=
rel15
->
qamModOrder
[
0
];
}
}
G
=
nr_get_G
(
nb_rb
,
nb_symb_sch
,
nb_re_dmrs
,
length_dmrs
,
mod_order
,
rel15
->
nrOfLayers
);
LOG_D
(
PHY
,
"dlsch coding A %d G %d mod_order %d
\n
"
,
A
,
G
,
mod_order
);
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_TRANSPORT/nr_ulsch.c
View file @
7394e4dc
...
...
@@ -141,25 +141,25 @@ void nr_ulsch_unscrambling_optim(int16_t* llr,
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
)
if
(
gNB
->
ulsch
_stats
[
i
].
rnti
>
0
)
LOG_I
(
PHY
,
"ULSCH RNTI %x: round_trials %d(%1.1e):%d(%1.1e):%d(%1.1e):%d, current_Qm %d, current_RI %d, total_bytes RX/SCHED %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
[
0
],
gNB
->
ulsch
[
i
][
0
]
->
stats
.
round_trials
[
2
],
(
double
)
gNB
->
ulsch
[
i
][
0
]
->
stats
.
round_trials
[
3
]
/
gNB
->
ulsch
[
i
][
0
]
->
stats
.
round_trials
[
0
],
gNB
->
ulsch
[
i
][
0
]
->
stats
.
round_trials
[
3
],
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
);
gNB
->
ulsch
_stats
[
i
].
rnti
,
gNB
->
ulsch
_stats
[
i
]
.
round_trials
[
0
],
(
double
)
gNB
->
ulsch
_stats
[
i
].
round_trials
[
1
]
/
gNB
->
ulsch_stats
[
i
]
.
round_trials
[
0
],
gNB
->
ulsch
_stats
[
i
]
.
round_trials
[
1
],
(
double
)
gNB
->
ulsch
_stats
[
i
].
round_trials
[
2
]
/
gNB
->
ulsch_stats
[
i
]
.
round_trials
[
0
],
gNB
->
ulsch
_stats
[
i
]
.
round_trials
[
2
],
(
double
)
gNB
->
ulsch
_stats
[
i
].
round_trials
[
3
]
/
gNB
->
ulsch_stats
[
i
]
.
round_trials
[
0
],
gNB
->
ulsch
_stats
[
i
]
.
round_trials
[
3
],
gNB
->
ulsch
_stats
[
i
]
.
current_Qm
,
gNB
->
ulsch
_stats
[
i
]
.
current_RI
,
gNB
->
ulsch
_stats
[
i
]
.
total_bytes_rx
,
gNB
->
ulsch
_stats
[
i
]
.
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
));
memset
((
void
*
)
&
gNB
->
ulsch
_stats
[
i
],
0
,
sizeof
(
gNB
->
ulsch_stats
[
i
]
));
}
This diff is collapsed.
Click to expand it.
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
View file @
7394e4dc
...
...
@@ -286,7 +286,7 @@ void clean_gNB_ulsch(NR_gNB_ULSCH_t *ulsch)
static
uint32_t
prnt_crc_cnt
=
0
;
#endif
uint32_t
nr_ulsch_decoding
(
PHY_VARS_gNB
*
phy_vars_
gNB
,
uint32_t
nr_ulsch_decoding
(
PHY_VARS_gNB
*
gNB
,
uint8_t
UE_id
,
short
*
ulsch_llr
,
NR_DL_FRAME_PARMS
*
frame_parms
,
...
...
@@ -308,7 +308,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
#endif
NR_gNB_ULSCH_t
*
ulsch
=
phy_vars_
gNB
->
ulsch
[
UE_id
][
0
];
NR_gNB_ULSCH_t
*
ulsch
=
gNB
->
ulsch
[
UE_id
][
0
];
NR_UL_gNB_HARQ_t
*
harq_process
=
ulsch
->
harq_processes
[
harq_pid
];
t_nrLDPC_dec_params
decParams
;
...
...
@@ -398,14 +398,28 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
}
}
ulsch
->
stats
.
round_trials
[
harq_process
->
round
]
++
;
NR_gNB_SCH_STATS_t
*
stats
=
NULL
;
int
first_free
=-
1
;
for
(
int
i
=
0
;
i
<
NUMBER_OF_NR_SCH_STATS_MAX
;
i
++
)
{
if
(
gNB
->
ulsch_stats
[
i
].
rnti
==
0
&&
first_free
==
-
1
)
{
first_free
=
i
;
stats
=&
gNB
->
ulsch_stats
[
i
];
}
if
(
gNB
->
ulsch_stats
[
i
].
rnti
==
ulsch
->
rnti
)
{
stats
=&
gNB
->
ulsch_stats
[
i
];
break
;
}
}
if
(
stats
)
{
stats
->
rnti
=
ulsch
->
rnti
;
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
;
if
(
stats
)
{
stats
->
current_Qm
=
Qm
;
stats
->
current_RI
=
n_layers
;
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
;
...
...
@@ -463,7 +477,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
E
=
nr_get_E
(
G
,
harq_process
->
C
,
Qm
,
n_layers
,
r
);
start_meas
(
&
phy_vars_
gNB
->
ulsch_deinterleaving_stats
);
start_meas
(
&
gNB
->
ulsch_deinterleaving_stats
);
////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////// nr_deinterleaving_ldpc ///////////////////////////////////
...
...
@@ -479,7 +493,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
//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);
stop_meas
(
&
phy_vars_
gNB
->
ulsch_deinterleaving_stats
);
stop_meas
(
&
gNB
->
ulsch_deinterleaving_stats
);
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, rvidx %d, round %d)...
\n
"
,
...
...
@@ -500,7 +514,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
///////////////////////// harq_process->e =====> harq_process->d /////////////////////////
start_meas
(
&
phy_vars_
gNB
->
ulsch_rate_unmatching_stats
);
start_meas
(
&
gNB
->
ulsch_rate_unmatching_stats
);
Tbslbrm
=
nr_compute_tbslbrm
(
0
,
nb_rb
,
n_layers
,
harq_process
->
C
);
...
...
@@ -517,12 +531,12 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
harq_process
->
F
,
Kr
-
harq_process
->
F
-
2
*
(
p_decParams
->
Z
))
==-
1
)
{
stop_meas
(
&
phy_vars_
gNB
->
ulsch_rate_unmatching_stats
);
stop_meas
(
&
gNB
->
ulsch_rate_unmatching_stats
);
LOG_E
(
PHY
,
"ulsch_decoding.c: Problem in rate_matching
\n
"
);
return
(
ulsch
->
max_ldpc_iterations
+
1
);
}
else
{
stop_meas
(
&
phy_vars_
gNB
->
ulsch_rate_unmatching_stats
);
stop_meas
(
&
gNB
->
ulsch_rate_unmatching_stats
);
}
r_offset
+=
E
;
...
...
@@ -560,7 +574,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
if
(
err_flag
==
0
)
{
start_meas
(
&
phy_vars_
gNB
->
ulsch_ldpc_decoding_stats
);
start_meas
(
&
gNB
->
ulsch_ldpc_decoding_stats
);
//LOG_E(PHY,"AbsSubframe %d.%d Start LDPC segment %d/%d A %d ",frame%1024,nr_tti_rx,r,harq_process->C-1, A);
...
...
@@ -603,7 +617,6 @@ 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)
...
...
@@ -629,7 +642,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);
#endif
stop_meas
(
&
phy_vars_
gNB
->
ulsch_ldpc_decoding_stats
);
stop_meas
(
&
gNB
->
ulsch_ldpc_decoding_stats
);
}
if
((
err_flag
==
0
)
&&
(
ret
>=
(
ulsch
->
max_ldpc_iterations
+
1
)))
{
...
...
@@ -652,7 +665,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
#ifdef gNB_DEBUG_TRACE
LOG_I
(
PHY
,
"[gNB %d] ULSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d) Kr %d r %d
\n
"
,
phy_vars_
gNB
->
Mod_id
,
frame
,
nr_tti_rx
,
harq_pid
,
harq_process
->
status
,
harq_process
->
round
,
harq_process
->
TBS
,
Kr
,
r
);
gNB
->
Mod_id
,
frame
,
nr_tti_rx
,
harq_pid
,
harq_process
->
status
,
harq_process
->
round
,
harq_process
->
TBS
,
Kr
,
r
);
#endif
// harq_process->harq_ack.ack = 0;
...
...
@@ -669,7 +682,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
}
// LOG_D(PHY,"[gNB %d] ULSCH: Setting NACK for nr_tti_rx %d (pid %d, pid status %d, round %d/Max %d, TBS %d)\n",
//
phy_vars_
gNB->Mod_id,nr_tti_rx,harq_pid,harq_process->status,harq_process->round,ulsch->Mlimit,harq_process->TBS);
// gNB->Mod_id,nr_tti_rx,harq_pid,harq_process->status,harq_process->round,ulsch->Mlimit,harq_process->TBS);
harq_process
->
handled
=
1
;
ret
=
ulsch
->
max_ldpc_iterations
+
1
;
...
...
@@ -678,7 +691,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
#ifdef gNB_DEBUG_TRACE
LOG_I
(
PHY
,
"[gNB %d] ULSCH: Setting ACK for nr_tti_rx %d TBS %d
\n
"
,
phy_vars_
gNB
->
Mod_id
,
nr_tti_rx
,
harq_process
->
TBS
);
gNB
->
Mod_id
,
nr_tti_rx
,
harq_process
->
TBS
);
#endif
harq_process
->
status
=
SCH_IDLE
;
...
...
@@ -689,7 +702,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
// harq_process->harq_ack.harq_id = harq_pid;
// harq_process->harq_ack.send_harq_status = 1;
// LOG_D(PHY,"[gNB %d] ULSCH: Setting ACK for nr_tti_rx %d (pid %d, round %d, TBS %d)\n",
phy_vars_
gNB->Mod_id,nr_tti_rx,harq_pid,harq_process->round,harq_process->TBS);
// LOG_D(PHY,"[gNB %d] ULSCH: Setting ACK for nr_tti_rx %d (pid %d, round %d, TBS %d)\n",gNB->Mod_id,nr_tti_rx,harq_pid,harq_process->round,harq_process->TBS);
// Reassembly of Transport block here
...
...
@@ -712,6 +725,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
#endif
}
if
(
stats
)
stats
->
total_bytes_rx
+=
harq_process
->
TBS
;
}
#ifdef DEBUG_ULSCH_DECODING
...
...
This diff is collapsed.
Click to expand it.
openair1/PHY/defs_gNB.h
View file @
7394e4dc
...
...
@@ -125,6 +125,7 @@ typedef struct {
}
NR_gNB_UL_PDCCH_t
;
typedef
struct
{
uint16_t
rnti
;
int
round_trials
[
8
];
int
total_bytes_tx
;
int
total_bytes_rx
;
...
...
@@ -175,8 +176,6 @@ typedef struct {
int16_t
sqrt_rho_a
;
/// amplitude of PDSCH (compared to RS) in symbols containing pilots
int16_t
sqrt_rho_b
;
/// statistics for measurement collection
NR_gNB_SCH_STATS_t
stats
;
}
NR_gNB_DLSCH_t
;
...
...
@@ -357,8 +356,6 @@ typedef struct {
uint8_t
max_ldpc_iterations
;
/// number of iterations used in last LDPC decoding
uint8_t
last_iteration_cnt
;
/// statistics for measurement collection
NR_gNB_SCH_STATS_t
stats
;
}
NR_gNB_ULSCH_t
;
typedef
struct
{
...
...
@@ -714,6 +711,11 @@ typedef struct PHY_VARS_gNB_s {
NR_gNB_ULSCH_t
*
ulsch
[
NUMBER_OF_NR_ULSCH_MAX
][
2
];
// [Nusers times][2 codewords]
NR_gNB_DLSCH_t
*
dlsch_SI
,
*
dlsch_ra
,
*
dlsch_p
;
NR_gNB_DLSCH_t
*
dlsch_PCH
;
/// statistics for DLSCH measurement collection
NR_gNB_SCH_STATS_t
dlsch_stats
[
NUMBER_OF_NR_SCH_STATS_MAX
];
/// statistics for ULSCH measurement collection
NR_gNB_SCH_STATS_t
ulsch_stats
[
NUMBER_OF_NR_SCH_STATS_MAX
];
t_nrPolar_params
*
uci_polarParams
;
uint8_t
pbch_configured
;
...
...
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