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
84521388
Commit
84521388
authored
Sep 26, 2023
by
Marius Tillner
Committed by
Marius Tillner
Dec 22, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added downlink latseq points for latency measurement
parent
3da85845
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
40 additions
and
8 deletions
+40
-8
executables/nr-ru.c
executables/nr-ru.c
+4
-0
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+7
-4
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
+3
-0
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+3
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+5
-1
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c
+2
-0
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
+2
-0
openair2/LAYER2/nr_rlc/nr_rlc_entity_am.c
openair2/LAYER2/nr_rlc/nr_rlc_entity_am.c
+12
-3
openair2/SDAP/nr_sdap/nr_sdap_entity.c
openair2/SDAP/nr_sdap/nr_sdap_entity.c
+2
-0
No files found.
executables/nr-ru.c
View file @
84521388
...
@@ -51,6 +51,7 @@
...
@@ -51,6 +51,7 @@
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "common/utils/LATSEQ/latseq.h"
#include <executables/softmodem-common.h>
#include <executables/softmodem-common.h>
...
@@ -851,6 +852,7 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
...
@@ -851,6 +852,7 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST
,
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(
VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST
,
(
timestamp
+
ru
->
ts_offset
-
ru
->
openair0_cfg
.
tx_sample_advance
)
&
0xffffffff
);
(
timestamp
+
ru
->
ts_offset
-
ru
->
openair0_cfg
.
tx_sample_advance
)
&
0xffffffff
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE
,
1
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE
,
1
);
LATSEQ_P
(
"D phy.ant--phy.SOUTHout"
,
"len%u::fm%u.sl%u"
,
(
siglen
+
sf_extension
)
*
sizeof
(
int32_t
),
frame
,
slot
);
// prepare tx buffer pointers
// prepare tx buffer pointers
txs
=
ru
->
rfdevice
.
trx_write_func
(
&
ru
->
rfdevice
,
txs
=
ru
->
rfdevice
.
trx_write_func
(
&
ru
->
rfdevice
,
timestamp
+
ru
->
ts_offset
-
ru
->
openair0_cfg
.
tx_sample_advance
-
sf_extension
,
timestamp
+
ru
->
ts_offset
-
ru
->
openair0_cfg
.
tx_sample_advance
-
sf_extension
,
...
@@ -858,6 +860,7 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
...
@@ -858,6 +860,7 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
siglen
+
sf_extension
,
siglen
+
sf_extension
,
ru
->
nb_tx
,
ru
->
nb_tx
,
flags
);
flags
);
LATSEQ_P
(
"D phy.SOUTHout--phy.out"
,
"len%u::fm%u.sl%u"
,
(
siglen
+
sf_extension
)
*
sizeof
(
int32_t
),
frame
,
slot
);
LOG_D
(
PHY
,
LOG_D
(
PHY
,
"[TXPATH] RU %d aa %d tx_rf, writing to TS %llu, %d.%d, unwrapped_frame %d, slot %d, flags %d, siglen+sf_extension %d, "
"[TXPATH] RU %d aa %d tx_rf, writing to TS %llu, %d.%d, unwrapped_frame %d, slot %d, flags %d, siglen+sf_extension %d, "
"returned %d, E %f
\n
"
,
"returned %d, E %f
\n
"
,
...
@@ -1079,6 +1082,7 @@ void ru_tx_func(void *param) {
...
@@ -1079,6 +1082,7 @@ void ru_tx_func(void *param) {
// do OFDM with/without TX front-end processing if needed
// do OFDM with/without TX front-end processing if needed
if
((
ru
->
fh_north_asynch_in
==
NULL
)
&&
(
ru
->
feptx_ofdm
))
ru
->
feptx_ofdm
(
ru
,
frame_tx
,
slot_tx
);
if
((
ru
->
fh_north_asynch_in
==
NULL
)
&&
(
ru
->
feptx_ofdm
))
ru
->
feptx_ofdm
(
ru
,
frame_tx
,
slot_tx
);
LATSEQ_P
(
"D phy.ofdmidft--phy.ant"
,
"len%u::fm%u.sl%u"
,
samples
,
frame_tx
,
slot_tx
);
if
(
!
emulate_rf
)
{
if
(
!
emulate_rf
)
{
// do outgoing fronthaul (south) if needed
// do outgoing fronthaul (south) if needed
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
84521388
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "common/utils/nr/nr_common.h"
#include "common/utils/nr/nr_common.h"
#include "executables/softmodem-common.h"
#include "executables/softmodem-common.h"
#include "common/utils/LATSEQ/latseq.h"
//#define DEBUG_DLSCH
//#define DEBUG_DLSCH
//#define DEBUG_DLSCH_MAPPING
//#define DEBUG_DLSCH_MAPPING
...
@@ -129,13 +130,13 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
...
@@ -129,13 +130,13 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
unsigned
char
output
[
rel15
->
rbSize
*
NR_SYMBOLS_PER_SLOT
*
NR_NB_SC_PER_RB
*
Qm
*
rel15
->
nrOfLayers
]
__attribute__
((
aligned
(
32
)));
unsigned
char
output
[
rel15
->
rbSize
*
NR_SYMBOLS_PER_SLOT
*
NR_NB_SC_PER_RB
*
Qm
*
rel15
->
nrOfLayers
]
__attribute__
((
aligned
(
32
)));
bzero
(
output
,
rel15
->
rbSize
*
NR_SYMBOLS_PER_SLOT
*
NR_NB_SC_PER_RB
*
Qm
*
rel15
->
nrOfLayers
);
bzero
(
output
,
rel15
->
rbSize
*
NR_SYMBOLS_PER_SLOT
*
NR_NB_SC_PER_RB
*
Qm
*
rel15
->
nrOfLayers
);
start_meas
(
dlsch_encoding_stats
);
start_meas
(
dlsch_encoding_stats
);
if
(
nr_dlsch_encoding
(
gNB
,
if
(
nr_dlsch_encoding
(
gNB
,
frame
,
slot
,
harq
,
frame_parms
,
output
,
tinput
,
tprep
,
tparity
,
toutput
,
frame
,
slot
,
harq
,
frame_parms
,
output
,
tinput
,
tprep
,
tparity
,
toutput
,
dlsch_rate_matching_stats
,
dlsch_rate_matching_stats
,
dlsch_interleaving_stats
,
dlsch_interleaving_stats
,
dlsch_segmentation_stats
)
==
-
1
)
dlsch_segmentation_stats
)
==
-
1
)
return
;
return
;
LATSEQ_P
(
"D phy.ldcp--phy.scrambled"
,
"len%u::fm%u.sl%u.dlschid%u.rnti%u"
,
1
,
frame
,
slot
,
dlsch_id
,
rel15
->
rnti
);
stop_meas
(
dlsch_encoding_stats
);
stop_meas
(
dlsch_encoding_stats
);
#ifdef DEBUG_DLSCH
#ifdef DEBUG_DLSCH
printf
(
"PDSCH encoding:
\n
Payload:
\n
"
);
printf
(
"PDSCH encoding:
\n
Payload:
\n
"
);
...
@@ -178,6 +179,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
...
@@ -178,6 +179,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
}
}
#endif
#endif
LATSEQ_P
(
"D phy.scrambled--phy.modulated"
,
"len%u::fm%u.sl%u.codeword%u.rnti%u"
,
1
,
frame
,
slot
,
q
,
rel15
->
rnti
);
stop_meas
(
dlsch_scrambling_stats
);
stop_meas
(
dlsch_scrambling_stats
);
/// Modulation
/// Modulation
start_meas
(
dlsch_modulation_stats
);
start_meas
(
dlsch_modulation_stats
);
...
@@ -185,6 +187,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
...
@@ -185,6 +187,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
encoded_length
,
encoded_length
,
Qm
,
Qm
,
mod_symbs
[
q
]);
mod_symbs
[
q
]);
LATSEQ_P
(
"D phy.modulated--phy.layermapped"
,
"len%u::fm%u.sl%u.codeword%u.qm%u.rnti%u"
,
1
,
frame
,
slot
,
q
,
Qm
,
rel15
->
rnti
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PDSCH_MODULATION
,
0
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PDSCH_MODULATION
,
0
);
stop_meas
(
dlsch_modulation_stats
);
stop_meas
(
dlsch_modulation_stats
);
#ifdef DEBUG_DLSCH
#ifdef DEBUG_DLSCH
...
@@ -215,7 +218,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
...
@@ -215,7 +218,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
printf
(
"
\n
"
);
printf
(
"
\n
"
);
}
}
#endif
#endif
LATSEQ_P
(
"D phy.layermapped--phy.resourcemapped"
,
"len%u::fm%u.sl%u.rnti%u"
,
1
,
frame
,
slot
,
rel15
->
rnti
);
stop_meas
(
&
gNB
->
dlsch_layer_mapping_stats
);
stop_meas
(
&
gNB
->
dlsch_layer_mapping_stats
);
/// Resource mapping
/// Resource mapping
...
@@ -467,6 +470,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
...
@@ -467,6 +470,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
}
// no DMRS/PTRS in symbol
}
// no DMRS/PTRS in symbol
}
// symbol loop
}
// symbol loop
}
// layer loop
}
// layer loop
LATSEQ_P
(
"D phy.resourcemapped--phy.antennamapped"
,
"len%u::fm%u.sl%u.rnti%u"
,
1
,
frame
,
slot
,
rel15
->
rnti
);
stop_meas
(
&
gNB
->
dlsch_resource_mapping_stats
);
stop_meas
(
&
gNB
->
dlsch_resource_mapping_stats
);
///Layer Precoding and Antenna port mapping
///Layer Precoding and Antenna port mapping
...
@@ -477,7 +481,6 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
...
@@ -477,7 +481,6 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
// The Precoding matrix:
// The Precoding matrix:
// The Codebook Type I
// The Codebook Type I
start_meas
(
&
gNB
->
dlsch_precoding_stats
);
start_meas
(
&
gNB
->
dlsch_precoding_stats
);
for
(
int
ap
=
0
;
ap
<
frame_parms
->
nb_antennas_tx
;
ap
++
)
{
for
(
int
ap
=
0
;
ap
<
frame_parms
->
nb_antennas_tx
;
ap
++
)
{
for
(
int
l
=
rel15
->
StartSymbolIndex
;
l
<
rel15
->
StartSymbolIndex
+
rel15
->
NrOfSymbols
;
l
++
)
{
for
(
int
l
=
rel15
->
StartSymbolIndex
;
l
<
rel15
->
StartSymbolIndex
+
rel15
->
NrOfSymbols
;
l
++
)
{
...
@@ -562,7 +565,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
...
@@ -562,7 +565,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
}
//RB loop
}
//RB loop
}
// symbol loop
}
// symbol loop
}
// port loop
}
// port loop
LATSEQ_P
(
"D phy.antennamapped--phy.rotated"
,
"len%u::fm%u.sl%u.nbant%u.rnti%u"
,
1
,
frame
,
slot
,
frame_parms
->
nb_antennas_tx
,
rel15
->
rnti
);
stop_meas
(
&
gNB
->
dlsch_precoding_stats
);
stop_meas
(
&
gNB
->
dlsch_precoding_stats
);
// TODO: handle precoding
// TODO: handle precoding
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
View file @
84521388
...
@@ -44,6 +44,7 @@
...
@@ -44,6 +44,7 @@
#include "common/utils/nr/nr_common.h"
#include "common/utils/nr/nr_common.h"
#include <syscall.h>
#include <syscall.h>
#include <openair2/UTIL/OPT/opt.h>
#include <openair2/UTIL/OPT/opt.h>
#include "common/utils/LATSEQ/latseq.h"
//#define DEBUG_DLSCH_CODING
//#define DEBUG_DLSCH_CODING
//#define DEBUG_DLSCH_FREE 1
//#define DEBUG_DLSCH_FREE 1
...
@@ -329,11 +330,13 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
...
@@ -329,11 +330,13 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
max_bytes
);
max_bytes
);
memcpy
(
harq
->
b
,
a
,
(
A
/
8
)
+
3
);
// using 3 bytes to mimic the case of 24 bit crc
memcpy
(
harq
->
b
,
a
,
(
A
/
8
)
+
3
);
// using 3 bytes to mimic the case of 24 bit crc
}
}
LATSEQ_P
(
"D phy.crc--phy.cbseg"
,
"len%u::fm%u.sl%u.rnti%u"
,
1
,
frame
,
slot
,
rel15
->
rnti
);
impp
.
BG
=
rel15
->
maintenance_parms_v3
.
ldpcBaseGraph
;
impp
.
BG
=
rel15
->
maintenance_parms_v3
.
ldpcBaseGraph
;
start_meas
(
dlsch_segmentation_stats
);
start_meas
(
dlsch_segmentation_stats
);
impp
.
Kb
=
nr_segmentation
(
harq
->
b
,
harq
->
c
,
harq
->
B
,
&
impp
.
n_segments
,
&
impp
.
K
,
impp
.
Zc
,
&
impp
.
F
,
impp
.
BG
);
impp
.
Kb
=
nr_segmentation
(
harq
->
b
,
harq
->
c
,
harq
->
B
,
&
impp
.
n_segments
,
&
impp
.
K
,
impp
.
Zc
,
&
impp
.
F
,
impp
.
BG
);
LATSEQ_P
(
"D phy.cbseg--phy.ldcp"
,
"len%u::fm%u.sl%u.nbseg%u.nbbitscb%u.rnti%u"
,
1
,
frame
,
slot
,
impp
.
n_segments
,
impp
.
K
,
rel15
->
rnti
);
stop_meas
(
dlsch_segmentation_stats
);
stop_meas
(
dlsch_segmentation_stats
);
if
(
impp
.
n_segments
>
MAX_NUM_NR_DLSCH_SEGMENTS_PER_LAYER
*
rel15
->
nrOfLayers
)
{
if
(
impp
.
n_segments
>
MAX_NUM_NR_DLSCH_SEGMENTS_PER_LAYER
*
rel15
->
nrOfLayers
)
{
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
84521388
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
#include "executables/softmodem-common.h"
#include "executables/softmodem-common.h"
#include "nfapi/oai_integration/vendor_ext.h"
#include "nfapi/oai_integration/vendor_ext.h"
#include "NR_SRS-ResourceSet.h"
#include "NR_SRS-ResourceSet.h"
#include "common/utils/LATSEQ/latseq.h"
#include "assertions.h"
#include "assertions.h"
...
@@ -191,6 +192,7 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx,
...
@@ -191,6 +192,7 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx,
if
(
msgTx
->
num_pdsch_slot
>
0
)
{
if
(
msgTx
->
num_pdsch_slot
>
0
)
{
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH
,
1
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH
,
1
);
LOG_D
(
PHY
,
"PDSCH generation started (%d) in frame %d.%d
\n
"
,
msgTx
->
num_pdsch_slot
,
frame
,
slot
);
LOG_D
(
PHY
,
"PDSCH generation started (%d) in frame %d.%d
\n
"
,
msgTx
->
num_pdsch_slot
,
frame
,
slot
);
LATSEQ_P
(
"D mac.dci--phy.crc"
,
"len%u::fm%u.sl%u"
,
1
,
frame
,
slot
);
nr_generate_pdsch
(
msgTx
,
frame
,
slot
);
nr_generate_pdsch
(
msgTx
,
frame
,
slot
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH
,
0
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH
,
0
);
}
}
...
@@ -236,6 +238,7 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx,
...
@@ -236,6 +238,7 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx,
}
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_TX
+
gNB
->
CC_id
,
0
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_TX
+
gNB
->
CC_id
,
0
);
LATSEQ_P
(
"D phy.rotated--phy.ofdmidft"
,
"len%u::fm%u.sl%u"
,
1
,
frame
,
slot
);
}
}
static
void
nr_postDecode
(
PHY_VARS_gNB
*
gNB
,
notifiedFIFO_elt_t
*
req
)
static
void
nr_postDecode
(
PHY_VARS_gNB
*
gNB
,
notifiedFIFO_elt_t
*
req
)
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
84521388
...
@@ -44,6 +44,7 @@
...
@@ -44,6 +44,7 @@
/*Softmodem params*/
/*Softmodem params*/
#include "executables/softmodem-common.h"
#include "executables/softmodem-common.h"
#include "../../../nfapi/oai_integration/vendor_ext.h"
#include "../../../nfapi/oai_integration/vendor_ext.h"
#include "common/utils/LATSEQ/latseq.h"
////////////////////////////////////////////////////////
////////////////////////////////////////////////////////
/////* DLSCH MAC PDU generation (6.1.2 TS 38.321) */////
/////* DLSCH MAC PDU generation (6.1.2 TS 38.321) */////
...
@@ -982,7 +983,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
...
@@ -982,7 +983,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
harq
->
feedback_slot
=
pucch
->
ul_slot
;
harq
->
feedback_slot
=
pucch
->
ul_slot
;
harq
->
is_waiting
=
true
;
harq
->
is_waiting
=
true
;
UE
->
mac_stats
.
dl
.
rounds
[
harq
->
round
]
++
;
UE
->
mac_stats
.
dl
.
rounds
[
harq
->
round
]
++
;
LOG_D
(
NR_MAC
,
LOG_D
(
NR_MAC
,
"%4d.%2d [DLSCH/PDSCH/PUCCH] RNTI %04x DCI L %d start %3d RBs %3d startSymbol %2d nb_symbol %2d dmrspos %x MCS %2d nrOfLayers %d TBS %4d HARQ PID %2d round %d RV %d NDI %d dl_data_to_ULACK %d (%d.%d) PUCCH allocation %d TPC %d
\n
"
,
"%4d.%2d [DLSCH/PDSCH/PUCCH] RNTI %04x DCI L %d start %3d RBs %3d startSymbol %2d nb_symbol %2d dmrspos %x MCS %2d nrOfLayers %d TBS %4d HARQ PID %2d round %d RV %d NDI %d dl_data_to_ULACK %d (%d.%d) PUCCH allocation %d TPC %d
\n
"
,
frame
,
frame
,
slot
,
slot
,
...
@@ -1208,6 +1209,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
...
@@ -1208,6 +1209,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
pdcch_pdu
->
DurationSymbols
);
pdcch_pdu
->
DurationSymbols
);
if
(
harq
->
round
!=
0
)
{
/* retransmission */
if
(
harq
->
round
!=
0
)
{
/* retransmission */
LATSEQ_P
(
"D mac.retx--mac.dci"
,
"len%u::fm%u.sl%u.hqpid%u.hqround%u"
,
TBS
,
frame
,
slot
,
current_harq_pid
,
harq
->
round
);
/* we do not have to do anything, since we do not require to get data
/* we do not have to do anything, since we do not require to get data
* from RLC or encode MAC CEs. The TX_req structure is filled below
* from RLC or encode MAC CEs. The TX_req structure is filled below
* or copy data to FAPI structures */
* or copy data to FAPI structures */
...
@@ -1294,6 +1296,8 @@ void nr_schedule_ue_spec(module_id_t module_id,
...
@@ -1294,6 +1296,8 @@ void nr_schedule_ue_spec(module_id_t module_id,
dlsch_total_bytes
+=
len
;
dlsch_total_bytes
+=
len
;
lcid_bytes
+=
len
;
lcid_bytes
+=
len
;
sdus
+=
1
;
sdus
+=
1
;
LATSEQ_P
(
"D mac.hdr--mac.dci"
,
"len%u::RMbuf%u.fm%u.sl%u.hqpid%u.mcs%u.tbsize%u.rnti%u"
,
len
,
buf
-
len
,
frame
,
slot
,
current_harq_pid
,
sched_pdsch
->
mcs
,
sched_pdsch
->
tb_size
,
rnti
);
LATSEQ_P
(
"D mac.hdr--mac.retx"
,
"len%u::RMbuf%u.hqpid%u.mcs%u.tbsize%u.rnti%u"
,
len
,
buf
-
len
,
current_harq_pid
,
sched_pdsch
->
mcs
,
sched_pdsch
->
tb_size
,
rnti
);
}
}
UE
->
mac_stats
.
dl
.
lc_bytes
[
lcid
]
+=
lcid_bytes
;
UE
->
mac_stats
.
dl
.
lc_bytes
[
lcid
]
+=
lcid_bytes
;
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c
View file @
84521388
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
#include "nr_pdcp_sdu.h"
#include "nr_pdcp_sdu.h"
#include "LOG/log.h"
#include "LOG/log.h"
#include "common/utils/LATSEQ/latseq.h"
static
void
nr_pdcp_entity_recv_pdu
(
nr_pdcp_entity_t
*
entity
,
static
void
nr_pdcp_entity_recv_pdu
(
nr_pdcp_entity_t
*
entity
,
char
*
_buffer
,
int
size
)
char
*
_buffer
,
int
size
)
...
@@ -246,6 +247,7 @@ static int nr_pdcp_entity_process_sdu(nr_pdcp_entity_t *entity,
...
@@ -246,6 +247,7 @@ static int nr_pdcp_entity_process_sdu(nr_pdcp_entity_t *entity,
entity
->
security_mode_completed
=
true
;
entity
->
security_mode_completed
=
true
;
}
}
LATSEQ_P
(
"D pdcp.hdr--pdcp.enqueue"
,
"len%u::SPbuf%u.sn%u.Pbuf%u"
,
header_size
+
size
+
integrity_size
,
buffer
,
sn
,
buf
);
entity
->
tx_next
++
;
entity
->
tx_next
++
;
entity
->
stats
.
txpdu_pkts
++
;
entity
->
stats
.
txpdu_pkts
++
;
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
View file @
84521388
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
#include "NR_CellGroupConfig.h"
#include "NR_CellGroupConfig.h"
#include "openair2/RRC/NR/nr_rrc_proto.h"
#include "openair2/RRC/NR/nr_rrc_proto.h"
#include <stdint.h>
#include <stdint.h>
#include "common/utils/LATSEQ/latseq.h"
/* from OAI */
/* from OAI */
#include "oai_asn1.h"
#include "oai_asn1.h"
...
@@ -697,6 +698,7 @@ static void deliver_pdu_drb_gnb(void *deliver_pdu_data, ue_id_t ue_id, int rb_id
...
@@ -697,6 +698,7 @@ static void deliver_pdu_drb_gnb(void *deliver_pdu_data, ue_id_t ue_id, int rb_id
mem_block_t
*
memblock
=
get_free_mem_block
(
size
,
__FUNCTION__
);
mem_block_t
*
memblock
=
get_free_mem_block
(
size
,
__FUNCTION__
);
memcpy
(
memblock
->
data
,
buf
,
size
);
memcpy
(
memblock
->
data
,
buf
,
size
);
LOG_D
(
PDCP
,
"%s(): (drb %d) calling rlc_data_req size %d
\n
"
,
__func__
,
rb_id
,
size
);
LOG_D
(
PDCP
,
"%s(): (drb %d) calling rlc_data_req size %d
\n
"
,
__func__
,
rb_id
,
size
);
LATSEQ_P
(
"D pdcp.enqueue--rlc.buf"
,
"len%u::Pbuf%u.PRbuf%u.ueid%u"
,
size
,
buf
,
memblock
->
data
,
ue_id
);
enqueue_rlc_data_req
(
&
ctxt
,
0
,
MBMS_FLAG_NO
,
rb_id
,
sdu_id
,
0
,
size
,
memblock
);
enqueue_rlc_data_req
(
&
ctxt
,
0
,
MBMS_FLAG_NO
,
rb_id
,
sdu_id
,
0
,
size
,
memblock
);
}
}
}
}
...
...
openair2/LAYER2/nr_rlc/nr_rlc_entity_am.c
View file @
84521388
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
#include "LOG/log.h"
#include "LOG/log.h"
#include "common/utils/time_stat.h"
#include "common/utils/time_stat.h"
#include "common/utils/LATSEQ/latseq.h"
/* for a given SDU/SDU segment, computes the corresponding PDU header size */
/* for a given SDU/SDU segment, computes the corresponding PDU header size */
static
int
compute_pdu_header_size
(
nr_rlc_entity_am_t
*
entity
,
static
int
compute_pdu_header_size
(
nr_rlc_entity_am_t
*
entity
,
...
@@ -1543,6 +1544,7 @@ static int generate_retx_pdu(nr_rlc_entity_am_t *entity, char *buffer,
...
@@ -1543,6 +1544,7 @@ static int generate_retx_pdu(nr_rlc_entity_am_t *entity, char *buffer,
int
p
;
int
p
;
sdu
=
entity
->
retransmit_list
;
sdu
=
entity
->
retransmit_list
;
LATSEQ_P
(
"D rlc.retx--TODO"
,
"len%u::sn%u.so%u"
,
sdu
->
size
,
sdu
->
sdu
->
sn
,
sdu
->
so
);
pdu_header_size
=
compute_pdu_header_size
(
entity
,
sdu
);
pdu_header_size
=
compute_pdu_header_size
(
entity
,
sdu
);
...
@@ -1619,6 +1621,7 @@ static int generate_tx_pdu(nr_rlc_entity_am_t *entity, char *buffer, int size)
...
@@ -1619,6 +1621,7 @@ static int generate_tx_pdu(nr_rlc_entity_am_t *entity, char *buffer, int size)
return
0
;
return
0
;
sdu
=
entity
->
tx_list
;
sdu
=
entity
->
tx_list
;
LATSEQ_P
(
"D rlc.genpdu--rlc.seg"
,
"len%u::Rbuf%u.sn%u"
,
sdu
->
size
,
sdu
->
sdu
,
sdu
->
sdu
->
sn
);
pdu_header_size
=
compute_pdu_header_size
(
entity
,
sdu
);
pdu_header_size
=
compute_pdu_header_size
(
entity
,
sdu
);
...
@@ -1638,7 +1641,7 @@ static int generate_tx_pdu(nr_rlc_entity_am_t *entity, char *buffer, int size)
...
@@ -1638,7 +1641,7 @@ static int generate_tx_pdu(nr_rlc_entity_am_t *entity, char *buffer, int size)
entity
->
common
.
bstatus
.
tx_size
-=
pdu_size
;
entity
->
common
.
bstatus
.
tx_size
-=
pdu_size
;
/* assign SN to SDU */
/* assign SN to SDU */
sdu
->
sdu
->
sn
=
entity
->
tx_next
;
//
sdu->sdu->sn = entity->tx_next;
/* segment if necessary */
/* segment if necessary */
if
(
pdu_size
>
size
)
{
if
(
pdu_size
>
size
)
{
...
@@ -1657,8 +1660,8 @@ static int generate_tx_pdu(nr_rlc_entity_am_t *entity, char *buffer, int size)
...
@@ -1657,8 +1660,8 @@ static int generate_tx_pdu(nr_rlc_entity_am_t *entity, char *buffer, int size)
}
}
/* update tx_next if the SDU segment is the last */
/* update tx_next if the SDU segment is the last */
if
(
sdu
->
is_last
)
//
if (sdu->is_last)
entity
->
tx_next
=
(
entity
->
tx_next
+
1
)
%
entity
->
sn_modulus
;
//
entity->tx_next = (entity->tx_next + 1) % entity->sn_modulus;
/* put SDU/SDU segment in the wait list */
/* put SDU/SDU segment in the wait list */
/* speedup: check end of wait list, probably the new sdu comes after */
/* speedup: check end of wait list, probably the new sdu comes after */
...
@@ -1690,6 +1693,7 @@ static int generate_tx_pdu(nr_rlc_entity_am_t *entity, char *buffer, int size)
...
@@ -1690,6 +1693,7 @@ static int generate_tx_pdu(nr_rlc_entity_am_t *entity, char *buffer, int size)
entity
->
force_poll
=
0
;
entity
->
force_poll
=
0
;
}
}
int
ret_size
=
serialize_sdu
(
entity
,
sdu
,
buffer
,
size
,
p
);
int
ret_size
=
serialize_sdu
(
entity
,
sdu
,
buffer
,
size
,
p
);
LATSEQ_P
(
"D rlc.seg--mac.hdr"
,
"len%u::Rbuf%u.sn%u.so%u.RMbuf%u"
,
ret_size
,
sdu
->
sdu
,
sdu
->
sdu
->
sn
,
sdu
->
so
,
buffer
);
entity
->
common
.
stats
.
txpdu_pkts
++
;
entity
->
common
.
stats
.
txpdu_pkts
++
;
entity
->
common
.
stats
.
txpdu_bytes
+=
ret_size
;
entity
->
common
.
stats
.
txpdu_bytes
+=
ret_size
;
...
@@ -1771,10 +1775,12 @@ void nr_rlc_entity_am_recv_sdu(nr_rlc_entity_t *_entity,
...
@@ -1771,10 +1775,12 @@ void nr_rlc_entity_am_recv_sdu(nr_rlc_entity_t *_entity,
entity
->
sdu_rejected
);
entity
->
sdu_rejected
);
entity
->
sdu_rejected
=
0
;
entity
->
sdu_rejected
=
0
;
entity
->
t_log_buffer_full
=
entity
->
t_current
;
entity
->
t_log_buffer_full
=
entity
->
t_current
;
LATSEQ_P
(
"D rlc.sdu--rlc.rejected1"
,
"len%u::PRbuf%u"
,
size
,
buffer
);
}
}
if
(
entity
->
tx_size
+
size
>
entity
->
tx_maxsize
)
{
if
(
entity
->
tx_size
+
size
>
entity
->
tx_maxsize
)
{
entity
->
sdu_rejected
++
;
entity
->
sdu_rejected
++
;
LATSEQ_P
(
"D rlc.sdu--rlc.rejected2"
,
"len%u::PRbuf%u"
,
size
,
buffer
);
return
;
return
;
}
}
...
@@ -1783,6 +1789,9 @@ void nr_rlc_entity_am_recv_sdu(nr_rlc_entity_t *_entity,
...
@@ -1783,6 +1789,9 @@ void nr_rlc_entity_am_recv_sdu(nr_rlc_entity_t *_entity,
entity
->
common
.
stats
.
rxsdu_bytes
+=
size
;
entity
->
common
.
stats
.
rxsdu_bytes
+=
size
;
sdu
=
nr_rlc_new_sdu
(
buffer
,
size
,
sdu_id
);
sdu
=
nr_rlc_new_sdu
(
buffer
,
size
,
sdu_id
);
sdu
->
sdu
->
sn
=
entity
->
tx_next
;
entity
->
tx_next
=
(
entity
->
tx_next
+
1
)
%
entity
->
sn_modulus
;
LATSEQ_P
(
"D rlc.buf--rlc.genpdu"
,
"len%u::PRbuf%u.Rbuf%u.sn%u"
,
size
,
buffer
,
sdu
->
sdu
,
sdu
->
sdu
->
sn
);
LOG_D
(
RLC
,
"Created new RLC SDU and append it to the RLC list
\n
"
);
LOG_D
(
RLC
,
"Created new RLC SDU and append it to the RLC list
\n
"
);
...
...
openair2/SDAP/nr_sdap/nr_sdap_entity.c
View file @
84521388
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#include <openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.h>
#include <openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.h>
#include <openair3/ocp-gtpu/gtp_itf.h>
#include <openair3/ocp-gtpu/gtp_itf.h>
#include "openair2/LAYER2/nr_pdcp/nr_pdcp_ue_manager.h"
#include "openair2/LAYER2/nr_pdcp/nr_pdcp_ue_manager.h"
#include "common/utils/LATSEQ/latseq.h"
#include <stdlib.h>
#include <stdlib.h>
#include <string.h>
#include <string.h>
...
@@ -69,6 +70,7 @@ static bool nr_sdap_tx_entity(nr_sdap_entity_t *entity,
...
@@ -69,6 +70,7 @@ static bool nr_sdap_tx_entity(nr_sdap_entity_t *entity,
const
uint32_t
*
destinationL2Id
,
const
uint32_t
*
destinationL2Id
,
const
uint8_t
qfi
,
const
uint8_t
qfi
,
const
bool
rqi
)
{
const
bool
rqi
)
{
LATSEQ_P
(
"D sdap.pdu--pdcp.hdr"
,
"len%u::SPbuf%u.ueid%u"
,
sdu_buffer_size
,
sdu_buffer
,
entity
->
ue_id
);
/* The offset of the SDAP header, it might be 0 if has_sdap_tx is not true in the pdcp entity. */
/* The offset of the SDAP header, it might be 0 if has_sdap_tx is not true in the pdcp entity. */
int
offset
=
0
;
int
offset
=
0
;
bool
ret
=
false
;
bool
ret
=
false
;
...
...
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