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
d3f90a90
Commit
d3f90a90
authored
Apr 07, 2022
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removing calculate_preferred_ul_tda
parent
276b2d5e
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
45 additions
and
172 deletions
+45
-172
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+1
-11
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+1
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+2
-3
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+14
-127
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+1
-1
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+0
-4
openair2/RRC/NR/nr_rrc_config.c
openair2/RRC/NR/nr_rrc_config.c
+25
-23
No files found.
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
d3f90a90
...
...
@@ -592,19 +592,9 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
if
(
CellGroup
)
{
const
NR_ServingCellConfig_t
*
servingCellConfig
=
NULL
;
if
(
CellGroup
->
spCellConfig
&&
CellGroup
->
spCellConfig
->
spCellConfigDedicated
)
{
if
(
CellGroup
->
spCellConfig
&&
CellGroup
->
spCellConfig
->
spCellConfigDedicated
)
servingCellConfig
=
CellGroup
->
spCellConfig
->
spCellConfigDedicated
;
const
struct
NR_UplinkConfig__uplinkBWP_ToAddModList
*
ubwpList
=
servingCellConfig
->
uplinkConfig
->
uplinkBWP_ToAddModList
;
if
(
ubwpList
)
{
AssertFatal
(
ubwpList
->
list
.
count
>
0
,
"uplinkBWP_ToAddModList no BWPs!
\n
"
);
for
(
int
i
=
0
;
i
<
ubwpList
->
list
.
count
;
++
i
)
{
const
NR_BWP_Uplink_t
*
ubwp
=
ubwpList
->
list
.
array
[
i
];
calculate_preferred_ul_tda
(
Mod_idP
,
ubwp
);
}
}
}
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
Mod_idP
]
->
UE_info
;
if
(
add_ue
==
1
&&
get_softmodem_params
()
->
phy_test
)
{
const
int
UE_id
=
add_new_nr_ue
(
Mod_idP
,
rnti
,
CellGroup
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
d3f90a90
...
...
@@ -60,8 +60,7 @@ const int set_dl_tda(gNB_MAC_INST *nrmac, NR_ServingCellConfigCommon_t *scc, int
scc
->
tdd_UL_DL_ConfigurationCommon
?
&
scc
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
:
NULL
;
if
(
tdd
)
{
int
nr_mix_slots
=
tdd
->
nrofDownlinkSymbols
!=
0
;
// there are dl symbols in mixed slot
if
(
nr_mix_slots
!=
0
)
{
// if there is a mixed slot
if
(
tdd
->
nrofDownlinkSymbols
>
1
)
{
// if there is a mixed slot where we can transmit DL
int
nr_slots_period
=
n
/
get_nb_periods_per_frame
(
tdd
->
dl_UL_TransmissionPeriodicity
);
if
((
slot
%
nr_slots_period
)
==
tdd
->
nrofDownlinkSlots
)
return
1
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
View file @
d3f90a90
...
...
@@ -436,7 +436,7 @@ bool nr_ul_preprocessor_phytest(module_id_t module_id, frame_t frame, sub_frame_
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
const
int
tda
=
s
ched_ctrl
->
active_ubwp
?
RC
.
nrmac
[
module_id
]
->
preferred_ul_tda
[
sched_ctrl
->
active_ubwp
->
bwp_Id
][
slot
]
:
1
;
const
int
tda
=
s
et_ul_tda
(
nr_mac
,
scc
,
slot
)
;
if
(
tda
<
0
)
return
false
;
const
struct
NR_PUSCH_TimeDomainResourceAllocationList
*
tdaList
=
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
d3f90a90
...
...
@@ -2917,14 +2917,13 @@ void nr_mac_update_timers(module_id_t module_id,
cg
->
spCellConfig
->
spCellConfigDedicated
&&
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
?
cg
->
spCellConfig
->
spCellConfigDedicated
->
uplinkConfig
->
initialUplinkBWP
:
NULL
;
int
**
preferred_ul_tda
=
RC
.
nrmac
[
module_id
]
->
preferred_ul_tda
;
NR_pusch_semi_static_t
*
ups
=
&
sched_ctrl
->
pusch_semi_static
;
int
dci_format
=
get_dci_format
(
sched_ctrl
);
const
uint8_t
num_dmrs_cdm_grps_no_data
=
(
ubwp
||
ubwpd
)
?
1
:
2
;
const
uint8_t
nrOfLayers
=
1
;
const
int
utda
=
ubwp
&&
preferred_ul_tda
[
ubwp
->
bwp_Id
][
slot
]
>=
0
?
preferred_ul_tda
[
ubwp
->
bwp_Id
][
slot
]
:
(
ups
->
time_domain_allocation
>=
0
?
ups
->
time_domain_allocation
:
0
);
const
int
utda
=
set_ul_tda
(
RC
.
nrmac
[
module_id
],
scc
,
slot
);
nr_set_pusch_semi_static
(
sib1
,
scc
,
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
d3f90a90
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
d3f90a90
...
...
@@ -523,7 +523,7 @@ uint8_t set_dl_nrOfLayers(NR_UE_sched_ctrl_t *sched_ctrl);
int
get_dci_format
(
NR_UE_sched_ctrl_t
*
sched_ctrl
);
const
int
set_dl_tda
(
gNB_MAC_INST
*
nrmac
,
NR_ServingCellConfigCommon_t
*
scc
,
int
slot
);
void
calculate_preferred_ul_tda
(
module_id_t
module_id
,
const
NR_BWP_Uplink_t
*
ubwp
);
const
int
set_ul_tda
(
gNB_MAC_INST
*
nrmac
,
NR_ServingCellConfigCommon_t
*
scc
,
int
slot
);
bool
find_free_CCE
(
module_id_t
module_id
,
sub_frame_t
slot
,
int
UE_id
);
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
d3f90a90
...
...
@@ -809,10 +809,6 @@ typedef struct gNB_MAC_INST_s {
uint64_t
dlsch_slot_bitmap
[
3
];
/// bitmap of ULSCH slots, can hold up to 160 slots
uint64_t
ulsch_slot_bitmap
[
3
];
/// Lookup for preferred time domain allocation for UL BWP, dynamically
/// allocated. The index refers to the DL slot, and the indicated TDA's k2
/// points to the right UL slot
int
*
preferred_ul_tda
[
MAX_NUM_BWP
];
/// maximum number of slots before a UE will be scheduled ULSCH automatically
uint32_t
ulsch_max_frame_inactivity
;
...
...
openair2/RRC/NR/nr_rrc_config.c
View file @
d3f90a90
...
...
@@ -372,38 +372,40 @@ void nr_rrc_config_ul_tda(NR_ServingCellConfigCommon_t *scc, int min_fb_delay){
uint8_t
DELTA
[
4
]
=
{
2
,
3
,
4
,
6
};
// Delta parameter for Msg3
int
mu
=
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
genericParameters
.
subcarrierSpacing
;
// UL TDA index 0 is basic slot configuration starting in symbol 0 til the last but one symbol
struct
NR_PUSCH_TimeDomainResourceAllocation
*
pusch_timedomainresourceallocation
=
CALLOC
(
1
,
sizeof
(
struct
NR_PUSCH_TimeDomainResourceAllocation
));
pusch_timedomainresourceallocation
->
k2
=
CALLOC
(
1
,
sizeof
(
long
));
*
pusch_timedomainresourceallocation
->
k2
=
k2
;
pusch_timedomainresourceallocation
->
mappingType
=
NR_PUSCH_TimeDomainResourceAllocation__mappingType_typeB
;
pusch_timedomainresourceallocation
->
startSymbolAndLength
=
get_SLIV
(
0
,
13
);
// basic slot configuration starting in symbol 0 til the last but one symbol
pusch_timedomainresourceallocation
->
startSymbolAndLength
=
get_SLIV
(
0
,
13
);
ASN_SEQUENCE_ADD
(
&
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
pusch_ConfigCommon
->
choice
.
setup
->
pusch_TimeDomainAllocationList
->
list
,
pusch_timedomainresourceallocation
);
if
(
frame_type
==
TDD
)
{
// TDD
if
(
scc
->
tdd_UL_DL_ConfigurationCommon
)
{
int
ul_symb
=
scc
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
nrofUplinkSymbols
;
pusch_timedomainresourceallocation
=
CALLOC
(
1
,
sizeof
(
struct
NR_PUSCH_TimeDomainResourceAllocation
));
pusch_timedomainresourceallocation
->
k2
=
CALLOC
(
1
,
sizeof
(
long
));
*
pusch_timedomainresourceallocation
->
k2
=
k2
;
pusch_timedomainresourceallocation
->
mappingType
=
NR_PUSCH_TimeDomainResourceAllocation__mappingType_typeB
;
pusch_timedomainresourceallocation
->
startSymbolAndLength
=
get_SLIV
(
14
-
ul_symb
,
ul_symb
-
1
);
// starting in fist ul symbol til the last but one
ASN_SEQUENCE_ADD
(
&
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
pusch_ConfigCommon
->
choice
.
setup
->
pusch_TimeDomainAllocationList
->
list
,
pusch_timedomainresourceallocation
);
// for msg3 in the mixed slot
int
nb_periods_per_frame
=
get_nb_periods_per_frame
(
scc
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
dl_UL_TransmissionPeriodicity
);
int
nb_slots_per_period
=
((
1
<<
mu
)
*
10
)
/
nb_periods_per_frame
;
struct
NR_PUSCH_TimeDomainResourceAllocation
*
pusch_timedomainresourceallocation_msg3
=
CALLOC
(
1
,
sizeof
(
struct
NR_PUSCH_TimeDomainResourceAllocation
));
pusch_timedomainresourceallocation_msg3
->
k2
=
CALLOC
(
1
,
sizeof
(
long
));
*
pusch_timedomainresourceallocation_msg3
->
k2
=
nb_slots_per_period
-
DELTA
[
mu
];
if
(
*
pusch_timedomainresourceallocation_msg3
->
k2
<
min_fb_delay
)
*
pusch_timedomainresourceallocation_msg3
->
k2
+=
nb_slots_per_period
;
AssertFatal
(
*
pusch_timedomainresourceallocation_msg3
->
k2
<
33
,
"Computed k2 for msg3 %ld is larger than the range allowed by RRC (0..32)
\n
"
,
*
pusch_timedomainresourceallocation_msg3
->
k2
);
pusch_timedomainresourceallocation_msg3
->
mappingType
=
NR_PUSCH_TimeDomainResourceAllocation__mappingType_typeB
;
pusch_timedomainresourceallocation_msg3
->
startSymbolAndLength
=
get_SLIV
(
14
-
ul_symb
,
ul_symb
-
1
);
// starting in fist ul symbol til the last but one
ASN_SEQUENCE_ADD
(
&
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
pusch_ConfigCommon
->
choice
.
setup
->
pusch_TimeDomainAllocationList
->
list
,
pusch_timedomainresourceallocation_msg3
);
if
(
ul_symb
>
1
)
{
// UL TDA index 1 for mixed slot (TDD)
pusch_timedomainresourceallocation
=
CALLOC
(
1
,
sizeof
(
struct
NR_PUSCH_TimeDomainResourceAllocation
));
pusch_timedomainresourceallocation
->
k2
=
CALLOC
(
1
,
sizeof
(
long
));
*
pusch_timedomainresourceallocation
->
k2
=
k2
;
pusch_timedomainresourceallocation
->
mappingType
=
NR_PUSCH_TimeDomainResourceAllocation__mappingType_typeB
;
pusch_timedomainresourceallocation
->
startSymbolAndLength
=
get_SLIV
(
14
-
ul_symb
,
ul_symb
-
1
);
// starting in fist ul symbol til the last but one
ASN_SEQUENCE_ADD
(
&
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
pusch_ConfigCommon
->
choice
.
setup
->
pusch_TimeDomainAllocationList
->
list
,
pusch_timedomainresourceallocation
);
// UL TDA index 2 for msg3 in the mixed slot (TDD)
int
nb_periods_per_frame
=
get_nb_periods_per_frame
(
scc
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
dl_UL_TransmissionPeriodicity
);
int
nb_slots_per_period
=
((
1
<<
mu
)
*
10
)
/
nb_periods_per_frame
;
struct
NR_PUSCH_TimeDomainResourceAllocation
*
pusch_timedomainresourceallocation_msg3
=
CALLOC
(
1
,
sizeof
(
struct
NR_PUSCH_TimeDomainResourceAllocation
));
pusch_timedomainresourceallocation_msg3
->
k2
=
CALLOC
(
1
,
sizeof
(
long
));
*
pusch_timedomainresourceallocation_msg3
->
k2
=
nb_slots_per_period
-
DELTA
[
mu
];
if
(
*
pusch_timedomainresourceallocation_msg3
->
k2
<
min_fb_delay
)
*
pusch_timedomainresourceallocation_msg3
->
k2
+=
nb_slots_per_period
;
AssertFatal
(
*
pusch_timedomainresourceallocation_msg3
->
k2
<
33
,
"Computed k2 for msg3 %ld is larger than the range allowed by RRC (0..32)
\n
"
,
*
pusch_timedomainresourceallocation_msg3
->
k2
);
pusch_timedomainresourceallocation_msg3
->
mappingType
=
NR_PUSCH_TimeDomainResourceAllocation__mappingType_typeB
;
pusch_timedomainresourceallocation_msg3
->
startSymbolAndLength
=
get_SLIV
(
14
-
ul_symb
,
ul_symb
-
1
);
// starting in fist ul symbol til the last but one
ASN_SEQUENCE_ADD
(
&
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
pusch_ConfigCommon
->
choice
.
setup
->
pusch_TimeDomainAllocationList
->
list
,
pusch_timedomainresourceallocation_msg3
);
}
}
}
}
...
...
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