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
wangwenhui
OpenXG-RAN
Commits
7ab0b200
Commit
7ab0b200
authored
Dec 18, 2020
by
k.ramya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code rearrangement
parent
0e24d8f4
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
170 additions
and
157 deletions
+170
-157
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+3
-3
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
+5
-10
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+18
-12
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+10
-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
-127
No files found.
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
7ab0b200
...
...
@@ -309,7 +309,7 @@ void config_common(int Mod_idP, int pdsch_AntennaPorts, NR_ServingCellConfigComm
}
}
#if 0
//!TODO : smae function can be written to handle csi_resources
void update_csi_bitlen (NR_CSI_MeasConfig_t *csi_MeasConfig, NR_UE_list_t *UE_list, int UE_id, module_id_t Mod_idP) {
uint8_t csi_report_id = 0;
...
...
@@ -636,7 +636,7 @@ void update_csi_bitlen (NR_CSI_MeasConfig_t *csi_MeasConfig, NR_UE_list_t *UE_li
}
}
}
#endif
extern
uint16_t
sl_ahead
;
int
rrc_mac_config_req_gNB
(
module_id_t
Mod_idP
,
...
...
@@ -754,7 +754,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
UE_info
->
secondaryCellGroup
[
UE_id
]
=
secondaryCellGroup
;
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
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
View file @
7ab0b200
...
...
@@ -310,7 +310,7 @@ void copy_nr_ulreq(module_id_t module_idP, frame_t frameP, sub_frame_t slotP)
}
*/
/*
void nr_schedule_pusch(int Mod_idP,
int UE_id,
int num_slots_per_tdd,
...
...
@@ -321,7 +321,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];
NR_UE_info_t *UE_info = &RC.nrmac[Mod_idP]->UE_info;
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)) {
UL_tti_req->SFN = pusch->frame;
UL_tti_req->Slot = pusch->slot;
...
...
@@ -333,7 +333,7 @@ void nr_schedule_pusch(int Mod_idP,
0, sizeof(NR_sched_pusch));
}
}
*/
bool
is_xlsch_in_slot
(
uint64_t
bitmap
,
sub_frame_t
slot
)
{
return
(
bitmap
>>
slot
)
&
0x01
;
...
...
@@ -348,7 +348,6 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
module_idP
,
ENB_FLAG_YES
,
NOT_A_RNTI
,
frame
,
slot
,
module_idP
);
int
nb_periods_per_frame
;
const
int
UE_id
=
0
;
const
int
bwp_id
=
1
;
gNB_MAC_INST
*
gNB
=
RC
.
nrmac
[
module_idP
];
...
...
@@ -471,12 +470,8 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
// This schedules the DCI for Downlink and PDSCH
if
(
is_xlsch_in_slot
(
dlsch_in_slot_bitmap
,
slot
%
num_slots_per_tdd
)
&&
slot
<
10
)
{
ue_sched_ctl
->
current_harq_pid
=
slot
%
num_slots_per_tdd
;
nr_acknack_scheduling
(
module_idP
,
UE_id
,
frame
,
slot
,
num_slots_per_tdd
,
&
pucch_sched
,
&
pucch_occ
);
//TCI handling function
//tci_handling(module_idP, UE_id, CC_id, ue_sched_ctl, frame, slot);
nr_schedule_uss_dlsch_phytest
(
module_idP
,
frame
,
slot
,
&
UE_list
->
UE_sched_ctrl
[
UE_id
].
sched_pucch
[
pucch_sched
][
pucch_occ
],
NULL
);
ue_sched_ctl
->
ta_apply
=
false
;
//ue_sched_ctl->current_harq_pid = slot % num_slots_per_tdd;
nr_schedule_ue_spec
(
module_idP
,
frame
,
slot
,
num_slots_per_tdd
);
}
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
7ab0b200
...
...
@@ -40,6 +40,11 @@ extern RAN_CONTEXT_t RC;
#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
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_rsrp_sorted
[
MAX_NUM_SSB
]
=
{
0
};
//Sorts ssb_index and ssb_rsrp array data and keeps in ssb_index_sorted and
...
...
@@ -94,7 +99,6 @@ void nr_schedule_pucch(int Mod_idP,
for
(
int
k
=
0
;
k
<
nr_ulmix_slots
;
k
++
)
{
for
(
int
l
=
0
;
l
<
2
;
l
++
)
{
<<<<<<<
HEAD
NR_sched_pucch
*
curr_pucch
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
].
sched_pucch
[
k
][
l
];
const
uint16_t
O_ack
=
curr_pucch
->
dai_c
;
const
uint16_t
O_csi
=
curr_pucch
->
csi_bits
;
...
...
@@ -555,7 +559,8 @@ void nr_csi_meas_reporting(int Mod_idP,
void
handle_nr_uci_pucch_0_1
(
module_id_t
mod_id
,
frame_t
frame
,
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
);
if
(
UE_id
<
0
)
{
...
...
@@ -576,21 +581,22 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id,
}
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
,
frame_t
frame
,
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
);
if
(
UE_id
<
0
)
{
LOG_E
(
MAC
,
"%s(): unknown RNTI %04x in PUCCH UCI
\n
"
,
__func__
,
uci_234
->
rnti
);
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_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
...
...
@@ -604,29 +610,29 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id,
uint8_t
sr_id
=
0
;
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
;
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
;
}
sched_ctrl
->
sr_req
.
nr_of_srs
=
uci_234
->
sr
.
sr_bit_len
;
}
// TODO
if
((
uci_234
->
pduBitmap
>>
1
)
&
0x01
)
{
nr_rx_acknack
(
NULL
,
NULL
,
uci_234
,
UL_info
,
sched_ctrl
,
stats
);
nr_rx_acknack
(
NULL
,
NULL
,
uci_234
,
UL_info
,
sched_ctrl
,
&
UE_info
->
mac_stats
[
0
]
);
}
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
"
,
UL_info
->
frame
,
UL_info
->
slot
,
scs
);
//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
(
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
}
}
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
7ab0b200
...
...
@@ -180,14 +180,22 @@ void nr_fill_nfapi_dl_pdu(int Mod_id,
int
ndi
,
int
round
);
void
tci_handling
(
module_id_t
Mod_idP
,
int
UE_id
,
int
CC_id
,
NR_UE_sched_ctrl_t
*
sched_ctrl
,
frame_t
frame
,
slot_t
slot
);
void
handle_nr_uci_pucch_0_1
(
module_id_t
mod_id
,
frame_t
frame
,
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
,
frame_t
frame
,
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
(
NR_BWP_Uplink_t
*
ubwp
,
...
...
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
View file @
7ab0b200
...
...
@@ -84,7 +84,6 @@ void handle_nr_uci(NR_UL_IND_t *UL_info)
const
sub_frame_t
slot
=
UL_info
->
slot
;
int
num_ucis
=
UL_info
->
uci_ind
.
num_ucis
;
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
++
)
{
switch
(
uci_list
[
i
].
pdu_type
)
{
...
...
@@ -94,13 +93,13 @@ void handle_nr_uci(NR_UL_IND_t *UL_info)
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
;
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
;
}
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
;
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
;
}
}
...
...
openair2/RRC/NR/rrc_gNB_reconfig.c
View file @
7ab0b200
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