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
wangjie
OpenXG-RAN
Commits
2f3dab63
Commit
2f3dab63
authored
Apr 01, 2021
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/add-dmrs-test' into NR_MCS_BLER
parents
8a1af3d3
a85fdd62
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
297 additions
and
30 deletions
+297
-30
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+1
-1
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+11
-9
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
+2
-2
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+4
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+232
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
+3
-3
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+27
-0
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
+8
-4
openair2/RRC/NR/rrc_gNB_reconfig.c
openair2/RRC/NR/rrc_gNB_reconfig.c
+6
-6
targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb.conf
targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb.conf
+1
-1
No files found.
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
2f3dab63
...
@@ -159,7 +159,7 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
...
@@ -159,7 +159,7 @@ uint8_t nr_generate_pdsch(PHY_VARS_gNB *gNB,
uint16_t
nb_re
=
((
12
*
rel15
->
NrOfSymbols
)
-
nb_re_dmrs
*
dmrs_len
-
xOverhead
)
*
rel15
->
rbSize
*
rel15
->
nrOfLayers
;
uint16_t
nb_re
=
((
12
*
rel15
->
NrOfSymbols
)
-
nb_re_dmrs
*
dmrs_len
-
xOverhead
)
*
rel15
->
rbSize
*
rel15
->
nrOfLayers
;
uint8_t
Qm
=
rel15
->
qamModOrder
[
0
];
uint8_t
Qm
=
rel15
->
qamModOrder
[
0
];
uint32_t
encoded_length
=
nb_re
*
Qm
;
uint32_t
encoded_length
=
nb_re
*
Qm
;
int16_t
mod_dmrs
[
14
][
n_dmrs
<<
1
]
__attribute__
((
aligned
(
16
)));
int16_t
mod_dmrs
[
14
][
n_dmrs
*
4
]
__attribute__
((
aligned
(
16
)));
/* PTRS */
/* PTRS */
uint16_t
beta_ptrs
=
1
;
uint16_t
beta_ptrs
=
1
;
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
View file @
2f3dab63
...
@@ -2166,8 +2166,8 @@ int get_num_dmrs(uint16_t dmrs_mask ) {
...
@@ -2166,8 +2166,8 @@ int get_num_dmrs(uint16_t dmrs_mask ) {
return
(
num_dmrs
);
return
(
num_dmrs
);
}
}
/* returns the total DMRS symbols in a slot*/
/* returns the total DMRS symbols in a slot*/
uint8_t
get_num_dmrs_symbols
(
NR_PDSCH_Config_t
*
pdsch_Config
,
int
dmrs_TypeA_Position
,
int
NrOfSymbols
){
uint8_t
get_num_dmrs_symbols
(
NR_PDSCH_Config_t
*
pdsch_Config
,
int
dmrs_TypeA_Position
,
int
NrOfSymbols
,
int
startSymbol
){
return
get_num_dmrs
(
fill_dmrs_mask
(
pdsch_Config
,
dmrs_TypeA_Position
,
NrOfSymbols
));
return
get_num_dmrs
(
fill_dmrs_mask
(
pdsch_Config
,
dmrs_TypeA_Position
,
NrOfSymbols
,
startSymbol
));
}
}
// Table 5.1.2.2.1-1 38.214
// Table 5.1.2.2.1-1 38.214
...
@@ -2806,9 +2806,10 @@ int is_nr_UL_slot(NR_ServingCellConfigCommon_t *scc, slot_t slot, lte_frame_type
...
@@ -2806,9 +2806,10 @@ int is_nr_UL_slot(NR_ServingCellConfigCommon_t *scc, slot_t slot, lte_frame_type
else
return
(
slot_in_period
>=
slots1
+
scc
->
tdd_UL_DL_ConfigurationCommon
->
pattern2
->
nrofDownlinkSlots
?
1
:
0
);
else
return
(
slot_in_period
>=
slots1
+
scc
->
tdd_UL_DL_ConfigurationCommon
->
pattern2
->
nrofDownlinkSlots
?
1
:
0
);
}
}
int16_t
fill_dmrs_mask
(
NR_PDSCH_Config_t
*
pdsch_Config
,
int
dmrs_TypeA_Position
,
int
NrOfSymbols
)
{
int16_t
fill_dmrs_mask
(
NR_PDSCH_Config_t
*
pdsch_Config
,
int
dmrs_TypeA_Position
,
int
NrOfSymbols
,
int
startSymbol
)
{
int
l0
;
int
l0
;
int
ld
=
NrOfSymbols
;
if
(
dmrs_TypeA_Position
==
NR_ServingCellConfigCommon__dmrs_TypeA_Position_pos2
)
l0
=
2
;
if
(
dmrs_TypeA_Position
==
NR_ServingCellConfigCommon__dmrs_TypeA_Position_pos2
)
l0
=
2
;
else
if
(
dmrs_TypeA_Position
==
NR_ServingCellConfigCommon__dmrs_TypeA_Position_pos3
)
l0
=
3
;
else
if
(
dmrs_TypeA_Position
==
NR_ServingCellConfigCommon__dmrs_TypeA_Position_pos3
)
l0
=
3
;
else
AssertFatal
(
1
==
0
,
"Illegal dmrs_TypeA_Position %d
\n
"
,(
int
)
dmrs_TypeA_Position
);
else
AssertFatal
(
1
==
0
,
"Illegal dmrs_TypeA_Position %d
\n
"
,(
int
)
dmrs_TypeA_Position
);
...
@@ -2819,8 +2820,9 @@ int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,i
...
@@ -2819,8 +2820,9 @@ int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,i
if
(
pdsch_Config
->
dmrs_DownlinkForPDSCH_MappingTypeA
&&
if
(
pdsch_Config
->
dmrs_DownlinkForPDSCH_MappingTypeA
&&
pdsch_Config
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
present
==
NR_SetupRelease_DMRS_DownlinkConfig_PR_setup
)
{
pdsch_Config
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
present
==
NR_SetupRelease_DMRS_DownlinkConfig_PR_setup
)
{
// Relative to start of slot
// Relative to start of slot
ld
+=
startSymbol
;
NR_DMRS_DownlinkConfig_t
*
dmrs_config
=
(
NR_DMRS_DownlinkConfig_t
*
)
pdsch_Config
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
;
NR_DMRS_DownlinkConfig_t
*
dmrs_config
=
(
NR_DMRS_DownlinkConfig_t
*
)
pdsch_Config
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
;
AssertFatal
(
NrOfSymbols
>
1
&&
NrOfSymbols
<
15
,
"Illegal NrOfSymbols %d
\n
"
,
NrOfSymbols
);
AssertFatal
(
ld
>
1
&&
ld
<
15
,
"Illegal l_d %d
\n
"
,
ld
);
int
pos2
=
0
;
int
pos2
=
0
;
if
(
dmrs_config
->
maxLength
==
NULL
)
{
if
(
dmrs_config
->
maxLength
==
NULL
)
{
// this is Table 7.4.1.1.2-3: PDSCH DM-RS positions l for single-symbol DM-RS
// this is Table 7.4.1.1.2-3: PDSCH DM-RS positions l for single-symbol DM-RS
...
@@ -2829,7 +2831,7 @@ int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,i
...
@@ -2829,7 +2831,7 @@ int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,i
return
(
1
<<
l0
);
return
(
1
<<
l0
);
switch
(
NrOfSymbols
)
{
switch
(
ld
)
{
case
2
:
case
2
:
case
3
:
case
3
:
case
4
:
case
4
:
...
@@ -2870,10 +2872,10 @@ int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,i
...
@@ -2870,10 +2872,10 @@ int16_t fill_dmrs_mask(NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,i
}
}
else
{
else
{
// Table 7.4.1.1.2-4: PDSCH DM-RS positions l for double-symbol DM-RS.
// Table 7.4.1.1.2-4: PDSCH DM-RS positions l for double-symbol DM-RS.
AssertFatal
(
NrOfSymbols
>
3
,
"Illegal NrOfSymbols %d for len2 DMRS
\n
"
,
NrOfSymbols
);
AssertFatal
(
ld
>
3
,
"Illegal l_d %d for len2 DMRS
\n
"
,
ld
);
if
(
NrOfSymbols
<
10
)
return
(
1
<<
l0
);
if
(
ld
<
10
)
return
(
1
<<
l0
);
if
(
NrOfSymbols
<
13
&&
*
dmrs_config
->
dmrs_AdditionalPosition
==
NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos0
)
return
(
1
<<
l0
);
if
(
ld
<
13
&&
*
dmrs_config
->
dmrs_AdditionalPosition
==
NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos0
)
return
(
1
<<
l0
);
if
(
NrOfSymbols
<
13
&&
*
dmrs_config
->
dmrs_AdditionalPosition
!=
NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos0
)
return
(
1
<<
l0
|
1
<<
8
);
if
(
ld
<
13
&&
*
dmrs_config
->
dmrs_AdditionalPosition
!=
NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos0
)
return
(
1
<<
l0
|
1
<<
8
);
if
(
*
dmrs_config
->
dmrs_AdditionalPosition
!=
NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos0
)
return
(
1
<<
l0
);
if
(
*
dmrs_config
->
dmrs_AdditionalPosition
!=
NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos0
)
return
(
1
<<
l0
);
if
(
*
dmrs_config
->
dmrs_AdditionalPosition
!=
NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos1
)
return
(
1
<<
l0
|
1
<<
10
);
if
(
*
dmrs_config
->
dmrs_AdditionalPosition
!=
NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos1
)
return
(
1
<<
l0
|
1
<<
10
);
if
(
*
dmrs_config
->
dmrs_AdditionalPosition
==
NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos0
)
return
(
1
<<
l0
);
if
(
*
dmrs_config
->
dmrs_AdditionalPosition
==
NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos0
)
return
(
1
<<
l0
);
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
View file @
2f3dab63
...
@@ -47,7 +47,7 @@ uint64_t from_nrarfcn(int nr_bandP, uint8_t scs_index, uint32_t dl_nrarfcn);
...
@@ -47,7 +47,7 @@ uint64_t from_nrarfcn(int nr_bandP, uint8_t scs_index, uint32_t dl_nrarfcn);
uint32_t
to_nrarfcn
(
int
nr_bandP
,
uint64_t
dl_CarrierFreq
,
uint8_t
scs_index
,
uint32_t
bw
);
uint32_t
to_nrarfcn
(
int
nr_bandP
,
uint64_t
dl_CarrierFreq
,
uint8_t
scs_index
,
uint32_t
bw
);
int16_t
fill_dmrs_mask
(
NR_PDSCH_Config_t
*
pdsch_Config
,
int
dmrs_TypeA_Position
,
int
NrOfSymbols
);
int16_t
fill_dmrs_mask
(
NR_PDSCH_Config_t
*
pdsch_Config
,
int
dmrs_TypeA_Position
,
int
NrOfSymbols
,
int
startSymbol
);
int
is_nr_DL_slot
(
NR_ServingCellConfigCommon_t
*
scc
,
slot_t
slotP
);
int
is_nr_DL_slot
(
NR_ServingCellConfigCommon_t
*
scc
,
slot_t
slotP
);
...
@@ -152,7 +152,7 @@ bool set_ul_ptrs_values(NR_PTRS_UplinkConfig_t *ul_ptrs_config,
...
@@ -152,7 +152,7 @@ bool set_ul_ptrs_values(NR_PTRS_UplinkConfig_t *ul_ptrs_config,
uint8_t
*
K_ptrs
,
uint8_t
*
L_ptrs
,
uint8_t
*
K_ptrs
,
uint8_t
*
L_ptrs
,
uint8_t
*
reOffset
,
uint8_t
*
maxNumPorts
,
uint8_t
*
ulPower
,
uint8_t
*
reOffset
,
uint8_t
*
maxNumPorts
,
uint8_t
*
ulPower
,
uint8_t
NrOfSymbols
);
uint8_t
NrOfSymbols
);
uint8_t
get_num_dmrs_symbols
(
NR_PDSCH_Config_t
*
pdsch_Config
,
int
dmrs_TypeA_Position
,
int
NrOfSymbols
);
uint8_t
get_num_dmrs_symbols
(
NR_PDSCH_Config_t
*
pdsch_Config
,
int
dmrs_TypeA_Position
,
int
NrOfSymbols
,
int
startSymbol
);
/* \brief Set the transform precoding according to 6.1.3 of 3GPP TS 38.214 version 16.3.0 Release 16
/* \brief Set the transform precoding according to 6.1.3 of 3GPP TS 38.214 version 16.3.0 Release 16
@param *pusch_config, pointer to pusch config
@param *pusch_config, pointer to pusch config
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
2f3dab63
...
@@ -704,7 +704,8 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
...
@@ -704,7 +704,8 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
/* dmrs symbol positions*/
/* dmrs symbol positions*/
dlsch_config_pdu_1_0
->
dlDmrsSymbPos
=
fill_dmrs_mask
(
pdsch_config
,
dlsch_config_pdu_1_0
->
dlDmrsSymbPos
=
fill_dmrs_mask
(
pdsch_config
,
mac
->
scc
->
dmrs_TypeA_Position
,
mac
->
scc
->
dmrs_TypeA_Position
,
dlsch_config_pdu_1_0
->
start_symbol
+
dlsch_config_pdu_1_0
->
number_symbols
);
dlsch_config_pdu_1_0
->
number_symbols
,
dlsch_config_pdu_1_0
->
start_symbol
);
dlsch_config_pdu_1_0
->
dmrsConfigType
=
mac
->
DLbwp
[
0
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_Type
==
NULL
?
0
:
1
;
dlsch_config_pdu_1_0
->
dmrsConfigType
=
mac
->
DLbwp
[
0
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_Type
==
NULL
?
0
:
1
;
/* number of DM-RS CDM groups without data according to subclause 5.1.6.2 of 3GPP TS 38.214 version 15.9.0 Release 15 */
/* number of DM-RS CDM groups without data according to subclause 5.1.6.2 of 3GPP TS 38.214 version 15.9.0 Release 15 */
if
(
dlsch_config_pdu_1_0
->
number_symbols
==
2
)
if
(
dlsch_config_pdu_1_0
->
number_symbols
==
2
)
...
@@ -869,7 +870,8 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
...
@@ -869,7 +870,8 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
/* dmrs symbol positions*/
/* dmrs symbol positions*/
dlsch_config_pdu_1_1
->
dlDmrsSymbPos
=
fill_dmrs_mask
(
pdsch_config
,
dlsch_config_pdu_1_1
->
dlDmrsSymbPos
=
fill_dmrs_mask
(
pdsch_config
,
mac
->
scc
->
dmrs_TypeA_Position
,
mac
->
scc
->
dmrs_TypeA_Position
,
dlsch_config_pdu_1_1
->
number_symbols
);
dlsch_config_pdu_1_1
->
number_symbols
,
dlsch_config_pdu_1_1
->
start_symbol
);
dlsch_config_pdu_1_1
->
dmrsConfigType
=
mac
->
DLbwp
[
dl_bwp_id
-
1
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_Type
==
NULL
?
0
:
1
;
dlsch_config_pdu_1_1
->
dmrsConfigType
=
mac
->
DLbwp
[
dl_bwp_id
-
1
]
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_Type
==
NULL
?
0
:
1
;
/* TODO: fix number of DM-RS CDM groups without data according to subclause 5.1.6.2 of 3GPP TS 38.214,
/* TODO: fix number of DM-RS CDM groups without data according to subclause 5.1.6.2 of 3GPP TS 38.214,
using tables 7.3.1.2.2-1, 7.3.1.2.2-2, 7.3.1.2.2-3, 7.3.1.2.2-4 of 3GPP TS 38.212 */
using tables 7.3.1.2.2-1, 7.3.1.2.2-2, 7.3.1.2.2-3, 7.3.1.2.2-4 of 3GPP TS 38.212 */
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
2f3dab63
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
View file @
2f3dab63
...
@@ -370,7 +370,7 @@ void schedule_control_sib1(module_id_t module_id,
...
@@ -370,7 +370,7 @@ void schedule_control_sib1(module_id_t module_id,
// Calculate number of PRB_DMRS
// Calculate number of PRB_DMRS
uint8_t
N_PRB_DMRS
=
gNB_mac
->
sched_ctrlCommon
->
pdsch_semi_static
.
numDmrsCdmGrpsNoData
*
6
;
uint8_t
N_PRB_DMRS
=
gNB_mac
->
sched_ctrlCommon
->
pdsch_semi_static
.
numDmrsCdmGrpsNoData
*
6
;
uint16_t
dlDmrsSymbPos
=
fill_dmrs_mask
(
gNB_mac
->
sched_ctrlCommon
->
active_bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
,
gNB_mac
->
common_channels
->
ServingCellConfigCommon
->
dmrs_TypeA_Position
,
startSymbolIndex
+
nrOfSymbols
);
uint16_t
dlDmrsSymbPos
=
fill_dmrs_mask
(
gNB_mac
->
sched_ctrlCommon
->
active_bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
,
gNB_mac
->
common_channels
->
ServingCellConfigCommon
->
dmrs_TypeA_Position
,
nrOfSymbols
,
startSymbolIndex
);
uint16_t
dmrs_length
=
get_num_dmrs
(
dlDmrsSymbPos
);
uint16_t
dmrs_length
=
get_num_dmrs
(
dlDmrsSymbPos
);
int
rbSize
=
0
;
int
rbSize
=
0
;
...
@@ -477,7 +477,7 @@ void nr_fill_nfapi_dl_sib1_pdu(int Mod_idP,
...
@@ -477,7 +477,7 @@ void nr_fill_nfapi_dl_sib1_pdu(int Mod_idP,
pdsch_pdu_rel15
->
StartSymbolIndex
=
StartSymbolIndex
;
pdsch_pdu_rel15
->
StartSymbolIndex
=
StartSymbolIndex
;
pdsch_pdu_rel15
->
NrOfSymbols
=
NrOfSymbols
;
pdsch_pdu_rel15
->
NrOfSymbols
=
NrOfSymbols
;
pdsch_pdu_rel15
->
dlDmrsSymbPos
=
fill_dmrs_mask
(
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
,
scc
->
dmrs_TypeA_Position
,
pdsch_pdu_rel15
->
StartSymbolIndex
+
pdsch_pdu_rel15
->
NrOfSymbols
);
pdsch_pdu_rel15
->
dlDmrsSymbPos
=
fill_dmrs_mask
(
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
,
scc
->
dmrs_TypeA_Position
,
pdsch_pdu_rel15
->
NrOfSymbols
,
pdsch_pdu_rel15
->
StartSymbolIndex
);
LOG_D
(
MAC
,
"dlDmrsSymbPos = 0x%x
\n
"
,
pdsch_pdu_rel15
->
dlDmrsSymbPos
);
LOG_D
(
MAC
,
"dlDmrsSymbPos = 0x%x
\n
"
,
pdsch_pdu_rel15
->
dlDmrsSymbPos
);
...
@@ -603,7 +603,7 @@ void schedule_nr_sib1(module_id_t module_idP, frame_t frameP, sub_frame_t slotP)
...
@@ -603,7 +603,7 @@ void schedule_nr_sib1(module_id_t module_idP, frame_t frameP, sub_frame_t slotP)
// Calculate number of PRB_DMRS
// Calculate number of PRB_DMRS
uint8_t
N_PRB_DMRS
=
gNB_mac
->
sched_ctrlCommon
->
pdsch_semi_static
.
numDmrsCdmGrpsNoData
*
6
;
uint8_t
N_PRB_DMRS
=
gNB_mac
->
sched_ctrlCommon
->
pdsch_semi_static
.
numDmrsCdmGrpsNoData
*
6
;
uint16_t
dlDmrsSymbPos
=
fill_dmrs_mask
(
gNB_mac
->
sched_ctrlCommon
->
active_bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
,
uint16_t
dlDmrsSymbPos
=
fill_dmrs_mask
(
gNB_mac
->
sched_ctrlCommon
->
active_bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
,
gNB_mac
->
common_channels
->
ServingCellConfigCommon
->
dmrs_TypeA_Position
,
startSymbolIndex
+
nrOfSymbols
);
gNB_mac
->
common_channels
->
ServingCellConfigCommon
->
dmrs_TypeA_Position
,
startSymbolIndex
,
nrOfSymbols
);
uint16_t
dmrs_length
=
get_num_dmrs
(
dlDmrsSymbPos
);
uint16_t
dmrs_length
=
get_num_dmrs
(
dlDmrsSymbPos
);
const
uint32_t
TBS
=
nr_compute_tbs
(
nr_get_Qm_dl
(
gNB_mac
->
sched_ctrlCommon
->
sched_pdsch
.
mcs
,
gNB_mac
->
sched_ctrlCommon
->
pdsch_semi_static
.
mcsTableIdx
),
const
uint32_t
TBS
=
nr_compute_tbs
(
nr_get_Qm_dl
(
gNB_mac
->
sched_ctrlCommon
->
sched_pdsch
.
mcs
,
gNB_mac
->
sched_ctrlCommon
->
pdsch_semi_static
.
mcsTableIdx
),
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
2f3dab63
...
@@ -378,6 +378,33 @@ int nr_write_ce_dlsch_pdu(module_id_t module_idP,
...
@@ -378,6 +378,33 @@ int nr_write_ce_dlsch_pdu(module_id_t module_idP,
return
offset
;
return
offset
;
}
}
void
getStartNrOfSymbols
(
NR_BWP_Downlink_t
*
bwp
,
int
tda
,
int
*
startSymbol
,
int
*
nrOfSymbols
)
{
struct
NR_PDSCH_TimeDomainResourceAllocationList
*
tdaList
=
bwp
->
bwp_Common
->
pdsch_ConfigCommon
->
choice
.
setup
->
pdsch_TimeDomainAllocationList
;
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
,
startSymbol
,
nrOfSymbols
);
}
nfapi_nr_dmrs_type_e
getDmrsConfigType
(
NR_BWP_Downlink_t
*
bwp
)
{
return
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_Type
==
NULL
?
0
:
1
;
}
uint8_t
getN_PRB_DMRS
(
NR_BWP_Downlink_t
*
bwp
,
int
numDmrsCdmGrpsNoData
)
{
const
nfapi_nr_dmrs_type_e
dmrsConfigType
=
getDmrsConfigType
(
bwp
);
if
(
dmrsConfigType
==
NFAPI_NR_DMRS_TYPE1
)
{
// if no data in dmrs cdm group is 1 only even REs have no data
// if no data in dmrs cdm group is 2 both odd and even REs have no data
return
numDmrsCdmGrpsNoData
*
6
;
}
else
{
return
numDmrsCdmGrpsNoData
*
4
;
}
}
#define BLER_UPDATE_FRAME 10
#define BLER_UPDATE_FRAME 10
#define BLER_TARGET 0.10f
#define BLER_TARGET 0.10f
#define BLER_THRESHOLD 0.03f
#define BLER_THRESHOLD 0.03f
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
View file @
2f3dab63
...
@@ -164,7 +164,8 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
...
@@ -164,7 +164,8 @@ void nr_schedule_css_dlsch_phytest(module_id_t module_idP,
pdsch_pdu_rel15
->
NrOfSymbols
=
NrOfSymbols
;
pdsch_pdu_rel15
->
NrOfSymbols
=
NrOfSymbols
;
pdsch_pdu_rel15
->
dlDmrsSymbPos
=
fill_dmrs_mask
(
NULL
,
pdsch_pdu_rel15
->
dlDmrsSymbPos
=
fill_dmrs_mask
(
NULL
,
scc
->
dmrs_TypeA_Position
,
scc
->
dmrs_TypeA_Position
,
NrOfSymbols
);
NrOfSymbols
,
StartSymbolIndex
);
/*
/*
AssertFatal(k0==0,"k0 is not zero for Initial DL BWP TimeDomain Alloc\n");
AssertFatal(k0==0,"k0 is not zero for Initial DL BWP TimeDomain Alloc\n");
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
2f3dab63
...
@@ -290,10 +290,14 @@ void nr_set_pdsch_semi_static(const NR_ServingCellConfigCommon_t *scc,
...
@@ -290,10 +290,14 @@ void nr_set_pdsch_semi_static(const NR_ServingCellConfigCommon_t *scc,
// if no data in dmrs cdm group is 1 only even REs have no data
// if no data in dmrs cdm group is 1 only even REs have no data
// if no data in dmrs cdm group is 2 both odd and even REs have no data
// if no data in dmrs cdm group is 2 both odd and even REs have no data
ps
->
N_PRB_DMRS
=
num_dmrs_cdm_grps_no_data
*
(
ps
->
dmrsConfigType
==
NFAPI_NR_DMRS_TYPE1
?
6
:
4
);
ps
->
N_PRB_DMRS
=
num_dmrs_cdm_grps_no_data
*
(
ps
->
dmrsConfigType
==
NFAPI_NR_DMRS_TYPE1
?
6
:
4
);
ps
->
N_DMRS_SLOT
=
ps
->
N_DMRS_SLOT
=
get_num_dmrs_symbols
(
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
,
get_num_dmrs_symbols
(
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
,
scc
->
dmrs_TypeA_Position
,
ps
->
nrOfSymbols
);
scc
->
dmrs_TypeA_Position
,
ps
->
dl_dmrs_symb_pos
=
ps
->
nrOfSymbols
,
fill_dmrs_mask
(
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
,
scc
->
dmrs_TypeA_Position
,
ps
->
nrOfSymbols
);
ps
->
startSymbolIndex
);
ps
->
dl_dmrs_symb_pos
=
fill_dmrs_mask
(
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
,
scc
->
dmrs_TypeA_Position
,
ps
->
nrOfSymbols
,
ps
->
startSymbolIndex
);
}
}
void
nr_set_pusch_semi_static
(
const
NR_ServingCellConfigCommon_t
*
scc
,
void
nr_set_pusch_semi_static
(
const
NR_ServingCellConfigCommon_t
*
scc
,
...
...
openair2/RRC/NR/rrc_gNB_reconfig.c
View file @
2f3dab63
...
@@ -71,8 +71,8 @@ void fill_default_initialDownlinkBWP(NR_BWP_Downlink_t *bwp, NR_ServingCellConfi
...
@@ -71,8 +71,8 @@ void fill_default_initialDownlinkBWP(NR_BWP_Downlink_t *bwp, NR_ServingCellConfi
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
scramblingID0
=
NULL
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
scramblingID0
=
NULL
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
scramblingID1
=
NULL
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
scramblingID1
=
NULL
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
phaseTrackingRS
=
NULL
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
phaseTrackingRS
=
NULL
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_AdditionalPosition
=
calloc
(
1
,
sizeof
(
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_AdditionalPosition
));
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_AdditionalPosition
=
NULL
;
//
calloc(1,sizeof(*bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition));
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_AdditionalPosition
=
NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos0
;
//*bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition = NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos1
;
}
}
void
fill_default_coresetZero
(
NR_ControlResourceSet_t
*
coreset0
,
NR_ServingCellConfigCommon_t
*
servingcellconfigcommon
)
{
void
fill_default_coresetZero
(
NR_ControlResourceSet_t
*
coreset0
,
NR_ServingCellConfigCommon_t
*
servingcellconfigcommon
)
{
...
@@ -299,8 +299,8 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
...
@@ -299,8 +299,8 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
scramblingID1
=
NULL
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
scramblingID1
=
NULL
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
phaseTrackingRS
=
NULL
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
phaseTrackingRS
=
NULL
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_AdditionalPosition
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_AdditionalPosition
));
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_AdditionalPosition
=
NULL
;
//
calloc(1,sizeof(*secondaryCellGroup->spCellConfig->spCellConfigDedicated->initialDownlinkBWP->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition));
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_AdditionalPosition
=
NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos0
;
//*secondaryCellGroup->spCellConfig->spCellConfigDedicated->initialDownlinkBWP->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition = NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos1
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
tci_StatesToAddModList
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
tci_StatesToAddModList
));
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
tci_StatesToAddModList
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
tci_StatesToAddModList
));
...
@@ -646,8 +646,8 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
...
@@ -646,8 +646,8 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
if
(
!
servingcellconfigdedicated
)
{
if
(
!
servingcellconfigdedicated
)
{
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
phaseTrackingRS
=
NULL
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
phaseTrackingRS
=
NULL
;
}
}
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_AdditionalPosition
=
calloc
(
1
,
sizeof
(
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_AdditionalPosition
));
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_AdditionalPosition
=
NULL
;
//
calloc(1,sizeof(*bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition));
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
dmrs_DownlinkForPDSCH_MappingTypeA
->
choice
.
setup
->
dmrs_AdditionalPosition
=
NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos0
;
//*bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_AdditionalPosition = NR_DMRS_DownlinkConfig__dmrs_AdditionalPosition_pos1
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
tci_StatesToAddModList
=
calloc
(
1
,
sizeof
(
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
tci_StatesToAddModList
));
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
tci_StatesToAddModList
=
calloc
(
1
,
sizeof
(
*
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
tci_StatesToAddModList
));
...
...
targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb.conf
View file @
2f3dab63
...
@@ -249,7 +249,7 @@ RUs = (
...
@@ -249,7 +249,7 @@ RUs = (
max_pdschReferenceSignalPower
= -
27
;
max_pdschReferenceSignalPower
= -
27
;
max_rxgain
=
114
;
max_rxgain
=
114
;
eNB_instances
= [
0
];
eNB_instances
= [
0
];
clock_src
=
"external"
;
#
clock_src = "external";
}
}
);
);
...
...
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