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
promise
OpenXG-RAN
Commits
16dcf575
Commit
16dcf575
authored
Aug 15, 2020
by
r.karey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added more logs and fixed assertion
parent
573cef2d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
62 additions
and
19 deletions
+62
-19
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+19
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
+3
-4
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+5
-1
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
+25
-9
openair2/RRC/NR/rrc_gNB_reconfig.c
openair2/RRC/NR/rrc_gNB_reconfig.c
+10
-5
No files found.
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
16dcf575
...
...
@@ -414,6 +414,25 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
gNB
->
UL_INFO
.
uci_ind
.
num_ucis
+=
1
;
pucch
->
active
=
0
;
break
;
case
2
:
num_ucis
=
gNB
->
UL_INFO
.
uci_ind
.
num_ucis
;
gNB
->
UL_INFO
.
uci_ind
.
uci_list
=
&
gNB
->
uci_pdu_list
[
0
];
gNB
->
UL_INFO
.
uci_ind
.
sfn
=
frame_rx
;
gNB
->
UL_INFO
.
uci_ind
.
slot
=
slot_rx
;
gNB
->
uci_pdu_list
[
num_ucis
].
pdu_type
=
NFAPI_NR_UCI_FORMAT_2_3_4_PDU_TYPE
;
gNB
->
uci_pdu_list
[
num_ucis
].
pdu_size
=
sizeof
(
nfapi_nr_uci_pucch_pdu_format_2_3_4_t
);
nfapi_nr_uci_pucch_pdu_format_2_3_4_t
*
uci_pdu_format2
=
&
gNB
->
uci_pdu_list
[
num_ucis
].
pucch_pdu_format_2_3_4
;
nr_decode_pucch2
(
gNB
,
slot_rx
,
uci_pdu_format2
,
pucch_pdu
);
gNB
->
UL_INFO
.
uci_ind
.
num_ucis
+=
1
;
pucch
->
active
=
0
;
break
;
default:
AssertFatal
(
1
==
0
,
"Only PUCCH format 0 is currently supported
\n
"
);
}
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
View file @
16dcf575
...
...
@@ -655,7 +655,7 @@ void nr_schedule_pucch(int Mod_idP,
memset
(
pucch_pdu
,
0
,
sizeof
(
nfapi_nr_pucch_pdu_t
));
UL_tti_req
->
n_pdus
+=
1
;
O_ack
=
curr_pucch
->
dai_c
;
O_uci
=
O_ack
;
// for now we are just sending acknacks in pucch
O_uci
=
O_ack
+
17
;
// for now we are just sending acknacks in pucch
LOG_I
(
MAC
,
"Scheduling pucch reception for frame %d slot %d
\n
"
,
frameP
,
slotP
);
nr_configure_pucch
(
pucch_pdu
,
scc
,
...
...
@@ -789,9 +789,8 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
if
(
UE_list
->
fiveG_connected
[
UE_id
]
&&
(
is_xlsch_in_slot
(
*
dlsch_in_slot_bitmap
,
slot_txP
%
num_slots_per_tdd
)))
{
ue_sched_ctl
->
current_harq_pid
=
slot_txP
%
num_slots_per_tdd
;
nr_update_pucch_scheduling
(
module_idP
,
UE_id
,
frame_txP
,
slot_txP
,
num_slots_per_tdd
,
&
pucch_sched
);
#ifdef GES_SUPPORT
tci_handling
(
module_idP
,
UE_id
,
CC_id
,
&
ue_sched_ctl
,
frame
,
slot
)
#endif
//TCI handling function
tci_handling
(
module_idP
,
UE_id
,
CC_id
,
&
ue_sched_ctl
,
frame_rxP
,
slot_rxP
);
nr_schedule_uss_dlsch_phytest
(
module_idP
,
frame_txP
,
slot_txP
,
&
UE_list
->
UE_sched_ctrl
[
UE_id
].
sched_pucch
[
pucch_sched
],
NULL
);
// resetting ta flag
gNB
->
ta_len
=
0
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
16dcf575
...
...
@@ -610,6 +610,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
...
...
@@ -633,6 +635,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"
);
...
...
@@ -670,6 +673,7 @@ void nr_configure_pucch(nfapi_nr_pucch_pdu_t* pucch_pdu,
pucch_pdu
->
sr_flag
=
SR_flag
;
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
;
...
...
@@ -1561,7 +1565,7 @@ void nr_update_pucch_scheduling(int Mod_idP,
if
(
curr_pucch
->
dai_c
<
MAX_ACK_BITS
)
{
curr_pucch
->
frame
=
frameP
;
curr_pucch
->
dai_c
++
;
curr_pucch
->
resource_indicator
=
4
;
//0; // in phytest with only 1 UE we are using just the 1st resource
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
;
...
...
openair2/NR_PHY_INTERFACE/NR_IF_Module.c
View file @
16dcf575
...
...
@@ -77,20 +77,32 @@ void handle_nr_rach(NR_UL_IND_t *UL_info) {
//!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
...
...
@@ -141,15 +153,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
...
...
@@ -186,6 +200,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
;
...
...
@@ -202,6 +217,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
;
...
...
@@ -377,7 +393,7 @@ void handle_nr_uci(NR_UL_IND_t *UL_info, NR_UE_sched_ctrl_t *sched_ctrl) {
int
bwp_id
=
1
;
NR_BWP_Uplink_t
*
ubwp
=
RC
.
nrmac
[
Mod_idP
]
->
UE_list
.
secondaryCellGroup
[
UE_id
]
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
bwp_id
-
1
];
NR_SubcarrierSpacing_t
scs
=
ubwp
->
bwp_Common
->
genericParameters
.
subcarrierSpacing
;
LOG_I
(
PHY
,
"SFN/SF:%d%d scs %d
\n
"
,
LOG_I
(
PHY
,
"SFN/SF:%d%d scs %
l
d
\n
"
,
UL_info
->
frame
,
UL_info
->
slot
,
scs
);
//API to parse the csi report and store it into sched_ctrl
...
...
openair2/RRC/NR/rrc_gNB_reconfig.c
View file @
16dcf575
...
...
@@ -1734,10 +1734,15 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
csires0
->
csi_RS_ResourceSetList
.
present
=
NR_CSI_ResourceConfig__csi_RS_ResourceSetList_PR_nzp_CSI_RS_SSB
;
csires0
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
=
calloc
(
1
,
sizeof
(
*
csires0
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
));
csires0
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
nzp_CSI_RS_ResourceSetList
=
calloc
(
1
,
sizeof
(
*
csires0
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
nzp_CSI_RS_ResourceSetList
));
csires0
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
csi_SSB_ResourceSetList
=
NULL
;
//For verification of CSI measurement adding the ssb resource set list
csires0
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
csi_SSB_ResourceSetList
=
calloc
(
1
,
sizeof
(
*
csires0
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
csi_SSB_ResourceSetList
));
//NULL;
NR_NZP_CSI_RS_ResourceSetId_t
*
csires00
=
calloc
(
1
,
sizeof
(
*
csires00
));
//For verification of CSI measurment for SSB
NR_CSI_SSB_ResourceSetId_t
*
ssbres00
=
calloc
(
1
,
sizeof
(
*
ssbres00
));
*
csires00
=
0
;
*
ssbres00
=
0
;
ASN_SEQUENCE_ADD
(
&
csires0
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
nzp_CSI_RS_ResourceSetList
->
list
,
csires00
);
ASN_SEQUENCE_ADD
(
&
csires0
->
csi_RS_ResourceSetList
.
choice
.
nzp_CSI_RS_SSB
->
csi_SSB_ResourceSetList
->
list
,
ssbres00
);
csires0
->
bwp_Id
=
1
;
csires0
->
resourceType
=
NR_CSI_ResourceConfig__resourceType_periodic
;
ASN_SEQUENCE_ADD
(
&
csi_MeasConfig
->
csi_ResourceConfigToAddModList
->
list
,
csires0
);
...
...
@@ -1872,7 +1877,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
csi_MeasConfig
->
csi_ReportConfigToAddModList
=
calloc
(
1
,
sizeof
(
*
csi_MeasConfig
->
csi_ReportConfigToAddModList
));
csi_MeasConfig
->
csi_ReportConfigToReleaseList
=
NULL
;
NR_CSI_ReportConfig_t
*
csirep0
=
calloc
(
1
,
sizeof
(
*
csirep0
));
/*
NR_CSI_ReportConfig_t *csirep0 = calloc(1,sizeof(*csirep0));
csirep0->reportConfigId=0;
csirep0->carrier=NULL;
csirep0->resourcesForChannelMeasurement=0;
...
...
@@ -1944,11 +1949,11 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
csirep0->ext1 = NULL;
ASN_SEQUENCE_ADD(&csi_MeasConfig->csi_ReportConfigToAddModList->list,csirep0);
*/
NR_CSI_ReportConfig_t
*
csirep1
=
calloc
(
1
,
sizeof
(
*
csirep1
));
csirep1
->
reportConfigId
=
2
;
csirep1
->
carrier
=
NULL
;
csirep1
->
resourcesForChannelMeasurement
=
initial_csi_index
;
csirep1
->
resourcesForChannelMeasurement
=
0
;
//initial_csi_index; Just for verification
csirep1
->
csi_IM_ResourcesForInterference
=
NULL
;
csirep1
->
nzp_CSI_RS_ResourcesForInterference
=
NULL
;
csirep1
->
reportConfigType
.
present
=
NR_CSI_ReportConfig__reportConfigType_PR_periodic
;
...
...
@@ -1957,7 +1962,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
csirep1
->
reportConfigType
.
choice
.
periodic
->
reportSlotConfig
.
choice
.
slots320
=
49
;
NR_PUCCH_CSI_Resource_t
*
pucchcsires1
=
calloc
(
1
,
sizeof
(
*
pucchcsires1
));
pucchcsires1
->
uplinkBandwidthPartId
=
1
;
pucchcsires1
->
pucch_Resource
=
4
;
//12;
pucchcsires1
->
pucch_Resource
=
3
;
//
4;//12;
ASN_SEQUENCE_ADD
(
&
csirep1
->
reportConfigType
.
choice
.
periodic
->
pucch_CSI_ResourceList
.
list
,
pucchcsires1
);
csirep1
->
reportQuantity
.
present
=
NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP
;
csirep1
->
reportQuantity
.
choice
.
ssb_Index_RSRP
=
(
NULL_t
)
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