Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
Michael Black
OpenXG UE
Commits
8a914732
Commit
8a914732
authored
Feb 04, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/bler_txoptim' into integration_2022_wk05_b
parents
a16a7fa9
d39fdc5c
Changes
27
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
470 additions
and
70 deletions
+470
-70
ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf
...pts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf
+1
-1
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-1
common/utils/T/tracer/macpdu2wireshark.c
common/utils/T/tracer/macpdu2wireshark.c
+25
-0
executables/nr-gnb.c
executables/nr-gnb.c
+2
-0
openair1/PHY/CODING/crc_byte.c
openair1/PHY/CODING/crc_byte.c
+3
-3
openair1/PHY/INIT/nr_init_ue.c
openair1/PHY/INIT/nr_init_ue.c
+1
-10
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+7
-6
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
+4
-3
openair1/PHY/NR_TRANSPORT/pucch_rx.c
openair1/PHY/NR_TRANSPORT/pucch_rx.c
+4
-1
openair1/PHY/TOOLS/time_meas.h
openair1/PHY/TOOLS/time_meas.h
+1
-0
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+1
-0
openair1/SCHED_NR/fapi_nr_l1.c
openair1/SCHED_NR/fapi_nr_l1.c
+4
-2
openair1/SIMULATION/NR_PHY/dlschsim.c
openair1/SIMULATION/NR_PHY/dlschsim.c
+23
-9
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
+3
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+18
-13
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+10
-1
openair2/LAYER2/NR_MAC_gNB/main.c
openair2/LAYER2/NR_MAC_gNB/main.c
+4
-1
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+4
-0
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
+5
-7
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+1
-1
openair2/UTIL/OPT/probe.c
openair2/UTIL/OPT/probe.c
+1
-1
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf
...ENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf
+7
-4
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.2x2.usrpn300.conf
...IC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.2x2.usrpn300.conf
+1
-1
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf
...ENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf
+6
-2
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.162PRB.2x2.usrpn300.conf
...IC-NR-5GC/CONF/gnb.sa.band78.fr1.162PRB.2x2.usrpn300.conf
+331
-0
No files found.
ci-scripts/conf_files/gnb.band78.sa.fr1.106PRB.2x2.usrpn310.conf
View file @
8a914732
...
...
@@ -226,7 +226,7 @@ MACRLCs = (
tr_n_preference
=
"local_RRC"
;
# pusch_TargetSNRx10 = 200;
# pucch_TargetSNRx10 = 150;
ulsch_max_frame_inactivity
=
1
;
ulsch_max_frame_inactivity
=
0
;
}
);
...
...
cmake_targets/CMakeLists.txt
View file @
8a914732
#/*
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
...
...
common/utils/T/tracer/macpdu2wireshark.c
View file @
8a914732
...
...
@@ -362,6 +362,16 @@ void nr_dl_retx(void *_d, event e)
e
.
e
[
d
->
nr_dl_retx_data
].
bsize
,
NO_PREAMBLE
);
}
void
nr_dl_retx
(
void
*
_d
,
event
e
)
{
ev_data
*
d
=
_d
;
trace_nr
(
d
,
NR_DIRECTION_DOWNLINK
,
NR_C_RNTI
,
e
.
e
[
d
->
nr_dl_retx_rnti
].
i
,
e
.
e
[
d
->
nr_dl_retx_frame
].
i
,
e
.
e
[
d
->
nr_dl_retx_slot
].
i
,
e
.
e
[
d
->
nr_dl_retx_data
].
b
,
e
.
e
[
d
->
nr_dl_retx_data
].
bsize
,
NO_PREAMBLE
);
}
void
nr_mib
(
void
*
_d
,
event
e
)
{
ev_data
*
d
=
_d
;
...
...
@@ -396,6 +406,7 @@ void setup_data(ev_data *d, void *database, int ul_id, int dl_id, int mib_id,
{
database_event_format
f
;
int
i
;
d
->
ul_rnti
=
-
1
;
d
->
ul_frame
=
-
1
;
d
->
ul_subframe
=
-
1
;
...
...
@@ -568,6 +579,20 @@ void setup_data(ev_data *d, void *database, int ul_id, int dl_id, int mib_id,
d
->
nr_dl_retx_data
==
-
1
)
goto
error
;
/* NR dl retx: rnti, frame, slot, data */
f
=
get_format
(
database
,
nr_dl_retx_id
);
for
(
i
=
0
;
i
<
f
.
count
;
i
++
)
{
G
(
"rnti"
,
"int"
,
d
->
nr_dl_retx_rnti
);
G
(
"frame"
,
"int"
,
d
->
nr_dl_retx_frame
);
G
(
"slot"
,
"int"
,
d
->
nr_dl_retx_slot
);
G
(
"data"
,
"buffer"
,
d
->
nr_dl_retx_data
);
}
if
(
d
->
nr_dl_retx_rnti
==
-
1
||
d
->
nr_dl_retx_frame
==
-
1
||
d
->
nr_dl_retx_slot
==
-
1
||
d
->
nr_dl_retx_data
==
-
1
)
goto
error
;
/* NR MIB: frame, slot, data */
f
=
get_format
(
database
,
nr_mib_id
);
...
...
executables/nr-gnb.c
View file @
8a914732
...
...
@@ -307,6 +307,7 @@ static void dump_L1_meas_stats(PHY_VARS_gNB *gNB, RU_t *ru, char *output) {
stroff
+=
print_meas_log
(
&
gNB
->
ul_indication_stats
,
"UL Indication"
,
NULL
,
NULL
,
output
+
stroff
);
stroff
+=
print_meas_log
(
&
gNB
->
rx_pusch_stats
,
"PUSCH inner-receiver"
,
NULL
,
NULL
,
output
+
stroff
);
stroff
+=
print_meas_log
(
&
gNB
->
ulsch_decoding_stats
,
"PUSCH decoding"
,
NULL
,
NULL
,
output
+
stroff
);
stroff
+=
print_meas_log
(
&
gNB
->
schedule_response_stats
,
"Schedule Response"
,
NULL
,
NULL
,
output
+
stroff
);
if
(
ru
->
feprx
)
stroff
+=
print_meas_log
(
&
ru
->
ofdm_demod_stats
,
"feprx"
,
NULL
,
NULL
,
output
+
stroff
);
if
(
ru
->
feptx_ofdm
)
{
...
...
@@ -343,6 +344,7 @@ void *nrL1_stats_thread(void *param) {
reset_meas
(
&
gNB
->
ul_indication_stats
);
reset_meas
(
&
gNB
->
rx_pusch_stats
);
reset_meas
(
&
gNB
->
ulsch_decoding_stats
);
reset_meas
(
&
gNB
->
schedule_response_stats
);
while
(
!
oai_exit
)
{
sleep
(
1
);
...
...
openair1/PHY/CODING/crc_byte.c
View file @
8a914732
...
...
@@ -38,7 +38,7 @@
#include "coding_defs.h"
#include "assertions.h"
#if USE_INTEL_CRC
#if USE_INTEL_CRC
#include "crc.h"
#endif
/*ref 36-212 v8.6.0 , pp 8-9 */
...
...
@@ -159,7 +159,7 @@ unsigned int crc24a (unsigned char * inptr,
if
(
bitlen
%
8
||
!
USE_INTEL_CRC
)
{
unsigned
int
crc
=
0
;
int
resbit
=
(
bitlen
%
8
);
while
(
octetlen
--
>
0
)
{
// printf("crc24a: in %x => crc %x\n",crc,*inptr);
crc
=
(
crc
<<
8
)
^
crc24aTable
[(
*
inptr
++
)
^
(
crc
>>
24
)];
...
...
@@ -192,7 +192,7 @@ unsigned int crc24b (unsigned char * inptr,
int
bitlen
)
{
int
octetlen
=
bitlen
/
8
;
/* Change in octets */
if
(
bitlen
%
8
||
!
USE_INTEL_CRC
)
{
unsigned
int
crc
=
0
;
int
resbit
=
(
bitlen
%
8
);
...
...
openair1/PHY/INIT/nr_init_ue.c
View file @
8a914732
...
...
@@ -20,23 +20,14 @@
*/
#include "phy_init.h"
#include "SCHED_UE/sched_UE.h"
#include "PHY/phy_extern_nr_ue.h"
//#include "SIMULATION/TOOLS/sim.h"
/*#include "RadioResourceConfigCommonSIB.h"
#include "RadioResourceConfigDedicated.h"
#include "TDD-Config.h"
#include "MBSFN-SubframeConfigList.h"*/
#include "openair1/PHY/defs_RU.h"
#include "openair1/PHY/impl_defs_nr.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "assertions.h"
#include
<math.h>
#include
"PHY/MODULATION/nr_modulation.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_ue.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
//#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/NR_REFSIG/pss_nr.h"
#include "PHY/NR_REFSIG/ul_ref_seq_nr.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
8a914732
...
...
@@ -183,12 +183,13 @@ void nr_generate_pdsch(processingData_L1tx_t *msgTx,
unsigned
char
output
[
rel15
->
rbSize
*
NR_SYMBOLS_PER_SLOT
*
NR_NB_SC_PER_RB
*
8
*
NR_MAX_NB_LAYERS
]
__attribute__
((
aligned
(
32
)));
bzero
(
output
,
rel15
->
rbSize
*
NR_SYMBOLS_PER_SLOT
*
NR_NB_SC_PER_RB
*
8
*
NR_MAX_NB_LAYERS
);
start_meas
(
dlsch_encoding_stats
);
nr_dlsch_encoding
(
gNB
,
harq
->
pdu
,
frame
,
slot
,
dlsch
,
frame_parms
,
output
,
tinput
,
tprep
,
tparity
,
toutput
,
dlsch_rate_matching_stats
,
dlsch_interleaving_stats
,
dlsch_segmentation_stats
);
if
(
nr_dlsch_encoding
(
gNB
,
harq
->
pdu
,
frame
,
slot
,
dlsch
,
frame_parms
,
output
,
tinput
,
tprep
,
tparity
,
toutput
,
dlsch_rate_matching_stats
,
dlsch_interleaving_stats
,
dlsch_segmentation_stats
)
==
-
1
)
return
;
stop_meas
(
dlsch_encoding_stats
);
#ifdef DEBUG_DLSCH
printf
(
"PDSCH encoding:
\n
Payload:
\n
"
);
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
View file @
8a914732
...
...
@@ -254,7 +254,7 @@ void ldpc8blocks( void *p) {
#ifdef DEBUG_DLSCH_CODING
for
(
int
i
=
0
;
i
<
16
;
i
++
)
printf
(
"output ratematching e[%d]= %d r_offset %u
\n
"
,
i
,
harq
->
e
[
i
+
r_offset
],
r_offset
);
printf
(
"output ratematching e[%d]= %d r_offset %u
\n
"
,
i
,
e
[
i
],
r_offset
);
#endif
nr_interleaving_ldpc
(
E
,
...
...
@@ -370,11 +370,11 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
//d_tmp[r] = &harq->d[r][0];
//channel_input[r] = &harq->d[r][0];
#ifdef DEBUG_DLSCH_CODING
LOG_D
(
PHY
,
"Encoder: B %d F %d
\n
"
,
harq
->
B
,
impp
->
F
);
LOG_D
(
PHY
,
"Encoder: B %d F %d
\n
"
,
harq
->
B
,
impp
.
F
);
LOG_D
(
PHY
,
"start ldpc encoder segment %d/%d
\n
"
,
r
,
impp
.
n_segments
);
LOG_D
(
PHY
,
"input %d %d %d %d %d
\n
"
,
harq
->
c
[
r
][
0
],
harq
->
c
[
r
][
1
],
harq
->
c
[
r
][
2
],
harq
->
c
[
r
][
3
],
harq
->
c
[
r
][
4
]);
for
(
int
cnt
=
0
;
cnt
<
22
*
(
*
Zc
)
/
8
;
cnt
++
)
{
for
(
int
cnt
=
0
;
cnt
<
22
*
(
*
impp
.
Zc
)
/
8
;
cnt
++
)
{
LOG_D
(
PHY
,
"%d "
,
harq
->
c
[
r
][
cnt
]);
}
...
...
@@ -405,6 +405,7 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
notifiedFIFO_elt_t
*
req
=
pullTpool
(
&
nf
,
gNB
->
threadPool
);
delNotifiedFIFO_elt
(
req
);
nbJobs
--
;
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_DLSCH_ENCODING
,
VCD_FUNCTION_OUT
);
return
0
;
...
...
openair1/PHY/NR_TRANSPORT/pucch_rx.c
View file @
8a914732
...
...
@@ -328,7 +328,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
LOG_D
(
PHY
,
"PUCCH IDFT[%d/%d] = (%d,%d)=>%f
\n
"
,
mcs
[
i
],
seq_index
,
corr_re
[
0
][
0
],
corr_im
[
0
][
0
],
10
*
log10
((
double
)
corr_re
[
0
][
0
]
*
corr_re
[
0
][
0
]
+
(
double
)
corr_im
[
0
][
0
]
*
corr_im
[
0
][
0
]));
if
(
pucch_pdu
->
nr_of_symbols
==
2
)
if
(
pucch_pdu
->
nr_of_symbols
==
2
)
LOG_D
(
PHY
,
"PUCCH 2nd symbol IDFT[%d/%d] = (%d,%d)=>%f
\n
"
,
mcs
[
i
],
seq_index
,
corr_re
[
0
][
1
],
corr_im
[
0
][
1
],
10
*
log10
((
double
)
corr_re
[
0
][
1
]
*
corr_re
[
0
][
1
]
+
(
double
)
corr_im
[
0
][
1
]
*
corr_im
[
0
][
1
]));
...
...
@@ -431,9 +431,11 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
uci_pdu
->
harq
->
num_harq
=
1
;
uci_pdu
->
harq
->
harq_confidence_level
=
no_conf
?
1
:
0
;
uci_pdu
->
harq
->
harq_list
=
(
nfapi_nr_harq_t
*
)
malloc
(
1
);
uci_pdu
->
harq
->
harq_list
[
0
].
harq_value
=
!
(
index
&
0x01
);
LOG_D
(
PHY
,
"[DLSCH/PDSCH/PUCCH] %d.%d HARQ value %d (0 pass, 1 fail) with confidence level %d (0 is good, 1 is bad) xrt_mag %d xrt_mag_next %d n0 %d (%d,%d) pucch0_thres %d, cqi %d, SNRtimes10 %d, energy %f, sync_pos %d
\n
"
,
frame
,
slot
,
uci_pdu
->
harq
->
harq_list
[
0
].
harq_value
,
uci_pdu
->
harq
->
harq_confidence_level
,
xrtmag_dBtimes10
,
xrtmag_next_dBtimes10
,
max_n0
,
uci_stats
->
pucch0_n00
,
uci_stats
->
pucch0_n01
,
uci_stats
->
pucch0_thres
,
cqi
,
SNRtimes10
,
10
*
log10
((
double
)
sigenergy
),
gNB
->
ulsch_stats
[
0
].
sync_pos
);
if
(
pucch_pdu
->
sr_flag
==
1
)
{
uci_pdu
->
sr
=
calloc
(
1
,
sizeof
(
*
uci_pdu
->
sr
));
uci_pdu
->
sr
->
sr_indication
=
(
index
>
1
)
?
1
:
0
;
...
...
@@ -447,6 +449,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
uci_pdu
->
harq
->
num_harq
=
2
;
uci_pdu
->
harq
->
harq_confidence_level
=
(
no_conf
)
?
1
:
0
;
uci_pdu
->
harq
->
harq_list
=
(
nfapi_nr_harq_t
*
)
malloc
(
2
);
uci_pdu
->
harq
->
harq_list
[
1
].
harq_value
=
!
(
index
&
0x01
);
uci_pdu
->
harq
->
harq_list
[
0
].
harq_value
=
!
((
index
>>
1
)
&
0x01
);
LOG_D
(
PHY
,
"[DLSCH/PDSCH/PUCCH] %d.%d HARQ values %d (0 pass, 1 fail) and %d with confidence level %d (0 is good, 1 is bad), xrt_mag %d xrt_mag_next %d n0 %d (%d,%d) pucch0_thres %d, cqi %d, SNRtimes10 %d,sync_pos %d
\n
"
,
...
...
openair1/PHY/TOOLS/time_meas.h
View file @
8a914732
...
...
@@ -142,6 +142,7 @@ static inline void start_meas(time_stats_t *ts) {
}
else
{
ts
->
in
=
rdtsc_oai
();
}
if
((
ts
->
trials
&
16383
)
<
10
)
ts
->
max
=
0
;
}
}
...
...
openair1/PHY/defs_gNB.h
View file @
8a914732
...
...
@@ -865,6 +865,7 @@ typedef struct PHY_VARS_gNB_s {
time_stats_t
rx_pusch_stats
;
time_stats_t
ul_indication_stats
;
time_stats_t
schedule_response_stats
;
time_stats_t
ulsch_decoding_stats
;
time_stats_t
ulsch_rate_unmatching_stats
;
time_stats_t
ulsch_ldpc_decoding_stats
;
...
...
openair1/SCHED_NR/fapi_nr_l1.c
View file @
8a914732
...
...
@@ -148,6 +148,8 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
AssertFatal
(
RC
.
gNB
[
Mod_id
]
!=
NULL
,
"RC.gNB[%d] is null
\n
"
,
Mod_id
);
gNB
=
RC
.
gNB
[
Mod_id
];
start_meas
(
&
gNB
->
schedule_response_stats
);
nfapi_nr_config_request_scf_t
*
cfg
=
&
gNB
->
gNB_config
;
int
slot_type
=
nr_slot_select
(
cfg
,
frame
,
slot
);
...
...
@@ -246,6 +248,6 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
if
(
number_dl_pdu
>
0
)
oai_nfapi_dl_tti_req
(
DL_req
);
}
}
stop_meas
(
&
gNB
->
schedule_response_stats
);
}
openair1/SIMULATION/NR_PHY/dlschsim.c
View file @
8a914732
...
...
@@ -67,6 +67,7 @@ uint16_t n_rnti = 0x1234;
openair0_config_t
openair0_cfg
[
MAX_CARDS
];
void
init_downlink_harq_status
(
NR_DL_UE_HARQ_t
*
dl_harq
)
{}
void
processSlotTX
(
void
*
arg
)
{}
int
main
(
int
argc
,
char
**
argv
)
{
...
...
@@ -118,7 +119,7 @@ int main(int argc, char **argv)
double
DS_TDL
=
.
03
;
cpuf
=
get_cpu_freq_GHz
();
char
gNBthreads
[
128
]
=
"n"
;
if
(
load_configmodule
(
argc
,
argv
,
CONFIG_ENABLECMDLINEONLY
)
==
0
)
{
exit_fun
(
"[NR_DLSCHSIM] Error, configuration module init failed
\n
"
);
}
...
...
@@ -436,9 +437,22 @@ int main(int argc, char **argv)
UE
->
dlsch_SI
[
0
]
=
new_nr_ue_dlsch
(
1
,
1
,
Nsoft
,
5
,
N_RB_DL
,
0
);
UE
->
dlsch_ra
[
0
]
=
new_nr_ue_dlsch
(
1
,
1
,
Nsoft
,
5
,
N_RB_DL
,
0
);
unsigned
char
harq_pid
=
0
;
//dlsch->harq_ids[subframe];
processingData_L1tx_t
msgDataTx
;
init_DLSCH_struct
(
gNB
,
&
msgDataTx
);
NR_gNB_DLSCH_t
*
dlsch
=
msgDataTx
.
dlsch
[
0
][
0
];
gNB
->
threadPool
=
(
tpool_t
*
)
malloc
(
sizeof
(
tpool_t
));
initTpool
(
gNBthreads
,
gNB
->
threadPool
,
true
);
gNB
->
resp_L1_tx
=
(
notifiedFIFO_t
*
)
malloc
(
sizeof
(
notifiedFIFO_t
));
initNotifiedFIFO
(
gNB
->
resp_L1_tx
);
// we create 2 threads for L1 tx processing
notifiedFIFO_elt_t
*
msgL1Tx
=
newNotifiedFIFO_elt
(
sizeof
(
processingData_L1tx_t
),
0
,
gNB
->
resp_L1_tx
,
processSlotTX
);
processingData_L1tx_t
*
msgDataTx
=
(
processingData_L1tx_t
*
)
NotifiedFifoData
(
msgL1Tx
);
init_DLSCH_struct
(
gNB
,
msgDataTx
);
msgDataTx
->
slot
=
slot
;
msgDataTx
->
frame
=
frame
;
memset
(
msgDataTx
->
ssb
,
0
,
64
*
sizeof
(
NR_gNB_SSB_t
));
reset_meas
(
&
msgDataTx
->
phy_proc_tx
);
gNB
->
phy_proc_tx_0
=
&
msgDataTx
->
phy_proc_tx
;
pushTpool
(
gNB
->
threadPool
,
msgL1Tx
);
NR_gNB_DLSCH_t
*
dlsch
=
msgDataTx
->
dlsch
[
0
][
0
];
nfapi_nr_dl_tti_pdsch_pdu_rel15_t
*
rel15
=
&
dlsch
->
harq_process
.
pdsch_pdu
.
pdsch_pdu_rel15
;
//time_stats_t *rm_stats, *te_stats, *i_stats;
uint8_t
is_crnti
=
0
,
llr8_flag
=
0
;
...
...
@@ -512,8 +526,8 @@ int main(int argc, char **argv)
//printf("crc32: [0]->0x%08x\n",crc24c(test_input, 32));
// generate signal
unsigned
char
output
[
rel15
->
rbSize
*
NR_SYMBOLS_PER_SLOT
*
NR_NB_SC_PER_RB
*
8
*
NR_MAX_NB_LAYERS
]
__attribute__
((
aligned
(
32
)));
bzero
(
output
,
rel15
->
rbSize
*
NR_SYMBOLS_PER_SLOT
*
NR_NB_SC_PER_RB
*
8
*
NR_MAX_NB_LAYERS
);
unsigned
char
output
[
rel15
->
rbSize
*
NR_SYMBOLS_PER_SLOT
*
NR_NB_SC_PER_RB
*
8
*
NR_MAX_NB_LAYERS
]
__attribute__
((
aligned
(
32
)));
bzero
(
output
,
rel15
->
rbSize
*
NR_SYMBOLS_PER_SLOT
*
NR_NB_SC_PER_RB
*
8
*
NR_MAX_NB_LAYERS
);
if
(
input_fd
==
NULL
)
{
nr_dlsch_encoding
(
gNB
,
test_input
,
frame
,
slot
,
dlsch
,
frame_parms
,
output
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
}
...
...
@@ -531,12 +545,12 @@ int main(int argc, char **argv)
//if (i<16)
// printf("encoder output f[%d] = %d\n",i,dlsch->harq_processes[0]->f[i]);
if
(
output
[
i
]
==
0
)
modulated_input
[
i
]
=
1
.
0
;
///sqrt(2); //QPSK
else
modulated_input
[
i
]
=
-
1
.
0
;
///sqrt(2);
//if (i<16) printf("modulated_input[%d] = %d\n",i,modulated_input[i]);
//SNR =10;
SNR_lin
=
pow
(
10
,
SNR
/
10
.
0
);
...
...
@@ -643,7 +657,7 @@ int main(int argc, char **argv)
for
(
i
=
0
;
i
<
2
;
i
++
)
{
printf
(
"gNB %d
\n
"
,
i
);
free_gNB_dlsch
(
&
(
msgDataTx
.
dlsch
[
0
][
i
]),
N_RB_DL
);
free_gNB_dlsch
(
&
(
msgDataTx
->
dlsch
[
0
][
i
]),
N_RB_DL
);
printf
(
"UE %d
\n
"
,
i
);
free_nr_ue_dlsch
(
&
(
UE
->
dlsch
[
0
][
0
][
i
]),
N_RB_DL
);
}
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
View file @
8a914732
...
...
@@ -395,7 +395,9 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
nr_schedule_ulsch
(
module_idP
,
frame
,
slot
);
// This schedules the DCI for Downlink and PDSCH
nr_schedule_ue_spec
(
module_idP
,
frame
,
slot
);
start_meas
(
&
gNB
->
schedule_dlsch
);
nr_schedule_ue_spec
(
module_idP
,
frame
,
slot
);
stop_meas
(
&
gNB
->
schedule_dlsch
);
nr_schedule_pucch
(
module_idP
,
frame
,
slot
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
8a914732
...
...
@@ -409,7 +409,7 @@ int get_mcs_from_bler(module_id_t mod_id, int CC_id, frame_t frame, sub_frame_t
/*const int dret3x = stats->dlsch_rounds[3] - bler_stats->dlsch_rounds[3];
if (dret3x > 0) {
if there is a third retransmission, decrease MCS for stabilization and
restart averaging window to stabilize transmission
restart averaging window to stabilize transmission
bler_stats->last_frame_slot = now;
bler_stats->mcs = max(9, bler_stats->mcs - 1);
memcpy(bler_stats->dlsch_rounds, stats->dlsch_rounds, sizeof(stats->dlsch_rounds));
...
...
@@ -431,7 +431,7 @@ int get_mcs_from_bler(module_id_t mod_id, int CC_id, frame_t frame, sub_frame_t
int
new_mcs
=
old_mcs
;
// TODO put back this condition when relevant
/* first ensure that number of 2nd retx is below threshold. If this is the
* case, use 1st retx to adjust faster
* case, use 1st retx to adjust faster
if (bler_stats->rd2_bler > nrmac->dl_rd2_bler_threshold && old_mcs > 6) {
new_mcs -= 2;
} else if (bler_stats->rd2_bler < nrmac->dl_rd2_bler_threshold) {*/
...
...
@@ -486,7 +486,8 @@ void nr_store_dlsch_buffer(module_id_t module_id,
DL_SCH_LCID_DCCH
,
0
,
0
);
if
((
sched_ctrl
->
lcid_mask
&
(
1
<<
4
))
>
0
)
if
((
sched_ctrl
->
lcid_mask
&
(
1
<<
4
))
>
0
)
{
start_meas
(
&
RC
.
nrmac
[
module_id
]
->
rlc_status_ind
);
sched_ctrl
->
rlc_status
[
DL_SCH_LCID_DTCH
]
=
mac_rlc_status_ind
(
module_id
,
rnti
,
module_id
,
...
...
@@ -497,16 +498,17 @@ void nr_store_dlsch_buffer(module_id_t module_id,
DL_SCH_LCID_DTCH
,
0
,
0
);
if
(
sched_ctrl
->
rlc_status
[
DL_SCH_LCID_DCCH
].
bytes_in_buffer
>
0
){
lcid
=
DL_SCH_LCID_DCCH
;
}
else
if
(
sched_ctrl
->
rlc_status
[
DL_SCH_LCID_DCCH1
].
bytes_in_buffer
>
0
)
{
lcid
=
DL_SCH_LCID_DCCH1
;
}
else
{
lcid
=
DL_SCH_LCID_DTCH
;
}
stop_meas
(
&
RC
.
nrmac
[
module_id
]
->
rlc_status_ind
);
}
if
(
sched_ctrl
->
rlc_status
[
DL_SCH_LCID_DCCH
].
bytes_in_buffer
>
0
){
lcid
=
DL_SCH_LCID_DCCH
;
}
else
if
(
sched_ctrl
->
rlc_status
[
DL_SCH_LCID_DCCH1
].
bytes_in_buffer
>
0
)
{
lcid
=
DL_SCH_LCID_DCCH1
;
}
else
{
lcid
=
DL_SCH_LCID_DTCH
;
}
sched_ctrl
->
num_total_bytes
+=
sched_ctrl
->
rlc_status
[
lcid
].
bytes_in_buffer
;
//later multiplex here. Just select DCCH/SRB before DTCH/DRB
...
...
@@ -1228,6 +1230,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
// const int lcid = DL_SCH_LCID_DTCH;
const
int
lcid
=
sched_ctrl
->
lcid_to_schedule
;
int
dlsch_total_bytes
=
0
;
start_meas
(
&
gNB_mac
->
rlc_data_req
);
if
(
sched_ctrl
->
num_total_bytes
>
0
)
{
tbs_size_t
len
=
0
;
while
(
size
>
3
)
{
...
...
@@ -1241,6 +1244,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
/* limit requested number of bytes to what preprocessor specified, or
* such that TBS is full */
const
rlc_buffer_occupancy_t
ndata
=
min
(
sched_ctrl
->
rlc_status
[
lcid
].
bytes_in_buffer
,
size
);
len
=
mac_rlc_data_req
(
module_id
,
rnti
,
module_id
,
...
...
@@ -1301,6 +1305,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
buf
+=
size
;
dlsch_total_bytes
+=
size
;
}
stop_meas
(
&
gNB_mac
->
rlc_data_req
);
// Add padding header and zero rest out if there is space left
if
(
size
>
0
)
{
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
8a914732
...
...
@@ -1946,7 +1946,7 @@ int add_new_nr_ue(module_id_t mod_idP, rnti_t rntiP, NR_CellGroupConfig_t *CellG
add_nr_list
(
&
UE_info
->
list
,
UE_id
);
memset
(
&
UE_info
->
mac_stats
[
UE_id
],
0
,
sizeof
(
NR_mac_stats_t
));
set_Y
(
UE_info
->
Y
[
UE_id
],
rntiP
);
if
(
CellGroup
&&
CellGroup
->
spCellConfig
&&
CellGroup
->
spCellConfig
&&
CellGroup
->
spCellConfig
->
spCellConfigDedicated
)
if
(
CellGroup
&&
CellGroup
->
spCellConfig
&&
CellGroup
->
spCellConfig
->
spCellConfigDedicated
)
compute_csi_bitlen
(
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
->
choice
.
setup
,
UE_info
,
UE_id
,
mod_idP
);
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
memset
(
sched_ctrl
,
0
,
sizeof
(
*
sched_ctrl
));
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
8a914732
...
...
@@ -1117,7 +1117,7 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id,
// tpc (power control) only if we received AckNack or positive SR. For a
// negative SR, the UE won't have sent anything, and the SNR is not valid
if
(((
uci_01
->
pduBitmap
>>
1
)
&
0x1
)
||
sched_ctrl
->
SR
)
{
if
(((
uci_01
->
pduBitmap
>>
1
)
&
0x1
)
)
{
if
((
uci_01
->
harq
)
&&
(
uci_01
->
harq
->
harq_confidence_level
==
0
))
sched_ctrl
->
tpc1
=
nr_get_tpc
(
RC
.
nrmac
[
mod_id
]
->
pucch_target_snrx10
,
uci_01
->
ul_cqi
,
30
);
else
sched_ctrl
->
tpc1
=
3
;
sched_ctrl
->
pucch_snrx10
=
uci_01
->
ul_cqi
*
5
-
640
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
8a914732
...
...
@@ -910,13 +910,22 @@ bool nr_UE_is_to_be_scheduled(module_id_t mod_id, int CC_id, int UE_id, frame_t
const
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
nrmac
->
UE_info
.
UE_sched_ctrl
[
UE_id
];
const
int
last_ul_sched
=
sched_ctrl
->
last_ul_frame
*
n
+
sched_ctrl
->
last_ul_slot
;
const
NR_TDD_UL_DL_Pattern_t
*
tdd
=
scc
->
tdd_UL_DL_ConfigurationCommon
?
&
scc
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
:
NULL
;
int
num_slots_per_period
;
int
tdd_period_len
[
8
]
=
{
500
,
625
,
1000
,
1250
,
2000
,
2500
,
5000
,
10000
};
if
(
tdd
)
num_slots_per_period
=
n
*
tdd_period_len
[
tdd
->
dl_UL_TransmissionPeriodicity
]
/
10000
;
else
num_slots_per_period
=
n
;
const
int
diff
=
(
now
-
last_ul_sched
+
1024
*
n
)
%
(
1024
*
n
);
/* UE is to be scheduled if
* (1) we think the UE has more bytes awaiting than what we scheduled
* (2) there is a scheduling request
* (3) or we did not schedule it in more than 10 frames */
const
bool
has_data
=
sched_ctrl
->
estimated_ul_buffer
>
sched_ctrl
->
sched_ul_bytes
;
const
bool
high_inactivity
=
diff
>=
nrmac
->
ulsch_max_frame_inactivity
*
n
;
const
bool
high_inactivity
=
diff
>=
(
nrmac
->
ulsch_max_frame_inactivity
>
0
?
(
nrmac
->
ulsch_max_frame_inactivity
*
n
)
:
num_slots_per_period
)
;
LOG_D
(
NR_MAC
,
"%4d.%2d UL inactivity %d slots has_data %d SR %d
\n
"
,
frame
,
...
...
openair2/LAYER2/NR_MAC_gNB/main.c
View file @
8a914732
...
...
@@ -128,7 +128,10 @@ void dump_mac_stats(gNB_MAC_INST *gNB, char *output, int strlen, bool reset_rsrp
}
}
}
print_meas_log
(
&
gNB
->
eNB_scheduler
,
"DL & UL scheduling timing stats"
,
NULL
,
NULL
,
output
+
stroff
);
print_meas
(
&
gNB
->
eNB_scheduler
,
"DL & UL scheduling timing stats"
,
NULL
,
NULL
);
print_meas
(
&
gNB
->
schedule_dlsch
,
"dlsch scheduler"
,
NULL
,
NULL
);
print_meas
(
&
gNB
->
rlc_data_req
,
"rlc_data_req"
,
NULL
,
NULL
);
print_meas
(
&
gNB
->
rlc_status_ind
,
"rlc_status_ind"
,
NULL
,
NULL
);
}
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
8a914732
...
...
@@ -738,6 +738,10 @@ typedef struct gNB_MAC_INST_s {
time_stats_t
schedule_dlsch_preprocessor
;
/// processing time of eNB DLSCH scheduler
time_stats_t
schedule_dlsch
;
// include rlc_data_req + MAC header + preprocessor
/// processing time of rlc_data_req
time_stats_t
rlc_data_req
;
/// processing time of rlc_status_ind
time_stats_t
rlc_status_ind
;
/// processing time of eNB MCH scheduler
time_stats_t
schedule_mch
;
/// processing time of eNB ULSCH reception
...
...
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
View file @
8a914732
...
...
@@ -490,13 +490,11 @@ void NR_UL_indication(NR_UL_IND_t *UL_info) {
dump_dl
(
sched_info
);
#endif
if
(
ifi
->
NR_Schedule_response
)
{
AssertFatal
(
ifi
->
NR_Schedule_response
!=
NULL
,
"nr_schedule_response is null (mod %d, cc %d)
\n
"
,
module_id
,
CC_id
);
ifi
->
NR_Schedule_response
(
sched_info
);
}
AssertFatal
(
ifi
->
NR_Schedule_response
!=
NULL
,
"nr_schedule_response is null (mod %d, cc %d)
\n
"
,
module_id
,
CC_id
);
ifi
->
NR_Schedule_response
(
sched_info
);
LOG_D
(
NR_PHY
,
"NR_Schedule_response: SFN SLOT:%d %d dl_pdus:%d
\n
"
,
sched_info
->
frame
,
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
8a914732
...
...
@@ -709,7 +709,7 @@ rrc_gNB_generate_defaultRRCReconfiguration(
DRB_config->pdcp_Config->moreThanOneRLC = NULL;
DRB_config->pdcp_Config->t_Reordering = calloc(1, sizeof(*DRB_config->pdcp_Config->t_Reordering));
*DRB_config->pdcp_Config->t_Reordering = NR_PDCP_Config__t_Reordering_ms0;
*DRB_config->pdcp_Config->t_Reordering = NR_PDCP_Config__t_Reordering_ms
10
0;
DRB_config->pdcp_Config->ext1 = NULL;
ASN_SEQUENCE_ADD(&(*DRB_configList)->list, DRB_config);
...
...
openair2/UTIL/OPT/probe.c
View file @
8a914732
...
...
@@ -408,7 +408,7 @@ static void SendFrameNR(guint8 radioType, guint8 direction, guint8 rntiType,
guint8
isPredefinedData
,
guint8
retx
,
guint8
crcStatus
,
guint8
oob_event
,
guint8
oob_event_value
,
uint8_t
*
pdu_buffer
,
unsigned
int
pdu_buffer_size
)
{
unsigned
char
frameBuffer
[
9
000
];
unsigned
char
frameBuffer
[
12
000
];
unsigned
int
frameOffset
;
ssize_t
bytesSent
;
frameOffset
=
0
;
...
...
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band41.fr1.106PRB.usrpb210.conf
View file @
8a914732
...
...
@@ -35,6 +35,7 @@ gNBs =
ssb_SubcarrierOffset
=
0
;
pdsch_AntennaPorts
=
1
;
pusch_AntennaPorts
=
1
;
min_rxtxtime
=
6
;
sib1_tda
=
0
;
pdcch_ConfigSIB1
= (
...
...
@@ -66,7 +67,7 @@ gNBs =
#initialDownlinkBWP
#genericParameters
# this is RBstart=27,L=48 (275*(L-1))+RBstart
initialDLBWPlocationAndBandwidth
=
12952
;
# 6366 12925 12956 28875 12952
initialDLBWPlocationAndBandwidth
=
28875
;
# 6366 12925 12956 28875 12952
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialDLBWPsubcarrierSpacing
=
1
;
...
...
@@ -86,7 +87,7 @@ gNBs =
pMax
=
20
;
#initialUplinkBWP
#genericParameters
initialULBWPlocationAndBandwidth
=
12952
;
initialULBWPlocationAndBandwidth
=
28875
;
# subcarrierSpacing
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
initialULBWPsubcarrierSpacing
=
1
;
...
...
@@ -210,7 +211,7 @@ MACRLCs = (
tr_n_preference
=
"local_RRC"
;
pusch_TargetSNRx10
=
150
;
pucch_TargetSNRx10
=
200
;
ulsch_max_frame_inactivity
=
1
;
ulsch_max_frame_inactivity
=
0
;
}
);
...
...
@@ -218,7 +219,7 @@ L1s = (
{
num_cc
=
1
;
tr_n_preference
=
"local_mac"
;
pusch_proc_threads
=
8
;
pusch_proc_threads
=
4
;
prach_dtx_threshold
=
120
;
pucch0_dtx_threshold
=
150
;
ofdm_offset_divisor
=
8
;
#set this to UINT_MAX for offset 0
...
...
@@ -296,5 +297,7 @@ log_config :
rrc_log_verbosity
=
"medium"
;
ngap_log_level
=
"debug"
;
ngap_log_verbosity
=
"medium"
;
f1ap_log_level
=
"debug"
;
f1ap_log_verbosity
=
"medium"
;
};
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.2x2.usrpn300.conf
View file @
8a914732
...
...
@@ -210,7 +210,7 @@ MACRLCs = (
tr_n_preference
=
"local_RRC"
;
#pusch_TargetSNRx10 = 150;
#pucch_TargetSNRx10 = 200;
ulsch_max_frame_inactivity
=
1
;
ulsch_max_frame_inactivity
=
0
;
}
);
...
...
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf
View file @
8a914732
...
...
@@ -35,7 +35,9 @@ gNBs =
ssb_SubcarrierOffset
=
0
;
pdsch_AntennaPorts
=
1
;
pusch_AntennaPorts
=
1
;
min_rxtxtime
=
6
;
sib1_tda
=
0
;
do_SRS
=
1
;
pdcch_ConfigSIB1
= (
{
...
...
@@ -210,7 +212,7 @@ MACRLCs = (
tr_n_preference
=
"local_RRC"
;
pusch_TargetSNRx10
=
150
;
pucch_TargetSNRx10
=
200
;
ulsch_max_frame_inactivity
=
1
;
ulsch_max_frame_inactivity
=
0
;
}
);
...
...
@@ -218,7 +220,7 @@ L1s = (
{
num_cc
=
1
;
tr_n_preference
=
"local_mac"
;
pusch_proc_threads
=
8
;
pusch_proc_threads
=
4
;
prach_dtx_threshold
=
120
;
pucch0_dtx_threshold
=
150
;
ofdm_offset_divisor
=
8
;
#set this to UINT_MAX for offset 0
...
...
@@ -296,5 +298,7 @@ log_config :
rrc_log_verbosity
=
"medium"
;
ngap_log_level
=
"debug"
;
ngap_log_verbosity
=
"medium"
;
f1ap_log_level
=
"debug"
;
f1ap_log_verbosity
=
"medium"
;
};
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.162PRB.2x2.usrpn300.conf
0 → 100644
View file @
8a914732
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