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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
4d4f7dd6
Commit
4d4f7dd6
authored
Jun 07, 2022
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initial commit for MAC UE BWP structure (bwp id)
parent
b5583d47
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
129 additions
and
108 deletions
+129
-108
openair1/PHY/INIT/nr_init_ru.c
openair1/PHY/INIT/nr_init_ru.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+3
-5
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+5
-3
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+102
-88
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+5
-5
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+3
-3
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+4
-3
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+6
-0
No files found.
openair1/PHY/INIT/nr_init_ru.c
View file @
4d4f7dd6
...
...
@@ -60,7 +60,7 @@ int nr_phy_init_RU(RU_t *ru) {
for
(
i
=
0
;
i
<
ru
->
nb_tx
;
i
++
)
{
// Allocate 10 subframes of I/Q TX signal data (time) if not
ru
->
common
.
txdata
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
ru
->
sf_extension
+
(
fp
->
samples_per_frame
*
sizeof
(
int32_t
)
));
ru
->
common
.
txdata
[
i
]
=
(
int32_t
*
)
malloc16_clear
(
(
ru
->
sf_extension
+
fp
->
samples_per_frame
)
*
sizeof
(
int32_t
));
LOG_I
(
PHY
,
"[INIT] common.txdata[%d] = %p (%lu bytes,sf_extension %d)
\n
"
,
i
,
ru
->
common
.
txdata
[
i
],
(
ru
->
sf_extension
+
fp
->
samples_per_frame
)
*
sizeof
(
int32_t
),
ru
->
sf_extension
);
ru
->
common
.
txdata
[
i
]
=
&
ru
->
common
.
txdata
[
i
][
ru
->
sf_extension
];
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
4d4f7dd6
...
...
@@ -1305,7 +1305,6 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
// look up the PDCCH PDU for this CC, BWP, and CORESET. If it does not exist, create it. This is especially
// important if we have multiple RAs, and the DLSCH has to reuse them, so we need to mark them
const
int
bwpid
=
bwp
?
bwp
->
bwp_Id
:
0
;
const
int
coresetid
=
coreset
->
controlResourceSetId
;
nfapi_nr_dl_tti_pdcch_pdu_rel15_t
*
pdcch_pdu_rel15
=
nr_mac
->
pdcch_pdu_idx
[
CC_id
][
coresetid
];
if
(
!
pdcch_pdu_rel15
)
{
...
...
@@ -1479,7 +1478,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
NR_DL_DCI_FORMAT_1_0
,
NR_RNTI_RA
,
BWPSize
,
bwp
id
,
ra
->
dl_bwp_
id
,
coresetid
,
nr_mac
->
cset0_bwp_size
);
...
...
@@ -1488,7 +1487,7 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
// Program UL processing for Msg3
NR_BWP_Uplink_t
*
ubwp
=
ra
->
CellGroup
?
ra
->
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
ra
->
d
l_bwp_id
-
1
]
:
ra
->
CellGroup
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
ra
->
u
l_bwp_id
-
1
]
:
NULL
;
nr_get_Msg3alloc
(
module_idP
,
CC_id
,
scc
,
ubwp
,
slotP
,
frameP
,
ra
,
nr_mac
->
tdd_beam_association
);
nr_add_msg3
(
module_idP
,
CC_id
,
frameP
,
slotP
,
ra
,
(
uint8_t
*
)
&
tx_req
->
TLVs
[
0
].
value
.
direct
[
0
]);
...
...
@@ -1764,7 +1763,6 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
// look up the PDCCH PDU for this CC, BWP, and CORESET. If it does not exist, create it. This is especially
// important if we have multiple RAs, and the DLSCH has to reuse them, so we need to mark them
const
int
bwpid
=
bwp
?
bwp
->
bwp_Id
:
0
;
const
int
coresetid
=
coreset
->
controlResourceSetId
;
nfapi_nr_dl_tti_pdcch_pdu_rel15_t
*
pdcch_pdu_rel15
=
nr_mac
->
pdcch_pdu_idx
[
CC_id
][
coresetid
];
if
(
!
pdcch_pdu_rel15
)
{
...
...
@@ -1895,7 +1893,7 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
NR_DL_DCI_FORMAT_1_0
,
NR_RNTI_TC
,
pdsch_pdu_rel15
->
BWPSize
,
bwp
id
,
ra
->
dl_bwp_
id
,
coresetid
,
nr_mac
->
cset0_bwp_size
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
4d4f7dd6
...
...
@@ -902,6 +902,7 @@ nr_pp_impl_dl nr_init_fr1_dlsch_preprocessor(module_id_t module_id, int CC_id) {
void
nr_schedule_ue_spec
(
module_id_t
module_id
,
frame_t
frame
,
sub_frame_t
slot
)
{
gNB_MAC_INST
*
gNB_mac
=
RC
.
nrmac
[
module_id
];
if
(
!
is_xlsch_in_slot
(
gNB_mac
->
dlsch_slot_bitmap
[
slot
/
64
],
slot
))
...
...
@@ -918,6 +919,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
UE_iterator
(
UE_info
->
list
,
UE
)
{
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE
->
UE_sched_ctrl
;
NR_UE_BWP_t
*
current_BWP
=
&
UE
->
current_BWP
;
if
(
sched_ctrl
->
ul_failure
==
1
&&
get_softmodem_params
()
->
phy_test
==
0
)
continue
;
...
...
@@ -1013,7 +1015,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
NR_SearchSpace_t
*
ss
=
(
bwp
||
bwpd
)
?
sched_ctrl
->
search_space
:
gNB_mac
->
sched_ctrlCommon
->
search_space
;
const
int
bwp_id
=
bwp
?
bwp
->
bwp_Id
:
0
;
const
int
bwp_id
=
current_BWP
->
dl_bwp_id
;
const
int
coresetid
=
(
bwp
||
bwpd
)
?
sched_ctrl
->
coreset
->
controlResourceSetId
:
gNB_mac
->
sched_ctrlCommon
->
coreset
->
controlResourceSetId
;
/* look up the PDCCH PDU for this CC, BWP, and CORESET. If it does not exist, create it */
...
...
@@ -1166,7 +1168,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
AssertFatal
(
n_dl_bwp
<=
NR_MAX_NUM_BWP
,
"downlinkBWP_ToAddModList has %d BWP!
\n
"
,
n_dl_bwp
);
// as per table 7.3.1.1.2-1 in 38.212
dci_payload
.
bwp_indicator
.
val
=
bwp
?
(
n_dl_bwp
<
4
?
bwp
->
bwp_Id
:
bwp
->
bwp_I
d
-
1
)
:
0
;
dci_payload
.
bwp_indicator
.
val
=
bwp
?
(
n_dl_bwp
<
4
?
bwp
_id
:
bwp_i
d
-
1
)
:
0
;
if
(
bwp
)
AssertFatal
(
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
resourceAllocation
==
NR_PDSCH_Config__resourceAllocation_resourceAllocationType1
,
"Only frequency resource allocation type 1 is currently supported
\n
"
);
...
...
@@ -1216,7 +1218,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
dci_format
,
rnti_type
,
pdsch_pdu
->
BWPSize
,
bwp
?
bwp
->
bwp_Id
:
0
,
bwp
_id
,
coresetid
,
gNB_mac
->
cset0_bwp_size
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
4d4f7dd6
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
4d4f7dd6
...
...
@@ -938,13 +938,12 @@ void tci_handling(NR_UE_info_t *UE, frame_t frame, slot_t slot) {
uint8_t
target_ssb_beam_index
=
curr_ssb_beam_index
;
uint8_t
is_triggering_ssb_beam_switch
=
0
;
uint8_t
ssb_idx
=
0
;
int
pdsch_bwp_id
=
0
;
int
pdsch_bwp_id
=
0
;
int
ssb_index
[
MAX_NUM_SSB
]
=
{
0
};
int
ssb_rsrp
[
MAX_NUM_SSB
]
=
{
0
};
uint8_t
idx
=
0
;
NR_UE_BWP_t
*
BWP
=
&
UE
->
current_BWP
;
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE
->
UE_sched_ctrl
;
const
int
bwp_id
=
sched_ctrl
->
active_bwp
?
1
:
0
;
NR_CellGroupConfig_t
*
CellGroup
=
UE
->
CellGroup
;
//bwp indicator
...
...
@@ -960,6 +959,7 @@ void tci_handling(NR_UE_info_t *UE, frame_t frame, slot_t slot) {
uint8_t
diff_rsrp_idx
=
0
;
uint8_t
i
,
j
;
const
int
bwp_id
=
BWP
->
dl_bwp_id
;
if
(
n_dl_bwp
<
4
)
pdsch_bwp_id
=
bwp_id
;
else
...
...
@@ -1632,6 +1632,7 @@ int nr_acknack_scheduling(int mod_id,
* * each UE has dedicated PUCCH Format 0 resources, and we use index 0! */
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE
->
UE_sched_ctrl
;
NR_CellGroupConfig_t
*
cg
=
UE
->
CellGroup
;
NR_UE_BWP_t
*
BWP
=
&
UE
->
current_BWP
;
NR_PUCCH_Config_t
*
pucch_Config
=
NULL
;
if
(
sched_ctrl
->
active_ubwp
)
{
...
...
@@ -1714,10 +1715,9 @@ int nr_acknack_scheduling(int mod_id,
NR_SearchSpace__searchSpaceType_PR
ss_type
=
(
is_common
==
0
&&
(
sched_ctrl
->
active_bwp
||
ubwpd
))
?
NR_SearchSpace__searchSpaceType_PR_ue_Specific
:
NR_SearchSpace__searchSpaceType_PR_common
;
uint8_t
pdsch_to_harq_feedback
[
8
];
const
int
bwp_id
=
sched_ctrl
->
active_bwp
?
sched_ctrl
->
active_bwp
->
bwp_Id
:
0
;
int
max_fb_time
=
0
;
get_pdsch_to_harq_feedback
(
UE
,
bwp_id
,
ss_type
,
&
max_fb_time
,
pdsch_to_harq_feedback
);
get_pdsch_to_harq_feedback
(
UE
,
ss_type
,
&
max_fb_time
,
pdsch_to_harq_feedback
);
LOG_D
(
NR_MAC
,
"In %s: 1b. DL %4d.%2d, UL_ACK %4d.%2d, DAI_C %d
\n
"
,
__FUNCTION__
,
frame
,
slot
,
pucch
->
frame
,
pucch
->
ul_slot
,
pucch
->
dai_c
);
/* there is a HARQ. Check whether we can use it for this ACKNACK */
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
4d4f7dd6
...
...
@@ -1526,6 +1526,7 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
if
(
sched_ctrl
->
ul_failure
==
1
&&
get_softmodem_params
()
->
phy_test
==
0
)
continue
;
NR_CellGroupConfig_t
*
cg
=
UE
->
CellGroup
;
NR_UE_BWP_t
*
current_BWP
=
&
UE
->
current_BWP
;
NR_BWP_UplinkDedicated_t
*
ubwpd
=
cg
&&
cg
->
spCellConfig
&&
cg
->
spCellConfig
->
spCellConfigDedicated
&&
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
?
...
...
@@ -1765,7 +1766,6 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
/* look up the PDCCH PDU for this BWP and CORESET. If it does not exist,
* create it */
const
int
bwp_id
=
sched_ctrl
->
active_bwp
?
sched_ctrl
->
active_bwp
->
bwp_Id
:
0
;
NR_SearchSpace_t
*
ss
=
(
sched_ctrl
->
active_bwp
||
ubwpd
)
?
sched_ctrl
->
search_space
:
RC
.
nrmac
[
module_id
]
->
sched_ctrlCommon
->
search_space
;
NR_ControlResourceSet_t
*
coreset
=
(
sched_ctrl
->
active_bwp
||
ubwpd
)
?
sched_ctrl
->
coreset
:
RC
.
nrmac
[
module_id
]
->
sched_ctrlCommon
->
coreset
;
const
int
coresetid
=
coreset
->
controlResourceSetId
;
...
...
@@ -1821,7 +1821,7 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
ps
->
time_domain_allocation
,
UE
->
UE_sched_ctrl
.
tpc0
,
n_ubwp
,
bwp_id
);
current_BWP
->
ul_
bwp_id
);
fill_dci_pdu_rel15
(
scc
,
cg
,
dci_pdu
,
...
...
@@ -1829,7 +1829,7 @@ void nr_schedule_ulsch(module_id_t module_id, frame_t frame, sub_frame_t slot)
ps
->
dci_format
,
rnti_types
[
0
],
pusch_pdu
->
bwp_size
,
bwp_id
,
current_BWP
->
ul_
bwp_id
,
coresetid
,
nr_mac
->
cset0_bwp_size
);
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
4d4f7dd6
...
...
@@ -225,8 +225,7 @@ int nr_acknack_scheduling( int Mod_idP,
int
r_pucch
,
int
do_common
);
void
get_pdsch_to_harq_feedback
(
NR_UE_info_t
*
,
int
bwp_id
,
void
get_pdsch_to_harq_feedback
(
NR_UE_info_t
*
UE
,
NR_SearchSpace__searchSpaceType_PR
ss_type
,
int
*
max_fb_time
,
uint8_t
*
pdsch_to_harq_feedback
);
...
...
@@ -406,7 +405,9 @@ NR_UE_info_t * find_nr_UE(NR_UEs_t* UEs, rnti_t rntiP);
int
find_nr_RA_id
(
module_id_t
mod_idP
,
int
CC_idP
,
rnti_t
rntiP
);
NR_UE_info_t
*
add_new_nr_ue
(
gNB_MAC_INST
*
nr_mac
,
rnti_t
rntiP
,
NR_CellGroupConfig_t
*
CellGroup
);
void
configure_UE_BWP
(
NR_UE_BWP_t
*
BWP
,
NR_CellGroupConfig_t
*
CellGroup
);
NR_UE_info_t
*
add_new_nr_ue
(
gNB_MAC_INST
*
nr_mac
,
rnti_t
rntiP
,
NR_CellGroupConfig_t
*
CellGroup
);
void
mac_remove_nr_ue
(
gNB_MAC_INST
*
nr_mac
,
rnti_t
rnti
);
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
4d4f7dd6
...
...
@@ -701,6 +701,11 @@ typedef struct NR_bler_options {
uint8_t
max_mcs
;
}
NR_bler_options_t
;
typedef
struct
NR_UE_BWP
{
NR_BWP_Id_t
dl_bwp_id
;
NR_BWP_Id_t
ul_bwp_id
;
}
NR_UE_BWP_t
;
/*! \brief UE list used by gNB to order UEs/CC for scheduling*/
#define MAX_CSI_REPORTCONFIG 48
typedef
struct
{
...
...
@@ -708,6 +713,7 @@ typedef struct {
/// scheduling control info
nr_csi_report_t
csi_report_template
[
MAX_CSI_REPORTCONFIG
];
NR_UE_sched_ctrl_t
UE_sched_ctrl
;
NR_UE_BWP_t
current_BWP
;
NR_mac_stats_t
mac_stats
;
NR_CellGroupConfig_t
*
CellGroup
;
char
cg_buf
[
32768
];
/* arbitrary size */
...
...
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