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
lizhongxiao
OpenXG-RAN
Commits
b4675c10
Commit
b4675c10
authored
Jan 09, 2023
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PDSCH configuration
parent
646cec27
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
88 deletions
+51
-88
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+2
-12
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+7
-16
openair2/LAYER2/NR_MAC_UE/config_ue.c
openair2/LAYER2/NR_MAC_UE/config_ue.c
+24
-8
openair2/LAYER2/NR_MAC_UE/mac_proto.h
openair2/LAYER2/NR_MAC_UE/mac_proto.h
+0
-1
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+18
-51
No files found.
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
b4675c10
...
...
@@ -909,7 +909,6 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
const
double
N_TA_max
=
Ta_max
*
bw_scaling
*
tc_factor
;
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
0
);
NR_BWP_Id_t
dl_bwp
=
mac
->
current_DL_BWP
.
bwp_id
;
NR_BWP_Id_t
ul_bwp
=
mac
->
current_UL_BWP
.
bwp_id
;
NR_PUSCH_TimeDomainResourceAllocationList_t
*
pusch_TimeDomainAllocationList
=
NULL
;
...
...
@@ -938,17 +937,8 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
}
long
mapping_type_ul
=
pusch_TimeDomainAllocationList
?
pusch_TimeDomainAllocationList
->
list
.
array
[
0
]
->
mappingType
:
NR_PUSCH_TimeDomainResourceAllocation__mappingType_typeA
;
NR_PDSCH_Config_t
*
pdsch_Config
=
NULL
;
NR_PDSCH_TimeDomainResourceAllocationList_t
*
pdsch_TimeDomainAllocationList
=
NULL
;
if
(
dl_bwp
){
pdsch_Config
=
(
mac
->
DLbwp
[
dl_bwp
-
1
]
&&
mac
->
DLbwp
[
dl_bwp
-
1
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
)
?
mac
->
DLbwp
[
dl_bwp
-
1
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
:
NULL
;
if
(
mac
->
DLbwp
[
dl_bwp
-
1
]
&&
mac
->
DLbwp
[
dl_bwp
-
1
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
)
pdsch_TimeDomainAllocationList
=
pdsch_Config
->
pdsch_TimeDomainAllocationList
->
choice
.
setup
;
else
if
(
mac
->
DLbwp
[
dl_bwp
-
1
]
&&
mac
->
DLbwp
[
dl_bwp
-
1
]
->
bwp_Common
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
)
pdsch_TimeDomainAllocationList
=
mac
->
DLbwp
[
dl_bwp
-
1
]
->
bwp_Common
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
;
}
else
if
(
mac
->
scc_SIB
&&
mac
->
scc_SIB
->
downlinkConfigCommon
.
initialDownlinkBWP
.
pdsch_ConfigCommon
->
choice
.
setup
)
pdsch_TimeDomainAllocationList
=
mac
->
scc_SIB
->
downlinkConfigCommon
.
initialDownlinkBWP
.
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
;
NR_PDSCH_Config_t
*
pdsch_Config
=
mac
->
current_DL_BWP
.
pdsch_Config
;
NR_PDSCH_TimeDomainResourceAllocationList_t
*
pdsch_TimeDomainAllocationList
=
mac
->
current_DL_BWP
.
tdaList
;
long
mapping_type_dl
=
pdsch_TimeDomainAllocationList
?
pdsch_TimeDomainAllocationList
->
list
.
array
[
0
]
->
mappingType
:
NR_PDSCH_TimeDomainResourceAllocation__mappingType_typeA
;
NR_DMRS_DownlinkConfig_t
*
NR_DMRS_dlconfig
=
NULL
;
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
View file @
b4675c10
...
...
@@ -3175,16 +3175,15 @@ uint16_t nr_dci_size(const NR_BWP_DownlinkCommon_t *initialDownlinkBWP,
long
rbg_size_config
;
int
num_entries
=
0
;
NR_UplinkConfig_t
*
uplinkConfig
=
NULL
;
NR_UplinkConfig_t
*
uplinkConfig
=
NULL
;
if
(
cg
&&
cg
->
spCellConfig
&&
cg
->
spCellConfig
->
spCellConfigDedicated
)
{
uplinkConfig
=
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
;
}
const
NR_BWP_DownlinkDedicated_t
*
bwpd
=
NULL
;
const
NR_BWP_UplinkDedicated_t
*
ubwpd
=
NULL
;
const
NR_BWP_DownlinkCommon_t
*
bwpc
=
NULL
;
const
NR_BWP_UplinkCommon_t
*
ubwpc
=
NULL
;
NR_PDSCH_Config_t
*
pdsch_Config
=
NULL
;
NR_PDSCH_Config_t
*
pdsch_Config
=
DL_BWP
?
DL_BWP
->
pdsch_Config
:
NULL
;
NR_PUSCH_Config_t
*
pusch_Config
=
NULL
;
NR_PUCCH_Config_t
*
pucch_Config
=
NULL
;
NR_PDCCH_Config_t
*
pdcch_Config
=
NULL
;
...
...
@@ -3192,21 +3191,17 @@ uint16_t nr_dci_size(const NR_BWP_DownlinkCommon_t *initialDownlinkBWP,
if
(
bwp_id
>
0
)
{
AssertFatal
(
cg
!=
NULL
,
"Cellgroup is null and bwp_id!=0"
);
bwpd
=
cg
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
array
[
bwp_id
-
1
]
->
bwp_Dedicated
;
bwpc
=
cg
->
spCellConfig
->
spCellConfigDedicated
->
downlinkBWP_ToAddModList
->
list
.
array
[
bwp_id
-
1
]
->
bwp_Common
;
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
;
pdsch_Config
=
(
bwpd
->
pdsch_Config
)
?
bwpd
->
pdsch_Config
->
choice
.
setup
:
NULL
;
pdcch_Config
=
(
bwpd
->
pdcch_Config
)
?
bwpd
->
pdcch_Config
->
choice
.
setup
:
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
)
{
bwpc
=
initialDownlinkBWP
;
ubwpc
=
initialUplinkBWP
;
bwpd
=
cg
->
spCellConfig
&&
cg
->
spCellConfig
->
spCellConfigDedicated
?
cg
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
:
NULL
;
ubwpd
=
uplinkConfig
?
uplinkConfig
->
initialUplinkBWP
:
NULL
;
pdsch_Config
=
(
bwpd
&&
bwpd
->
pdsch_Config
)
?
bwpd
->
pdsch_Config
->
choice
.
setup
:
NULL
;
pdcch_Config
=
(
bwpd
&&
bwpd
->
pdcch_Config
)
?
bwpd
->
pdcch_Config
->
choice
.
setup
:
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
;
...
...
@@ -3403,7 +3398,7 @@ uint16_t nr_dci_size(const NR_BWP_DownlinkCommon_t *initialDownlinkBWP,
break
;
case
NR_DL_DCI_FORMAT_1_1
:
LOG_D
(
NR_MAC
,
"DCI_FORMAT 1_1 : pdsch_Config %p, pucch_Config %p
\n
"
,
pdsch_Config
,
pucch_Config
);
LOG_D
(
NR_MAC
,
"DCI_FORMAT 1_1 : pdsch_Config %p, pucch_Config %p
\n
"
,
pdsch_Config
,
pucch_Config
);
// General note: 0 bits condition is ignored as default nbits is 0.
// Format identifier
size
=
1
;
...
...
@@ -3435,15 +3430,11 @@ 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
(
pdsch_Config
==
NULL
||
pdsch_Config
->
pdsch_TimeDomainAllocationList
==
NULL
)
{
if
(
bwpc
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
==
NULL
)
num_entries
=
16
;
// num of entries in default table
else
num_entries
=
bwpc
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
->
list
.
count
;
}
// Time domain assignment (see table 5.1.2.1.1-1 in 38.214)
if
(
DL_BWP
->
tdaList
)
num_entries
=
DL_BWP
->
tdaList
->
list
.
count
;
else
num_entries
=
pdsch_Config
->
pdsch_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
,
"pdsch tda.nbits= %d
\n
"
,
dci_pdu
->
time_domain_assignment
.
nbits
);
size
+=
dci_pdu
->
time_domain_assignment
.
nbits
;
...
...
openair2/LAYER2/NR_MAC_UE/config_ue.c
View file @
b4675c10
...
...
@@ -547,16 +547,23 @@ void configure_current_BWP(NR_UE_MAC_INST_t *mac,
NR_UE_UL_BWP_t
*
UL_BWP
=
&
mac
->
current_UL_BWP
;
NR_BWP_t
dl_genericParameters
=
{
0
};
NR_BWP_t
ul_genericParameters
=
{
0
};
NR_BWP_DownlinkCommon_t
*
bwp_dlcommon
=
NULL
;
if
(
scc
)
{
DL_BWP
->
bwp_id
=
0
;
UL_BWP
->
bwp_id
=
0
;
dl_genericParameters
=
scc
->
downlinkConfigCommon
.
initialDownlinkBWP
.
genericParameters
;
bwp_dlcommon
=
&
scc
->
downlinkConfigCommon
.
initialDownlinkBWP
;
dl_genericParameters
=
bwp_dlcommon
->
genericParameters
;
if
(
scc
->
uplinkConfigCommon
)
ul_genericParameters
=
scc
->
uplinkConfigCommon
->
initialUplinkBWP
.
genericParameters
;
else
ul_genericParameters
=
scc
->
downlinkConfigCommon
.
initialDownlinkBWP
.
genericParameters
;
ul_genericParameters
=
bwp_dlcommon
->
genericParameters
;
DL_BWP
->
pdsch_Config
=
NULL
;
if
(
bwp_dlcommon
->
pdsch_ConfigCommon
)
DL_BWP
->
tdaList
=
bwp_dlcommon
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
;
}
if
(
cell_group_config
)
{
if
(
cell_group_config
->
spCellConfig
&&
cell_group_config
->
spCellConfig
->
spCellConfigDedicated
)
{
...
...
@@ -566,6 +573,12 @@ void configure_current_BWP(NR_UE_MAC_INST_t *mac,
if
(
spCellConfigDedicated
->
uplinkConfig
->
firstActiveUplinkBWP_Id
)
UL_BWP
->
bwp_id
=
*
spCellConfigDedicated
->
uplinkConfig
->
firstActiveUplinkBWP_Id
;
if
(
mac
->
scc
)
{
bwp_dlcommon
=
mac
->
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
;
}
if
(
mac
->
scc_SIB
)
{
bwp_dlcommon
=
&
mac
->
scc_SIB
->
downlinkConfigCommon
.
initialDownlinkBWP
;
}
NR_BWP_Downlink_t
*
bwp_downlink
=
NULL
;
const
struct
NR_ServingCellConfig__downlinkBWP_ToAddModList
*
bwpList
=
spCellConfigDedicated
->
downlinkBWP_ToAddModList
;
if
(
bwpList
&&
DL_BWP
->
bwp_id
>
0
)
{
...
...
@@ -576,15 +589,18 @@ void configure_current_BWP(NR_UE_MAC_INST_t *mac,
}
AssertFatal
(
bwp_downlink
!=
NULL
,
"Couldn't find DLBWP corresponding to BWP ID %ld
\n
"
,
DL_BWP
->
bwp_id
);
dl_genericParameters
=
bwp_downlink
->
bwp_Common
->
genericParameters
;
DL_BWP
->
pdsch_Config
=
bwp_downlink
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
;
}
else
{
if
(
mac
->
scc
)
{
dl_genericParameters
=
mac
->
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
->
genericParameters
;
}
if
(
mac
->
scc_SIB
)
{
dl_genericParameters
=
mac
->
scc_SIB
->
downlinkConfigCommon
.
initialDownlinkBWP
.
genericParameters
;
}
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
;
NR_BWP_Uplink_t
*
bwp_uplink
=
NULL
;
const
struct
NR_UplinkConfig__uplinkBWP_ToAddModList
*
ubwpList
=
spCellConfigDedicated
->
uplinkConfig
->
uplinkBWP_ToAddModList
;
if
(
ubwpList
&&
UL_BWP
->
bwp_id
>
0
)
{
...
...
openair2/LAYER2/NR_MAC_UE/mac_proto.h
View file @
b4675c10
...
...
@@ -262,7 +262,6 @@ 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
);
NR_PDSCH_TimeDomainResourceAllocationList_t
*
choose_dl_tda_list
(
NR_PDSCH_Config_t
*
pdsch_Config
,
NR_PDSCH_ConfigCommon_t
*
pdsch_ConfigCommon
);
int8_t
nr_ue_process_dci_time_dom_resource_assignment
(
NR_UE_MAC_INST_t
*
mac
,
NR_PUSCH_TimeDomainResourceAllocationList_t
*
pusch_TimeDomainAllocationList
,
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
b4675c10
...
...
@@ -237,19 +237,6 @@ NR_BWP_DownlinkCommon_t *get_bwp_downlink_common(NR_UE_MAC_INST_t *mac, NR_BWP_I
return
bwp_Common
;
}
NR_PDSCH_TimeDomainResourceAllocationList_t
*
choose_dl_tda_list
(
NR_PDSCH_Config_t
*
pdsch_Config
,
NR_PDSCH_ConfigCommon_t
*
pdsch_ConfigCommon
)
{
NR_PDSCH_TimeDomainResourceAllocationList_t
*
pdsch_TimeDomainAllocationList
=
NULL
;
if
(
pdsch_Config
&&
pdsch_Config
->
pdsch_TimeDomainAllocationList
)
pdsch_TimeDomainAllocationList
=
pdsch_Config
->
pdsch_TimeDomainAllocationList
->
choice
.
setup
;
else
if
(
pdsch_ConfigCommon
->
pdsch_TimeDomainAllocationList
)
pdsch_TimeDomainAllocationList
=
pdsch_ConfigCommon
->
pdsch_TimeDomainAllocationList
;
return
(
pdsch_TimeDomainAllocationList
);
}
NR_PUSCH_TimeDomainResourceAllocationList_t
*
choose_ul_tda_list
(
const
NR_PUSCH_Config_t
*
pusch_Config
,
NR_PUSCH_ConfigCommon_t
*
pusch_ConfigCommon
)
{
NR_PUSCH_TimeDomainResourceAllocationList_t
*
pusch_TimeDomainAllocationList
=
NULL
;
...
...
@@ -645,7 +632,6 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
uint8_t
is_Msg3
=
0
;
NR_UE_DL_BWP_t
*
current_DL_BWP
=
&
mac
->
current_DL_BWP
;
NR_UE_UL_BWP_t
*
current_UL_BWP
=
&
mac
->
current_UL_BWP
;
NR_BWP_Id_t
dl_bwp_id
=
current_DL_BWP
->
bwp_id
;
NR_BWP_Id_t
ul_bwp_id
=
current_UL_BWP
->
bwp_id
;
int
default_abc
=
1
;
...
...
@@ -815,8 +801,8 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
dl_config
->
dl_config_list
[
dl_config
->
number_pdus
].
dlsch_config_pdu
.
rnti
=
rnti
;
fapi_nr_dl_config_dlsch_pdu_rel15_t
*
dlsch_config_pdu_1_0
=
&
dl_config
->
dl_config_list
[
dl_config
->
number_pdus
].
dlsch_config_pdu
.
dlsch_config_rel15
;
NR_PDSCH_Config_t
*
pdsch_config
=
(
dl_bwp_id
>
0
&&
mac
->
DLbwp
[
dl_bwp_id
-
1
])
?
mac
->
DLbwp
[
dl_bwp_id
-
1
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
:
NULL
;
int
is_common
=
0
;
NR_PDSCH_Config_t
*
pdsch_config
=
current_DL_BWP
?
current_DL_BWP
->
pdsch_Config
:
NULL
;
int
is_common
=
0
;
if
(
dci_ind
->
ss_type
==
NR_SearchSpace__searchSpaceType_PR_common
)
{
dlsch_config_pdu_1_0
->
BWPSize
=
mac
->
type0_PDCCH_CSS_config
.
num_rbs
?
mac
->
type0_PDCCH_CSS_config
.
num_rbs
:
current_DL_BWP
->
initial_BWPSize
;
dlsch_config_pdu_1_0
->
BWPStart
=
dci_ind
->
cset_start
;
...
...
@@ -839,16 +825,9 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
dl_config
->
dl_config_list
[
dl_config
->
number_pdus
].
pdu_type
=
FAPI_NR_DL_CONFIG_TYPE_DLSCH
;
}
if
(
(
ra
->
RA_window_cnt
>=
0
&&
rnti
==
ra
->
ra_rnti
)
||
(
rnti
==
ra
->
t_crnti
)
)
{
if
(
mac
->
scc
==
NULL
)
{
// use coreset0
if
(
mac
->
scc
==
NULL
)
// use coreset0
is_common
=
1
;
}
if
(
!
get_softmodem_params
()
->
sa
)
{
// NSA mode is not using the Initial BWP
pdsch_config
=
mac
->
DLbwp
[
dl_bwp_id
-
1
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
;
}
}
else
if
(
dl_bwp_id
>
0
&&
mac
->
DLbwp
[
dl_bwp_id
-
1
])
{
pdsch_config
=
mac
->
DLbwp
[
dl_bwp_id
-
1
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
;
}
else
if
(
mac
->
scc
)
pdsch_config
=
NULL
;
}
}
/* IDENTIFIER_DCI_FORMATS */
...
...
@@ -859,17 +838,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
}
NR_PDSCH_TimeDomainResourceAllocationList_t
*
pdsch_TimeDomainAllocationList
=
NULL
;
if
(
dl_bwp_id
>
0
&&
mac
->
DLbwp
[
dl_bwp_id
-
1
]
&&
mac
->
DLbwp
[
dl_bwp_id
-
1
]
->
bwp_Dedicated
&&
mac
->
DLbwp
[
dl_bwp_id
-
1
]
->
bwp_Dedicated
->
pdsch_Config
&&
mac
->
DLbwp
[
dl_bwp_id
-
1
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
)
pdsch_TimeDomainAllocationList
=
mac
->
DLbwp
[
dl_bwp_id
-
1
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
->
choice
.
setup
;
else
if
(
dl_bwp_id
>
0
&&
mac
->
DLbwp
[
dl_bwp_id
-
1
]
&&
mac
->
DLbwp
[
dl_bwp_id
-
1
]
->
bwp_Common
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
)
pdsch_TimeDomainAllocationList
=
mac
->
DLbwp
[
dl_bwp_id
-
1
]
->
bwp_Common
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
;
else
if
(
mac
->
scc_SIB
&&
mac
->
scc_SIB
->
downlinkConfigCommon
.
initialDownlinkBWP
.
pdsch_ConfigCommon
->
choice
.
setup
)
pdsch_TimeDomainAllocationList
=
mac
->
scc_SIB
->
downlinkConfigCommon
.
initialDownlinkBWP
.
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
;
NR_PDSCH_TimeDomainResourceAllocationList_t
*
pdsch_TimeDomainAllocationList
=
(
rnti
==
SI_RNTI
)
?
NULL
:
current_DL_BWP
->
tdaList
;
int
mappingtype
;
/* TIME_DOM_RESOURCE_ASSIGNMENT */
...
...
@@ -880,14 +849,14 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
LOG_W
(
MAC
,
"[%d.%d] Invalid time_domain_assignment. Possibly due to false DCI. Ignoring DCI!
\n
"
,
frame
,
slot
);
return
-
1
;
}
if
(
pdsch_TimeDomainAllocationList
&&
rnti
!=
SI_RNTI
)
if
(
pdsch_TimeDomainAllocationList
)
mappingtype
=
pdsch_TimeDomainAllocationList
->
list
.
array
[
dci
->
time_domain_assignment
.
val
]
->
mappingType
;
struct
NR_DMRS_DownlinkConfig
*
dl_dmrs_config
=
NULL
;
if
(
dl_bwp_id
>
0
&&
mac
->
DLbwp
[
dl_bwp_id
-
1
]
!=
NULL
)
if
(
pdsch_config
)
dl_dmrs_config
=
(
mappingtype
==
typeA
)
?
mac
->
DLbwp
[
dl_bwp_id
-
1
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
:
mac
->
DLbwp
[
dl_bwp_id
-
1
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeB
->
choice
.
setup
;
pdsch_config
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
:
pdsch_config
->
dmrs_DownlinkForPDSCH_MappingTypeB
->
choice
.
setup
;
dlsch_config_pdu_1_0
->
nscid
=
0
;
if
(
dl_dmrs_config
&&
dl_dmrs_config
->
scramblingID0
)
...
...
@@ -1084,16 +1053,15 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
LOG_W
(
NR_MAC
,
"[%d.%d] bwp_indicator %d > NR_MAX_NUM_BWP Possibly due to false DCI. Ignoring DCI!
\n
"
,
frame
,
slot
,
dci
->
bwp_indicator
.
val
);
return
-
1
;
}
NR_BWP_Id_t
dl_bwp_id
=
mac
->
current_DL_BWP
.
bwp_id
;
NR_BWP_Id_t
ul_bwp_id
=
mac
->
current_UL_BWP
.
bwp_id
;
NR_PDSCH_Config_t
*
pdsch_Config
=
NULL
;
NR_BWP_Id_t
dl_bwp_id
=
current_DL_BWP
->
bwp_id
;
NR_BWP_Id_t
ul_bwp_id
=
current_UL_BWP
->
bwp_id
;
NR_PDSCH_Config_t
*
pdsch_Config
=
current_DL_BWP
->
pdsch_Config
;
NR_BWP_DownlinkDedicated_t
*
bwpd
=
NULL
;
NR_BWP_DownlinkCommon_t
*
bwpc
=
NULL
;
NR_BWP_UplinkDedicated_t
*
ubwpd
=
NULL
;
NR_BWP_UplinkCommon_t
*
ubwpc
=
NULL
;
get_bwp_info
(
mac
,
dl_bwp_id
,
ul_bwp_id
,
&
bwpd
,
&
bwpc
,
&
ubwpd
,
&
ubwpc
);
pdsch_Config
=
bwpd
->
pdsch_Config
->
choice
.
setup
;
dl_config
->
dl_config_list
[
dl_config
->
number_pdus
].
pdu_type
=
FAPI_NR_DL_CONFIG_TYPE_DLSCH
;
dl_config
->
dl_config_list
[
dl_config
->
number_pdus
].
dlsch_config_pdu
.
rnti
=
rnti
;
...
...
@@ -1114,7 +1082,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
}
/* TIME_DOM_RESOURCE_ASSIGNMENT */
int
mappingtype
;
NR_PDSCH_TimeDomainResourceAllocationList_t
*
pdsch_TimeDomainAllocationList
=
c
hoose_dl_tda_list
(
pdsch_Config
,
bwpc
->
pdsch_ConfigCommon
->
choice
.
setup
)
;
NR_PDSCH_TimeDomainResourceAllocationList_t
*
pdsch_TimeDomainAllocationList
=
c
urrent_DL_BWP
->
tdaList
;
if
(
nr_ue_process_dci_time_dom_resource_assignment
(
mac
,
NULL
,
pdsch_TimeDomainAllocationList
,
NULL
,
dlsch_config_pdu_1_1
,
&
mappingtype
,
dci
->
time_domain_assignment
.
val
,
0
,
false
)
<
0
)
{
...
...
@@ -2115,11 +2083,10 @@ uint8_t get_downlink_ack(NR_UE_MAC_INST_t *mac,
NR_BWP_UplinkCommon_t
*
ubwpc
=
NULL
;
get_bwp_info
(
mac
,
dl_bwp_id
,
ul_bwp_id
,
&
bwpd
,
&
bwpc
,
&
ubwpd
,
&
ubwpc
);
if
(
bwpd
&&
bwpd
->
pdsch_Config
&&
bwpd
->
pdsch_Config
->
choice
.
setup
&&
bwpd
->
pdsch_Config
->
choice
.
setup
->
maxNrofCodeWordsScheduledByDCI
&&
bwpd
->
pdsch_Config
->
choice
.
setup
->
maxNrofCodeWordsScheduledByDCI
[
0
]
==
2
)
{
if
(
current_DL_BWP
&&
current_DL_BWP
->
pdsch_Config
&&
current_DL_BWP
->
pdsch_Config
->
maxNrofCodeWordsScheduledByDCI
&&
current_DL_BWP
->
pdsch_Config
->
maxNrofCodeWordsScheduledByDCI
[
0
]
==
2
)
{
two_transport_blocks
=
true
;
number_of_code_word
=
2
;
}
...
...
@@ -2212,7 +2179,7 @@ uint8_t get_downlink_ack(NR_UE_MAC_INST_t *mac,
if
(
mac
->
cg
!=
NULL
&&
mac
->
cg
->
physicalCellGroupConfig
!=
NULL
&&
mac
->
cg
->
physicalCellGroupConfig
->
harq_ACK_SpatialBundlingPUCCH
!=
NULL
)
{
int
N_TB_max_DL
=
bwpd
->
pdsch_Config
->
choice
.
setup
->
maxNrofCodeWordsScheduledByDCI
[
0
];
int
N_TB_max_DL
=
current_DL_BWP
->
pdsch_Config
->
maxNrofCodeWordsScheduledByDCI
[
0
];
pucch
->
n_HARQ_ACK
=
(((
V_DAI_m_DL
-
U_DAI_c
)
%
4
)
*
N_TB_max_DL
)
+
N_m_c_rx
+
N_SPS_c
;
LOG_D
(
MAC
,
"PUCCH power n(%d) = ( V(%d) - U(%d) )mod4 * N_TB(%d) + N(%d)
\n
"
,
pucch
->
n_HARQ_ACK
,
V_DAI_m_DL
,
U_DAI_c
,
N_TB_max_DL
,
N_m_c_rx
);
}
...
...
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