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
ac485030
Commit
ac485030
authored
Aug 15, 2020
by
r.karey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added more logs and fixed assertion
parent
4a33844b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
81 additions
and
9 deletions
+81
-9
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
+0
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+57
-0
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
+24
-8
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
View file @
ac485030
...
...
@@ -379,7 +379,6 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
if
((
slot
==
0
)
&&
(
frame
&
127
)
==
0
)
dump_mac_stats
(
RC
.
nrmac
[
module_idP
]);
// This schedules MIB
schedule_nr_mib
(
module_idP
,
frame
,
slot
,
nr_slots_per_frame
[
*
scc
->
ssbSubcarrierSpacing
]);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
ac485030
...
...
@@ -939,6 +939,8 @@ void nr_configure_pucch(nfapi_nr_pucch_pdu_t* pucch_pdu,
n_set
=
pucch_Config
->
resourceSetToAddModList
->
list
.
count
;
AssertFatal
(
n_set
>
0
,
"PUCCH resourceSetToAddModList is empty
\n
"
);
LOG_I
(
MAC
,
"UCI n_set= %d
\n
"
,
n_set
);
N2
=
2
;
// procedure to select pucch resource id from resource sets according to
// number of uci bits and pucch resource indicator pucch_resource
...
...
@@ -966,6 +968,7 @@ void nr_configure_pucch(nfapi_nr_pucch_pdu_t* pucch_pdu,
}
else
N2
=
N3
;
}
LOG_I
(
MAC
,
"UCI resource id = %ld
\n
"
,
*
resource_id
);
}
AssertFatal
(
resource_id
!=
NULL
,
"Couldn-t find any matching PUCCH resource in the PUCCH resource sets"
);
...
...
@@ -1004,6 +1007,7 @@ void nr_configure_pucch(nfapi_nr_pucch_pdu_t* pucch_pdu,
pucch_pdu
->
sr_flag
=
O_sr
;
break
;
case
NR_PUCCH_Resource__format_PR_format2
:
LOG_I
(
MAC
,
"UCI format2 is being scheduled
\n
"
);
pucch_pdu
->
format_type
=
2
;
pucch_pdu
->
nr_of_symbols
=
pucchres
->
format
.
choice
.
format2
->
nrofSymbols
;
pucch_pdu
->
start_symbol_index
=
pucchres
->
format
.
choice
.
format2
->
startingSymbolIndex
;
...
...
@@ -1993,6 +1997,59 @@ void get_pdsch_to_harq_feedback(int Mod_idP,
}
}
<<<<<<<
HEAD
=======
// function to update pucch scheduling parameters in UE list when a USS DL is scheduled
void
nr_update_pucch_scheduling
(
int
Mod_idP
,
int
UE_id
,
frame_t
frameP
,
sub_frame_t
slotP
,
int
slots_per_tdd
,
int
*
pucch_id
)
{
NR_ServingCellConfigCommon_t
*
scc
=
RC
.
nrmac
[
Mod_idP
]
->
common_channels
->
ServingCellConfigCommon
;
NR_UE_list_t
*
UE_list
=
&
RC
.
nrmac
[
Mod_idP
]
->
UE_list
;
NR_sched_pucch
*
curr_pucch
;
int
first_ul_slot_tdd
,
k
,
i
;
uint8_t
pdsch_to_harq_feedback
[
8
];
int
found
=
0
;
int
nr_ulmix_slots
=
scc
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
nrofUplinkSlots
;
if
(
scc
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
nrofUplinkSymbols
!=
0
)
nr_ulmix_slots
++
;
// this is hardcoded for now as ue specific
NR_SearchSpace__searchSpaceType_PR
ss_type
=
NR_SearchSpace__searchSpaceType_PR_ue_Specific
;
get_pdsch_to_harq_feedback
(
Mod_idP
,
UE_id
,
ss_type
,
pdsch_to_harq_feedback
);
// for each possible ul or mixed slot
for
(
k
=
0
;
k
<
nr_ulmix_slots
;
k
++
)
{
curr_pucch
=
&
UE_list
->
UE_sched_ctrl
[
UE_id
].
sched_pucch
[
k
];
// if there is free room in current pucch structure
if
(
curr_pucch
->
dai_c
<
MAX_ACK_BITS
)
{
curr_pucch
->
frame
=
frameP
;
curr_pucch
->
dai_c
++
;
curr_pucch
->
resource_indicator
=
0
;
//4;//0; // in phytest with only 1 UE we are using just the 1st resource
// first pucch occasion in first UL or MIXED slot
first_ul_slot_tdd
=
scc
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
nrofDownlinkSlots
;
i
=
0
;
while
(
i
<
8
&&
found
==
0
)
{
// look if timing indicator is among allowed values
if
(
pdsch_to_harq_feedback
[
i
]
==
(
first_ul_slot_tdd
+
k
)
-
(
slotP
%
slots_per_tdd
))
found
=
1
;
if
(
found
==
0
)
i
++
;
}
if
(
found
==
1
)
{
// computing slot in which pucch is scheduled
curr_pucch
->
ul_slot
=
first_ul_slot_tdd
+
k
+
(
slotP
-
(
slotP
%
slots_per_tdd
));
curr_pucch
->
timing_indicator
=
i
;
// index in the list of timing indicators
*
pucch_id
=
k
;
return
;
}
}
}
AssertFatal
(
1
==
0
,
"No Uplink slot available in accordance to allowed timing indicator
\n
"
);
}
>>>>>>>
Added
more
logs
and
fixed
assertion
void
find_aggregation_candidates
(
uint8_t
*
aggregation_level
,
uint8_t
*
nr_of_candidates
,
...
...
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
View file @
ac485030
...
...
@@ -107,20 +107,32 @@ uint8_t get_ssb_resources (NR_CSI_MeasConfig_t *csi_MeasConfig,
//!TODO : smae function can be written to handle csi_resources
uint8_t
get_ssb_resources
(
NR_CSI_MeasConfig_t
*
csi_MeasConfig
,
NR_CSI_ResourceConfigId_t
csi_ResourceConfigId
,
NR_CSI_ReportConfig__reportQuantity_PR
reportQuantity_type
)
{
NR_CSI_ReportConfig__reportQuantity_PR
reportQuantity_type
,
uint8_t
*
nb_resource_sets
)
{
uint8_t
idx
=
0
;
//
uint8_t csi_ssb_idx =0;
uint8_t
csi_ssb_idx
=
0
;
for
(
idx
=
0
;
idx
<
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
.
count
;
idx
++
)
{
if
(
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
.
array
[
idx
]
->
csi_ResourceConfigId
==
csi_ResourceConfigId
)
{
//Finding the CSI_RS or SSB Resources
if
(
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
.
array
[
idx
]
->
csi_RS_ResourceSetList
.
present
==
NR_CSI_ResourceConfig__csi_RS_ResourceSetList_PR_nzp_CSI_RS_SSB
)
{
if
(
NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP
==
reportQuantity_type
)
return
(
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
.
array
[
idx
]
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
csi_SSB_ResourceSetList
->
list
.
count
);
if
(
NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP
==
reportQuantity_type
){
*
nb_resource_sets
=
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
.
array
[
idx
]
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
csi_SSB_ResourceSetList
->
list
.
count
;
for
(
csi_ssb_idx
=
0
;
csi_ssb_idx
<
csi_MeasConfig
->
csi_SSB_ResourceSetToAddModList
->
list
.
count
;
csi_ssb_idx
++
)
{
if
(
csi_MeasConfig
->
csi_SSB_ResourceSetToAddModList
->
list
.
array
[
csi_ssb_idx
]
->
csi_SSB_ResourceSetId
==
*
(
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
.
array
[
idx
]
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
csi_SSB_ResourceSetList
->
list
.
array
[
0
]))
{
return
csi_MeasConfig
->
csi_SSB_ResourceSetToAddModList
->
list
.
array
[
csi_ssb_idx
]
->
csi_SSB_ResourceList
.
list
.
count
;
}
else
{
//handle error condition
AssertFatal
(
csi_MeasConfig
->
csi_SSB_ResourceSetToAddModList
->
list
.
array
[
csi_ssb_idx
]
->
csi_SSB_ResourceSetId
,
"csi_SSB_ResourcesSetId is not configured"
);
}
}
}
else
if
(
NR_CSI_ReportConfig__reportQuantity_PR_cri_RSRP
==
reportQuantity_type
)
return
(
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
.
array
[
idx
]
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
nzp_CSI_RS_ResourceSetList
->
list
.
count
)
;
*
nb_resource_sets
=
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
.
array
[
idx
]
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
nzp_CSI_RS_ResourceSetList
->
list
.
count
;
}
else
{
//TODO: find the CSI_RS IM resources
...
...
@@ -325,15 +337,17 @@ void extract_pucch_csi_report ( NR_CSI_MeasConfig_t *csi_MeasConfig,
AssertFatal
(
reportQuantity_type
,
"reportQuantity is not configured"
);
if
(
NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP
==
reportQuantity_type
)
{
uint8_t
nb_ssb_resource_set
=
get_ssb_resources
(
csi_MeasConfig
,
uint8_t
nb_ssb_resource_set
=
0
;
uint8_t
nb_ssb_resources
=
get_ssb_resources
(
csi_MeasConfig
,
csi_MeasConfig
->
csi_ReportConfigToAddModList
->
list
.
array
[
csi_report_id
]
->
resourcesForChannelMeasurement
,
reportQuantity_type
);
//csi_MeasConfig->csi_SSB_ResourceSetToAddModList->list.array[0]->CSI_SSB_ResourceList.list.count;
reportQuantity_type
,
&
nb_ssb_resource_set
);
//csi_MeasConfig->csi_SSB_ResourceSetToAddModList->list.array[0]->CSI_SSB_ResourceList.list.count;
uint8_t
idx
=
0
;
uint8_t
ssb_idx
=
0
;
uint8_t
diff_rsrp_idx
=
0
;
uint8_t
bitlen_ssbri
=
log
(
nb_ssb_resource
_set
)
/
log
(
2
);
uint8_t
bitlen_ssbri
=
log
(
nb_ssb_resource
s
)
/
log
(
2
);
sched_ctrl
->
nr_of_csi_report
[
UE_id
]
=
nb_ssb_resource_set
;
LOG_I
(
MAC
,
"csi_payload = %d, bitlen_ssbri = %d, nb_ssb_resource_set = %d,nb_ssb_resources = %d
\n
"
,
payload_size
,
bitlen_ssbri
,
nb_ssb_resource_set
,
nb_ssb_resources
);
/*! As per the spec 38.212 and table: 6.3.1.1.2-12 in a single UCI sequence we can have multiple CSI_report
* the number of CSI_report will depend on number of CSI resource sets that are configured in CSI-ResourceConfig RRC IE
* From spec 38.331 from the IE CSI-ResourceConfig for SSB RSRP reporting we can configure only one resource set
...
...
@@ -370,6 +384,7 @@ void extract_pucch_csi_report ( NR_CSI_MeasConfig_t *csi_MeasConfig,
}
sched_ctrl
->
CSI_report
[
UE_id
][
idx
].
choice
.
ssb_cri_report
.
RSRP
=
(
*
payload
)
&
0x7f
;
*
payload
>>=
7
;
for
(
diff_rsrp_idx
=
0
;
diff_rsrp_idx
<=
sched_ctrl
->
CSI_report
[
UE_id
][
idx
].
choice
.
ssb_cri_report
.
nr_ssbri_cri
-
1
;
diff_rsrp_idx
++
)
{
sched_ctrl
->
CSI_report
[
UE_id
][
idx
].
choice
.
ssb_cri_report
.
diff_RSRP
[
diff_rsrp_idx
]
=
(
*
payload
)
&
0x0f
;
...
...
@@ -386,6 +401,7 @@ void extract_pucch_csi_report ( NR_CSI_MeasConfig_t *csi_MeasConfig,
}
sched_ctrl
->
CSI_report
[
UE_id
][
idx
].
choice
.
ssb_cri_report
.
RSRP
=
(
*
payload
)
&
0x7f
;
*
payload
>>=
7
;
/** From Table 6.3.1.1.2-3: RI, LI, CQI, and CRI of codebookType=typeI-SinglePanel */
sched_ctrl
->
CSI_report
[
UE_id
][
idx
].
choice
.
ssb_cri_report
.
diff_RSRP
[
0
]
=
(
*
payload
)
&
0x0f
;
*
payload
>>=
4
;
...
...
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