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
Michael Black
OpenXG-RAN
Commits
0d9d4f55
Commit
0d9d4f55
authored
Jan 09, 2023
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
further improvements in tda lists
parent
91f8f887
Changes
15
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
263 additions
and
311 deletions
+263
-311
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
+1
-0
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
+1
-0
openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
+12
-0
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+117
-16
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
+15
-5
openair2/LAYER2/NR_MAC_UE/config_ue.c
openair2/LAYER2/NR_MAC_UE/config_ue.c
+11
-11
openair2/LAYER2/NR_MAC_UE/mac_proto.h
openair2/LAYER2/NR_MAC_UE/mac_proto.h
+5
-8
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+56
-133
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+27
-122
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+6
-6
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+7
-5
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
+2
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+1
-3
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+1
-1
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
+1
-0
No files found.
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
View file @
0d9d4f55
...
...
@@ -87,6 +87,7 @@ typedef struct {
typedef
struct
{
uint16_t
rnti
;
uint8_t
dci_format
;
uint8_t
CoreSetType
;
int
ss_type
;
// n_CCE index of first CCE for PDCCH reception
int
n_CCE
;
...
...
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
View file @
0d9d4f55
...
...
@@ -935,6 +935,7 @@ uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
dci_ind
->
dci_list
[
dci_ind
->
number_of_dcis
].
N_CCE
=
L
;
dci_ind
->
dci_list
[
dci_ind
->
number_of_dcis
].
dci_format
=
rel15
->
dci_format_options
[
k
];
dci_ind
->
dci_list
[
dci_ind
->
number_of_dcis
].
ss_type
=
rel15
->
dci_type_options
[
k
];
dci_ind
->
dci_list
[
dci_ind
->
number_of_dcis
].
CoreSetType
=
rel15
->
coreset
.
CoreSetType
;
int
n_rb
,
rb_offset
;
get_coreset_rballoc
(
rel15
->
coreset
.
frequency_domain_resource
,
&
n_rb
,
&
rb_offset
);
dci_ind
->
dci_list
[
dci_ind
->
number_of_dcis
].
cset_start
=
rel15
->
BWPStart
+
rb_offset
;
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac.h
View file @
0d9d4f55
...
...
@@ -603,5 +603,17 @@ typedef struct NR_UE_UL_BWP {
int
max_fb_time
;
}
NR_UE_UL_BWP_t
;
typedef
enum
{
typeA
=
0
,
typeB
=
1
}
mappingType_t
;
typedef
struct
NR_ul_tda_info
{
mappingType_t
mapping_type
;
int
startSymbolIndex
;
int
nrOfSymbols
;
long
k2
;
}
NR_ul_tda_info_t
;
#endif
/*__LAYER2_MAC_H__ */
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
View file @
0d9d4f55
...
...
@@ -419,6 +419,82 @@ const char table_38211_6_3_1_5_5[22][4][2] = {
{{
'1'
,
'1'
},
{
'o'
,
'o'
},
{
'j'
,
'o'
},
{
'1'
,
'n'
}}
// tpmi 21
};
const
uint8_t
table_6_1_2_1_1_2
[
16
][
4
]
=
{
{
0
,
0
,
0
,
14
},
// row index 1
{
0
,
0
,
0
,
12
},
// row index 2
{
0
,
0
,
0
,
10
},
// row index 3
{
1
,
0
,
2
,
10
},
// row index 4
{
1
,
0
,
4
,
10
},
// row index 5
{
1
,
0
,
4
,
8
},
// row index 6
{
1
,
0
,
4
,
6
},
// row index 7
{
0
,
1
,
0
,
14
},
// row index 8
{
0
,
1
,
0
,
12
},
// row index 9
{
0
,
1
,
0
,
10
},
// row index 10
{
0
,
2
,
0
,
14
},
// row index 11
{
0
,
2
,
0
,
12
},
// row index 12
{
0
,
2
,
0
,
10
},
// row index 13
{
1
,
0
,
8
,
6
},
// row index 14
{
0
,
3
,
0
,
14
},
// row index 15
{
0
,
3
,
0
,
10
}
// row index 16
};
const
uint8_t
table_6_1_2_1_1_3
[
16
][
4
]
=
{
{
0
,
0
,
0
,
8
},
// row index 1
{
0
,
0
,
0
,
12
},
// row index 2
{
0
,
0
,
0
,
10
},
// row index 3
{
1
,
0
,
2
,
10
},
// row index 4
{
1
,
0
,
4
,
4
},
// row index 5
{
1
,
0
,
4
,
8
},
// row index 6
{
1
,
0
,
4
,
6
},
// row index 7
{
0
,
1
,
0
,
8
},
// row index 8
{
0
,
1
,
0
,
12
},
// row index 9
{
0
,
1
,
0
,
10
},
// row index 10
{
0
,
2
,
0
,
6
},
// row index 11
{
0
,
2
,
0
,
12
},
// row index 12
{
0
,
2
,
0
,
10
},
// row index 13
{
1
,
0
,
8
,
4
},
// row index 14
{
0
,
3
,
0
,
8
},
// row index 15
{
0
,
3
,
0
,
10
}
// row index 16
};
NR_ul_tda_info_t
get_ul_tda_info
(
NR_PUSCH_TimeDomainResourceAllocationList_t
*
tdalist
,
int
tda_index
,
int
scs
,
int
normal_CP
)
{
NR_ul_tda_info_t
tda_info
=
{
0
};
int
j
=
scs
==
0
?
1
:
scs
;
if
(
tdalist
)
{
if
(
tda_index
>=
tdalist
->
list
.
count
)
{
LOG_E
(
MAC
,
"TDA index from DCI %d exceeds TDA list array size %d
\n
"
,
tda_index
,
tdalist
->
list
.
count
);
return
tda_info
;
}
NR_PUSCH_TimeDomainResourceAllocation_t
*
tda
=
tdalist
->
list
.
array
[
tda_index
];
tda_info
.
mapping_type
=
tda
->
mappingType
;
tda_info
.
k2
=
tda
->
k2
?
*
tda
->
k2
:
j
;
int
S
,
L
;
SLIV2SL
(
tda
->
startSymbolAndLength
,
&
S
,
&
L
);
tda_info
.
startSymbolIndex
=
S
;
tda_info
.
nrOfSymbols
=
L
;
}
else
{
if
(
normal_CP
)
{
tda_info
.
mapping_type
=
table_6_1_2_1_1_2
[
tda_index
][
0
];
tda_info
.
k2
=
table_6_1_2_1_1_2
[
tda_index
][
1
]
+
j
;
tda_info
.
startSymbolIndex
=
table_6_1_2_1_1_2
[
tda_index
][
2
];
tda_info
.
nrOfSymbols
=
table_6_1_2_1_1_2
[
tda_index
][
3
];
}
else
{
tda_info
.
mapping_type
=
table_6_1_2_1_1_3
[
tda_index
][
0
];
tda_info
.
k2
=
table_6_1_2_1_1_3
[
tda_index
][
1
]
+
j
;
tda_info
.
startSymbolIndex
=
table_6_1_2_1_1_3
[
tda_index
][
2
];
tda_info
.
nrOfSymbols
=
table_6_1_2_1_1_3
[
tda_index
][
3
];
}
}
return
tda_info
;
}
void
get_info_from_tda_tables
(
int
default_abc
,
int
tda
,
int
dmrs_TypeA_Position
,
...
...
@@ -3130,6 +3206,39 @@ uint8_t compute_precoding_information(NR_PUSCH_Config_t *pusch_Config,
return
nbits
;
}
NR_PDSCH_TimeDomainResourceAllocationList_t
*
get_dl_tdalist
(
const
NR_UE_DL_BWP_t
*
DL_BWP
,
int
controlResourceSetId
,
int
ss_type
,
nr_rnti_type_t
rnti_type
)
{
if
(
!
DL_BWP
)
return
NULL
;
// see table 5.1.2.1.1-1 in 38.214
if
((
rnti_type
==
NR_RNTI_CS
||
rnti_type
==
NR_RNTI_C
||
rnti_type
==
NR_RNTI_MCS_C
)
&&
!
(
ss_type
==
NR_SearchSpace__searchSpaceType_PR_common
&&
controlResourceSetId
==
0
)
&&
(
DL_BWP
->
pdsch_Config
&&
DL_BWP
->
pdsch_Config
->
pdsch_TimeDomainAllocationList
))
return
DL_BWP
->
pdsch_Config
->
pdsch_TimeDomainAllocationList
->
choice
.
setup
;
else
return
DL_BWP
->
tdaList
;
}
NR_PUSCH_TimeDomainResourceAllocationList_t
*
get_ul_tdalist
(
const
NR_UE_UL_BWP_t
*
UL_BWP
,
int
controlResourceSetId
,
int
ss_type
,
nr_rnti_type_t
rnti_type
)
{
if
((
rnti_type
==
NR_RNTI_CS
||
rnti_type
==
NR_RNTI_C
||
rnti_type
==
NR_RNTI_MCS_C
)
&&
!
(
ss_type
==
NR_SearchSpace__searchSpaceType_PR_common
&&
controlResourceSetId
==
0
)
&&
(
UL_BWP
->
pusch_Config
&&
UL_BWP
->
pusch_Config
->
pusch_TimeDomainAllocationList
))
return
UL_BWP
->
pusch_Config
->
pusch_TimeDomainAllocationList
->
choice
.
setup
;
else
return
UL_BWP
->
tdaList
;
}
uint16_t
get_rb_bwp_dci
(
nr_dci_format_t
format
,
int
ss_type
,
uint16_t
cset0_bwp_size
,
...
...
@@ -3181,23 +3290,18 @@ uint16_t nr_dci_size(const NR_BWP_DownlinkCommon_t *initialDownlinkBWP,
}
const
NR_BWP_UplinkDedicated_t
*
ubwpd
=
NULL
;
const
NR_BWP_UplinkCommon_t
*
ubwpc
=
NULL
;
NR_PDSCH_Config_t
*
pdsch_Config
=
DL_BWP
?
DL_BWP
->
pdsch_Config
:
NULL
;
NR_PUSCH_Config_t
*
pusch_Config
=
NULL
;
NR_PUSCH_Config_t
*
pusch_Config
=
UL_BWP
?
UL_BWP
->
pusch_Config
:
NULL
;
NR_PUCCH_Config_t
*
pucch_Config
=
NULL
;
NR_SRS_Config_t
*
srs_config
=
NULL
;
if
(
bwp_id
>
0
)
{
AssertFatal
(
cg
!=
NULL
,
"Cellgroup is null and bwp_id!=0"
);
ubwpd
=
uplinkConfig
?
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
bwp_id
-
1
]
->
bwp_Dedicated
:
NULL
;
ubwpc
=
uplinkConfig
?
uplinkConfig
->
uplinkBWP_ToAddModList
->
list
.
array
[
bwp_id
-
1
]
->
bwp_Common
:
NULL
;
pucch_Config
=
(
ubwpd
->
pucch_Config
)
?
ubwpd
->
pucch_Config
->
choice
.
setup
:
NULL
;
pusch_Config
=
(
ubwpd
->
pusch_Config
)
?
ubwpd
->
pusch_Config
->
choice
.
setup
:
NULL
;
srs_config
=
(
ubwpd
->
srs_Config
)
?
ubwpd
->
srs_Config
->
choice
.
setup
:
NULL
;
}
else
if
(
cg
)
{
ubwpc
=
initialUplinkBWP
;
ubwpd
=
uplinkConfig
?
uplinkConfig
->
initialUplinkBWP
:
NULL
;
pucch_Config
=
(
ubwpd
&&
ubwpd
->
pucch_Config
)
?
ubwpd
->
pucch_Config
->
choice
.
setup
:
NULL
;
pusch_Config
=
(
ubwpd
&&
ubwpd
->
pusch_Config
)
?
ubwpd
->
pusch_Config
->
choice
.
setup
:
NULL
;
srs_config
=
(
ubwpd
&&
ubwpd
->
srs_Config
)
?
ubwpd
->
srs_Config
->
choice
.
setup
:
NULL
;
}
...
...
@@ -3269,14 +3373,11 @@ uint16_t nr_dci_size(const NR_BWP_DownlinkCommon_t *initialDownlinkBWP,
LOG_D
(
NR_MAC
,
"PUSCH Frequency Domain Assignment nbits %d, N_RB %d
\n
"
,
dci_pdu
->
frequency_domain_assignment
.
nbits
,
N_RB
);
size
+=
dci_pdu
->
frequency_domain_assignment
.
nbits
;
// Time domain assignment
if
(
pusch_Config
==
NULL
||
pusch_Config
->
pusch_TimeDomainAllocationList
==
NULL
)
{
if
(
ubwpc
->
pusch_ConfigCommon
->
choice
.
setup
->
pusch_TimeDomainAllocationList
==
NULL
)
num_entries
=
16
;
// num of entries in default table
else
num_entries
=
ubwpc
->
pusch_ConfigCommon
->
choice
.
setup
->
pusch_TimeDomainAllocationList
->
list
.
count
;
}
NR_PUSCH_TimeDomainResourceAllocationList_t
*
tdalistul
=
get_ul_tdalist
(
UL_BWP
,
coreset
->
controlResourceSetId
,
ss_type
,
rnti_type
);
if
(
tdalistul
)
num_entries
=
tdalistul
->
list
.
count
;
else
num_entries
=
pusch_Config
->
pusch_TimeDomainAllocationList
->
choice
.
setup
->
list
.
count
;
num_entries
=
16
;
// num of entries in default table
dci_pdu
->
time_domain_assignment
.
nbits
=
(
int
)
ceil
(
log2
(
num_entries
));
LOG_D
(
NR_MAC
,
"PUSCH Time Domain Allocation nbits %d, pusch_Config %p
\n
"
,
dci_pdu
->
time_domain_assignment
.
nbits
,
pusch_Config
);
size
+=
dci_pdu
->
time_domain_assignment
.
nbits
;
...
...
@@ -3423,9 +3524,9 @@ uint16_t nr_dci_size(const NR_BWP_DownlinkCommon_t *initialDownlinkBWP,
dci_pdu
->
frequency_domain_assignment
.
nbits
=
((
int
)
ceil
(
log2
((
N_RB
*
(
N_RB
+
1
))
>>
1
))
>
numRBG
)
?
(
int
)
ceil
(
log2
((
N_RB
*
(
N_RB
+
1
))
>>
1
))
+
1
:
numRBG
+
1
;
size
+=
dci_pdu
->
frequency_domain_assignment
.
nbits
;
LOG_D
(
NR_MAC
,
"dci_pdu->frequency_domain_assignment.nbits %d (N_RB %d)
\n
"
,
dci_pdu
->
frequency_domain_assignment
.
nbits
,
N_RB
);
// Time domain assignment (see table 5.1.2.1.1-1 in 38.214)
if
(
DL_BWP
->
tdaL
ist
)
num_entries
=
DL_BWP
->
tdaL
ist
->
list
.
count
;
NR_PDSCH_TimeDomainResourceAllocationList_t
*
tdalist
=
get_dl_tdalist
(
DL_BWP
,
coreset
->
controlResourceSetId
,
ss_type
,
rnti_type
);
if
(
tdal
ist
)
num_entries
=
tdal
ist
->
list
.
count
;
else
num_entries
=
16
;
// num of entries in default table
dci_pdu
->
time_domain_assignment
.
nbits
=
(
int
)
ceil
(
log2
(
num_entries
));
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
View file @
0d9d4f55
...
...
@@ -51,11 +51,6 @@ typedef enum {
pusch_len2
=
2
}
pusch_maxLength_t
;
typedef
enum
{
typeA
=
0
,
typeB
=
1
}
mappingType_t
;
uint32_t
get_Y
(
const
NR_SearchSpace_t
*
ss
,
int
slot
,
rnti_t
rnti
);
uint8_t
get_BG
(
uint32_t
A
,
uint16_t
R
);
...
...
@@ -89,6 +84,21 @@ uint8_t compute_precoding_information(NR_PUSCH_Config_t *pusch_Config,
const
uint8_t
*
nrOfLayers
,
uint32_t
*
val
);
NR_PDSCH_TimeDomainResourceAllocationList_t
*
get_dl_tdalist
(
const
NR_UE_DL_BWP_t
*
DL_BWP
,
int
controlResourceSetId
,
int
ss_type
,
nr_rnti_type_t
rnti_type
);
NR_PUSCH_TimeDomainResourceAllocationList_t
*
get_ul_tdalist
(
const
NR_UE_UL_BWP_t
*
UL_BWP
,
int
controlResourceSetId
,
int
ss_type
,
nr_rnti_type_t
rnti_type
);
NR_ul_tda_info_t
get_ul_tda_info
(
NR_PUSCH_TimeDomainResourceAllocationList_t
*
tdalist
,
int
tda_index
,
int
scs
,
int
normal_CP
);
uint16_t
nr_dci_size
(
const
NR_BWP_DownlinkCommon_t
*
initialDownlinkBWP
,
const
NR_BWP_UplinkCommon_t
*
initialUplinkBWP
,
const
NR_UE_DL_BWP_t
*
DL_BWP
,
...
...
openair2/LAYER2/NR_MAC_UE/config_ue.c
View file @
0d9d4f55
...
...
@@ -548,11 +548,13 @@ void configure_current_BWP(NR_UE_MAC_INST_t *mac,
NR_BWP_t
dl_genericParameters
=
{
0
};
NR_BWP_t
ul_genericParameters
=
{
0
};
NR_BWP_DownlinkCommon_t
*
bwp_dlcommon
=
NULL
;
NR_BWP_UplinkCommon_t
*
bwp_ulcommon
=
NULL
;
if
(
scc
)
{
DL_BWP
->
bwp_id
=
0
;
UL_BWP
->
bwp_id
=
0
;
bwp_dlcommon
=
&
scc
->
downlinkConfigCommon
.
initialDownlinkBWP
;
bwp_ulcommon
=
&
scc
->
uplinkConfigCommon
->
initialUplinkBWP
;
dl_genericParameters
=
bwp_dlcommon
->
genericParameters
;
if
(
scc
->
uplinkConfigCommon
)
ul_genericParameters
=
scc
->
uplinkConfigCommon
->
initialUplinkBWP
.
genericParameters
;
...
...
@@ -562,6 +564,8 @@ void configure_current_BWP(NR_UE_MAC_INST_t *mac,
DL_BWP
->
pdsch_Config
=
NULL
;
if
(
bwp_dlcommon
->
pdsch_ConfigCommon
)
DL_BWP
->
tdaList
=
bwp_dlcommon
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
;
if
(
bwp_ulcommon
->
pusch_ConfigCommon
)
UL_BWP
->
tdaList
=
bwp_ulcommon
->
pusch_ConfigCommon
->
choice
.
setup
->
pusch_TimeDomainAllocationList
;
}
if
(
cell_group_config
)
{
...
...
@@ -575,9 +579,11 @@ void configure_current_BWP(NR_UE_MAC_INST_t *mac,
if
(
mac
->
scc
)
{
bwp_dlcommon
=
mac
->
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
;
bwp_ulcommon
=
mac
->
scc
->
uplinkConfigCommon
->
initialUplinkBWP
;
}
if
(
mac
->
scc_SIB
)
{
bwp_dlcommon
=
&
mac
->
scc_SIB
->
downlinkConfigCommon
.
initialDownlinkBWP
;
bwp_ulcommon
=
&
mac
->
scc_SIB
->
uplinkConfigCommon
->
initialUplinkBWP
;
}
NR_BWP_Downlink_t
*
bwp_downlink
=
NULL
;
const
struct
NR_ServingCellConfig__downlinkBWP_ToAddModList
*
bwpList
=
spCellConfigDedicated
->
downlinkBWP_ToAddModList
;
...
...
@@ -595,11 +601,8 @@ void configure_current_BWP(NR_UE_MAC_INST_t *mac,
dl_genericParameters
=
bwp_dlcommon
->
genericParameters
;
DL_BWP
->
pdsch_Config
=
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
;
}
if
(
DL_BWP
->
pdsch_Config
&&
DL_BWP
->
pdsch_Config
->
pdsch_TimeDomainAllocationList
)
DL_BWP
->
tdaList
=
DL_BWP
->
pdsch_Config
->
pdsch_TimeDomainAllocationList
->
choice
.
setup
;
else
DL_BWP
->
tdaList
=
bwp_dlcommon
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
;
UL_BWP
->
tdaList
=
bwp_ulcommon
->
pusch_ConfigCommon
->
choice
.
setup
->
pusch_TimeDomainAllocationList
;
NR_BWP_Uplink_t
*
bwp_uplink
=
NULL
;
const
struct
NR_UplinkConfig__uplinkBWP_ToAddModList
*
ubwpList
=
spCellConfigDedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
;
...
...
@@ -611,14 +614,11 @@ void configure_current_BWP(NR_UE_MAC_INST_t *mac,
}
AssertFatal
(
bwp_uplink
!=
NULL
,
"Couldn't find ULBWP corresponding to BWP ID %ld
\n
"
,
UL_BWP
->
bwp_id
);
ul_genericParameters
=
bwp_uplink
->
bwp_Common
->
genericParameters
;
UL_BWP
->
pusch_Config
=
bwp_uplink
->
bwp_Dedicated
->
pusch_Config
->
choice
.
setup
;
}
else
{
if
(
mac
->
scc
)
{
ul_genericParameters
=
mac
->
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
genericParameters
;
}
if
(
mac
->
scc_SIB
)
{
ul_genericParameters
=
mac
->
scc_SIB
->
uplinkConfigCommon
->
initialUplinkBWP
.
genericParameters
;
}
UL_BWP
->
pusch_Config
=
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
->
pusch_Config
->
choice
.
setup
;
ul_genericParameters
=
bwp_ulcommon
->
genericParameters
;
}
}
else
...
...
openair2/LAYER2/NR_MAC_UE/mac_proto.h
View file @
0d9d4f55
...
...
@@ -261,14 +261,10 @@ void get_bwp_info(NR_UE_MAC_INST_t *mac,
NR_BWP_DownlinkCommon_t
*
get_bwp_downlink_common
(
NR_UE_MAC_INST_t
*
mac
,
NR_BWP_Id_t
dl_bwp_id
);
NR_PUSCH_TimeDomainResourceAllocationList_t
*
choose_ul_tda_list
(
const
NR_PUSCH_Config_t
*
pusch_Config
,
NR_PUSCH_ConfigCommon_t
*
pusch_ConfigCommon
);
int8_t
nr_ue_process_dci_time_dom_resource_assignment
(
NR_UE_MAC_INST_t
*
mac
,
NR_PUSCH_TimeDomainResourceAllocationList_t
*
pusch_TimeDomainAllocationList
,
NR_PDSCH_TimeDomainResourceAllocationList_t
*
pdsch_TimeDomainAllocationList
,
nfapi_nr_ue_pusch_pdu_t
*
pusch_config_pdu
,
fapi_nr_dl_config_dlsch_pdu_rel15_t
*
dlsch_config_pdu
,
int
*
mappingtype
,
int
*
mapping
_
type
,
uint8_t
time_domain_ind
,
int
default_abc
,
bool
use_default
);
...
...
@@ -474,7 +470,7 @@ int16_t compute_nr_SSB_PL(NR_UE_MAC_INST_t *mac, short ssb_rsrp_dBm);
// - in which ULSCH should be scheduled. K2 is configured in RRC configuration.
// PUSCH Msg3 scheduler:
// - scheduled by RAR UL grant according to 8.3 of TS 38.213
int
nr_ue_pusch_scheduler
(
NR_UE_MAC_INST_t
*
mac
,
uint8_t
is_Msg3
,
frame_t
current_frame
,
int
current_slot
,
frame_t
*
frame_tx
,
int
*
slot_tx
,
uint8_t
tda_id
);
int
nr_ue_pusch_scheduler
(
NR_UE_MAC_INST_t
*
mac
,
uint8_t
is_Msg3
,
frame_t
current_frame
,
int
current_slot
,
frame_t
*
frame_tx
,
int
*
slot_tx
,
long
k2
);
int
get_rnti_type
(
NR_UE_MAC_INST_t
*
mac
,
uint16_t
rnti
);
...
...
@@ -487,6 +483,7 @@ int get_rnti_type(NR_UE_MAC_INST_t *mac, uint16_t rnti);
// - 6.4.1.1.1 of TS 38.211
// - 6.3.1.7 of 38.211
int
nr_config_pusch_pdu
(
NR_UE_MAC_INST_t
*
mac
,
NR_ul_tda_info_t
*
tda_info
,
nfapi_nr_ue_pusch_pdu_t
*
pusch_config_pdu
,
dci_pdu_rel15_t
*
dci
,
RAR_grant_t
*
rar_grant
,
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
0d9d4f55
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
View file @
0d9d4f55
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
0d9d4f55
...
...
@@ -1161,12 +1161,12 @@ void nr_generate_Msg2(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
BWPSize
=
type0_PDCCH_CSS_config
->
num_rbs
;
}
NR_ControlResourceSet_t
*
coreset
=
ra
->
coreset
;
const
int
coresetid
=
coreset
->
controlResourceSetId
;
// Calculate number of symbols
int
time_domain_assignment
=
get_dl_tda
(
nr_mac
,
scc
,
slotP
);
NR_tda_info_t
tda_info
=
nr_get_pdsch_tda_info
(
dl_bwp
,
time_domain_assignment
);
NR_ControlResourceSet_t
*
coreset
=
ra
->
coreset
;
NR_PDSCH_TimeDomainResourceAllocationList_t
*
tda_list
=
get_dl_tdalist
(
dl_bwp
,
coresetid
,
ss
->
searchSpaceType
->
present
,
NR_RNTI_RA
);
NR_tda_info_t
tda_info
=
nr_get_pdsch_tda_info
(
tda_list
,
time_domain_assignment
);
AssertFatal
(
coreset
!=
NULL
,
"Coreset cannot be null for RA-Msg2
\n
"
);
...
...
@@ -1208,7 +1208,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
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
)
{
nfapi_nr_dl_tti_request_pdu_t
*
dl_tti_pdcch_pdu
=
&
dl_req
->
dl_tti_pdu_list
[
dl_req
->
nPDUs
];
...
...
@@ -1480,7 +1479,8 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
}
uint8_t
time_domain_assignment
=
get_dl_tda
(
nr_mac
,
scc
,
slotP
);
NR_tda_info_t
msg4_tda
=
nr_get_pdsch_tda_info
(
dl_bwp
,
time_domain_assignment
);
NR_PDSCH_TimeDomainResourceAllocationList_t
*
tda_list
=
get_dl_tdalist
(
dl_bwp
,
coreset
->
controlResourceSetId
,
ss
->
searchSpaceType
->
present
,
NR_RNTI_TC
);
NR_tda_info_t
msg4_tda
=
nr_get_pdsch_tda_info
(
tda_list
,
time_domain_assignment
);
NR_pdsch_dmrs_t
dmrs_info
=
get_dl_dmrs_params
(
scc
,
dl_bwp
,
&
msg4_tda
,
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
0d9d4f55
...
...
@@ -411,7 +411,9 @@ bool allocate_dl_retransmission(module_id_t module_id,
/* Check first whether the old TDA can be reused
* this helps allocate retransmission when TDA changes (e.g. new nrOfSymbols > old nrOfSymbols) */
NR_tda_info_t
temp_tda
=
nr_get_pdsch_tda_info
(
dl_bwp
,
tda
);
NR_PDSCH_TimeDomainResourceAllocationList_t
*
pdsch_TimeDomainAllocationList
=
get_dl_tdalist
(
dl_bwp
,
coresetid
,
sched_ctrl
->
search_space
->
searchSpaceType
->
present
,
NR_RNTI_C
);
NR_tda_info_t
temp_tda
=
nr_get_pdsch_tda_info
(
pdsch_TimeDomainAllocationList
,
tda
);
bool
reuse_old_tda
=
(
retInfo
->
tda_info
.
startSymbolIndex
==
temp_tda
.
startSymbolIndex
)
&&
(
retInfo
->
tda_info
.
nrOfSymbols
<=
temp_tda
.
nrOfSymbols
);
LOG_D
(
NR_MAC
,
"[UE %x] %s old TDA, %s number of layers
\n
"
,
UE
->
rnti
,
...
...
@@ -729,7 +731,8 @@ void pf_dl(module_id_t module_id,
sched_pdsch
->
time_domain_allocation
=
get_dl_tda
(
mac
,
scc
,
slot
);
AssertFatal
(
sched_pdsch
->
time_domain_allocation
>=
0
,
"Unable to find PDSCH time domain allocation in list
\n
"
);
sched_pdsch
->
tda_info
=
nr_get_pdsch_tda_info
(
dl_bwp
,
sched_pdsch
->
time_domain_allocation
);
NR_PDSCH_TimeDomainResourceAllocationList_t
*
pdsch_TimeDomainAllocationList
=
get_dl_tdalist
(
dl_bwp
,
coresetid
,
sched_ctrl
->
search_space
->
searchSpaceType
->
present
,
NR_RNTI_C
);
sched_pdsch
->
tda_info
=
nr_get_pdsch_tda_info
(
pdsch_TimeDomainAllocationList
,
sched_pdsch
->
time_domain_allocation
);
NR_tda_info_t
*
tda_info
=
&
sched_pdsch
->
tda_info
;
const
uint16_t
slbitmap
=
SL_to_bitmap
(
tda_info
->
startSymbolIndex
,
tda_info
->
nrOfSymbols
);
...
...
@@ -798,13 +801,12 @@ void nr_fr1_dlsch_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t
NR_UE_DL_BWP_t
*
current_BWP
=
&
UE
->
current_DL_BWP
;
const
int
tda
=
get_dl_tda
(
RC
.
nrmac
[
module_id
],
scc
,
slot
);
int
startSymbolIndex
,
nrOfSymbols
;
const
struct
NR_PDSCH_TimeDomainResourceAllocationList
*
tdaList
=
current_BWP
->
tdaList
;
const
int
coresetid
=
sched_ctrl
->
coreset
->
controlResourceSetId
;
const
struct
NR_PDSCH_TimeDomainResourceAllocationList
*
tdaList
=
get_dl_tdalist
(
current_BWP
,
coresetid
,
sched_ctrl
->
search_space
->
searchSpaceType
->
present
,
NR_RNTI_C
);
AssertFatal
(
tda
<
tdaList
->
list
.
count
,
"time_domain_allocation %d>=%d
\n
"
,
tda
,
tdaList
->
list
.
count
);
const
int
startSymbolAndLength
=
tdaList
->
list
.
array
[
tda
]
->
startSymbolAndLength
;
SLIV2SL
(
startSymbolAndLength
,
&
startSymbolIndex
,
&
nrOfSymbols
);
const
int
coresetid
=
sched_ctrl
->
coreset
->
controlResourceSetId
;
const
uint16_t
bwpSize
=
coresetid
==
0
?
RC
.
nrmac
[
module_id
]
->
cset0_bwp_size
:
current_BWP
->
BWPSize
;
const
uint16_t
BWPStart
=
coresetid
==
0
?
RC
.
nrmac
[
module_id
]
->
cset0_bwp_start
:
current_BWP
->
BWPStart
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
View file @
0d9d4f55
...
...
@@ -59,7 +59,8 @@ void nr_preprocessor_phytest(module_id_t module_id,
const
int
CC_id
=
0
;
const
int
tda
=
get_dl_tda
(
RC
.
nrmac
[
module_id
],
scc
,
slot
);
NR_tda_info_t
tda_info
=
nr_get_pdsch_tda_info
(
dl_bwp
,
tda
);
NR_PDSCH_TimeDomainResourceAllocationList_t
*
tdalist
=
get_dl_tdalist
(
dl_bwp
,
sched_ctrl
->
coreset
->
controlResourceSetId
,
sched_ctrl
->
search_space
->
searchSpaceType
->
present
,
NR_RNTI_C
);
NR_tda_info_t
tda_info
=
nr_get_pdsch_tda_info
(
tdalist
,
tda
);
sched_ctrl
->
sched_pdsch
.
tda_info
=
tda_info
;
sched_ctrl
->
sched_pdsch
.
time_domain_allocation
=
tda
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
0d9d4f55
...
...
@@ -563,11 +563,10 @@ bool nr_find_nb_rb(uint16_t Qm,
return
*
tbs
>=
bytes
&&
*
nb_rb
<=
nb_rb_max
;
}
NR_tda_info_t
nr_get_pdsch_tda_info
(
const
NR_
UE_DL_BWP_t
*
dl_bwp
,
NR_tda_info_t
nr_get_pdsch_tda_info
(
const
NR_
PDSCH_TimeDomainResourceAllocationList_t
*
tdaList
,
const
int
tda
)
{
NR_tda_info_t
tda_info
=
{
0
};
NR_PDSCH_TimeDomainResourceAllocationList_t
*
tdaList
=
dl_bwp
->
tdaList
;
AssertFatal
(
tda
<
tdaList
->
list
.
count
,
"time_domain_allocation %d>=%d
\n
"
,
tda
,
tdaList
->
list
.
count
);
tda_info
.
mapping_type
=
tdaList
->
list
.
array
[
tda
]
->
mappingType
;
const
int
startSymbolAndLength
=
tdaList
->
list
.
array
[
tda
]
->
startSymbolAndLength
;
...
...
@@ -1177,7 +1176,6 @@ void fill_dci_pdu_rel15(const NR_ServingCellConfigCommon_t *scc,
*
dci_pdu
=
0
;
uint16_t
alt_size
=
0
;
uint16_t
N_RB
;
const
int
controlResourceSetId
=
*
ss
->
controlResourceSetId
;
if
(
current_DL_BWP
)
{
N_RB
=
get_rb_bwp_dci
(
dci_format
,
ss
->
searchSpaceType
->
present
,
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
0d9d4f55
...
...
@@ -307,7 +307,7 @@ long get_K2(NR_PUSCH_TimeDomainResourceAllocationList_t *tdaList,
int
time_domain_assignment
,
int
mu
);
NR_tda_info_t
nr_get_pdsch_tda_info
(
const
NR_
UE_DL_BWP_t
*
dl_bwp
,
NR_tda_info_t
nr_get_pdsch_tda_info
(
const
NR_
PDSCH_TimeDomainResourceAllocationList_t
*
tdaList
,
const
int
tda
);
NR_tda_info_t
nr_get_pusch_tda_info
(
const
NR_UE_UL_BWP_t
*
ul_bwp
,
...
...
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
View file @
0d9d4f55
...
...
@@ -667,6 +667,7 @@ static void fill_dci_from_dl_config(nr_downlink_indication_t*dl_ind, fapi_nr_dl_
if
(
rel15_dci
->
dci_length_options
[
j
]
==
dl_ind
->
dci_ind
->
dci_list
[
k
].
payloadSize
)
{
dl_ind
->
dci_ind
->
dci_list
[
k
].
dci_format
=
rel15_dci
->
dci_format_options
[
j
];
dl_ind
->
dci_ind
->
dci_list
[
k
].
ss_type
=
rel15_dci
->
dci_type_options
[
j
];
dl_ind
->
dci_ind
->
dci_list
[
k
].
CoreSetType
=
rel15_dci
->
coreset
.
CoreSetType
;
LOG_D
(
NR_PHY
,
"format assigned dl_ind->dci_ind->dci_list[k].dci_format %d
\n
"
,
dl_ind
->
dci_ind
->
dci_list
[
k
].
dci_format
);
}
...
...
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