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
zzha zzha
OpenXG-RAN
Commits
8c5cf098
Commit
8c5cf098
authored
Sep 29, 2022
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
addressing review
parent
ef701be8
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
19 deletions
+16
-19
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+12
-15
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
+2
-2
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
View file @
8c5cf098
...
@@ -236,7 +236,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
...
@@ -236,7 +236,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
nr_schedule_ue_spec
(
module_idP
,
frame
,
slot
);
nr_schedule_ue_spec
(
module_idP
,
frame
,
slot
);
stop_meas
(
&
gNB
->
schedule_dlsch
);
stop_meas
(
&
gNB
->
schedule_dlsch
);
nr_sr_reporting
(
RC
.
nrmac
[
module_idP
],
frame
,
slot
,
module_idP
);
nr_sr_reporting
(
RC
.
nrmac
[
module_idP
],
frame
,
slot
);
nr_schedule_pucch
(
RC
.
nrmac
[
module_idP
],
frame
,
slot
);
nr_schedule_pucch
(
RC
.
nrmac
[
module_idP
],
frame
,
slot
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
8c5cf098
...
@@ -1099,8 +1099,8 @@ int nr_acknack_scheduling(int mod_id,
...
@@ -1099,8 +1099,8 @@ int nr_acknack_scheduling(int mod_id,
if
(
curr_pucch
->
active
&&
if
(
curr_pucch
->
active
&&
curr_pucch
->
frame
==
pucch_frame
&&
curr_pucch
->
frame
==
pucch_frame
&&
curr_pucch
->
ul_slot
==
pucch_slot
)
{
curr_pucch
->
ul_slot
==
pucch_slot
)
{
LOG_D
(
NR_MAC
,
"
In %s:
pucch_acknak DL %4d.%2d, UL_ACK %4d.%2d Bits already in current PUCCH: DAI_C %d CSI %d
\n
"
,
LOG_D
(
NR_MAC
,
"pucch_acknak DL %4d.%2d, UL_ACK %4d.%2d Bits already in current PUCCH: DAI_C %d CSI %d
\n
"
,
__FUNCTION__
,
frame
,
slot
,
pucch_frame
,
pucch_slot
,
curr_pucch
->
dai_c
,
curr_pucch
->
csi_bits
);
frame
,
slot
,
pucch_frame
,
pucch_slot
,
curr_pucch
->
dai_c
,
curr_pucch
->
csi_bits
);
// we can't schedule if short pucch is already full
// we can't schedule if short pucch is already full
if
(
curr_pucch
->
csi_bits
==
0
&&
if
(
curr_pucch
->
csi_bits
==
0
&&
curr_pucch
->
dai_c
==
2
)
curr_pucch
->
dai_c
==
2
)
...
@@ -1117,8 +1117,8 @@ int nr_acknack_scheduling(int mod_id,
...
@@ -1117,8 +1117,8 @@ int nr_acknack_scheduling(int mod_id,
// no need to check VRB occupation because already done when PUCCH has been activated
// no need to check VRB occupation because already done when PUCCH has been activated
curr_pucch
->
timing_indicator
=
f
;
curr_pucch
->
timing_indicator
=
f
;
curr_pucch
->
dai_c
++
;
curr_pucch
->
dai_c
++
;
LOG_D
(
NR_MAC
,
"
In %s:
DL %4d.%2d, UL_ACK %4d.%2d Scheduling ACK/NACK in PUCCH %d with timing indicator %d DAI %d CSI %d
\n
"
,
LOG_D
(
NR_MAC
,
"DL %4d.%2d, UL_ACK %4d.%2d Scheduling ACK/NACK in PUCCH %d with timing indicator %d DAI %d CSI %d
\n
"
,
__FUNCTION__
,
frame
,
slot
,
curr_pucch
->
frame
,
curr_pucch
->
ul_slot
,
i
,
f
,
curr_pucch
->
dai_c
,
curr_pucch
->
csi_bits
);
frame
,
slot
,
curr_pucch
->
frame
,
curr_pucch
->
ul_slot
,
i
,
f
,
curr_pucch
->
dai_c
,
curr_pucch
->
csi_bits
);
return
i
;
// index of current PUCCH structure
return
i
;
// index of current PUCCH structure
}
}
else
if
(
!
curr_pucch
->
active
)
else
if
(
!
curr_pucch
->
active
)
...
@@ -1137,8 +1137,8 @@ int nr_acknack_scheduling(int mod_id,
...
@@ -1137,8 +1137,8 @@ int nr_acknack_scheduling(int mod_id,
bwp_start
,
bwp_start
,
bwp_size
);
bwp_size
);
if
(
!
ret
)
{
if
(
!
ret
)
{
LOG_D
(
NR_MAC
,
"
In %s:
DL %4d.%2d, UL_ACK %4d.%2d PRB resources for this occasion are already occupied, move to the following occasion
\n
"
,
LOG_D
(
NR_MAC
,
"DL %4d.%2d, UL_ACK %4d.%2d PRB resources for this occasion are already occupied, move to the following occasion
\n
"
,
__FUNCTION__
,
frame
,
slot
,
curr_pucch
->
frame
,
curr_pucch
->
ul_slot
);
frame
,
slot
,
curr_pucch
->
frame
,
curr_pucch
->
ul_slot
);
continue
;
continue
;
}
}
// allocating a new PUCCH structure for this occasion
// allocating a new PUCCH structure for this occasion
...
@@ -1150,30 +1150,27 @@ int nr_acknack_scheduling(int mod_id,
...
@@ -1150,30 +1150,27 @@ int nr_acknack_scheduling(int mod_id,
curr_pucch
->
resource_indicator
=
0
;
// each UE has dedicated PUCCH resources
curr_pucch
->
resource_indicator
=
0
;
// each UE has dedicated PUCCH resources
curr_pucch
->
r_pucch
=
r_pucch
;
curr_pucch
->
r_pucch
=
r_pucch
;
LOG_D
(
NR_MAC
,
"
In %s:
DL %4d.%2d, UL_ACK %4d.%2d Scheduling ACK/NACK in PUCCH %d with timing indicator %d DAI %d
\n
"
,
LOG_D
(
NR_MAC
,
"DL %4d.%2d, UL_ACK %4d.%2d Scheduling ACK/NACK in PUCCH %d with timing indicator %d DAI %d
\n
"
,
__FUNCTION__
,
frame
,
slot
,
curr_pucch
->
frame
,
curr_pucch
->
ul_slot
,
inactive_pucch
,
f
,
curr_pucch
->
dai_c
);
frame
,
slot
,
curr_pucch
->
frame
,
curr_pucch
->
ul_slot
,
inactive_pucch
,
f
,
curr_pucch
->
dai_c
);
// blocking resources for current PUCCH in VRB map
// blocking resources for current PUCCH in VRB map
for
(
int
l
=
0
;
l
<
curr_pucch
->
nr_of_symb
;
l
++
)
{
for
(
int
l
=
0
;
l
<
curr_pucch
->
nr_of_symb
;
l
++
)
{
uint16_t
symb
=
SL_to_bitmap
(
curr_pucch
->
start_symb
+
l
,
1
);
uint16_t
symb
=
SL_to_bitmap
(
curr_pucch
->
start_symb
+
l
,
1
);
int
prb
;
int
prb
=
curr_pucch
->
prb_start
;
if
(
l
==
1
&&
curr_pucch
->
second_hop_prb
!=
0
)
if
(
l
==
1
&&
curr_pucch
->
second_hop_prb
!=
0
)
prb
=
curr_pucch
->
second_hop_prb
;
prb
=
curr_pucch
->
second_hop_prb
;
else
prb
=
curr_pucch
->
prb_start
;
vrb_map_UL
[
bwp_start
+
prb
]
|=
symb
;
vrb_map_UL
[
bwp_start
+
prb
]
|=
symb
;
}
}
return
inactive_pucch
;
// index of current PUCCH structure
return
inactive_pucch
;
// index of current PUCCH structure
}
}
}
}
LOG_D
(
NR_MAC
,
"In %s: DL %4d.%2d, Couldn't find scheduling occasion for this HARQ process
\n
"
,
LOG_D
(
NR_MAC
,
"DL %4d.%2d, Couldn't find scheduling occasion for this HARQ process
\n
"
,
frame
,
slot
);
__FUNCTION__
,
frame
,
slot
);
return
-
1
;
return
-
1
;
}
}
void
nr_sr_reporting
(
gNB_MAC_INST
*
nrmac
,
frame_t
SFN
,
sub_frame_t
slot
,
int
mod_id
)
void
nr_sr_reporting
(
gNB_MAC_INST
*
nrmac
,
frame_t
SFN
,
sub_frame_t
slot
)
{
{
if
(
!
is_xlsch_in_slot
(
nrmac
->
ulsch_slot_bitmap
[
slot
/
64
],
slot
))
if
(
!
is_xlsch_in_slot
(
nrmac
->
ulsch_slot_bitmap
[
slot
/
64
],
slot
))
return
;
return
;
...
@@ -1232,7 +1229,7 @@ void nr_sr_reporting(gNB_MAC_INST *nrmac, frame_t SFN, sub_frame_t slot, int mod
...
@@ -1232,7 +1229,7 @@ void nr_sr_reporting(gNB_MAC_INST *nrmac, frame_t SFN, sub_frame_t slot, int mod
}
}
AssertFatal
(
found
||
free_pucch
>-
1
,
"Coulnd't find an available PUCCH resource to schedule SR
\n
"
);
AssertFatal
(
found
||
free_pucch
>-
1
,
"Coulnd't find an available PUCCH resource to schedule SR
\n
"
);
if
(
!
found
)
{
if
(
!
found
)
{
uint16_t
*
vrb_map_UL
=
&
RC
.
nrmac
[
mod_id
]
->
common_channels
[
CC_id
].
vrb_map_UL
[
slot
*
MAX_BWP_SIZE
];
uint16_t
*
vrb_map_UL
=
&
nrmac
->
common_channels
[
CC_id
].
vrb_map_UL
[
slot
*
MAX_BWP_SIZE
];
int
bwp_start
=
ul_bwp
->
BWPStart
;
int
bwp_start
=
ul_bwp
->
BWPStart
;
int
bwp_size
=
ul_bwp
->
BWPSize
;
int
bwp_size
=
ul_bwp
->
BWPSize
;
NR_sched_pucch_t
*
sched_sr
=
&
sched_ctrl
->
sched_pucch
[
free_pucch
];
NR_sched_pucch_t
*
sched_sr
=
&
sched_ctrl
->
sched_pucch
[
free_pucch
];
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
8c5cf098
...
@@ -493,7 +493,7 @@ int get_mcs_from_bler(const NR_bler_options_t *bler_options,
...
@@ -493,7 +493,7 @@ int get_mcs_from_bler(const NR_bler_options_t *bler_options,
void
UL_tti_req_ahead_initialization
(
gNB_MAC_INST
*
gNB
,
NR_ServingCellConfigCommon_t
*
scc
,
int
n
,
int
CCid
);
void
UL_tti_req_ahead_initialization
(
gNB_MAC_INST
*
gNB
,
NR_ServingCellConfigCommon_t
*
scc
,
int
n
,
int
CCid
);
void
nr_sr_reporting
(
gNB_MAC_INST
*
nrmac
,
frame_t
frameP
,
sub_frame_t
slotP
,
int
mod_id
);
void
nr_sr_reporting
(
gNB_MAC_INST
*
nrmac
,
frame_t
frameP
,
sub_frame_t
slotP
);
size_t
dump_mac_stats
(
gNB_MAC_INST
*
gNB
,
char
*
output
,
size_t
strlen
,
bool
reset_rsrp
);
size_t
dump_mac_stats
(
gNB_MAC_INST
*
gNB
,
char
*
output
,
size_t
strlen
,
bool
reset_rsrp
);
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
8c5cf098
...
@@ -563,8 +563,8 @@ typedef struct {
...
@@ -563,8 +563,8 @@ typedef struct {
int
cce_index
;
int
cce_index
;
uint8_t
aggregation_level
;
uint8_t
aggregation_level
;
///
PUCCH scheduling information. Array of two: HARQ+SR in the first field,
///
Array of PUCCH scheduling information.
///
CSI in second. This order is important for nr_acknack_scheduling()!
///
Its size depends on TDD configuration and max feedback time
NR_sched_pucch_t
*
sched_pucch
;
NR_sched_pucch_t
*
sched_pucch
;
int
sched_pucch_size
;
int
sched_pucch_size
;
...
...
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