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
b3e18641
Commit
b3e18641
authored
Sep 22, 2022
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix for scheduling msg3 without mixed slot and to avoid scheduling SR using pucch-ResourceCommon
parent
00024639
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
47 deletions
+35
-47
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+6
-18
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+11
-14
openair2/RRC/NR/nr_rrc_config.c
openair2/RRC/NR/nr_rrc_config.c
+17
-14
No files found.
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
b3e18641
...
...
@@ -1550,6 +1550,7 @@ void nr_ue_configure_pucch(NR_UE_MAC_INST_t *mac,
LOG_D
(
NR_MAC
,
"initial_pucch_id %d, pucch_resource %p
\n
"
,
pucch
->
initial_pucch_id
,
pucch
->
pucch_resource
);
// configure pucch from Table 9.2.1-1
// only for ack/nack
if
(
pucch
->
initial_pucch_id
>
-
1
&&
pucch
->
pucch_resource
==
NULL
)
{
...
...
@@ -1582,25 +1583,12 @@ void nr_ue_configure_pucch(NR_UE_MAC_INST_t *mac,
pucch_pdu
->
freq_hop_flag
=
1
;
pucch_pdu
->
time_domain_occ_idx
=
0
;
if
(
O_SR
==
0
||
pucch
->
sr_payload
==
0
)
{
/* only ack is transmitted TS 36.213 9.2.3 UE procedure for reporting HARQ-ACK */
if
(
O_ACK
==
1
)
pucch_pdu
->
mcs
=
sequence_cyclic_shift_1_harq_ack_bit
[
pucch
->
ack_payload
&
0x1
];
/* only harq of 1 bit */
else
pucch_pdu
->
mcs
=
sequence_cyclic_shift_2_harq_ack_bits
[
pucch
->
ack_payload
&
0x3
];
/* only harq with 2 bits */
}
else
{
/* SR + eventually ack are transmitted TS 36.213 9.2.5.1 UE procedure for multiplexing HARQ-ACK or CSI and SR */
if
(
pucch
->
sr_payload
==
1
)
{
/* positive scheduling request */
if
(
O_ACK
==
1
)
pucch_pdu
->
mcs
=
sequence_cyclic_shift_1_harq_ack_bit_positive_sr
[
pucch
->
ack_payload
&
0x1
];
/* positive SR and harq of 1 bit */
else
if
(
O_ACK
==
2
)
pucch_pdu
->
mcs
=
sequence_cyclic_shift_2_harq_ack_bits_positive_sr
[
pucch
->
ack_payload
&
0x3
];
/* positive SR and harq with 2 bits */
else
pucch_pdu
->
mcs
=
0
;
/* only positive SR */
}
}
if
(
O_ACK
==
1
)
pucch_pdu
->
mcs
=
sequence_cyclic_shift_1_harq_ack_bit
[
pucch
->
ack_payload
&
0x1
];
/* only harq of 1 bit */
else
pucch_pdu
->
mcs
=
sequence_cyclic_shift_2_harq_ack_bits
[
pucch
->
ack_payload
&
0x3
];
/* only harq with 2 bits */
// TODO verify if SR can be transmitted in this mode
pucch_pdu
->
payload
=
(
pucch
->
sr_payload
<<
O_ACK
)
|
pucch
->
ack_payload
;
pucch_pdu
->
payload
=
pucch
->
ack_payload
;
}
else
if
(
pucch
->
pucch_resource
!=
NULL
)
{
...
...
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
b3e18641
...
...
@@ -514,7 +514,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
if
(
tdd
)
{
nr_ulstart_slot
=
tdd
->
nrofDownlinkSlots
+
(
tdd
->
nrofUplinkSymbols
==
0
);
nr_dl_slots
=
tdd
->
nrofDownlinkSlots
+
(
tdd
->
nrofDownlinkSymbols
!=
0
);
nr_ulstart_slot
=
tdd
->
nrofDownlinkSlots
+
(
tdd
->
nrofUplinkSymbols
==
0
)
;
nr_ulstart_slot
=
tdd
->
nrofDownlinkSlots
;
nr_slots_period
/=
get_nb_periods_per_frame
(
tdd
->
dl_UL_TransmissionPeriodicity
);
}
else
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
b3e18641
...
...
@@ -894,7 +894,8 @@ void nr_get_Msg3alloc(module_id_t module_id,
const
int
n_slots_frame
=
nr_slots_per_frame
[
mu
];
uint8_t
k2
=
0
;
if
(
frame_type
==
TDD
)
{
int
nb_periods_per_frame
=
get_nb_periods_per_frame
(
scc
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
dl_UL_TransmissionPeriodicity
);
const
int
first_ul_slot_period
=
tdd
->
nrofDownlinkSlots
;
int
nb_periods_per_frame
=
get_nb_periods_per_frame
(
tdd
->
dl_UL_TransmissionPeriodicity
);
int
nb_slots_per_period
=
((
1
<<
mu
)
*
10
)
/
nb_periods_per_frame
;
for
(
int
i
=
0
;
i
<
pusch_TimeDomainAllocationList
->
list
.
count
;
i
++
)
{
startSymbolAndLength
=
pusch_TimeDomainAllocationList
->
list
.
array
[
i
]
->
startSymbolAndLength
;
...
...
@@ -903,19 +904,15 @@ void nr_get_Msg3alloc(module_id_t module_id,
int
start_symbol_index
,
nr_of_symbols
;
SLIV2SL
(
pusch_TimeDomainAllocationList
->
list
.
array
[
i
]
->
startSymbolAndLength
,
&
start_symbol_index
,
&
nr_of_symbols
);
LOG_D
(
NR_MAC
,
"Checking Msg3 TDA %d : k2 %d, sliv %d,S %d L %d
\n
"
,
i
,(
int
)
k2
,(
int
)
pusch_TimeDomainAllocationList
->
list
.
array
[
i
]
->
startSymbolAndLength
,
start_symbol_index
,
nr_of_symbols
);
// we want to transmit in the uplink symbols of mixed slot AND assuming Msg2 was in the mixed slot
if
((
k2
+
DELTA
[
mu
])
%
nb_slots_per_period
==
0
)
{
temp_slot
=
current_slot
+
k2
+
DELTA
[
mu
];
// msg3 slot according to 8.3 in 38.213
ra
->
Msg3_slot
=
temp_slot
%
nr_slots_per_frame
[
mu
];
if
(
is_xlsch_in_slot
(
RC
.
nrmac
[
module_id
]
->
ulsch_slot_bitmap
[
ra
->
Msg3_slot
/
64
],
ra
->
Msg3_slot
)
&&
nr_of_symbols
<=
scc
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
nrofUplinkSymbols
&&
start_symbol_index
>=
(
14
-
scc
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
.
nrofUplinkSymbols
))
{
ra
->
Msg3_tda_id
=
i
;
ra
->
msg3_startsymb
=
StartSymbolIndex
;
ra
->
msg3_nrsymb
=
NrOfSymbols
;
break
;
}
// we want to transmit in the uplink symbols of mixed slot or the first uplink slot
temp_slot
=
(
current_slot
+
k2
+
DELTA
[
mu
])
%
nr_slots_per_frame
[
mu
];
// msg3 slot according to 8.3 in 38.213
if
((
temp_slot
%
nb_slots_per_period
)
==
first_ul_slot_period
&&
is_xlsch_in_slot
(
RC
.
nrmac
[
module_id
]
->
ulsch_slot_bitmap
[
temp_slot
/
64
],
temp_slot
))
{
ra
->
Msg3_tda_id
=
i
;
ra
->
msg3_startsymb
=
StartSymbolIndex
;
ra
->
msg3_nrsymb
=
NrOfSymbols
;
ra
->
Msg3_slot
=
temp_slot
;
break
;
}
}
AssertFatal
(
ra
->
Msg3_tda_id
<
16
,
"Couldn't find an appropriate TD allocation for Msg3
\n
"
);
...
...
openair2/RRC/NR/nr_rrc_config.c
View file @
b3e18641
...
...
@@ -584,21 +584,24 @@ void nr_rrc_config_ul_tda(NR_ServingCellConfigCommon_t *scc, int min_fb_delay){
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
);
}
// 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
));
int
no_mix_slot
=
ul_symb
==
0
?
1
:
0
;
*
pusch_timedomainresourceallocation_msg3
->
k2
=
nb_slots_per_period
-
DELTA
[
mu
]
+
no_mix_slot
;
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
;
if
(
no_mix_slot
)
pusch_timedomainresourceallocation_msg3
->
startSymbolAndLength
=
get_SLIV
(
0
,
13
);
// full allocation if there is no mixed slot
else
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