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
8dff7f2b
Commit
8dff7f2b
authored
Dec 23, 2023
by
Marius Tillner
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'LatSeq_5GSA_downlink' into LatSeq_5GSA
parents
073597ad
84521388
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
36 additions
and
8 deletions
+36
-8
executables/nr-ru.c
executables/nr-ru.c
+3
-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
+2
-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
+1
-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
+11
-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 @
8dff7f2b
...
...
@@ -853,6 +853,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
,
(
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
);
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
txs
=
ru
->
rfdevice
.
trx_write_func
(
&
ru
->
rfdevice
,
timestamp
+
ru
->
ts_offset
-
ru
->
openair0_cfg
.
tx_sample_advance
-
sf_extension
,
...
...
@@ -860,6 +861,7 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
siglen
+
sf_extension
,
ru
->
nb_tx
,
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
,
"[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
"
,
...
...
@@ -1081,6 +1083,7 @@ void ru_tx_func(void *param) {
// 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
);
LATSEQ_P
(
"D phy.ofdmidft--phy.ant"
,
"len%u::fm%u.sl%u"
,
samples
,
frame_tx
,
slot_tx
);
if
(
!
emulate_rf
)
{
// do outgoing fronthaul (south) if needed
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
8dff7f2b
...
...
@@ -39,6 +39,7 @@
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "common/utils/nr/nr_common.h"
#include "executables/softmodem-common.h"
#include "common/utils/LATSEQ/latseq.h"
//#define DEBUG_DLSCH
//#define DEBUG_DLSCH_MAPPING
...
...
@@ -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
)));
bzero
(
output
,
rel15
->
rbSize
*
NR_SYMBOLS_PER_SLOT
*
NR_NB_SC_PER_RB
*
Qm
*
rel15
->
nrOfLayers
);
start_meas
(
dlsch_encoding_stats
);
if
(
nr_dlsch_encoding
(
gNB
,
frame
,
slot
,
harq
,
frame_parms
,
output
,
tinput
,
tprep
,
tparity
,
toutput
,
dlsch_rate_matching_stats
,
dlsch_interleaving_stats
,
dlsch_segmentation_stats
)
==
-
1
)
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
);
#ifdef DEBUG_DLSCH
printf
(
"PDSCH encoding:
\n
Payload:
\n
"
);
...
...
@@ -178,6 +179,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
}
#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
);
/// Modulation
start_meas
(
dlsch_modulation_stats
);
...
...
@@ -185,6 +187,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
encoded_length
,
Qm
,
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
);
stop_meas
(
dlsch_modulation_stats
);
#ifdef DEBUG_DLSCH
...
...
@@ -215,7 +218,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
printf
(
"
\n
"
);
}
#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
);
/// Resource mapping
...
...
@@ -467,6 +470,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
}
// no DMRS/PTRS in symbol
}
// symbol 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
);
///Layer Precoding and Antenna port mapping
...
...
@@ -477,7 +481,6 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
// The Precoding matrix:
// The Codebook Type I
start_meas
(
&
gNB
->
dlsch_precoding_stats
);
for
(
int
ap
=
0
;
ap
<
frame_parms
->
nb_antennas_tx
;
ap
++
)
{
for
(
int
l
=
rel15
->
StartSymbolIndex
;
l
<
rel15
->
StartSymbolIndex
+
rel15
->
NrOfSymbols
;
l
++
)
{
...
...
@@ -562,7 +565,7 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
}
//RB loop
}
// symbol 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
);
// TODO: handle precoding
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
View file @
8dff7f2b
...
...
@@ -44,6 +44,7 @@
#include "common/utils/nr/nr_common.h"
#include <syscall.h>
#include <openair2/UTIL/OPT/opt.h>
#include "common/utils/LATSEQ/latseq.h"
//#define DEBUG_DLSCH_CODING
//#define DEBUG_DLSCH_FREE 1
...
...
@@ -329,11 +330,13 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
max_bytes
);
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
;
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
);
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
);
if
(
impp
.
n_segments
>
MAX_NUM_NR_DLSCH_SEGMENTS_PER_LAYER
*
rel15
->
nrOfLayers
)
{
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
8dff7f2b
...
...
@@ -192,6 +192,7 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx,
if
(
msgTx
->
num_pdsch_slot
>
0
)
{
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
);
LATSEQ_P
(
"D mac.dci--phy.crc"
,
"len%u::fm%u.sl%u"
,
1
,
frame
,
slot
);
nr_generate_pdsch
(
msgTx
,
frame
,
slot
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH
,
0
);
}
...
...
@@ -237,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
);
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
)
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
8dff7f2b
...
...
@@ -44,6 +44,7 @@
/*Softmodem params*/
#include "executables/softmodem-common.h"
#include "../../../nfapi/oai_integration/vendor_ext.h"
#include "common/utils/LATSEQ/latseq.h"
////////////////////////////////////////////////////////
/////* DLSCH MAC PDU generation (6.1.2 TS 38.321) */////
...
...
@@ -982,7 +983,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
harq
->
feedback_slot
=
pucch
->
ul_slot
;
harq
->
is_waiting
=
true
;
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
"
,
frame
,
slot
,
...
...
@@ -1208,6 +1209,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
pdcch_pdu
->
DurationSymbols
);
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
* from RLC or encode MAC CEs. The TX_req structure is filled below
* or copy data to FAPI structures */
...
...
@@ -1294,6 +1296,8 @@ void nr_schedule_ue_spec(module_id_t module_id,
dlsch_total_bytes
+=
len
;
lcid_bytes
+=
len
;
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
;
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_entity.c
View file @
8dff7f2b
...
...
@@ -251,6 +251,7 @@ static int nr_pdcp_entity_process_sdu(nr_pdcp_entity_t *entity,
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
->
stats
.
txpdu_pkts
++
;
...
...
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
View file @
8dff7f2b
...
...
@@ -31,6 +31,7 @@
#include "NR_CellGroupConfig.h"
#include "openair2/RRC/NR/nr_rrc_proto.h"
#include <stdint.h>
#include "common/utils/LATSEQ/latseq.h"
/* from OAI */
#include "oai_asn1.h"
...
...
@@ -698,6 +699,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__
);
memcpy
(
memblock
->
data
,
buf
,
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
);
}
}
...
...
openair2/LAYER2/nr_rlc/nr_rlc_entity_am.c
View file @
8dff7f2b
...
...
@@ -1546,6 +1546,7 @@ static int generate_retx_pdu(nr_rlc_entity_am_t *entity, char *buffer,
int
p
;
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
);
...
...
@@ -1622,6 +1623,7 @@ static int generate_tx_pdu(nr_rlc_entity_am_t *entity, char *buffer, int size)
return
0
;
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
);
...
...
@@ -1641,7 +1643,7 @@ static int generate_tx_pdu(nr_rlc_entity_am_t *entity, char *buffer, int size)
entity
->
common
.
bstatus
.
tx_size
-=
pdu_size
;
/* assign SN to SDU */
sdu
->
sdu
->
sn
=
entity
->
tx_next
;
//
sdu->sdu->sn = entity->tx_next;
/* segment if necessary */
if
(
pdu_size
>
size
)
{
...
...
@@ -1660,8 +1662,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 */
if
(
sdu
->
is_last
)
entity
->
tx_next
=
(
entity
->
tx_next
+
1
)
%
entity
->
sn_modulus
;
//
if (sdu->is_last)
//
entity->tx_next = (entity->tx_next + 1) % entity->sn_modulus;
/* put SDU/SDU segment in the wait list */
/* speedup: check end of wait list, probably the new sdu comes after */
...
...
@@ -1693,6 +1695,7 @@ static int generate_tx_pdu(nr_rlc_entity_am_t *entity, char *buffer, int size)
entity
->
force_poll
=
0
;
}
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_bytes
+=
ret_size
;
...
...
@@ -1774,10 +1777,12 @@ void nr_rlc_entity_am_recv_sdu(nr_rlc_entity_t *_entity,
entity
->
sdu_rejected
);
entity
->
sdu_rejected
=
0
;
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
)
{
entity
->
sdu_rejected
++
;
LATSEQ_P
(
"D rlc.sdu--rlc.rejected2"
,
"len%u::PRbuf%u"
,
size
,
buffer
);
return
;
}
...
...
@@ -1786,6 +1791,9 @@ void nr_rlc_entity_am_recv_sdu(nr_rlc_entity_t *_entity,
entity
->
common
.
stats
.
rxsdu_bytes
+=
size
;
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
"
);
...
...
openair2/SDAP/nr_sdap/nr_sdap_entity.c
View file @
8dff7f2b
...
...
@@ -24,6 +24,7 @@
#include <openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.h>
#include <openair3/ocp-gtpu/gtp_itf.h>
#include "openair2/LAYER2/nr_pdcp/nr_pdcp_ue_manager.h"
#include "common/utils/LATSEQ/latseq.h"
#include <stdlib.h>
#include <string.h>
...
...
@@ -70,6 +71,7 @@ static bool nr_sdap_tx_entity(nr_sdap_entity_t *entity,
const
uint32_t
*
destinationL2Id
,
const
uint8_t
qfi
,
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. */
int
offset
=
0
;
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