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
spbro
OpenXG-RAN
Commits
75c2f9e5
Commit
75c2f9e5
authored
Jul 31, 2023
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improving handling of tdd_UL_DL_ConfigurationCommon absence when checking DL or UL slot
parent
fe99f633
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
43 deletions
+43
-43
executables/nr-ue.c
executables/nr-ue.c
+2
-5
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+32
-27
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
+2
-2
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
+7
-9
No files found.
executables/nr-ue.c
View file @
75c2f9e5
...
...
@@ -328,9 +328,7 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
free_and_zero
(
ch_info
);
}
bool
default_dl
=
mac
->
tdd_UL_DL_ConfigurationCommon
?
false
:
true
;
if
(
default_dl
||
is_nr_DL_slot
(
mac
->
tdd_UL_DL_ConfigurationCommon
,
if
(
is_nr_DL_slot
(
mac
->
tdd_UL_DL_ConfigurationCommon
,
ul_info
.
slot_rx
))
{
memset
(
&
mac
->
dl_info
,
0
,
sizeof
(
mac
->
dl_info
));
mac
->
dl_info
.
cc_id
=
CC_id
;
...
...
@@ -345,8 +343,7 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
if
(
pthread_mutex_unlock
(
&
mac
->
mutex_dl_info
))
abort
();
if
(
!
default_dl
&&
is_nr_UL_slot
(
mac
->
tdd_UL_DL_ConfigurationCommon
,
if
(
is_nr_UL_slot
(
mac
->
tdd_UL_DL_ConfigurationCommon
,
ul_info
.
slot_tx
,
mac
->
frame_type
))
{
LOG_D
(
NR_MAC
,
"Slot %d. calling nr_ue_ul_ind()
\n
"
,
ul_info
.
slot_tx
);
nr_ue_ul_scheduler
(
&
ul_info
);
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
View file @
75c2f9e5
...
...
@@ -3635,12 +3635,12 @@ int ul_ant_bits(NR_DMRS_UplinkConfig_t *NR_DMRS_UplinkConfig, long transformPrec
int
tdd_period_to_num
[
8
]
=
{
500
,
625
,
1000
,
1250
,
2000
,
2500
,
5000
,
10000
};
int
is_nr_DL_slot
(
NR_TDD_UL_DL_ConfigCommon_t
*
tdd_UL_DL_ConfigurationCommon
,
slot_t
slot
)
{
int
period
,
period1
,
period2
=
0
;
if
(
tdd_UL_DL_ConfigurationCommon
==
NULL
)
return
(
1
);
bool
is_nr_DL_slot
(
NR_TDD_UL_DL_ConfigCommon_t
*
tdd_UL_DL_ConfigurationCommon
,
slot_t
slot
)
{
if
(
tdd_UL_DL_ConfigurationCommon
==
NULL
)
return
true
;
int
period1
,
period2
=
0
;
if
(
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
ext1
&&
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
ext1
->
dl_UL_TransmissionPeriodicity_v1530
)
period1
=
3000
+*
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
ext1
->
dl_UL_TransmissionPeriodicity_v1530
;
...
...
@@ -3650,49 +3650,54 @@ int is_nr_DL_slot(NR_TDD_UL_DL_ConfigCommon_t *tdd_UL_DL_ConfigurationCommon,slo
if
(
tdd_UL_DL_ConfigurationCommon
->
pattern2
)
{
if
(
tdd_UL_DL_ConfigurationCommon
->
pattern2
->
ext1
&&
tdd_UL_DL_ConfigurationCommon
->
pattern2
->
ext1
->
dl_UL_TransmissionPeriodicity_v1530
)
period2
=
3000
+
*
tdd_UL_DL_ConfigurationCommon
->
pattern2
->
ext1
->
dl_UL_TransmissionPeriodicity_v1530
;
period2
=
3000
+
*
tdd_UL_DL_ConfigurationCommon
->
pattern2
->
ext1
->
dl_UL_TransmissionPeriodicity_v1530
;
else
period2
=
tdd_period_to_num
[
tdd_UL_DL_ConfigurationCommon
->
pattern2
->
dl_UL_TransmissionPeriodicity
];
}
period
=
period1
+
period2
;
int
scs
=
tdd_UL_DL_ConfigurationCommon
->
referenceSubcarrierSpacing
;
int
slots
=
period
*
(
1
<<
scs
)
/
1000
;
int
slots1
=
period1
*
(
1
<<
scs
)
/
1000
;
int
period
=
period1
+
period2
;
int
scs
=
tdd_UL_DL_ConfigurationCommon
->
referenceSubcarrierSpacing
;
int
slots
=
period
*
(
1
<<
scs
)
/
1000
;
int
slots1
=
period1
*
(
1
<<
scs
)
/
1000
;
int
slot_in_period
=
slot
%
slots
;
if
(
slot_in_period
<
slots1
)
return
(
slot_in_period
<=
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
nrofDownlinkSlots
?
1
:
0
);
else
return
(
slot_in_period
<=
slots1
+
tdd_UL_DL_ConfigurationCommon
->
pattern2
->
nrofDownlinkSlots
?
1
:
0
);
if
(
slot_in_period
<
slots1
)
return
slot_in_period
<=
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
nrofDownlinkSlots
;
else
return
slot_in_period
<=
slots1
+
tdd_UL_DL_ConfigurationCommon
->
pattern2
->
nrofDownlinkSlots
;
}
int
is_nr_UL_slot
(
NR_TDD_UL_DL_ConfigCommon_t
*
tdd_UL_DL_ConfigurationCommon
,
slot_t
slot
,
frame_type_t
frame_type
)
{
int
period
,
period1
,
period2
=
0
;
bool
is_nr_UL_slot
(
NR_TDD_UL_DL_ConfigCommon_t
*
tdd_UL_DL_ConfigurationCommon
,
slot_t
slot
,
frame_type_t
frame_type
)
{
// Note: condition on frame_type
// goal: the UL scheduler assumes mode is TDD therefore this hack is needed to make FDD work
if
(
tdd_UL_DL_ConfigurationCommon
==
NULL
||
frame_type
==
FDD
)
{
return
(
1
);
}
if
(
frame_type
==
FDD
)
return
true
;
if
(
tdd_UL_DL_ConfigurationCommon
==
NULL
)
// before receiving TDD information all slots should be considered to be DL
return
false
;
int
period1
,
period2
=
0
;
if
(
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
ext1
&&
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
ext1
->
dl_UL_TransmissionPeriodicity_v1530
)
period1
=
3000
+
*
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
ext1
->
dl_UL_TransmissionPeriodicity_v1530
;
period1
=
3000
+
*
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
ext1
->
dl_UL_TransmissionPeriodicity_v1530
;
else
period1
=
tdd_period_to_num
[
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
dl_UL_TransmissionPeriodicity
];
if
(
tdd_UL_DL_ConfigurationCommon
->
pattern2
)
{
if
(
tdd_UL_DL_ConfigurationCommon
->
pattern2
->
ext1
&&
tdd_UL_DL_ConfigurationCommon
->
pattern2
->
ext1
->
dl_UL_TransmissionPeriodicity_v1530
)
period2
=
3000
+
*
tdd_UL_DL_ConfigurationCommon
->
pattern2
->
ext1
->
dl_UL_TransmissionPeriodicity_v1530
;
period2
=
3000
+
*
tdd_UL_DL_ConfigurationCommon
->
pattern2
->
ext1
->
dl_UL_TransmissionPeriodicity_v1530
;
else
period2
=
tdd_period_to_num
[
tdd_UL_DL_ConfigurationCommon
->
pattern2
->
dl_UL_TransmissionPeriodicity
];
}
period
=
period1
+
period2
;
int
scs
=
tdd_UL_DL_ConfigurationCommon
->
referenceSubcarrierSpacing
;
int
slots
=
period
*
(
1
<<
scs
)
/
1000
;
int
slots1
=
period1
*
(
1
<<
scs
)
/
1000
;
int
period
=
period1
+
period2
;
int
scs
=
tdd_UL_DL_ConfigurationCommon
->
referenceSubcarrierSpacing
;
int
slots
=
period
*
(
1
<<
scs
)
/
1000
;
int
slots1
=
period1
*
(
1
<<
scs
)
/
1000
;
int
slot_in_period
=
slot
%
slots
;
if
(
slot_in_period
<
slots1
)
return
(
slot_in_period
>=
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
nrofDownlinkSlots
?
1
:
0
);
else
return
(
slot_in_period
>=
slots1
+
tdd_UL_DL_ConfigurationCommon
->
pattern2
->
nrofDownlinkSlots
?
1
:
0
);
if
(
slot_in_period
<
slots1
)
return
slot_in_period
>=
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
nrofDownlinkSlots
;
else
return
slot_in_period
>=
slots1
+
tdd_UL_DL_ConfigurationCommon
->
pattern2
->
nrofDownlinkSlots
;
}
int16_t
fill_dmrs_mask
(
const
NR_PDSCH_Config_t
*
pdsch_Config
,
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
View file @
75c2f9e5
...
...
@@ -67,9 +67,9 @@ int16_t fill_dmrs_mask(const NR_PDSCH_Config_t *pdsch_Config,
mappingType_t
mappingtype
,
int
length
);
int
is_nr_DL_slot
(
NR_TDD_UL_DL_ConfigCommon_t
*
tdd_UL_DL_ConfigurationCommon
,
slot_t
slotP
);
bool
is_nr_DL_slot
(
NR_TDD_UL_DL_ConfigCommon_t
*
tdd_UL_DL_ConfigurationCommon
,
slot_t
slotP
);
int
is_nr_UL_slot
(
NR_TDD_UL_DL_ConfigCommon_t
*
tdd_UL_DL_ConfigurationCommon
,
slot_t
slotP
,
frame_type_t
frame_type
);
bool
is_nr_UL_slot
(
NR_TDD_UL_DL_ConfigCommon_t
*
tdd_UL_DL_ConfigurationCommon
,
slot_t
slotP
,
frame_type_t
frame_type
);
uint8_t
compute_srs_resource_indicator
(
NR_PUSCH_ServingCellConfig_t
*
pusch_servingcellconfig
,
NR_PUSCH_Config_t
*
pusch_Config
,
...
...
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
View file @
75c2f9e5
...
...
@@ -742,19 +742,17 @@ void check_and_process_dci(nfapi_nr_dl_tti_request_t *dl_tti_request,
int
slots_per_frame
=
20
;
//30 kHZ subcarrier spacing
int
slot_ahead
=
2
;
// TODO: Make this dynamic
if
(
mac
->
tdd_UL_DL_ConfigurationCommon
)
{
if
(
is_nr_UL_slot
(
mac
->
tdd_UL_DL_ConfigurationCommon
,
(
slot
+
slot_ahead
)
%
slots_per_frame
,
mac
->
frame_type
)
&&
mac
->
ra
.
ra_state
!=
RA_SUCCEEDED
)
{
// If we filled dl_info AFTER we got the slot indication, we want to check if we should fill tx_req:
nr_uplink_indication_t
ul_info
=
{
if
(
is_nr_UL_slot
(
mac
->
tdd_UL_DL_ConfigurationCommon
,
(
slot
+
slot_ahead
)
%
slots_per_frame
,
mac
->
frame_type
)
&&
mac
->
ra
.
ra_state
!=
RA_SUCCEEDED
)
{
// If we filled dl_info AFTER we got the slot indication, we want to check if we should fill tx_req:
nr_uplink_indication_t
ul_info
=
{
.
frame_rx
=
frame
,
.
slot_rx
=
slot
,
.
slot_tx
=
(
slot
+
slot_ahead
)
%
slots_per_frame
,
.
frame_tx
=
(
ul_info
.
slot_rx
+
slot_ahead
>=
slots_per_frame
)
?
ul_info
.
frame_rx
+
1
:
ul_info
.
frame_rx
};
nr_ue_ul_scheduler
(
&
ul_info
);
}
nr_ue_ul_scheduler
(
&
ul_info
);
}
}
...
...
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