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
spbro
OpenXG-RAN
Commits
fb1cc6c2
Commit
fb1cc6c2
authored
Sep 27, 2024
by
Jaroslava Fiedlerova
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/sib19-gnb' into integration_2024_w39
parents
01524428
b6b3cc51
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
557 additions
and
104 deletions
+557
-104
openair2/GNB_APP/RRC_nr_paramsvalues.h
openair2/GNB_APP/RRC_nr_paramsvalues.h
+14
-0
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+32
-3
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
+2
-0
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+31
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
+5
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+3
-3
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
+346
-87
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+4
-6
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+14
-1
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+19
-0
openair2/RRC/NR/nr_rrc_config.c
openair2/RRC/NR/nr_rrc_config.c
+74
-1
openair2/RRC/NR/nr_rrc_config.h
openair2/RRC/NR/nr_rrc_config.h
+4
-0
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.25PRB.usrpx300.conf
...GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.25PRB.usrpx300.conf
+7
-0
No files found.
openair2/GNB_APP/RRC_nr_paramsvalues.h
View file @
fb1cc6c2
...
...
@@ -109,6 +109,13 @@
#define GNB_CONFIG_STRING_SSPBCHBLOCKPOWER "ssPBCH_BlockPower"
#define GNB_CONFIG_STRING_CELLSPECIFICKOFFSET "cellSpecificKoffset_r17"
#define GNB_CONFIG_STRING_EPHEMERIS_POSITION_X "positionX-r17"
#define GNB_CONFIG_STRING_EPHEMERIS_POSITION_Y "positionY-r17"
#define GNB_CONFIG_STRING_EPHEMERIS_POSITION_Z "positionZ-r17"
#define GNB_CONFIG_STRING_EPHEMERIS_VELOCITY_VX "velocityVX-r17"
#define GNB_CONFIG_STRING_EPHEMERIS_VELOCITY_VY "velocityVY-r17"
#define GNB_CONFIG_STRING_EPHEMERIS_VELOCITY_VZ "velocityVZ-r17"
#define GNB_CONFIG_STRING_TA_COMMON "ta-Common-r17"
#define CARRIERBANDWIDTH_OKVALUES {11,18,24,25,31,32,38,51,52,65,66,78,79,93,106,107,121,132,133,135,160,162,189,216,217,245,264,270,273}
...
...
@@ -232,6 +239,13 @@
{GNB_CONFIG_STRING_NROFUPLINKSYMBOLS2,NULL,0,.i64ptr=&scc->tdd_UL_DL_ConfigurationCommon->pattern2->nrofUplinkSymbols,.defint64val=-1,TYPE_INT64,0},\
{GNB_CONFIG_STRING_SSPBCHBLOCKPOWER,NULL,0,.i64ptr=&scc->ss_PBCH_BlockPower,.defint64val=20,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_CELLSPECIFICKOFFSET,NULL,0,.i64ptr=scc->ext2->ntn_Config_r17->cellSpecificKoffset_r17,.defint64val=0,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_EPHEMERIS_POSITION_X,NULL,0,.i64ptr=&scc->ext2->ntn_Config_r17->ephemerisInfo_r17->choice.positionVelocity_r17->positionX_r17,.defint64val=LONG_MAX,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_EPHEMERIS_POSITION_Y,NULL,0,.i64ptr=&scc->ext2->ntn_Config_r17->ephemerisInfo_r17->choice.positionVelocity_r17->positionY_r17,.defint64val=LONG_MAX,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_EPHEMERIS_POSITION_Z,NULL,0,.i64ptr=&scc->ext2->ntn_Config_r17->ephemerisInfo_r17->choice.positionVelocity_r17->positionZ_r17,.defint64val=LONG_MAX,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_EPHEMERIS_VELOCITY_VX,NULL,0,.i64ptr=&scc->ext2->ntn_Config_r17->ephemerisInfo_r17->choice.positionVelocity_r17->velocityVX_r17,.defint64val=LONG_MAX,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_EPHEMERIS_VELOCITY_VY,NULL,0,.i64ptr=&scc->ext2->ntn_Config_r17->ephemerisInfo_r17->choice.positionVelocity_r17->velocityVY_r17,.defint64val=LONG_MAX,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_EPHEMERIS_VELOCITY_VZ,NULL,0,.i64ptr=&scc->ext2->ntn_Config_r17->ephemerisInfo_r17->choice.positionVelocity_r17->velocityVZ_r17,.defint64val=LONG_MAX,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_TA_COMMON,NULL,0,.i64ptr=&scc->ext2->ntn_Config_r17->ta_Info_r17->ta_Common_r17,.defint64val=-1,TYPE_INT64,0}, \
{GNB_CONFIG_STRING_MSG1SUBCARRIERSPACING,NULL,0,.i64ptr=scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon->choice.setup->msg1_SubcarrierSpacing,.defintval=-1,TYPE_INT64,0}}
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
...
...
openair2/GNB_APP/gnb_config.c
View file @
fb1cc6c2
...
...
@@ -216,6 +216,13 @@ void prepare_scc(NR_ServingCellConfigCommon_t *scc) {
scc
->
ext2
=
CALLOC
(
1
,
sizeof
(
*
scc
->
ext2
));
scc
->
ext2
->
ntn_Config_r17
=
CALLOC
(
1
,
sizeof
(
*
scc
->
ext2
->
ntn_Config_r17
));
scc
->
ext2
->
ntn_Config_r17
->
cellSpecificKoffset_r17
=
CALLOC
(
1
,
sizeof
(
*
scc
->
ext2
->
ntn_Config_r17
->
cellSpecificKoffset_r17
));
scc
->
ext2
->
ntn_Config_r17
->
ephemerisInfo_r17
=
CALLOC
(
1
,
sizeof
(
*
scc
->
ext2
->
ntn_Config_r17
->
ephemerisInfo_r17
));
scc
->
ext2
->
ntn_Config_r17
->
ta_Info_r17
=
CALLOC
(
1
,
sizeof
(
*
scc
->
ext2
->
ntn_Config_r17
->
ta_Info_r17
));
scc
->
ext2
->
ntn_Config_r17
->
ephemerisInfo_r17
->
present
=
NR_EphemerisInfo_r17_PR_positionVelocity_r17
;
scc
->
ext2
->
ntn_Config_r17
->
ephemerisInfo_r17
->
choice
.
positionVelocity_r17
=
CALLOC
(
1
,
sizeof
(
*
scc
->
ext2
->
ntn_Config_r17
->
ephemerisInfo_r17
->
choice
.
positionVelocity_r17
));
}
// Section 4.1 in 38.213
...
...
@@ -436,8 +443,27 @@ void fix_scc(NR_ServingCellConfigCommon_t *scc, uint64_t ssbmap)
AssertFatal
(
*
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
pucch_ConfigCommon
->
choice
.
setup
->
pucch_ResourceCommon
<
2
,
"pucch_ResourceConfig should be 0 or 1 for now
\n
"
);
if
(
*
scc
->
ext2
->
ntn_Config_r17
->
cellSpecificKoffset_r17
==
0
)
{
if
(
*
scc
->
ext2
->
ntn_Config_r17
->
cellSpecificKoffset_r17
==
0
)
{
free
(
scc
->
ext2
->
ntn_Config_r17
->
cellSpecificKoffset_r17
);
scc
->
ext2
->
ntn_Config_r17
->
cellSpecificKoffset_r17
=
NULL
;
}
if
(
scc
->
ext2
->
ntn_Config_r17
->
ta_Info_r17
->
ta_Common_r17
==
-
1
)
{
free
(
scc
->
ext2
->
ntn_Config_r17
->
ta_Info_r17
);
scc
->
ext2
->
ntn_Config_r17
->
ta_Info_r17
=
NULL
;
}
if
(
scc
->
ext2
->
ntn_Config_r17
->
ephemerisInfo_r17
->
choice
.
positionVelocity_r17
->
positionX_r17
==
LONG_MAX
&&
scc
->
ext2
->
ntn_Config_r17
->
ephemerisInfo_r17
->
choice
.
positionVelocity_r17
->
positionY_r17
==
LONG_MAX
&&
scc
->
ext2
->
ntn_Config_r17
->
ephemerisInfo_r17
->
choice
.
positionVelocity_r17
->
positionZ_r17
==
LONG_MAX
&&
scc
->
ext2
->
ntn_Config_r17
->
ephemerisInfo_r17
->
choice
.
positionVelocity_r17
->
velocityVX_r17
==
LONG_MAX
&&
scc
->
ext2
->
ntn_Config_r17
->
ephemerisInfo_r17
->
choice
.
positionVelocity_r17
->
velocityVY_r17
==
LONG_MAX
&&
scc
->
ext2
->
ntn_Config_r17
->
ephemerisInfo_r17
->
choice
.
positionVelocity_r17
->
velocityVZ_r17
==
LONG_MAX
)
{
free
(
scc
->
ext2
->
ntn_Config_r17
->
ephemerisInfo_r17
->
choice
.
positionVelocity_r17
);
free
(
scc
->
ext2
->
ntn_Config_r17
->
ephemerisInfo_r17
);
scc
->
ext2
->
ntn_Config_r17
->
ephemerisInfo_r17
=
NULL
;
}
if
(
!
scc
->
ext2
->
ntn_Config_r17
->
cellSpecificKoffset_r17
&&
!
scc
->
ext2
->
ntn_Config_r17
->
ta_Info_r17
&&
!
scc
->
ext2
->
ntn_Config_r17
->
ephemerisInfo_r17
)
{
free
(
scc
->
ext2
->
ntn_Config_r17
);
free
(
scc
->
ext2
);
scc
->
ext2
=
NULL
;
...
...
@@ -1447,9 +1473,12 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg)
f1ap_served_cell_info_t
info
;
read_du_cell_info
(
cfg
,
NODE_IS_DU
(
node_type
),
&
gnb_id
,
&
gnb_du_id
,
&
name
,
&
info
,
1
);
if
(
get_softmodem_params
()
->
sa
)
if
(
get_softmodem_params
()
->
sa
)
{
nr_mac_configure_sib1
(
RC
.
nrmac
[
0
],
&
info
.
plmn
,
info
.
nr_cellid
,
*
info
.
tac
);
if
(
scc
->
ext2
&&
scc
->
ext2
->
ntn_Config_r17
)
nr_mac_configure_sib19
(
RC
.
nrmac
[
0
]);
}
// read F1 Setup information from config and generated MIB/SIB1
// and store it at MAC for sending later
NR_BCCH_BCH_Message_t
*
mib
=
RC
.
nrmac
[
0
]
->
common_channels
[
0
].
mib
;
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
View file @
fb1cc6c2
...
...
@@ -231,6 +231,8 @@ NR_tda_info_t get_info_from_tda_tables(default_table_type_t table_type,
int
dmrs_TypeA_Position
,
int
normal_CP
);
NR_tda_info_t
set_tda_info_from_list
(
NR_PDSCH_TimeDomainResourceAllocationList_t
*
tdalist
,
int
tda_index
);
default_table_type_t
get_default_table_type
(
int
mux_pattern
);
void
fill_coresetZero
(
NR_ControlResourceSet_t
*
coreset0
,
NR_Type0_PDCCH_CSS_config_t
*
type0_PDCCH_CSS_config
);
...
...
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
fb1cc6c2
...
...
@@ -694,9 +694,29 @@ void nr_mac_config_scc(gNB_MAC_INST *nrmac, NR_ServingCellConfigCommon_t *scc, c
NR_RA_t
*
ra
=
&
cc
->
ra
[
n
];
nr_clear_ra_proc
(
ra
);
}
nr_fill_sched_osi
(
nrmac
,
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
pdcch_ConfigCommon
);
NR_SCHED_UNLOCK
(
&
nrmac
->
sched_lock
);
}
void
nr_fill_sched_osi
(
gNB_MAC_INST
*
nrmac
,
const
struct
NR_SetupRelease_PDCCH_ConfigCommon
*
pdcch_ConfigCommon
)
{
NR_SearchSpaceId_t
*
osi_SearchSpace
=
pdcch_ConfigCommon
->
choice
.
setup
->
searchSpaceOtherSystemInformation
;
if
(
osi_SearchSpace
)
{
nrmac
->
sched_osi
=
CALLOC
(
1
,
sizeof
(
*
nrmac
->
sched_osi
));
struct
NR_PDCCH_ConfigCommon__commonSearchSpaceList
*
commonSearchSpaceList
=
pdcch_ConfigCommon
->
choice
.
setup
->
commonSearchSpaceList
;
AssertFatal
(
commonSearchSpaceList
->
list
.
count
>
0
,
"common SearchSpace list has 0 elements
\n
"
);
for
(
int
i
=
0
;
i
<
commonSearchSpaceList
->
list
.
count
;
i
++
)
{
NR_SearchSpace_t
*
ss
=
commonSearchSpaceList
->
list
.
array
[
i
];
if
(
ss
->
searchSpaceId
==
*
osi_SearchSpace
)
nrmac
->
sched_osi
->
search_space
=
ss
;
}
AssertFatal
(
nrmac
->
sched_osi
->
search_space
!=
NULL
,
"SearchSpace cannot be null for OSI
\n
"
);
}
}
void
nr_mac_configure_sib1
(
gNB_MAC_INST
*
nrmac
,
const
f1ap_plmn_t
*
plmn
,
uint64_t
cellID
,
int
tac
)
{
AssertFatal
(
get_softmodem_params
()
->
sa
>
0
,
"error: SIB1 only applicable for SA
\n
"
);
...
...
@@ -709,6 +729,17 @@ void nr_mac_configure_sib1(gNB_MAC_INST *nrmac, const f1ap_plmn_t *plmn, uint64_
AssertFatal
(
cc
->
sib1_bcch_length
>
0
,
"could not encode SIB1
\n
"
);
}
void
nr_mac_configure_sib19
(
gNB_MAC_INST
*
nrmac
)
{
AssertFatal
(
get_softmodem_params
()
->
sa
>
0
,
"error: SIB19 only applicable for SA
\n
"
);
NR_COMMON_channels_t
*
cc
=
&
nrmac
->
common_channels
[
0
];
NR_ServingCellConfigCommon_t
*
scc
=
cc
->
ServingCellConfigCommon
;
NR_BCCH_DL_SCH_Message_t
*
sib19
=
get_SIB19_NR
(
scc
);
cc
->
sib19
=
sib19
;
cc
->
sib19_bcch_length
=
encode_SIB19_NR
(
sib19
,
cc
->
sib19_bcch_pdu
,
sizeof
(
cc
->
sib19_bcch_pdu
));
AssertFatal
(
cc
->
sib19_bcch_length
>
0
,
"could not encode SIB19
\n
"
);
}
bool
nr_mac_add_test_ue
(
gNB_MAC_INST
*
nrmac
,
uint32_t
rnti
,
NR_CellGroupConfig_t
*
CellGroup
)
{
/* ideally, instead of this function, "users" of this function should call
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
View file @
fb1cc6c2
...
...
@@ -263,8 +263,12 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frame, sub_frame_
schedule_nr_mib
(
module_idP
,
frame
,
slot
,
&
sched_info
->
DL_req
);
// This schedules SIB1
if
(
get_softmodem_params
()
->
sa
==
1
)
// SIB19 will be scheduled if ntn_Config_r17 is initialized
if
(
get_softmodem_params
()
->
sa
==
1
)
{
schedule_nr_sib1
(
module_idP
,
frame
,
slot
,
&
sched_info
->
DL_req
,
&
sched_info
->
TX_req
);
if
(
cc
->
sib19
)
schedule_nr_sib19
(
module_idP
,
frame
,
slot
,
&
sched_info
->
DL_req
,
&
sched_info
->
TX_req
,
cc
->
sib19_bcch_length
,
cc
->
sib19_bcch_pdu
);
}
// This schedule PRACH if we are not in phy_test mode
if
(
get_softmodem_params
()
->
phy_test
==
0
)
{
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
fb1cc6c2
...
...
@@ -673,7 +673,7 @@ static void nr_generate_Msg3_retransmission(module_id_t module_idP,
ul_dci_request_pdu
->
PDUSize
=
(
uint8_t
)(
2
+
sizeof
(
nfapi_nr_dl_tti_pdcch_pdu
));
pdcch_pdu_rel15
=
&
ul_dci_request_pdu
->
pdcch_pdu
.
pdcch_pdu_rel15
;
ul_dci_req
->
numPdus
+=
1
;
nr_configure_pdcch
(
pdcch_pdu_rel15
,
coreset
,
&
ra
->
sched_pdcch
);
nr_configure_pdcch
(
pdcch_pdu_rel15
,
coreset
,
&
ra
->
sched_pdcch
,
false
);
nr_mac
->
pdcch_pdu_idx
[
CC_id
][
coresetid
]
=
pdcch_pdu_rel15
;
}
...
...
@@ -1335,7 +1335,7 @@ static void nr_generate_Msg2(module_id_t module_idP,
dl_tti_pdcch_pdu
->
PDUSize
=
(
uint8_t
)(
2
+
sizeof
(
nfapi_nr_dl_tti_pdcch_pdu
));
dl_req
->
nPDUs
+=
1
;
pdcch_pdu_rel15
=
&
dl_tti_pdcch_pdu
->
pdcch_pdu
.
pdcch_pdu_rel15
;
nr_configure_pdcch
(
pdcch_pdu_rel15
,
coreset
,
&
ra
->
sched_pdcch
);
nr_configure_pdcch
(
pdcch_pdu_rel15
,
coreset
,
&
ra
->
sched_pdcch
,
false
);
nr_mac
->
pdcch_pdu_idx
[
CC_id
][
coresetid
]
=
pdcch_pdu_rel15
;
}
...
...
@@ -1577,7 +1577,7 @@ static void prepare_dl_pdus(gNB_MAC_INST *nr_mac,
dl_tti_pdcch_pdu
->
PDUSize
=
(
uint8_t
)(
2
+
sizeof
(
nfapi_nr_dl_tti_pdcch_pdu
));
dl_req
->
nPDUs
+=
1
;
pdcch_pdu_rel15
=
&
dl_tti_pdcch_pdu
->
pdcch_pdu
.
pdcch_pdu_rel15
;
nr_configure_pdcch
(
pdcch_pdu_rel15
,
coreset
,
&
ra
->
sched_pdcch
);
nr_configure_pdcch
(
pdcch_pdu_rel15
,
coreset
,
&
ra
->
sched_pdcch
,
false
);
nr_mac
->
pdcch_pdu_idx
[
CC_id
][
coresetid
]
=
pdcch_pdu_rel15
;
}
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
View file @
fb1cc6c2
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
fb1cc6c2
...
...
@@ -1074,7 +1074,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
pdcch_pdu
=
&
dl_tti_pdcch_pdu
->
pdcch_pdu
.
pdcch_pdu_rel15
;
LOG_D
(
NR_MAC
,
"Trying to configure DL pdcch for UE %04x, bwp %d, cs %d
\n
"
,
UE
->
rnti
,
bwp_id
,
coresetid
);
NR_ControlResourceSet_t
*
coreset
=
sched_ctrl
->
coreset
;
nr_configure_pdcch
(
pdcch_pdu
,
coreset
,
&
sched_ctrl
->
sched_pdcch
);
nr_configure_pdcch
(
pdcch_pdu
,
coreset
,
&
sched_ctrl
->
sched_pdcch
,
false
);
gNB_mac
->
pdcch_pdu_idx
[
CC_id
][
coresetid
]
=
pdcch_pdu
;
}
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
fb1cc6c2
...
...
@@ -870,7 +870,8 @@ int nr_get_default_pucch_res(int pucch_ResourceCommon) {
void
nr_configure_pdcch
(
nfapi_nr_dl_tti_pdcch_pdu_rel15_t
*
pdcch_pdu
,
NR_ControlResourceSet_t
*
coreset
,
NR_sched_pdcch_t
*
pdcch
)
{
NR_sched_pdcch_t
*
pdcch
,
bool
otherSI
)
{
pdcch_pdu
->
BWPSize
=
pdcch
->
BWPSize
;
...
...
@@ -892,11 +893,8 @@ void nr_configure_pdcch(nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu,
pdcch_pdu
->
InterleaverSize
=
pdcch
->
InterleaverSize
;
pdcch_pdu
->
ShiftIndex
=
pdcch
->
ShiftIndex
;
if
(
coreset
->
controlResourceSetId
==
0
)
{
pdcch_pdu
->
CoreSetType
=
NFAPI_NR_CSET_CONFIG_MIB_SIB1
;
}
else
{
pdcch_pdu
->
CoreSetType
=
NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG
;
}
pdcch_pdu
->
CoreSetType
=
(
otherSI
||
coreset
->
controlResourceSetId
!=
0
)
?
NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG
:
NFAPI_NR_CSET_CONFIG_MIB_SIB1
;
//precoderGranularity
pdcch_pdu
->
precoderGranularity
=
coreset
->
precoderGranularity
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
fb1cc6c2
...
...
@@ -2558,7 +2558,7 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot, n
ul_dci_request_pdu
->
PDUSize
=
(
uint8_t
)(
4
+
sizeof
(
nfapi_nr_dl_tti_pdcch_pdu
));
pdcch_pdu
=
&
ul_dci_request_pdu
->
pdcch_pdu
.
pdcch_pdu_rel15
;
ul_dci_req
->
numPdus
+=
1
;
nr_configure_pdcch
(
pdcch_pdu
,
coreset
,
&
sched_ctrl
->
sched_pdcch
);
nr_configure_pdcch
(
pdcch_pdu
,
coreset
,
&
sched_ctrl
->
sched_pdcch
,
false
);
pdcch_pdu_coreset
[
coresetid
]
=
pdcch_pdu
;
}
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
fb1cc6c2
...
...
@@ -46,7 +46,9 @@ void mac_top_init_gNB(ngran_node_t node_type,
void
nr_mac_send_f1_setup_req
(
void
);
void
nr_mac_config_scc
(
gNB_MAC_INST
*
nrmac
,
NR_ServingCellConfigCommon_t
*
scc
,
const
nr_mac_config_t
*
mac_config
);
void
nr_fill_sched_osi
(
gNB_MAC_INST
*
nrmac
,
const
struct
NR_SetupRelease_PDCCH_ConfigCommon
*
pdcch_ConfigCommon
);
void
nr_mac_configure_sib1
(
gNB_MAC_INST
*
nrmac
,
const
f1ap_plmn_t
*
plmn
,
uint64_t
cellID
,
int
tac
);
void
nr_mac_configure_sib19
(
gNB_MAC_INST
*
nrmac
);
bool
nr_mac_add_test_ue
(
gNB_MAC_INST
*
nrmac
,
uint32_t
rnti
,
NR_CellGroupConfig_t
*
CellGroup
);
bool
nr_mac_prepare_ra_ue
(
gNB_MAC_INST
*
nrmac
,
uint32_t
rnti
,
NR_CellGroupConfig_t
*
CellGroup
);
...
...
@@ -86,6 +88,16 @@ void schedule_nr_sib1(module_id_t module_idP,
nfapi_nr_dl_tti_request_t
*
DL_req
,
nfapi_nr_tx_data_request_t
*
TX_req
);
void
schedule_nr_sib19
(
module_id_t
module_idP
,
frame_t
frameP
,
sub_frame_t
slotP
,
nfapi_nr_dl_tti_request_t
*
DL_req
,
nfapi_nr_tx_data_request_t
*
TX_req
,
int
sib19_bcch_length
,
uint8_t
*
sib19_bcch_pdu
);
struct
NR_SchedulingInfo2_r17
*
find_sib19_sched_info
(
const
struct
NR_SI_SchedulingInfo_v1700
*
);
void
schedule_nr_mib
(
module_id_t
module_idP
,
frame_t
frameP
,
sub_frame_t
slotP
,
nfapi_nr_dl_tti_request_t
*
DL_req
);
/* \brief main UL scheduler function. Calls a preprocessor to decide on
...
...
@@ -202,7 +214,8 @@ void find_search_space(int ss_type,
void
nr_configure_pdcch
(
nfapi_nr_dl_tti_pdcch_pdu_rel15_t
*
pdcch_pdu
,
NR_ControlResourceSet_t
*
coreset
,
NR_sched_pdcch_t
*
pdcch
);
NR_sched_pdcch_t
*
pdcch
,
bool
otherSI
);
NR_sched_pdcch_t
set_pdcch_structure
(
gNB_MAC_INST
*
gNB_mac
,
NR_SearchSpace_t
*
ss
,
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
fb1cc6c2
...
...
@@ -260,6 +260,7 @@ typedef struct {
frame_type_t
frame_type
;
NR_BCCH_BCH_Message_t
*
mib
;
NR_BCCH_DL_SCH_Message_t
*
sib1
;
NR_BCCH_DL_SCH_Message_t
*
sib19
;
NR_ServingCellConfigCommon_t
*
ServingCellConfigCommon
;
/// pre-configured ServingCellConfig that is default for every UE
NR_ServingCellConfig_t
*
pre_ServingCellConfig
;
...
...
@@ -268,6 +269,9 @@ typedef struct {
/// Outgoing BCCH pdu for PHY
uint8_t
sib1_bcch_pdu
[
NR_MAX_SIB_LENGTH
/
8
];
int
sib1_bcch_length
;
/// used for sib19 data
uint8_t
sib19_bcch_pdu
[
NR_MAX_SIB_LENGTH
/
8
];
int
sib19_bcch_length
;
/// Template for RA computations
NR_RA_t
ra
[
NR_NB_RA_PROC_MAX
];
/// VRB map for common channels
...
...
@@ -663,6 +667,19 @@ typedef struct {
seq_arr_t
lc_config
;
}
NR_UE_sched_ctrl_t
;
typedef
struct
{
NR_SearchSpace_t
*
search_space
;
NR_ControlResourceSet_t
*
coreset
;
NR_sched_pdcch_t
sched_pdcch
;
NR_sched_pdsch_t
sched_pdsch
;
uint32_t
num_total_bytes
;
int
cce_index
;
uint8_t
aggregation_level
;
}
NR_UE_sched_osi_ctrl_t
;
typedef
struct
{
uicc_t
*
uicc
;
}
NRUEcontext_t
;
...
...
@@ -877,7 +894,9 @@ typedef struct gNB_MAC_INST_s {
nr_mac_config_t
radio_config
;
NR_UE_sched_osi_ctrl_t
*
sched_osi
;
NR_UE_sched_ctrl_t
*
sched_ctrlCommon
;
uint16_t
cset0_bwp_start
;
uint16_t
cset0_bwp_size
;
NR_Type0_PDCCH_CSS_config_t
type0_PDCCH_CSS_config
[
64
];
...
...
openair2/RRC/NR/nr_rrc_config.c
View file @
fb1cc6c2
...
...
@@ -2244,6 +2244,29 @@ NR_BCCH_DL_SCH_Message_t *get_SIB1_NR(const NR_ServingCellConfigCommon_t *scc,
asn1cSeqAdd(&sib1->si_SchedulingInfo->schedulingInfoList.list,schedulingInfo);*/
// sib19 scheduling info
// ensure ntn-config is initialized
if
(
scc
->
ext2
&&
scc
->
ext2
->
ntn_Config_r17
)
{
sib1
->
nonCriticalExtension
=
CALLOC
(
1
,
sizeof
(
struct
NR_SIB1_v1610_IEs
));
sib1
->
nonCriticalExtension
->
nonCriticalExtension
=
CALLOC
(
1
,
sizeof
(
struct
NR_SIB1_v1630_IEs
));
sib1
->
nonCriticalExtension
->
nonCriticalExtension
->
nonCriticalExtension
=
CALLOC
(
1
,
sizeof
(
struct
NR_SIB1_v1700_IEs
));
struct
NR_SI_SchedulingInfo_v1700
*
sib_v17_scheduling_info
=
CALLOC
(
1
,
sizeof
(
struct
NR_SI_SchedulingInfo_v1700
));
struct
NR_SchedulingInfo2_r17
*
si_schedulinginfo2_r17
=
CALLOC
(
1
,
sizeof
(
struct
NR_SchedulingInfo2_r17
));
si_schedulinginfo2_r17
->
si_BroadcastStatus_r17
=
NR_SchedulingInfo2_r17__si_BroadcastStatus_r17_broadcasting
;
si_schedulinginfo2_r17
->
si_WindowPosition_r17
=
2
;
si_schedulinginfo2_r17
->
si_Periodicity_r17
=
NR_SchedulingInfo2_r17__si_Periodicity_r17_rf8
;
struct
NR_SIB_TypeInfo_v1700
*
sib_type_info
=
CALLOC
(
1
,
sizeof
(
struct
NR_SIB_TypeInfo_v1700
));
sib_type_info
->
sibType_r17
.
present
=
NR_SIB_TypeInfo_v1700__sibType_r17_PR_type1_r17
;
sib_type_info
->
sibType_r17
.
choice
.
type1_r17
=
NR_SIB_TypeInfo_v1700__sibType_r17__type1_r17_sibType19
;
asn1cSeqAdd
(
&
si_schedulinginfo2_r17
->
sib_MappingInfo_r17
.
list
,
sib_type_info
);
asn1cSeqAdd
(
&
sib_v17_scheduling_info
->
schedulingInfoList2_r17
.
list
,
si_schedulinginfo2_r17
);
sib1
->
nonCriticalExtension
->
nonCriticalExtension
->
nonCriticalExtension
->
si_SchedulingInfo_v1700
=
sib_v17_scheduling_info
;
}
// servingCellConfigCommon
asn1cCalloc
(
sib1
->
servingCellConfigCommon
,
ServCellCom
);
NR_BWP_DownlinkCommon_t
*
initialDownlinkBWP
=
&
ServCellCom
->
downlinkConfigCommon
.
initialDownlinkBWP
;
...
...
@@ -2434,7 +2457,10 @@ NR_BCCH_DL_SCH_Message_t *get_SIB1_NR(const NR_ServingCellConfigCommon_t *scc,
// nonCriticalExtension
// TODO: add nonCriticalExtension
//xer_fprint(stdout, &asn_DEF_NR_SIB1, (const void*)sib1_message->message.choice.c1->choice.systemInformationBlockType1);
if
(
LOG_DEBUGFLAG
(
DEBUG_ASN1
))
{
xer_fprint
(
stdout
,
&
asn_DEF_NR_BCCH_DL_SCH_Message
,
sib1_message
);
}
return
sib1_message
;
}
...
...
@@ -2454,6 +2480,53 @@ int encode_SIB1_NR(NR_BCCH_DL_SCH_Message_t *sib1, uint8_t *buffer, int max_buff
return
(
enc_rval
.
encoded
+
7
)
/
8
;
}
NR_BCCH_DL_SCH_Message_t
*
get_SIB19_NR
(
const
NR_ServingCellConfigCommon_t
*
scc
)
{
NR_BCCH_DL_SCH_Message_t
*
sib_message
=
CALLOC
(
1
,
sizeof
(
NR_BCCH_DL_SCH_Message_t
));
sib_message
->
message
.
present
=
NR_BCCH_DL_SCH_MessageType_PR_c1
;
sib_message
->
message
.
choice
.
c1
=
CALLOC
(
1
,
sizeof
(
struct
NR_BCCH_DL_SCH_MessageType__c1
));
sib_message
->
message
.
choice
.
c1
->
present
=
NR_BCCH_DL_SCH_MessageType__c1_PR_systemInformation
;
sib_message
->
message
.
choice
.
c1
->
choice
.
systemInformation
=
CALLOC
(
1
,
sizeof
(
struct
NR_SystemInformation
));
struct
NR_SystemInformation
*
sib
=
sib_message
->
message
.
choice
.
c1
->
choice
.
systemInformation
;
sib
->
criticalExtensions
.
present
=
NR_SystemInformation__criticalExtensions_PR_systemInformation
;
sib
->
criticalExtensions
.
choice
.
systemInformation
=
CALLOC
(
1
,
sizeof
(
struct
NR_SystemInformation_IEs
));
struct
NR_SystemInformation_IEs
*
ies
=
sib
->
criticalExtensions
.
choice
.
systemInformation
;
SystemInformation_IEs__sib_TypeAndInfo__Member
*
sib19
=
NULL
;
sib19
=
CALLOC
(
1
,
sizeof
(
SystemInformation_IEs__sib_TypeAndInfo__Member
));
sib19
->
present
=
NR_SystemInformation_IEs__sib_TypeAndInfo__Member_PR_sib19_v1700
;
sib19
->
choice
.
sib19_v1700
=
CALLOC
(
1
,
sizeof
(
struct
NR_SIB19_r17
));
// use ntn-config from NR_ServingCellConfigCommon_t
const
int
copy_result
=
asn_copy
(
&
asn_DEF_NR_NTN_Config_r17
,
(
void
**
)
&
sib19
->
choice
.
sib19_v1700
->
ntn_Config_r17
,
scc
->
ext2
->
ntn_Config_r17
);
AssertFatal
(
copy_result
==
0
,
"Was unable to copy ntn_Config_r17 from scc to SIB19 structure
\n
"
);
asn1cSeqAdd
(
&
ies
->
sib_TypeAndInfo
.
list
,
sib19
);
if
(
LOG_DEBUGFLAG
(
DEBUG_ASN1
))
{
xer_fprint
(
stdout
,
&
asn_DEF_NR_BCCH_DL_SCH_Message
,
sib_message
);
}
return
sib_message
;
}
int
encode_SIB19_NR
(
NR_BCCH_DL_SCH_Message_t
*
sib19
,
uint8_t
*
buffer
,
int
max_buffer_size
)
{
asn_enc_rval_t
enc_rval
;
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_NR_BCCH_DL_SCH_Message
,
NULL
,
sib19
,
buffer
,
150
);
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
return
((
enc_rval
.
encoded
+
7
)
/
8
);
}
void
free_SIB19_NR
(
NR_BCCH_DL_SCH_Message_t
*
sib19
)
{
ASN_STRUCT_FREE
(
asn_DEF_NR_BCCH_DL_SCH_Message
,
sib19
);
}
static
NR_PhysicalCellGroupConfig_t
*
configure_phy_cellgroup
(
void
)
{
NR_PhysicalCellGroupConfig_t
*
physicalCellGroupConfig
=
calloc
(
1
,
sizeof
(
*
physicalCellGroupConfig
));
...
...
openair2/RRC/NR/nr_rrc_config.h
View file @
fb1cc6c2
...
...
@@ -74,6 +74,10 @@ NR_BCCH_DL_SCH_Message_t *get_SIB1_NR(const NR_ServingCellConfigCommon_t *scc,
void
free_SIB1_NR
(
NR_BCCH_DL_SCH_Message_t
*
sib1
);
int
encode_SIB1_NR
(
NR_BCCH_DL_SCH_Message_t
*
sib1
,
uint8_t
*
buffer
,
int
max_buffer_size
);
NR_BCCH_DL_SCH_Message_t
*
get_SIB19_NR
(
const
NR_ServingCellConfigCommon_t
*
scc
);
int
encode_SIB19_NR
(
NR_BCCH_DL_SCH_Message_t
*
sib19
,
uint8_t
*
buffer
,
int
max_buffer_size
);
void
free_SIB19_NR
(
NR_BCCH_DL_SCH_Message_t
*
sib19
);
NR_CellGroupConfig_t
*
get_initial_cellGroupConfig
(
int
uid
,
const
NR_ServingCellConfigCommon_t
*
scc
,
const
NR_ServingCellConfig_t
*
servingcellconfigdedicated
,
...
...
targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band66.fr1.25PRB.usrpx300.conf
View file @
fb1cc6c2
...
...
@@ -165,6 +165,13 @@ gNBs =
#ntn_Config_r17
# cellSpecificKoffset_r17 = 478; # GEO satellite
# cellSpecificKoffset_r17 = 40; # LEO satellite
# ta-Common-r17 = 29319745;
# positionX-r17 = 0;
# positionY-r17 = 0;
# positionZ-r17 = 32433846;
# velocityVX-r17 = 0;
# velocityVY-r17 = 0;
# velocityVZ-r17 = 0;
}
);
...
...
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