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
0a0a5e48
Commit
0a0a5e48
authored
Dec 18, 2020
by
k.ramya
Committed by
guhan
Feb 26, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code rearrangement
parent
e7036385
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
160 additions
and
147 deletions
+160
-147
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+2
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
+3
-3
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+17
-11
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+4
-2
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
+2
-3
openair2/RRC/NR/rrc_gNB_reconfig.c
openair2/RRC/NR/rrc_gNB_reconfig.c
+132
-126
No files found.
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
0a0a5e48
...
@@ -651,7 +651,7 @@ void update_csi_bitlen (NR_CSI_MeasConfig_t *csi_MeasConfig, NR_UE_list_t *UE_li
...
@@ -651,7 +651,7 @@ void update_csi_bitlen (NR_CSI_MeasConfig_t *csi_MeasConfig, NR_UE_list_t *UE_li
}
}
}
}
}
}
#endif
extern
uint16_t
sl_ahead
;
extern
uint16_t
sl_ahead
;
int
rrc_mac_config_req_gNB
(
module_id_t
Mod_idP
,
int
rrc_mac_config_req_gNB
(
module_id_t
Mod_idP
,
...
@@ -780,7 +780,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
...
@@ -780,7 +780,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
UE_info
->
secondaryCellGroup
[
UE_id
]
=
secondaryCellGroup
;
UE_info
->
secondaryCellGroup
[
UE_id
]
=
secondaryCellGroup
;
LOG_I
(
PHY
,
"Modified UE_id %d/%x with secondaryCellGroup
\n
"
,
UE_id
,
rnti
);
LOG_I
(
PHY
,
"Modified UE_id %d/%x with secondaryCellGroup
\n
"
,
UE_id
,
rnti
);
}
}
update_csi_bitlen
(
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
->
choice
.
setup
,
UE_list
,
UE_id
,
Mod_idP
);
//
update_csi_bitlen (secondaryCellGroup->spCellConfig->spCellConfigDedicated->csi_MeasConfig->choice.setup, UE_list, UE_id, Mod_idP);
}
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG
,
VCD_FUNCTION_OUT
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG
,
VCD_FUNCTION_OUT
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
View file @
0a0a5e48
...
@@ -322,7 +322,7 @@ void copy_nr_ulreq(module_id_t module_idP, frame_t frameP, sub_frame_t slotP)
...
@@ -322,7 +322,7 @@ void copy_nr_ulreq(module_id_t module_idP, frame_t frameP, sub_frame_t slotP)
}
}
*/
*/
/*
void nr_schedule_pusch(int Mod_idP,
void nr_schedule_pusch(int Mod_idP,
int UE_id,
int UE_id,
int num_slots_per_tdd,
int num_slots_per_tdd,
...
@@ -333,7 +333,7 @@ void nr_schedule_pusch(int Mod_idP,
...
@@ -333,7 +333,7 @@ void nr_schedule_pusch(int Mod_idP,
nfapi_nr_ul_tti_request_t *UL_tti_req = &RC.nrmac[Mod_idP]->UL_tti_req[0];
nfapi_nr_ul_tti_request_t *UL_tti_req = &RC.nrmac[Mod_idP]->UL_tti_req[0];
NR_UE_info_t *UE_info = &RC.nrmac[Mod_idP]->UE_info;
NR_UE_info_t *UE_info = &RC.nrmac[Mod_idP]->UE_info;
int k = slotP + ul_slots - num_slots_per_tdd;
int k = slotP + ul_slots - num_slots_per_tdd;
NR_sched_pusch
*
pusch
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
].
sched_pusch
[
k
];
NR_sched_pusch
_t
*pusch = &UE_info->UE_sched_ctrl[UE_id].sched_pusch[k];
if ((pusch->active == true) && (frameP == pusch->frame) && (slotP == pusch->slot)) {
if ((pusch->active == true) && (frameP == pusch->frame) && (slotP == pusch->slot)) {
UL_tti_req->SFN = pusch->frame;
UL_tti_req->SFN = pusch->frame;
UL_tti_req->Slot = pusch->slot;
UL_tti_req->Slot = pusch->slot;
...
@@ -345,7 +345,7 @@ void nr_schedule_pusch(int Mod_idP,
...
@@ -345,7 +345,7 @@ void nr_schedule_pusch(int Mod_idP,
0, sizeof(NR_sched_pusch));
0, sizeof(NR_sched_pusch));
}
}
}
}
*/
bool
is_xlsch_in_slot
(
uint64_t
bitmap
,
sub_frame_t
slot
)
{
bool
is_xlsch_in_slot
(
uint64_t
bitmap
,
sub_frame_t
slot
)
{
return
(
bitmap
>>
slot
)
&
0x01
;
return
(
bitmap
>>
slot
)
&
0x01
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
0a0a5e48
...
@@ -86,6 +86,11 @@ void nr_fill_nfapi_pucch(module_id_t mod_id,
...
@@ -86,6 +86,11 @@ void nr_fill_nfapi_pucch(module_id_t mod_id,
#define L1_RSRP_HYSTERIS 10 //considering 10 dBm as hysterisis for avoiding frequent SSB Beam Switching. !Fixme provide exact value if any
#define L1_RSRP_HYSTERIS 10 //considering 10 dBm as hysterisis for avoiding frequent SSB Beam Switching. !Fixme provide exact value if any
//#define L1_DIFF_RSRP_STEP_SIZE 2
//#define L1_DIFF_RSRP_STEP_SIZE 2
void
nr_rx_acknack
(
nfapi_nr_uci_pusch_pdu_t
*
uci_pusch
,
nfapi_nr_uci_pucch_pdu_format_0_1_t
*
uci_01
,
nfapi_nr_uci_pucch_pdu_format_2_3_4_t
*
uci_234
,
NR_UL_IND_t
*
UL_info
,
NR_UE_sched_ctrl_t
*
sched_ctrl
,
NR_mac_stats_t
*
stats
);
int
ssb_index_sorted
[
MAX_NUM_SSB
]
=
{
0
};
int
ssb_index_sorted
[
MAX_NUM_SSB
]
=
{
0
};
int
ssb_rsrp_sorted
[
MAX_NUM_SSB
]
=
{
0
};
int
ssb_rsrp_sorted
[
MAX_NUM_SSB
]
=
{
0
};
//Sorts ssb_index and ssb_rsrp array data and keeps in ssb_index_sorted and
//Sorts ssb_index and ssb_rsrp array data and keeps in ssb_index_sorted and
...
@@ -600,7 +605,8 @@ static void handle_dl_harq(module_id_t mod_id,
...
@@ -600,7 +605,8 @@ static void handle_dl_harq(module_id_t mod_id,
void
handle_nr_uci_pucch_0_1
(
module_id_t
mod_id
,
void
handle_nr_uci_pucch_0_1
(
module_id_t
mod_id
,
frame_t
frame
,
frame_t
frame
,
sub_frame_t
slot
,
sub_frame_t
slot
,
const
nfapi_nr_uci_pucch_pdu_format_0_1_t
*
uci_01
)
const
nfapi_nr_uci_pucch_pdu_format_0_1_t
*
uci_01
,
NR_UL_IND_t
*
UL_info
)
{
{
int
UE_id
=
find_nr_UE_id
(
mod_id
,
uci_01
->
rnti
);
int
UE_id
=
find_nr_UE_id
(
mod_id
,
uci_01
->
rnti
);
if
(
UE_id
<
0
)
{
if
(
UE_id
<
0
)
{
...
@@ -648,21 +654,22 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id,
...
@@ -648,21 +654,22 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id,
}
}
if
(((
uci_01
->
pduBitmap
>>
1
)
&
0x01
))
{
if
(((
uci_01
->
pduBitmap
>>
1
)
&
0x01
))
{
nr_rx_acknack
(
NULL
,
uci_01
,
NULL
,
UL_info
,
sched_ctrl
,
stats
);
nr_rx_acknack
(
NULL
,
uci_01
,
NULL
,
UL_info
,
sched_ctrl
,
&
UE_info
->
mac_stats
[
0
]
);
}
}
}
}
void
handle_nr_uci_pucch_2_3_4
(
module_id_t
mod_id
,
void
handle_nr_uci_pucch_2_3_4
(
module_id_t
mod_id
,
frame_t
frame
,
frame_t
frame
,
sub_frame_t
slot
,
sub_frame_t
slot
,
const
nfapi_nr_uci_pucch_pdu_format_2_3_4_t
*
uci_234
)
const
nfapi_nr_uci_pucch_pdu_format_2_3_4_t
*
uci_234
,
NR_UL_IND_t
*
UL_info
)
{
{
NR_CSI_MeasConfig_t
*
csi_MeasConfig
=
RC
.
nrmac
[
Mod_idP
]
->
UE_list
.
secondaryCellGroup
[
UE_id
]
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
->
choice
.
setup
;
int
UE_id
=
find_nr_UE_id
(
mod_id
,
uci_234
->
rnti
);
int
UE_id
=
find_nr_UE_id
(
mod_id
,
uci_234
->
rnti
);
if
(
UE_id
<
0
)
{
if
(
UE_id
<
0
)
{
LOG_E
(
MAC
,
"%s(): unknown RNTI %04x in PUCCH UCI
\n
"
,
__func__
,
uci_234
->
rnti
);
LOG_E
(
MAC
,
"%s(): unknown RNTI %04x in PUCCH UCI
\n
"
,
__func__
,
uci_234
->
rnti
);
return
;
return
;
}
}
NR_CSI_MeasConfig_t
*
csi_MeasConfig
=
RC
.
nrmac
[
mod_id
]
->
UE_info
.
secondaryCellGroup
[
UE_id
]
->
spCellConfig
->
spCellConfigDedicated
->
csi_MeasConfig
->
choice
.
setup
;
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
mod_id
]
->
UE_info
;
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
mod_id
]
->
UE_info
;
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
...
@@ -678,8 +685,8 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id,
...
@@ -678,8 +685,8 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id,
uint8_t
sr_id
=
0
;
uint8_t
sr_id
=
0
;
for
(
sr_id
=
0
;
sr_id
<
uci_234
->
sr
.
sr_bit_len
;
sr_id
++
)
{
for
(
sr_id
=
0
;
sr_id
<
uci_234
->
sr
.
sr_bit_len
;
sr_id
++
)
{
sched_ctrl
->
sr_req
.
ul_SR
[
sr_id
]
=
uci_234
->
sr
.
sr_payload
&
1
;
sched_ctrl
->
sr_req
.
ul_SR
[
sr_id
]
=
*
(
uci_234
->
sr
.
sr_payload
)
&
1
;
uci_234
->
sr
.
sr_payload
>>=
1
;
*
(
uci_234
->
sr
.
sr_payload
)
>>=
1
;
}
}
sched_ctrl
->
sr_req
.
nr_of_srs
=
uci_234
->
sr
.
sr_bit_len
;
sched_ctrl
->
sr_req
.
nr_of_srs
=
uci_234
->
sr
.
sr_bit_len
;
...
@@ -718,17 +725,17 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id,
...
@@ -718,17 +725,17 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id,
}
}
if
((
uci_234
->
pduBitmap
>>
1
)
&
0x01
)
{
if
((
uci_234
->
pduBitmap
>>
1
)
&
0x01
)
{
NR_SubcarrierSpacing_t
scs
=*
(
RC
.
nrmac
[
Mod_idP
]
->
common_channels
->
ServingCellConfigCommon
->
ssbSubcarrierSpacing
);
NR_SubcarrierSpacing_t
scs
=*
(
RC
.
nrmac
[
mod_id
]
->
common_channels
->
ServingCellConfigCommon
->
ssbSubcarrierSpacing
);
LOG_I
(
PHY
,
"SFN/SF:%d%d scs %ld
\n
"
,
LOG_I
(
PHY
,
"SFN/SF:%d%d scs %ld
\n
"
,
UL_info
->
frame
,
UL_info
->
slot
,
UL_info
->
frame
,
UL_info
->
slot
,
scs
);
scs
);
//API to parse the csi report and store it into sched_ctrl
//API to parse the csi report and store it into sched_ctrl
extract_pucch_csi_report
(
csi_MeasConfig
,
uci_
pdu
,
sched_ctrl
,
UL_info
->
frame
,
UL_info
->
slot
,
scs
,
UE_id
,
Mod_idP
);
extract_pucch_csi_report
(
csi_MeasConfig
,
uci_
234
,
sched_ctrl
,
UL_info
->
frame
,
UL_info
->
slot
,
scs
,
UE_id
,
mod_id
);
//TCI handling function
//TCI handling function
tci_handling
(
Mod_idP
,
UE_id
,
UL_info
->
CC_id
,
sched_ctrl
,
UL_info
->
frame
,
UL_info
->
slot
);
tci_handling
(
mod_id
,
UE_id
,
UL_info
->
CC_id
,
sched_ctrl
,
UL_info
->
frame
,
UL_info
->
slot
);
}
}
if
(
uci_
pdu
->
pduBitmap
&
0x08
)
{
if
(
uci_
234
->
pduBitmap
&
0x08
)
{
///Handle CSI Report 2
///Handle CSI Report 2
}
}
}
}
...
@@ -1549,4 +1556,3 @@ void extract_pucch_csi_report (NR_CSI_MeasConfig_t *csi_MeasConfig,
...
@@ -1549,4 +1556,3 @@ void extract_pucch_csi_report (NR_CSI_MeasConfig_t *csi_MeasConfig,
}
}
>>>>>>>
uci
mac
functions
in
a
new
file
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
0a0a5e48
...
@@ -162,11 +162,13 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
...
@@ -162,11 +162,13 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
void
handle_nr_uci_pucch_0_1
(
module_id_t
mod_id
,
void
handle_nr_uci_pucch_0_1
(
module_id_t
mod_id
,
frame_t
frame
,
frame_t
frame
,
sub_frame_t
slot
,
sub_frame_t
slot
,
const
nfapi_nr_uci_pucch_pdu_format_0_1_t
*
uci_01
);
const
nfapi_nr_uci_pucch_pdu_format_0_1_t
*
uci_01
,
NR_UL_IND_t
*
UL_info
);
void
handle_nr_uci_pucch_2_3_4
(
module_id_t
mod_id
,
void
handle_nr_uci_pucch_2_3_4
(
module_id_t
mod_id
,
frame_t
frame
,
frame_t
frame
,
sub_frame_t
slot
,
sub_frame_t
slot
,
const
nfapi_nr_uci_pucch_pdu_format_2_3_4_t
*
uci_234
);
const
nfapi_nr_uci_pucch_pdu_format_2_3_4_t
*
uci_234
,
NR_UL_IND_t
*
UL_info
);
void
config_uldci
(
const
NR_BWP_Uplink_t
*
ubwp
,
void
config_uldci
(
const
NR_BWP_Uplink_t
*
ubwp
,
...
...
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
View file @
0a0a5e48
...
@@ -421,7 +421,6 @@ void handle_nr_uci(NR_UL_IND_t *UL_info)
...
@@ -421,7 +421,6 @@ void handle_nr_uci(NR_UL_IND_t *UL_info)
const sub_frame_t slot = UL_info->slot;
const sub_frame_t slot = UL_info->slot;
int num_ucis = UL_info->uci_ind.num_ucis;
int num_ucis = UL_info->uci_ind.num_ucis;
nfapi_nr_uci_t *uci_list = UL_info->uci_ind.uci_list;
nfapi_nr_uci_t *uci_list = UL_info->uci_ind.uci_list;
uint8_t UE_id = 0;
for (int i = 0; i < num_ucis; i++) {
for (int i = 0; i < num_ucis; i++) {
switch (uci_list[i].pdu_type) {
switch (uci_list[i].pdu_type) {
...
@@ -431,13 +430,13 @@ void handle_nr_uci(NR_UL_IND_t *UL_info)
...
@@ -431,13 +430,13 @@ void handle_nr_uci(NR_UL_IND_t *UL_info)
case NFAPI_NR_UCI_FORMAT_0_1_PDU_TYPE: {
case NFAPI_NR_UCI_FORMAT_0_1_PDU_TYPE: {
const nfapi_nr_uci_pucch_pdu_format_0_1_t *uci_pdu = &uci_list[i].pucch_pdu_format_0_1;
const nfapi_nr_uci_pucch_pdu_format_0_1_t *uci_pdu = &uci_list[i].pucch_pdu_format_0_1;
handle_nr_uci_pucch_0_1(mod_id, frame, slot, uci_pdu);
handle_nr_uci_pucch_0_1(mod_id, frame, slot, uci_pdu
, UL_info
);
break;
break;
}
}
case NFAPI_NR_UCI_FORMAT_2_3_4_PDU_TYPE: {
case NFAPI_NR_UCI_FORMAT_2_3_4_PDU_TYPE: {
const nfapi_nr_uci_pucch_pdu_format_2_3_4_t *uci_pdu = &uci_list[i].pucch_pdu_format_2_3_4;
const nfapi_nr_uci_pucch_pdu_format_2_3_4_t *uci_pdu = &uci_list[i].pucch_pdu_format_2_3_4;
handle_nr_uci_pucch_2_3_4(mod_id, frame, slot, uci_pdu);
handle_nr_uci_pucch_2_3_4(mod_id, frame, slot, uci_pdu
, UL_info
);
break;
break;
}
}
}
}
...
...
openair2/RRC/NR/rrc_gNB_reconfig.c
View file @
0a0a5e48
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