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
lizhongxiao
OpenXG UE
Commits
0102379f
Commit
0102379f
authored
Mar 04, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/NR_RRC_256QAM_DL' into integration_2022_wk09_b
parents
eb4df484
60cab5fb
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
261 additions
and
140 deletions
+261
-140
ci-scripts/xml_files/fr1_sa_quectel_162prb.xml
ci-scripts/xml_files/fr1_sa_quectel_162prb.xml
+2
-2
ci-scripts/xml_files/fr1_sa_quectel_stages.xml
ci-scripts/xml_files/fr1_sa_quectel_stages.xml
+12
-1
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-0
cmake_targets/autotests/test_case_list.xml
cmake_targets/autotests/test_case_list.xml
+16
-14
common/utils/nr/nr_common.c
common/utils/nr/nr_common.c
+21
-0
common/utils/nr/nr_common.h
common/utils/nr/nr_common.h
+1
-0
executables/softmodem-common.h
executables/softmodem-common.h
+1
-4
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+11
-7
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+2
-1
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+2
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+16
-6
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+1
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+12
-3
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+2
-0
openair2/RRC/NR/MESSAGES/asn1_msg.c
openair2/RRC/NR/MESSAGES/asn1_msg.c
+29
-9
openair2/RRC/NR/MESSAGES/asn1_msg.h
openair2/RRC/NR/MESSAGES/asn1_msg.h
+6
-0
openair2/RRC/NR/nr_rrc_config.c
openair2/RRC/NR/nr_rrc_config.c
+90
-0
openair2/RRC/NR/nr_rrc_config.h
openair2/RRC/NR/nr_rrc_config.h
+8
-0
openair2/RRC/NR/nr_rrc_proto.h
openair2/RRC/NR/nr_rrc_proto.h
+2
-0
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+14
-49
openair2/RRC/NR/rrc_gNB_nsa.c
openair2/RRC/NR/rrc_gNB_nsa.c
+2
-0
openair2/RRC/NR/rrc_gNB_reconfig.c
openair2/RRC/NR/rrc_gNB_reconfig.c
+10
-44
No files found.
ci-scripts/xml_files/fr1_sa_quectel_162prb.xml
View file @
0102379f
...
...
@@ -96,8 +96,8 @@
<testCase
id=
"072000"
>
<class>
Iperf
</class>
<desc>
iperf (DL/
14
0Mbps/UDP)(60 sec)(single-ue profile)
</desc>
<iperf_args>
-u -b
14
0M -t 60
</iperf_args>
<desc>
iperf (DL/
20
0Mbps/UDP)(60 sec)(single-ue profile)
</desc>
<iperf_args>
-u -b
20
0M -t 60
</iperf_args>
<direction>
DL
</direction>
<id>
nrmodule2_quectel
</id>
<iperf_packetloss_threshold>
50
</iperf_packetloss_threshold>
...
...
ci-scripts/xml_files/fr1_sa_quectel_stages.xml
View file @
0102379f
...
...
@@ -42,6 +42,8 @@
000001
071004
000001
071005
000001
011002
081000
</TestCaseRequestedList>
...
...
@@ -148,7 +150,16 @@
<iperf_bitrate_threshold>
90
</iperf_bitrate_threshold>
<iperf_profile>
single-ue
</iperf_profile>
</testCase>
<testCase
id=
"071005"
>
<class>
Iperf
</class>
<desc>
iperf (DL/130Mbps/UDP)(30 sec)(single-ue profile)
</desc>
<iperf_args>
-u -b 130M -t 30
</iperf_args>
<direction>
DL
</direction>
<id>
nrmodule2_quectel
</id>
<iperf_packetloss_threshold>
50
</iperf_packetloss_threshold>
<iperf_bitrate_threshold>
50
</iperf_bitrate_threshold>
<iperf_profile>
single-ue
</iperf_profile>
</testCase>
<testCase
id=
"081000"
>
...
...
cmake_targets/CMakeLists.txt
View file @
0102379f
...
...
@@ -1910,6 +1910,7 @@ set(NR_L2_SRC_UE
${
NR_SDAP_SRC
}
${
NR_UE_RRC_DIR
}
/L2_interface_ue.c
${
NR_UE_RRC_DIR
}
/main_ue.c
${
NR_RRC_DIR
}
/nr_rrc_config.c
${
NR_UE_RRC_DIR
}
/rrc_UE.c
${
NR_UE_RRC_DIR
}
/rrc_nsa.c
)
...
...
cmake_targets/autotests/test_case_list.xml
View file @
0102379f
...
...
@@ -1093,17 +1093,18 @@
(Test8: 217 PRB 100 PDSCH-PRBs 110 PDSCH-Offset),
(Test9: 106 PRBs 50 PDSCH-PRBs MCS Index 27),
(Test10: 106 PRBs 50 PDSCH-PRBs MCS Index 16),
(Test11: HARQ test 25% TP (4 rounds),
(Test12: HARQ test 33% TP (3 rounds),
(Test13: HARQ test 50% TP (2 rounds),
(Test14: 3 PTRS, 8 Interpolated Symbols),
(Test15: 6 PTRS, 5 Interpolated Symbols),
(Test16: 11 PTRS, 0 Interpolated Symbols),
(Test17: Mapping type A, 2 DMRS Symbols),
(Test18: Mapping type A, 3 DMRS Symbols),
(Test19: Mapping type B, 4 DMRS Symbols),
(Test20: 4x4 MIMO, 1 Layer),
(Test21: 4x4 MIMO, 2 Layers)
</desc>
(Test11: 106 MCS-TABLE 256 QAM MCS Index 26),
(Test12: HARQ test 25% TP (4 rounds),
(Test13: HARQ test 33% TP (3 rounds),
(Test14: HARQ test 50% TP (2 rounds),
(Test15: 3 PTRS, 8 Interpolated Symbols),
(Test16: 6 PTRS, 5 Interpolated Symbols),
(Test17: 11 PTRS, 0 Interpolated Symbols),
(Test18: Mapping type A, 2 DMRS Symbols),
(Test19: Mapping type A, 3 DMRS Symbols),
(Test20: Mapping type B, 4 DMRS Symbols),
(Test21: 4x4 MIMO, 1 Layer),
(Test22: 4x4 MIMO, 2 Layers)
</desc>
<pre_compile_prog></pre_compile_prog>
<compile_prog>
$OPENAIR_DIR/cmake_targets/build_oai
</compile_prog>
<compile_prog_args>
--phy_simulators -c
</compile_prog_args>
...
...
@@ -1118,8 +1119,9 @@
-n100 -R217 -b100 -s5
-n100 -R217 -a80 -s5
-n100 -R217 -a110 -s5 -b100
-n100 -e27 -s30
-n100 -e16 -s10
-n100 -e27 -s30
-n100 -e16 -s10
-n100 -q1 -e27 -s30
-n100 -s1 -t25
-n100 -s1 -t33
-n100 -s1 -t50
...
...
@@ -1131,7 +1133,7 @@
-n100 -s2 -U 2 1 3
-n10 -s20 -U 3 0 0 2 -gR -x1 -y4 -z4
-n10 -s20 -U 3 0 0 2 -gR -x2 -y4 -z4
</main_exec_args>
<tags>
nr_dlsim.test1 nr_dlsim.test2 nr_dlsim.test3 nr_dlsim.test4 nr_dlsim.test5 nr_dlsim.test6 nr_dlsim.test7 nr_dlsim.test8 nr_dlsim.test9 nr_dlsim.test10 nr_dlsim.test11 nr_dlsim.test12 nr_dlsim.test13 nr_dlsim.test14 nr_dlsim.test15 nr_dlsim.test16 nr_dlsim.test17 nr_dlsim.test18 nr_dlsim.test19 nr_dlsim.test20 nr_dlsim.test21
</tags>
<tags>
nr_dlsim.test1 nr_dlsim.test2 nr_dlsim.test3 nr_dlsim.test4 nr_dlsim.test5 nr_dlsim.test6 nr_dlsim.test7 nr_dlsim.test8 nr_dlsim.test9 nr_dlsim.test10 nr_dlsim.test11 nr_dlsim.test12 nr_dlsim.test13 nr_dlsim.test14 nr_dlsim.test15 nr_dlsim.test16 nr_dlsim.test17 nr_dlsim.test18 nr_dlsim.test19 nr_dlsim.test20 nr_dlsim.test21
nr_dlsim.test22
</tags>
<search_expr_true>
PDSCH test OK
</search_expr_true>
<search_expr_false>
segmentation fault|assertion|exiting|fatal
</search_expr_false>
<nruns>
3
</nruns>
...
...
common/utils/nr/nr_common.c
View file @
0102379f
...
...
@@ -36,6 +36,27 @@
const
char
*
duplex_mode
[]
=
{
"FDD"
,
"TDD"
};
int
tables_5_3_2
[
5
][
11
]
=
{
{
25
,
52
,
79
,
106
,
133
,
160
,
216
,
270
,
-
1
,
-
1
,
-
1
},
// 15 FR1
{
11
,
24
,
38
,
51
,
65
,
78
,
106
,
133
,
162
,
217
,
273
},
// 30 FR1
{
-
1
,
11
,
18
,
24
,
31
,
38
,
51
,
65
,
79
,
107
,
135
},
// 60 FR1
{
66
,
132
,
264
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
},
// 60 FR2
{
32
,
66
,
132
,
264
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
,
-
1
}
// 120FR2
};
int
get_supported_band_index
(
int
scs
,
int
band
,
int
n_rbs
){
int
scs_index
=
scs
;
if
(
band
>
256
)
scs_index
++
;
for
(
int
i
=
0
;
i
<
11
;
i
++
)
{
if
(
n_rbs
==
tables_5_3_2
[
scs
][
i
])
return
i
;
}
return
(
-
1
);
// not found
}
// Table 5.2-1 NR operating bands in FR1 & FR2 (3GPP TS 38.101)
// Table 5.4.2.3-1 Applicable NR-ARFCN per operating band in FR1 & FR2 (3GPP TS 38.101)
// Notes:
...
...
common/utils/nr/nr_common.h
View file @
0102379f
...
...
@@ -80,6 +80,7 @@ void SLIV2SL(int SLIV,int *S,int *L);
int
get_dmrs_port
(
int
nl
,
uint16_t
dmrs_ports
);
uint16_t
SL_to_bitmap
(
int
startSymbolIndex
,
int
nrOfSymbols
);
int
get_nb_periods_per_frame
(
uint8_t
tdd_period
);
int
get_supported_band_index
(
int
scs
,
int
band
,
int
n_rbs
);
long
rrc_get_max_nr_csrs
(
uint8_t
max_rbs
,
long
b_SRS
);
#define CEILIDIV(a,b) ((a+b-1)/b)
...
...
executables/softmodem-common.h
View file @
0102379f
...
...
@@ -120,7 +120,6 @@ extern "C"
#define TIMING_SOURCE softmodem_params.timing_source
#define SEND_DMRSSYNC softmodem_params.send_dmrs_sync
#define USIM_TEST softmodem_params.usim_test
#define USE_256QAM_TABLE softmodem_params.use_256qam_table
#define PRB_INTERPOLATION softmodem_params.prb_interpolation
#define NFAPI softmodem_params.nfapi
#define NSA softmodem_params.nsa
...
...
@@ -158,14 +157,13 @@ extern int usrp_tx_thread;
{"basicsim", CONFIG_HLP_RFSIM, PARAMFLAG_BOOL, uptr:&basicsim, defintval:0, TYPE_INT, 0}, \
{"nokrnmod", CONFIG_HLP_NOKRNMOD, PARAMFLAG_BOOL, uptr:&nokrnmod, defintval:0, TYPE_INT, 0}, \
{"nbiot-disable", CONFIG_HLP_DISABLNBIOT, PARAMFLAG_BOOL, uptr:&nonbiot, defuintval:0, TYPE_INT, 0}, \
{"use-256qam-table", CONFIG_HLP_256QAM, PARAMFLAG_BOOL, iptr:&USE_256QAM_TABLE, defintval:0, TYPE_INT, 0}, \
{"nsa", CONFIG_HLP_NSA, PARAMFLAG_BOOL, iptr:&NSA, defintval:0, TYPE_INT, 0}, \
{"node-number", NULL, 0, u16ptr:&NODE_NUMBER, defuintval:0, TYPE_UINT16, 0}, \
{"usrp-tx-thread-config", CONFIG_HLP_USRP_THREAD, 0, iptr:&usrp_tx_thread, defstrval:0, TYPE_INT, 0}, \
{"do-prb-interpolation", CONFIG_HLP_PRBINTER, PARAMFLAG_BOOL, iptr:&PRB_INTERPOLATION, defintval:0, TYPE_INT, 0}, \
{"nfapi", CONFIG_HLP_NFAPI, 0, u8ptr:&nfapi_mode, defintval:0, TYPE_UINT8, 0}, \
{"non-stop", CONFIG_HLP_NONSTOP, PARAMFLAG_BOOL, iptr:&NON_STOP, defintval:0, TYPE_INT, 0}, \
{"emulate-l1", CONFIG_L1_EMULATOR, PARAMFLAG_BOOL, iptr:&EMULATE_L1, defintval:0, TYPE_INT, 0}
,
\
{"emulate-l1", CONFIG_L1_EMULATOR, PARAMFLAG_BOOL, iptr:&EMULATE_L1, defintval:0, TYPE_INT, 0}
\
}
#define CONFIG_HLP_NSA "Enable NSA mode \n"
...
...
@@ -250,7 +248,6 @@ typedef struct {
uint32_t
timing_source
;
int
hw_timing_advance
;
uint32_t
send_dmrs_sync
;
int
use_256qam_table
;
int
prb_interpolation
;
uint8_t
nfapi
;
int
nsa
;
...
...
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
0102379f
...
...
@@ -441,7 +441,7 @@ int main(int argc, char **argv)
FILE
*
scg_fd
=
NULL
;
while
((
c
=
getopt
(
argc
,
argv
,
"f:hA:pf:g:in:s:S:t:x:y:z:M:N:F:GR:dPIL:Ea:b:d:e:
m:w:T:U:q
X:"
))
!=
-
1
)
{
while
((
c
=
getopt
(
argc
,
argv
,
"f:hA:pf:g:in:s:S:t:x:y:z:M:N:F:GR:dPIL:Ea:b:d:e:
q:m:w:T:U:
X:"
))
!=
-
1
)
{
switch
(
c
)
{
case
'f'
:
scg_fd
=
fopen
(
optarg
,
"r"
);
...
...
@@ -607,16 +607,17 @@ int main(int argc, char **argv)
case
'b'
:
g_rbSize
=
atoi
(
optarg
);
break
;
case
'D'
:
dlsch_threads
=
atoi
(
optarg
);
break
;
break
;
case
'e'
:
g_mcsIndex
=
atoi
(
optarg
);
break
;
case
'q'
:
g_mcsTableIdx
=
1
;
get_softmodem_params
()
->
use_256qam_table
=
1
;
g_mcsTableIdx
=
atoi
(
optarg
);
break
;
case
'm'
:
...
...
@@ -680,7 +681,7 @@ int main(int argc, char **argv)
printf
(
"-c Start symbol for PDSCH (fixed for now)
\n
"
);
printf
(
"-j Number of symbols for PDSCH (fixed for now)
\n
"
);
printf
(
"-e MSC index
\n
"
);
printf
(
"-q
Use 2nd MCS table (256 QAM table) for PDSCH
\n
"
);
printf
(
"-q
MCS Table index
\n
"
);
printf
(
"-t Acceptable effective throughput (in percentage)
\n
"
);
printf
(
"-T Enable PTRS, arguments list L_PTRS{0,1,2} K_PTRS{2,4}, e.g. -T 2 0 2
\n
"
);
printf
(
"-U Change DMRS Config, arguments list DMRS TYPE{0=A,1=B} DMRS AddPos{0:2} DMRS ConfType{1:2}, e.g. -U 3 0 2 1
\n
"
);
...
...
@@ -781,11 +782,14 @@ int main(int argc, char **argv)
fill_scc_sim
(
rrc
.
carrier
.
servingcellconfigcommon
,
&
ssb_bitmap
,
N_RB_DL
,
N_RB_DL
,
mu
,
mu
);
ssb_bitmap
=
1
;
// Enable only first SSB with index ssb_indx=0
fix_scc
(
scc
,
ssb_bitmap
);
prepare_scd
(
scd
);
fill_default_secondaryCellGroup
(
scc
,
scd
,
secondaryCellGroup
,
0
,
1
,
n_tx
,
6
,
0
,
0
,
0
);
NR_UE_NR_Capability_t
*
UE_Capability_nr
=
CALLOC
(
1
,
sizeof
(
NR_UE_NR_Capability_t
));
prepare_sim_uecap
(
UE_Capability_nr
,
scc
,
mu
,
N_RB_DL
,
g_mcsTableIdx
);
// TODO do a UECAP for phy-sim
fill_default_secondaryCellGroup
(
scc
,
scd
,
secondaryCellGroup
,
UE_Capability_nr
,
0
,
1
,
n_tx
,
6
,
0
,
0
,
0
);
/* RRC parameter validation for secondaryCellGroup */
fix_scd
(
scd
);
...
...
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
0102379f
...
...
@@ -731,7 +731,8 @@ int main(int argc, char **argv)
prepare_scd
(
scd
);
fill_default_secondaryCellGroup
(
scc
,
scd
,
secondaryCellGroup
,
0
,
1
,
n_tx
,
0
,
0
,
0
,
0
);
// TODO do a UECAP for phy-sim
fill_default_secondaryCellGroup
(
scc
,
scd
,
secondaryCellGroup
,
NULL
,
0
,
1
,
n_tx
,
0
,
0
,
0
,
0
);
// xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void*)secondaryCellGroup);
...
...
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
0102379f
...
...
@@ -627,6 +627,8 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
process_CellGroup
(
CellGroup
,
&
UE_info
->
UE_sched_ctrl
[
UE_id
]);
const
NR_ServingCellConfig_t
*
servingCellConfig
=
CellGroup
?
CellGroup
->
spCellConfig
->
spCellConfigDedicated
:
NULL
;
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
sched_ctrl
->
update_pdsch_ps
=
true
;
sched_ctrl
->
update_pusch_ps
=
true
;
const
NR_PDSCH_ServingCellConfig_t
*
pdsch
=
servingCellConfig
?
servingCellConfig
->
pdsch_ServingCellConfig
->
choice
.
setup
:
NULL
;
if
(
get_softmodem_params
()
->
sa
)
{
// add all available DL HARQ processes for this UE in SA
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
0102379f
...
...
@@ -393,12 +393,17 @@ int nr_write_ce_dlsch_pdu(module_id_t module_idP,
#define BLER_UPDATE_FRAME 10
#define BLER_FILTER 0.9f
int
get_mcs_from_bler
(
module_id_t
mod_id
,
int
CC_id
,
frame_t
frame
,
sub_frame_t
slot
,
int
UE_id
)
int
get_mcs_from_bler
(
module_id_t
mod_id
,
int
CC_id
,
frame_t
frame
,
sub_frame_t
slot
,
int
UE_id
,
int
mcs_table
)
{
gNB_MAC_INST
*
nrmac
=
RC
.
nrmac
[
mod_id
];
const
NR_ServingCellConfigCommon_t
*
scc
=
nrmac
->
common_channels
[
CC_id
].
ServingCellConfigCommon
;
const
int
n
=
nr_slots_per_frame
[
*
scc
->
ssbSubcarrierSpacing
];
int
max_allowed_mcs
=
(
mcs_table
==
1
)
?
27
:
28
;
int
max_mcs
=
nrmac
->
dl_max_mcs
;
if
(
nrmac
->
dl_max_mcs
>
max_allowed_mcs
)
max_mcs
=
max_allowed_mcs
;
NR_DL_bler_stats_t
*
bler_stats
=
&
nrmac
->
UE_info
.
UE_sched_ctrl
[
UE_id
].
dl_bler_stats
;
/* first call: everything is zero. Initialize to sensible default */
if
(
bler_stats
->
last_frame_slot
==
0
&&
bler_stats
->
mcs
==
0
)
{
...
...
@@ -444,7 +449,7 @@ int get_mcs_from_bler(module_id_t mod_id, int CC_id, frame_t frame, sub_frame_t
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) {*/
if
(
bler_stats
->
bler
<
nrmac
->
dl_bler_target_lower
&&
old_mcs
<
nrmac
->
dl_
max_mcs
&&
dtx
>
9
)
if
(
bler_stats
->
bler
<
nrmac
->
dl_bler_target_lower
&&
old_mcs
<
max_mcs
&&
dtx
>
9
)
new_mcs
+=
1
;
else
if
(
bler_stats
->
bler
>
nrmac
->
dl_bler_target_upper
&&
old_mcs
>
6
)
new_mcs
-=
1
;
...
...
@@ -586,8 +591,10 @@ bool allocate_dl_retransmission(module_id_t module_id,
}
/* check whether we need to switch the TDA allocation since the last
* (re-)transmission */
if
(
ps
->
time_domain_allocation
!=
tda
)
nr_set_pdsch_semi_static
(
scc
,
UE_info
->
CellGroup
[
UE_id
],
sched_ctrl
->
active_bwp
,
bwpd
,
tda
,
ps
->
nrOfLayers
,
sched_ctrl
,
ps
);
if
(
ps
->
time_domain_allocation
!=
tda
||
sched_ctrl
->
update_pdsch_ps
)
{
nr_set_pdsch_semi_static
(
scc
,
cg
,
sched_ctrl
->
active_bwp
,
bwpd
,
tda
,
ps
->
nrOfLayers
,
sched_ctrl
,
ps
);
sched_ctrl
->
update_pdsch_ps
=
false
;
}
}
else
{
/* the retransmission will use a different time domain allocation, check
* that we have enough resources */
...
...
@@ -744,7 +751,7 @@ void pf_dl(module_id_t module_id,
/* Calculate coeff */
set_dl_mcs
(
sched_pdsch
,
sched_ctrl
,
&
mac
->
dl_max_mcs
,
ps
->
mcsTableIdx
);
sched_pdsch
->
mcs
=
get_mcs_from_bler
(
module_id
,
/* CC_id = */
0
,
frame
,
slot
,
UE_id
);
sched_pdsch
->
mcs
=
get_mcs_from_bler
(
module_id
,
/* CC_id = */
0
,
frame
,
slot
,
UE_id
,
ps
->
mcsTableIdx
);
layers
[
UE_id
]
=
set_dl_nrOfLayers
(
sched_ctrl
);
const
uint8_t
Qm
=
nr_get_Qm_dl
(
sched_pdsch
->
mcs
,
ps
->
mcsTableIdx
);
const
uint16_t
R
=
nr_get_code_rate_dl
(
sched_pdsch
->
mcs
,
ps
->
mcsTableIdx
);
...
...
@@ -863,8 +870,11 @@ void pf_dl(module_id_t module_id,
NR_pdsch_semi_static_t
*
ps
=
&
sched_ctrl
->
pdsch_semi_static
;
if
(
ps
->
nrOfLayers
!=
layers
[
UE_id
]
||
ps
->
time_domain_allocation
!=
tda
)
ps
->
time_domain_allocation
!=
tda
||
sched_ctrl
->
update_pdsch_ps
)
{
nr_set_pdsch_semi_static
(
scc
,
UE_info
->
CellGroup
[
UE_id
],
sched_ctrl
->
active_bwp
,
bwpd
,
tda
,
layers
[
UE_id
],
sched_ctrl
,
ps
);
sched_ctrl
->
update_pdsch_ps
=
false
;
}
const
uint16_t
slbitmap
=
SL_to_bitmap
(
ps
->
startSymbolIndex
,
ps
->
nrOfSymbols
);
// Freq-demain allocation
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
0102379f
...
...
@@ -532,6 +532,7 @@ void nr_set_pdsch_semi_static(const NR_ServingCellConfigCommon_t *scc,
ps
->
mcsTableIdx
=
2
;
}
else
ps
->
mcsTableIdx
=
0
;
LOG_D
(
NR_MAC
,
"MCS Table Index: %d
\n
"
,
ps
->
mcsTableIdx
);
NR_PDSCH_Config_t
*
pdsch_Config
;
if
(
bwp
&&
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
0102379f
...
...
@@ -992,8 +992,11 @@ bool allocate_ul_retransmission(module_id_t module_id,
if
(
ps
->
time_domain_allocation
!=
tda
||
ps
->
dci_format
!=
dci_format
||
ps
->
num_dmrs_cdm_grps_no_data
!=
num_dmrs_cdm_grps_no_data
)
||
ps
->
num_dmrs_cdm_grps_no_data
!=
num_dmrs_cdm_grps_no_data
||
sched_ctrl
->
update_pusch_ps
)
{
nr_set_pusch_semi_static
(
scc
,
sched_ctrl
->
active_ubwp
,
ubwpd
,
dci_format
,
tda
,
num_dmrs_cdm_grps_no_data
,
ps
);
sched_ctrl
->
update_pusch_ps
=
false
;
}
LOG_D
(
NR_MAC
,
"%s(): retransmission keeping TDA %d and TBS %d
\n
"
,
__func__
,
tda
,
retInfo
->
tb_size
);
}
else
{
/* the retransmission will use a different time domain allocation, check
...
...
@@ -1230,8 +1233,11 @@ void pf_ul(module_id_t module_id,
const
int
tda
=
sched_ctrl
->
active_ubwp
?
nrmac
->
preferred_ul_tda
[
sched_ctrl
->
active_ubwp
->
bwp_Id
][
slot
]
:
0
;
if
(
ps
->
time_domain_allocation
!=
tda
||
ps
->
dci_format
!=
dci_format
||
ps
->
num_dmrs_cdm_grps_no_data
!=
num_dmrs_cdm_grps_no_data
)
||
ps
->
num_dmrs_cdm_grps_no_data
!=
num_dmrs_cdm_grps_no_data
||
sched_ctrl
->
update_pusch_ps
)
{
nr_set_pusch_semi_static
(
scc
,
sched_ctrl
->
active_ubwp
,
ubwpd
,
dci_format
,
tda
,
num_dmrs_cdm_grps_no_data
,
ps
);
sched_ctrl
->
update_pusch_ps
=
false
;
}
NR_sched_pusch_t
*
sched_pusch
=
&
sched_ctrl
->
sched_pusch
;
sched_pusch
->
mcs
=
9
;
update_ul_ue_R_Qm
(
sched_pusch
,
ps
);
...
...
@@ -1347,8 +1353,11 @@ void pf_ul(module_id_t module_id,
const
int
tda
=
sched_ctrl
->
active_ubwp
?
nrmac
->
preferred_ul_tda
[
sched_ctrl
->
active_ubwp
->
bwp_Id
][
slot
]
:
0
;
if
(
ps
->
time_domain_allocation
!=
tda
||
ps
->
dci_format
!=
dci_format
||
ps
->
num_dmrs_cdm_grps_no_data
!=
num_dmrs_cdm_grps_no_data
)
||
ps
->
num_dmrs_cdm_grps_no_data
!=
num_dmrs_cdm_grps_no_data
||
sched_ctrl
->
update_pusch_ps
)
{
nr_set_pusch_semi_static
(
scc
,
sched_ctrl
->
active_ubwp
,
ubwpd
,
dci_format
,
tda
,
num_dmrs_cdm_grps_no_data
,
ps
);
sched_ctrl
->
update_pusch_ps
=
false
;
}
update_ul_ue_R_Qm
(
sched_pusch
,
ps
);
/* Calculate the current scheduling bytes and the necessary RBs */
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
0102379f
...
...
@@ -620,6 +620,8 @@ typedef struct {
int
ul_failure
;
struct
CSI_Report
CSI_report
;
bool
SR
;
bool
update_pdsch_ps
;
bool
update_pusch_ps
;
bool
set_mcs
;
/// information about every HARQ process
NR_UE_harq_t
harq_processes
[
NR_MAX_NB_HARQ_PROCESSES
];
...
...
openair2/RRC/NR/MESSAGES/asn1_msg.c
View file @
0102379f
...
...
@@ -1451,6 +1451,30 @@ void fill_mastercellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, NR_CellGr
ASN_SEQUENCE_ADD
(
&
ue_context_mastercellGroup
->
rlc_BearerToAddModList
->
list
,
rlc_BearerConfig_drb
);
}
void
update_cellGroupConfig
(
NR_CellGroupConfig_t
*
cellGroupConfig
,
rrc_gNB_carrier_data_t
*
carrier
,
NR_UE_NR_Capability_t
*
uecap
)
{
NR_SpCellConfig_t
*
SpCellConfig
=
cellGroupConfig
->
spCellConfig
;
if
(
SpCellConfig
==
NULL
)
return
;
NR_ServingCellConfigCommon_t
*
scc
=
carrier
->
servingcellconfigcommon
;
NR_BWP_DownlinkDedicated_t
*
bwp_Dedicated
=
SpCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
;
set_dl_mcs_table
(
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
genericParameters
.
subcarrierSpacing
,
uecap
,
bwp_Dedicated
,
scc
);
struct
NR_ServingCellConfig__downlinkBWP_ToAddModList
*
DL_BWP_list
=
SpCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
;
if
(
DL_BWP_list
)
{
for
(
int
i
=
0
;
i
<
DL_BWP_list
->
list
.
count
;
i
++
){
NR_BWP_Downlink_t
*
bwp
=
DL_BWP_list
->
list
.
array
[
i
];
int
scs
=
bwp
->
bwp_Common
->
genericParameters
.
subcarrierSpacing
;
set_dl_mcs_table
(
scs
,
uecap
,
bwp
->
bwp_Dedicated
,
carrier
->
servingcellconfigcommon
);
}
}
}
void
fill_initial_cellGroupConfig
(
int
uid
,
NR_CellGroupConfig_t
*
cellGroupConfig
,
NR_ServingCellConfigCommon_t
*
scc
,
...
...
@@ -1870,6 +1894,8 @@ int16_t do_RRCReconfiguration(
NR_SDAP_Config_t
*
sdap_config
,
NR_MeasConfig_t
*
meas_config
,
struct
NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList
*
dedicatedNAS_MessageList
,
rrc_gNB_ue_context_t
*
const
ue_context_pP
,
rrc_gNB_carrier_data_t
*
carrier
,
NR_MAC_CellGroupConfig_t
*
mac_CellGroupConfig
,
NR_CellGroupConfig_t
*
cellGroupConfig
)
//------------------------------------------------------------------------------
...
...
@@ -1906,15 +1932,6 @@ int16_t do_RRCReconfiguration(
ie
->
radioBearerConfig
->
srb3_ToRelease
=
NULL
;
ie
->
radioBearerConfig
->
drb_ToReleaseList
=
DRB_releaseList
;
}
/******************** Secondary Cell Group ********************/
// rrc_gNB_carrier_data_t *carrier = &(gnb_rrc_inst->carrier);
// fill_default_secondaryCellGroup( carrier->servingcellconfigcommon,
// ue_context_pP->ue_context.secondaryCellGroup,
// 1,
// 1,
// carrier->pdsch_AntennaPorts,
// carrier->initial_csi_index[ue_context_p->local_uid + 1],
// ue_context_pP->local_uid);
/******************** Meas Config ********************/
// measConfig
...
...
@@ -1930,6 +1947,9 @@ int16_t do_RRCReconfiguration(
}
if
(
cellGroupConfig
!=
NULL
){
update_cellGroupConfig
(
cellGroupConfig
,
carrier
,
ue_context_pP
->
ue_context
.
UE_Capability_nr
);
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_NR_CellGroupConfig
,
NULL
,
(
void
*
)
cellGroupConfig
,
...
...
openair2/RRC/NR/MESSAGES/asn1_msg.h
View file @
0102379f
...
...
@@ -110,6 +110,10 @@ void fill_initial_cellGroupConfig(int uid,
NR_ServingCellConfigCommon_t
*
scc
,
rrc_gNB_carrier_data_t
*
carrier
);
void
update_cellGroupConfig
(
NR_CellGroupConfig_t
*
cellGroupConfig
,
rrc_gNB_carrier_data_t
*
carrier
,
NR_UE_NR_Capability_t
*
uecap
);
void
fill_mastercellGroupConfig
(
NR_CellGroupConfig_t
*
cellGroupConfig
,
NR_CellGroupConfig_t
*
ue_context_mastercellGroup
);
uint8_t
do_RRCSetup
(
rrc_gNB_ue_context_t
*
const
ue_context_pP
,
...
...
@@ -145,6 +149,8 @@ int16_t do_RRCReconfiguration(
NR_SDAP_Config_t
*
sdap_config
,
NR_MeasConfig_t
*
meas_config
,
struct
NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList
*
dedicatedNAS_MessageList
,
rrc_gNB_ue_context_t
*
const
ue_context_pP
,
rrc_gNB_carrier_data_t
*
carrier
,
NR_MAC_CellGroupConfig_t
*
mac_CellGroupConfig
,
NR_CellGroupConfig_t
*
cellGroupConfig
);
...
...
openair2/RRC/NR/nr_rrc_config.c
View file @
0102379f
...
...
@@ -31,6 +31,50 @@
#include "nr_rrc_config.h"
#include "common/utils/nr/nr_common.h"
void
prepare_sim_uecap
(
NR_UE_NR_Capability_t
*
cap
,
NR_ServingCellConfigCommon_t
*
scc
,
int
numerology
,
int
rbsize
,
int
mcs_table
)
{
int
band
=
*
scc
->
downlinkConfigCommon
->
frequencyInfoDL
->
frequencyBandList
.
list
.
array
[
0
];
NR_BandNR_t
*
nr_bandnr
=
CALLOC
(
1
,
sizeof
(
NR_BandNR_t
));
nr_bandnr
->
bandNR
=
band
;
ASN_SEQUENCE_ADD
(
&
cap
->
rf_Parameters
.
supportedBandListNR
.
list
,
nr_bandnr
);
if
(
mcs_table
==
1
)
{
int
bw
=
get_supported_band_index
(
numerology
,
band
,
rbsize
);
if
(
band
>
256
)
{
NR_BandNR_t
*
bandNRinfo
=
cap
->
rf_Parameters
.
supportedBandListNR
.
list
.
array
[
0
];
bandNRinfo
->
pdsch_256QAM_FR2
=
CALLOC
(
1
,
sizeof
(
*
bandNRinfo
->
pdsch_256QAM_FR2
));
*
bandNRinfo
->
pdsch_256QAM_FR2
=
NR_BandNR__pdsch_256QAM_FR2_supported
;
}
else
{
cap
->
phy_Parameters
.
phy_ParametersFR1
=
CALLOC
(
1
,
sizeof
(
*
cap
->
phy_Parameters
.
phy_ParametersFR1
));
NR_Phy_ParametersFR1_t
*
phy_fr1
=
cap
->
phy_Parameters
.
phy_ParametersFR1
;
phy_fr1
->
pdsch_256QAM_FR1
=
CALLOC
(
1
,
sizeof
(
*
phy_fr1
->
pdsch_256QAM_FR1
));
*
phy_fr1
->
pdsch_256QAM_FR1
=
NR_Phy_ParametersFR1__pdsch_256QAM_FR1_supported
;
}
cap
->
featureSets
=
CALLOC
(
1
,
sizeof
(
*
cap
->
featureSets
));
NR_FeatureSets_t
*
fs
=
cap
->
featureSets
;
fs
->
featureSetsDownlinkPerCC
=
CALLOC
(
1
,
sizeof
(
*
fs
->
featureSetsDownlinkPerCC
));
NR_FeatureSetDownlinkPerCC_t
*
fs_cc
=
CALLOC
(
1
,
sizeof
(
NR_FeatureSetDownlinkPerCC_t
));
fs_cc
->
supportedSubcarrierSpacingDL
=
numerology
;
if
(
band
>
256
)
{
fs_cc
->
supportedBandwidthDL
.
present
=
NR_SupportedBandwidth_PR_fr2
;
fs_cc
->
supportedBandwidthDL
.
choice
.
fr2
=
bw
;
}
else
{
fs_cc
->
supportedBandwidthDL
.
present
=
NR_SupportedBandwidth_PR_fr1
;
fs_cc
->
supportedBandwidthDL
.
choice
.
fr1
=
bw
;
}
fs_cc
->
supportedModulationOrderDL
=
CALLOC
(
1
,
sizeof
(
*
fs_cc
->
supportedModulationOrderDL
));
*
fs_cc
->
supportedModulationOrderDL
=
NR_ModulationOrder_qam256
;
ASN_SEQUENCE_ADD
(
&
fs
->
featureSetsDownlinkPerCC
->
list
,
fs_cc
);
}
}
void
nr_rrc_config_dl_tda
(
NR_ServingCellConfigCommon_t
*
scc
){
lte_frame_type_t
frame_type
=
get_frame_type
(
*
scc
->
downlinkConfigCommon
->
frequencyInfoDL
->
frequencyBandList
.
list
.
array
[
0
],
*
scc
->
ssbSubcarrierSpacing
);
...
...
@@ -105,6 +149,52 @@ void nr_rrc_config_ul_tda(NR_ServingCellConfigCommon_t *scc, int min_fb_delay){
ASN_SEQUENCE_ADD
(
&
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
pusch_ConfigCommon
->
choice
.
setup
->
pusch_TimeDomainAllocationList
->
list
,
pusch_timedomainresourceallocation_msg3
);
}
}
}
void
set_dl_mcs_table
(
int
scs
,
NR_UE_NR_Capability_t
*
cap
,
NR_BWP_DownlinkDedicated_t
*
bwp_Dedicated
,
NR_ServingCellConfigCommon_t
*
scc
)
{
if
(
cap
==
NULL
){
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
=
NULL
;
return
;
}
int
band
=
*
scc
->
downlinkConfigCommon
->
frequencyInfoDL
->
frequencyBandList
.
list
.
array
[
0
];
struct
NR_FrequencyInfoDL__scs_SpecificCarrierList
scs_list
=
scc
->
downlinkConfigCommon
->
frequencyInfoDL
->
scs_SpecificCarrierList
;
int
bw_rb
=
-
1
;
for
(
int
i
=
0
;
i
<
scs_list
.
list
.
count
;
i
++
){
if
(
scs
==
scs_list
.
list
.
array
[
i
]
->
subcarrierSpacing
){
bw_rb
=
scs_list
.
list
.
array
[
i
]
->
carrierBandwidth
;
break
;
}
}
AssertFatal
(
bw_rb
>
0
,
"Could not find scs-SpecificCarrierList element for scs %d"
,
scs
);
int
bw
=
get_supported_band_index
(
scs
,
band
,
bw_rb
);
AssertFatal
(
bw
>
0
,
"Supported band corresponding to %d RBs not found
\n
"
,
bw_rb
);
bool
supported
=
false
;
if
(
band
>
256
)
{
for
(
int
i
=
0
;
i
<
cap
->
rf_Parameters
.
supportedBandListNR
.
list
.
count
;
i
++
)
{
NR_BandNR_t
*
bandNRinfo
=
cap
->
rf_Parameters
.
supportedBandListNR
.
list
.
array
[
i
];
if
(
bandNRinfo
->
bandNR
==
band
&&
bandNRinfo
->
pdsch_256QAM_FR2
)
{
supported
=
true
;
break
;
}
}
}
else
if
(
cap
->
phy_Parameters
.
phy_ParametersFR1
&&
cap
->
phy_Parameters
.
phy_ParametersFR1
->
pdsch_256QAM_FR1
)
supported
=
true
;
if
(
supported
)
{
if
(
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
==
NULL
)
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
=
calloc
(
1
,
sizeof
(
*
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
));
*
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
=
NR_PDSCH_Config__mcs_Table_qam256
;
}
else
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
=
NULL
;
}
openair2/RRC/NR/nr_rrc_config.h
View file @
0102379f
...
...
@@ -113,6 +113,14 @@ typedef struct physicalcellgroup_s{
void
nr_rrc_config_dl_tda
(
NR_ServingCellConfigCommon_t
*
scc
);
void
nr_rrc_config_ul_tda
(
NR_ServingCellConfigCommon_t
*
scc
,
int
min_fb_delay
);
void
set_dl_mcs_table
(
int
scs
,
NR_UE_NR_Capability_t
*
cap
,
NR_BWP_DownlinkDedicated_t
*
bwp_Dedicated
,
NR_ServingCellConfigCommon_t
*
scc
);
void
prepare_sim_uecap
(
NR_UE_NR_Capability_t
*
cap
,
NR_ServingCellConfigCommon_t
*
scc
,
int
numerology
,
int
rbsize
,
int
mcs_table
);
#endif
openair2/RRC/NR/nr_rrc_proto.h
View file @
0102379f
...
...
@@ -76,6 +76,7 @@ void rrc_remove_nsa_user(gNB_RRC_INST *rrc, int rnti);
void
fill_default_secondaryCellGroup
(
NR_ServingCellConfigCommon_t
*
servingcellconfigcommon
,
NR_ServingCellConfig_t
*
servingcellconfigdedicated
,
NR_CellGroupConfig_t
*
secondaryCellGroup
,
NR_UE_NR_Capability_t
*
uecap
,
int
scg_id
,
int
servCellIndex
,
int
dl_antenna_ports
,
...
...
@@ -94,6 +95,7 @@ void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon
NR_ServingCellConfig_t
*
servingcellconfigdedicated
,
NR_RRCReconfiguration_IEs_t
*
reconfig
,
NR_CellGroupConfig_t
*
secondaryCellGroup
,
NR_UE_NR_Capability_t
*
uecap
,
int
dl_antenna_ports
,
int
minRXTXTIMEpdsch
,
int
do_csirs
,
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
0102379f
...
...
@@ -709,6 +709,8 @@ rrc_gNB_generate_defaultRRCReconfiguration(
dedicatedNAS_MessageList
=
NULL
;
}
gNB_RRC_INST
*
rrc
=
RC
.
nrrrc
[
ctxt_pP
->
module_id
];
gNB_RRC_UE_t
*
ue_p
=
&
ue_context_pP
->
ue_context
;
memset
(
buffer
,
0
,
sizeof
(
buffer
));
size
=
do_RRCReconfiguration
(
ctxt_pP
,
buffer
,
sizeof
(
buffer
),
xid
,
...
...
@@ -719,8 +721,10 @@ rrc_gNB_generate_defaultRRCReconfiguration(
NULL
,
NULL
,
dedicatedNAS_MessageList
,
ue_context_pP
,
&
rrc
->
carrier
,
NULL
,
NULL
);
ue_p
->
masterCellGroup
);
free
(
ue_context_pP
->
ue_context
.
nas_pdu
.
buffer
);
...
...
@@ -980,6 +984,8 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
NULL
,
NULL
,
dedicatedNAS_MessageList
,
ue_context_pP
,
&
rrc
->
carrier
,
NULL
,
cellGroupConfig
);
LOG_DUMPMSG
(
NR_RRC
,
DEBUG_RRC
,(
char
*
)
buffer
,
size
,
"[MSG] RRC Reconfiguration
\n
"
);
...
...
@@ -1151,6 +1157,8 @@ rrc_gNB_modify_dedicatedRRCReconfiguration(
NULL
,
dedicatedNAS_MessageList
,
NULL
,
NULL
,
NULL
,
NULL
);
LOG_DUMPMSG
(
NR_RRC
,
DEBUG_RRC
,
(
char
*
)
buffer
,
size
,
"[MSG] RRC Reconfiguration
\n
"
);
...
...
@@ -1249,6 +1257,8 @@ rrc_gNB_generate_dedicatedRRCReconfiguration_release(
NULL
,
dedicatedNAS_MessageList
,
NULL
,
NULL
,
NULL
,
NULL
);
ue_context_pP
->
ue_context
.
pdu_session_release_command_flag
=
1
;
...
...
@@ -1798,6 +1808,8 @@ rrc_gNB_process_RRCConnectionReestablishmentComplete(
NULL
,
// MeasObj_list,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
LOG_DUMPMSG
(
NR_RRC
,
DEBUG_RRC
,(
char
*
)
buffer
,
size
,
"[MSG] RRC Reconfiguration
\n
"
);
...
...
@@ -3340,51 +3352,6 @@ unsigned int get_ul_bw_mask(gNB_RRC_INST *rrc,NR_UE_NR_Capability_t *cap) {
return
(
0
);
}
int
is_dl_256QAM_supported
(
gNB_RRC_INST
*
rrc
,
NR_UE_NR_Capability_t
*
cap
)
{
int
common_band
=
*
rrc
->
carrier
.
servingcellconfigcommon
->
downlinkConfigCommon
->
frequencyInfoDL
->
frequencyBandList
.
list
.
array
[
0
];
int
common_scs
=
rrc
->
carrier
.
servingcellconfigcommon
->
downlinkConfigCommon
->
frequencyInfoDL
->
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
subcarrierSpacing
;
if
(
common_band
>
256
)
{
for
(
int
i
=
0
;
i
<
cap
->
rf_Parameters
.
supportedBandListNR
.
list
.
count
;
i
++
)
{
NR_BandNR_t
*
bandNRinfo
=
cap
->
rf_Parameters
.
supportedBandListNR
.
list
.
array
[
i
];
if
(
bandNRinfo
->
bandNR
==
common_band
&&
!
bandNRinfo
->
pdsch_256QAM_FR2
)
return
(
0
);
}
}
else
if
(
cap
->
phy_Parameters
.
phy_ParametersFR1
&&
!
cap
->
phy_Parameters
.
phy_ParametersFR1
->
pdsch_256QAM_FR1
)
return
(
0
);
// check featureSet
NR_FeatureSets_t
*
fs
=
cap
->
featureSets
;
if
(
fs
)
{
// go through DL feature sets and look for one with current SCS
for
(
int
i
=
0
;
i
<
fs
->
featureSetsDownlinkPerCC
->
list
.
count
;
i
++
)
{
if
(
fs
->
featureSetsDownlinkPerCC
->
list
.
array
[
i
]
->
supportedSubcarrierSpacingDL
==
common_scs
&&
fs
->
featureSetsDownlinkPerCC
->
list
.
array
[
i
]
->
supportedModulationOrderDL
&&
*
fs
->
featureSetsDownlinkPerCC
->
list
.
array
[
i
]
->
supportedModulationOrderDL
==
NR_ModulationOrder_qam256
)
return
(
1
);
}
}
return
(
0
);
}
int
is_ul_256QAM_supported
(
gNB_RRC_INST
*
rrc
,
NR_UE_NR_Capability_t
*
cap
)
{
int
common_band
=
*
rrc
->
carrier
.
servingcellconfigcommon
->
uplinkConfigCommon
->
frequencyInfoUL
->
frequencyBandList
->
list
.
array
[
0
];
int
common_scs
=
rrc
->
carrier
.
servingcellconfigcommon
->
uplinkConfigCommon
->
frequencyInfoUL
->
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
subcarrierSpacing
;
for
(
int
i
=
0
;
i
<
cap
->
rf_Parameters
.
supportedBandListNR
.
list
.
count
;
i
++
)
{
NR_BandNR_t
*
bandNRinfo
=
cap
->
rf_Parameters
.
supportedBandListNR
.
list
.
array
[
i
];
if
(
bandNRinfo
->
bandNR
==
common_band
&&
!
bandNRinfo
->
pusch_256QAM
)
return
(
0
);
}
// check featureSet
NR_FeatureSets_t
*
fs
=
cap
->
featureSets
;
if
(
fs
)
{
// go through UL feature sets and look for one with current SCS
for
(
int
i
=
0
;
i
<
fs
->
featureSetsUplinkPerCC
->
list
.
count
;
i
++
)
{
if
(
fs
->
featureSetsUplinkPerCC
->
list
.
array
[
i
]
->
supportedSubcarrierSpacingUL
==
common_scs
&&
fs
->
featureSetsUplinkPerCC
->
list
.
array
[
i
]
->
supportedModulationOrderUL
&&
*
fs
->
featureSetsUplinkPerCC
->
list
.
array
[
i
]
->
supportedModulationOrderUL
==
NR_ModulationOrder_qam256
)
return
(
1
);
}
}
return
(
0
);
}
int
get_ul_mimo_layersCB
(
gNB_RRC_INST
*
rrc
,
NR_UE_NR_Capability_t
*
cap
)
{
int
common_scs
=
rrc
->
carrier
.
servingcellconfigcommon
->
uplinkConfigCommon
->
frequencyInfoUL
->
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
subcarrierSpacing
;
...
...
@@ -3454,11 +3421,9 @@ void nr_rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
}
if
(
ue_context_p
->
ue_context
.
UE_Capability_nr
)
{
fprintf
(
fd
,
"NR RRC UE cap: BW DL %x. BW UL %x,
256 QAM DL %s, 256 QAM UL %s,
DL MIMO Layers %d UL MIMO Layers (CB) %d UL MIMO Layers (nonCB) %d
\n
"
,
fprintf
(
fd
,
"NR RRC UE cap: BW DL %x. BW UL %x, DL MIMO Layers %d UL MIMO Layers (CB) %d UL MIMO Layers (nonCB) %d
\n
"
,
get_dl_bw_mask
(
RC
.
nrrrc
[
0
],
ue_context_p
->
ue_context
.
UE_Capability_nr
),
get_ul_bw_mask
(
RC
.
nrrrc
[
0
],
ue_context_p
->
ue_context
.
UE_Capability_nr
),
is_dl_256QAM_supported
(
RC
.
nrrrc
[
0
],
ue_context_p
->
ue_context
.
UE_Capability_nr
)
==
1
?
"yes"
:
"no"
,
is_ul_256QAM_supported
(
RC
.
nrrrc
[
0
],
ue_context_p
->
ue_context
.
UE_Capability_nr
)
==
1
?
"yes"
:
"no"
,
get_dl_mimo_layers
(
RC
.
nrrrc
[
0
],
ue_context_p
->
ue_context
.
UE_Capability_nr
),
get_ul_mimo_layersCB
(
RC
.
nrrrc
[
0
],
ue_context_p
->
ue_context
.
UE_Capability_nr
),
get_ul_mimo_layers
(
RC
.
nrrrc
[
0
],
ue_context_p
->
ue_context
.
UE_Capability_nr
));
...
...
openair2/RRC/NR/rrc_gNB_nsa.c
View file @
0102379f
...
...
@@ -245,6 +245,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
ue_context_p
->
ue_context
.
spCellConfig
->
spCellConfigDedicated
,
reconfig_ies
,
ue_context_p
->
ue_context
.
secondaryCellGroup
,
ue_context_p
->
ue_context
.
UE_Capability_nr
,
carrier
->
pdsch_AntennaPorts
,
carrier
->
minRXTXTIME
,
carrier
->
do_CSIRS
,
...
...
@@ -255,6 +256,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
NULL
,
reconfig_ies
,
ue_context_p
->
ue_context
.
secondaryCellGroup
,
ue_context_p
->
ue_context
.
UE_Capability_nr
,
carrier
->
pdsch_AntennaPorts
,
carrier
->
minRXTXTIME
,
carrier
->
do_CSIRS
,
...
...
openair2/RRC/NR/rrc_gNB_reconfig.c
View file @
0102379f
...
...
@@ -45,6 +45,7 @@
#include "SIMULATION/TOOLS/sim.h"
#include "executables/softmodem-common.h"
#include "LAYER2/nr_rlc/nr_rlc_oai_api.h"
#include "nr_rrc_config.h"
#define false 0
#define true 1
...
...
@@ -52,6 +53,7 @@
void
fill_default_secondaryCellGroup
(
NR_ServingCellConfigCommon_t
*
servingcellconfigcommon
,
NR_ServingCellConfig_t
*
servingcellconfigdedicated
,
NR_CellGroupConfig_t
*
secondaryCellGroup
,
NR_UE_NR_Capability_t
*
uecap
,
int
scg_id
,
int
servCellIndex
,
int
dl_antenna_ports
,
...
...
@@ -63,6 +65,9 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
AssertFatal
(
servingcellconfigcommon
!=
NULL
,
"servingcellconfigcommon is null
\n
"
);
AssertFatal
(
secondaryCellGroup
!=
NULL
,
"secondaryCellGroup is null
\n
"
);
if
(
uecap
==
NULL
)
LOG_E
(
RRC
,
"No UE Capabilities available when programming default CellGroup in NSA
\n
"
);
// This assert will never happen in the current implementation because NUMBER_OF_UE_MAX = 4.
// However, if in the future NUMBER_OF_UE_MAX is increased, it will be necessary to improve the allocation of SRS resources,
// where the startPosition = 2 or 3 and sl160 = 17, 17, 27 ... 157 only give us 30 different allocations.
...
...
@@ -336,12 +341,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
rateMatchPatternGroup1
=
NULL
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
rateMatchPatternGroup2
=
NULL
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
rbg_Size
=
NR_PDSCH_Config__rbg_Size_config1
;
if
(
!
get_softmodem_params
()
->
use_256qam_table
)
{
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
=
NULL
;
}
else
{
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
));
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
=
NR_PDSCH_Config__mcs_Table_qam256
;
}
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
=
NULL
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
maxNrofCodeWordsScheduledByDCI
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
maxNrofCodeWordsScheduledByDCI
));
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
maxNrofCodeWordsScheduledByDCI
=
NR_PDSCH_Config__maxNrofCodeWordsScheduledByDCI_n1
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
prb_BundlingType
.
present
=
NR_PDSCH_Config__prb_BundlingType_PR_staticBundling
;
...
...
@@ -605,43 +605,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
rateMatchPatternGroup1
=
NULL
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
rateMatchPatternGroup2
=
NULL
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
rbg_Size
=
NR_PDSCH_Config__rbg_Size_config1
;
if
(
!
get_softmodem_params
()
->
use_256qam_table
)
{
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
=
NULL
;
}
else
{
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
=
calloc
(
1
,
sizeof
(
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
));
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
=
NR_PDSCH_Config__mcs_Table_qam256
;
}
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
maxNrofCodeWordsScheduledByDCI
=
calloc
(
1
,
sizeof
(
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
maxNrofCodeWordsScheduledByDCI
));
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
maxNrofCodeWordsScheduledByDCI
=
NR_PDSCH_Config__maxNrofCodeWordsScheduledByDCI_n1
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
prb_BundlingType
.
present
=
NR_PDSCH_Config__prb_BundlingType_PR_staticBundling
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
prb_BundlingType
.
choice
.
staticBundling
=
calloc
(
1
,
sizeof
(
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
prb_BundlingType
.
choice
.
staticBundling
));
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
prb_BundlingType
.
choice
.
staticBundling
->
bundleSize
=
calloc
(
1
,
sizeof
(
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
prb_BundlingType
.
choice
.
staticBundling
->
bundleSize
));
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
prb_BundlingType
.
choice
.
staticBundling
->
bundleSize
=
NR_PDSCH_Config__prb_BundlingType__staticBundling__bundleSize_wideband
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
zp_CSI_RS_ResourceToAddModList
=
NULL
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
zp_CSI_RS_ResourceToReleaseList
=
NULL
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
aperiodic_ZP_CSI_RS_ResourceSetsToAddModList
=
NULL
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
aperiodic_ZP_CSI_RS_ResourceSetsToReleaseList
=
NULL
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
sp_ZP_CSI_RS_ResourceSetsToAddModList
=
NULL
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
sp_ZP_CSI_RS_ResourceSetsToReleaseList
=
NULL
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
p_ZP_CSI_RS_ResourceSet
=
NULL
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
tci_StatesToReleaseList
=
NULL
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
vrb_ToPRB_Interleaver
=
NULL
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
resourceAllocation
=
NR_PDSCH_Config__resourceAllocation_resourceAllocationType1
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
=
NULL
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
pdsch_AggregationFactor
=
NULL
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
rateMatchPatternToAddModList
=
NULL
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
rateMatchPatternToReleaseList
=
NULL
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
rateMatchPatternGroup1
=
NULL
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
rateMatchPatternGroup2
=
NULL
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
rbg_Size
=
NR_PDSCH_Config__rbg_Size_config1
;
if
(
!
get_softmodem_params
()
->
use_256qam_table
)
{
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
=
NULL
;
}
else
{
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
=
calloc
(
1
,
sizeof
(
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
));
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
mcs_Table
=
NR_PDSCH_Config__mcs_Table_qam256
;
}
set_dl_mcs_table
(
bwp
->
bwp_Common
->
genericParameters
.
subcarrierSpacing
,
uecap
,
bwp
->
bwp_Dedicated
,
servingcellconfigcommon
);
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
maxNrofCodeWordsScheduledByDCI
=
calloc
(
1
,
sizeof
(
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
maxNrofCodeWordsScheduledByDCI
));
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
maxNrofCodeWordsScheduledByDCI
=
NR_PDSCH_Config__maxNrofCodeWordsScheduledByDCI_n1
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
prb_BundlingType
.
present
=
NR_PDSCH_Config__prb_BundlingType_PR_staticBundling
;
...
...
@@ -744,8 +708,8 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
pusch_Config
->
pusch_TimeDomainAllocationList
=
NULL
;
pusch_Config
->
pusch_AggregationFactor
=
NULL
;
pusch_Config
->
mcs_Table
=
NULL
;
pusch_Config
->
mcs_TableTransformPrecoder
=
NULL
;
pusch_Config
->
transformPrecoder
=
NULL
;
pusch_Config
->
mcs_TableTransformPrecoder
=
NULL
;
/* if msg3_transformprecoding is set in conf file - pusch config should not disable it */
if
(
servingcellconfigcommon
->
uplinkConfigCommon
->
initialUplinkBWP
->
rach_ConfigCommon
->
choice
.
setup
->
msg3_transformPrecoder
==
NULL
)
{
pusch_Config
->
transformPrecoder
=
calloc
(
1
,
sizeof
(
*
pusch_Config
->
transformPrecoder
));
...
...
@@ -1378,6 +1342,7 @@ void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon
NR_ServingCellConfig_t
*
servingcellconfigdedicated
,
NR_RRCReconfiguration_IEs_t
*
reconfig
,
NR_CellGroupConfig_t
*
secondaryCellGroup
,
NR_UE_NR_Capability_t
*
uecap
,
int
dl_antenna_ports
,
int
minRXTXTIME
,
int
do_csirs
,
...
...
@@ -1392,6 +1357,7 @@ void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon
fill_default_secondaryCellGroup
(
servingcellconfigcommon
,
servingcellconfigdedicated
,
secondaryCellGroup
,
uecap
,
1
,
1
,
dl_antenna_ports
,
...
...
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