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
338426ed
Commit
338426ed
authored
Mar 13, 2024
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use NR_timer_t for SR-ProhibitTimer
parent
1cae1879
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
18 deletions
+15
-18
openair2/LAYER2/NR_MAC_UE/config_ue.c
openair2/LAYER2/NR_MAC_UE/config_ue.c
+7
-4
openair2/LAYER2/NR_MAC_UE/mac_defs.h
openair2/LAYER2/NR_MAC_UE/mac_defs.h
+2
-4
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
+1
-2
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+3
-8
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+2
-0
No files found.
openair2/LAYER2/NR_MAC_UE/config_ue.c
View file @
338426ed
...
...
@@ -1691,6 +1691,7 @@ static uint32_t nr_get_sf_periodicBSRTimer(long periodicBSR)
static
void
configure_maccellgroup
(
NR_UE_MAC_INST_t
*
mac
,
const
NR_MAC_CellGroupConfig_t
*
mcg
)
{
NR_UE_SCHEDULING_INFO
*
si
=
&
mac
->
scheduling_info
;
int
scs
=
mac
->
current_UL_BWP
->
scs
;
if
(
mcg
->
drx_Config
)
LOG_E
(
NR_MAC
,
"DRX not implemented! Configuration not handled!
\n
"
);
if
(
mcg
->
schedulingRequestConfig
)
{
...
...
@@ -1699,8 +1700,7 @@ static void configure_maccellgroup(NR_UE_MAC_INST_t *mac, const NR_MAC_CellGroup
for
(
int
i
=
0
;
i
<
src
->
schedulingRequestToReleaseList
->
list
.
count
;
i
++
)
{
if
(
*
src
->
schedulingRequestToReleaseList
->
list
.
array
[
i
]
==
si
->
sr_id
)
{
si
->
SR_COUNTER
=
0
;
si
->
sr_ProhibitTimer
=
0
;
si
->
sr_ProhibitTimer_Running
=
0
;
nr_timer_setup
(
&
si
->
sr_ProhibitTimer
,
0
,
1
);
// default value is 0ms
si
->
sr_id
=
-
1
;
// invalid init value
}
else
...
...
@@ -1715,13 +1715,16 @@ static void configure_maccellgroup(NR_UE_MAC_INST_t *mac, const NR_MAC_CellGroup
"Current implementation cannot handle more than 1 SR configuration
\n
"
);
si
->
sr_id
=
sr
->
schedulingRequestId
;
si
->
sr_TransMax
=
sr
->
sr_TransMax
;
int
target_ms
=
0
;
if
(
sr
->
sr_ProhibitTimer
)
LOG_E
(
NR_MAC
,
"SR prohibit timer not properly implemented
\n
"
);
target_ms
=
1
<<
*
sr
->
sr_ProhibitTimer
;
// length of slot is (1/2^scs)ms
nr_timer_setup
(
&
si
->
sr_ProhibitTimer
,
target_ms
<<
scs
,
1
);
// 1 slot update rate
}
}
}
if
(
mcg
->
bsr_Config
)
{
int
subframes_per_slot
=
nr_slots_per_frame
[
mac
->
current_UL_BWP
->
scs
]
/
10
;
int
subframes_per_slot
=
nr_slots_per_frame
[
scs
]
/
10
;
uint32_t
periodic_sf
=
nr_get_sf_periodicBSRTimer
(
mcg
->
bsr_Config
->
periodicBSR_Timer
);
uint32_t
target
=
periodic_sf
<
UINT_MAX
?
periodic_sf
*
subframes_per_slot
:
periodic_sf
;
nr_timer_setup
(
&
si
->
periodicBSR_Timer
,
target
,
1
);
// 1 slot update rate
...
...
openair2/LAYER2/NR_MAC_UE/mac_defs.h
View file @
338426ed
...
...
@@ -222,10 +222,8 @@ typedef struct {
NR_timer_t
retxBSR_Timer
;
/// periodicBSR-Timer
NR_timer_t
periodicBSR_Timer
;
/// default value is 0: not configured
uint16_t
sr_ProhibitTimer
;
/// sr ProhibitTime running
uint8_t
sr_ProhibitTimer_Running
;
/// sr ProhibitTimer
NR_timer_t
sr_ProhibitTimer
;
// Maximum number of SR transmissions
uint32_t
sr_TransMax
;
int
sr_id
;
...
...
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
View file @
338426ed
...
...
@@ -165,6 +165,7 @@ void reset_mac_inst(NR_UE_MAC_INST_t *nr_mac)
}
nr_timer_stop
(
&
nr_mac
->
ra
.
contention_resolution_timer
);
nr_timer_stop
(
&
nr_mac
->
scheduling_info
.
sr_DelayTimer
);
nr_timer_stop
(
&
nr_mac
->
scheduling_info
.
sr_ProhibitTimer
);
nr_timer_stop
(
&
nr_mac
->
scheduling_info
.
retxBSR_Timer
);
// consider all timeAlignmentTimers as expired and perform the corresponding actions in clause 5.2
...
...
@@ -187,8 +188,6 @@ void reset_mac_inst(NR_UE_MAC_INST_t *nr_mac)
// cancel any triggered Scheduling Request procedure
nr_mac
->
scheduling_info
.
SR_COUNTER
=
0
;
nr_mac
->
scheduling_info
.
SR_pending
=
0
;
nr_mac
->
scheduling_info
.
sr_ProhibitTimer
=
0
;
nr_mac
->
scheduling_info
.
sr_ProhibitTimer_Running
=
0
;
nr_mac
->
scheduling_info
.
sr_id
=
-
1
;
// invalid init value
// cancel any triggered Buffer Status Reporting procedure
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
338426ed
...
...
@@ -2504,14 +2504,8 @@ int8_t nr_ue_get_SR(NR_UE_MAC_INST_t *mac, frame_t frameP, slot_t slot)
si
->
SR_pending
);
// todo
si
->
SR_COUNTER
++
;
// start the sr-prohibittimer : rel 9 and above
if
(
si
->
sr_ProhibitTimer
>
0
)
{
// timer configured
si
->
sr_ProhibitTimer
--
;
si
->
sr_ProhibitTimer_Running
=
1
;
}
else
{
si
->
sr_ProhibitTimer_Running
=
0
;
}
//mac->ul_active =1;
// start the sr-prohibittimer
nr_timer_start
(
&
si
->
sr_ProhibitTimer
);
return
(
1
);
//instruct phy to signal SR
}
else
{
// notify RRC to relase PUCCH/SRS
...
...
@@ -2526,6 +2520,7 @@ int8_t nr_ue_get_SR(NR_UE_MAC_INST_t *mac, frame_t frameP, slot_t slot)
}
si
->
SR_pending
=
0
;
si
->
SR_COUNTER
=
0
;
nr_timer_stop
(
&
si
->
sr_ProhibitTimer
);
return
(
0
);
}
}
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
View file @
338426ed
...
...
@@ -133,6 +133,7 @@ static void trigger_regular_bsr(NR_UE_MAC_INST_t *mac, NR_LogicalChannelIdentity
void
update_mac_timers
(
NR_UE_MAC_INST_t
*
mac
)
{
nr_timer_tick
(
&
mac
->
ra
.
contention_resolution_timer
);
nr_timer_tick
(
&
mac
->
scheduling_info
.
sr_ProhibitTimer
);
nr_timer_tick
(
&
mac
->
scheduling_info
.
sr_DelayTimer
);
bool
retxBSR_expired
=
nr_timer_tick
(
&
mac
->
scheduling_info
.
retxBSR_Timer
);
if
(
retxBSR_expired
)
{
...
...
@@ -2678,6 +2679,7 @@ static void nr_ue_get_sdu_mac_ce_post(NR_UE_MAC_INST_t *mac,
LOG_D
(
NR_MAC
,
"[UE %d][SR] Gave SDU to PHY, clearing any scheduling request
\n
"
,
mac
->
ue_id
);
sched_info
->
SR_pending
=
0
;
sched_info
->
SR_COUNTER
=
0
;
nr_timer_stop
(
&
sched_info
->
sr_ProhibitTimer
);
/* Actions when a BSR is sent */
if
(
mac_ce_p
->
bsr_ce_len
)
{
...
...
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