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
littleBu
OpenXG-RAN
Commits
d0ba1a30
Commit
d0ba1a30
authored
2 months ago
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use frame_type in frame_structure instead of bool
parent
b4398164
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
20 additions
and
20 deletions
+20
-20
common/utils/nr/nr_common.h
common/utils/nr/nr_common.h
+1
-1
openair1/SCHED_NR/phy_frame_config_nr.c
openair1/SCHED_NR/phy_frame_config_nr.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+9
-9
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
+3
-3
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+2
-2
openair2/RRC/NR/nr_rrc_config.c
openair2/RRC/NR/nr_rrc_config.c
+1
-1
No files found.
common/utils/nr/nr_common.h
View file @
d0ba1a30
...
...
@@ -142,7 +142,7 @@ typedef struct frame_structure_s {
int8_t
numb_slots_frame
;
int8_t
numb_slots_period
;
int8_t
numb_period_frame
;
bool
is_tdd
;
frame_type_t
frame_type
;
}
frame_structure_t
;
typedef
struct
{
...
...
This diff is collapsed.
Click to expand it.
openair1/SCHED_NR/phy_frame_config_nr.c
View file @
d0ba1a30
...
...
@@ -395,7 +395,7 @@ void free_tdd_configuration_dedicated_nr(NR_DL_FRAME_PARMS *frame_parms) {
void
do_tdd_config_sim
(
PHY_VARS_gNB
*
gNB
,
int
mu
)
{
frame_structure_t
fs
=
{.
is_tdd
=
true
};
frame_structure_t
fs
=
{.
frame_type
=
TDD
};
fs
.
numb_slots_frame
=
(
1
<<
mu
)
*
NR_NUMBER_OF_SUBFRAMES_PER_FRAME
;
fs
.
numb_period_frame
=
get_nb_periods_per_frame
(
gNB
->
gNB_config
.
tdd_table
.
tdd_period
.
value
);
fs
.
numb_slots_period
=
fs
.
numb_slots_frame
/
fs
.
numb_period_frame
;
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
d0ba1a30
...
...
@@ -380,7 +380,7 @@ int get_first_ul_slot(const frame_structure_t *fs, bool mixed)
{
DevAssert
(
fs
);
if
(
fs
->
is_tdd
)
{
if
(
fs
->
frame_type
==
TDD
)
{
for
(
int
i
=
0
;
i
<
fs
->
numb_slots_period
;
i
++
)
{
if
((
mixed
&&
is_ul_slot
(
i
,
fs
))
||
fs
->
period_cfg
.
tdd_slot_bitmap
[
i
].
slot_type
==
TDD_NR_UPLINK_SLOT
)
{
return
i
;
...
...
@@ -396,7 +396,7 @@ int get_first_ul_slot(const frame_structure_t *fs, bool mixed)
*/
int
get_dl_slots_per_period
(
const
frame_structure_t
*
fs
)
{
return
fs
->
is_tdd
?
fs
->
period_cfg
.
num_dl_slots
:
fs
->
numb_slots_frame
;
return
fs
->
frame_type
==
TDD
?
fs
->
period_cfg
.
num_dl_slots
:
fs
->
numb_slots_frame
;
}
/**
...
...
@@ -404,7 +404,7 @@ int get_dl_slots_per_period(const frame_structure_t *fs)
*/
int
get_ul_slots_per_period
(
const
frame_structure_t
*
fs
)
{
return
fs
->
is_tdd
?
fs
->
period_cfg
.
num_ul_slots
:
fs
->
numb_slots_frame
;
return
fs
->
frame_type
==
TDD
?
fs
->
period_cfg
.
num_ul_slots
:
fs
->
numb_slots_frame
;
}
/**
...
...
@@ -416,7 +416,7 @@ int get_full_ul_slots_per_period(const frame_structure_t *fs)
{
DevAssert
(
fs
);
if
(
!
fs
->
is_tdd
)
if
(
fs
->
frame_type
==
FDD
)
return
fs
->
numb_slots_frame
;
int
count
=
0
;
...
...
@@ -438,7 +438,7 @@ int get_full_dl_slots_per_period(const frame_structure_t *fs)
{
DevAssert
(
fs
);
if
(
!
fs
->
is_tdd
)
if
(
fs
->
frame_type
==
FDD
)
return
fs
->
numb_slots_frame
;
int
count
=
0
;
...
...
@@ -456,7 +456,7 @@ int get_full_dl_slots_per_period(const frame_structure_t *fs)
*/
int
get_ul_slots_per_frame
(
const
frame_structure_t
*
fs
)
{
return
fs
->
is_tdd
?
fs
->
numb_period_frame
*
get_ul_slots_per_period
(
fs
)
:
fs
->
numb_slots_frame
;
return
fs
->
frame_type
==
TDD
?
fs
->
numb_period_frame
*
get_ul_slots_per_period
(
fs
)
:
fs
->
numb_slots_frame
;
}
/**
...
...
@@ -471,7 +471,7 @@ int get_ul_slot_offset(const frame_structure_t *fs, int idx, bool count_mixed)
DevAssert
(
fs
);
// FDD
if
(
!
fs
->
is_tdd
)
if
(
fs
->
frame_type
==
FDD
)
return
idx
;
// UL slots indexes in period
...
...
@@ -514,10 +514,10 @@ void config_frame_structure(int mu,
if
(
frame_type
==
TDD
)
{
fs
->
numb_period_frame
=
get_nb_periods_per_frame
(
tdd_period
);
fs
->
numb_slots_period
=
fs
->
numb_slots_frame
/
fs
->
numb_period_frame
;
fs
->
is_tdd
=
true
;
fs
->
frame_type
=
TDD
;
config_tdd_patterns
(
scc
->
tdd_UL_DL_ConfigurationCommon
,
fs
);
}
else
{
// FDD
fs
->
is_tdd
=
false
;
fs
->
frame_type
=
FDD
;
fs
->
numb_period_frame
=
1
;
fs
->
numb_slots_period
=
fs
->
numb_slots_frame
;
}
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
View file @
d0ba1a30
...
...
@@ -126,7 +126,7 @@ static void clear_beam_information(NR_beam_info_t *beam_info, int frame, int slo
*/
bool
is_ul_slot
(
const
slot_t
slot
,
const
frame_structure_t
*
fs
)
{
if
(
!
fs
->
is_tdd
)
if
(
fs
->
frame_type
==
FDD
)
return
true
;
const
tdd_period_config_t
*
pc
=
&
fs
->
period_cfg
;
slot_t
s
=
get_slot_idx_in_period
(
slot
,
fs
);
...
...
@@ -142,7 +142,7 @@ bool is_ul_slot(const slot_t slot, const frame_structure_t *fs)
*/
bool
is_dl_slot
(
const
slot_t
slot
,
const
frame_structure_t
*
fs
)
{
if
(
!
fs
->
is_tdd
)
if
(
fs
->
frame_type
==
FDD
)
return
true
;
const
tdd_period_config_t
*
pc
=
&
fs
->
period_cfg
;
slot_t
s
=
get_slot_idx_in_period
(
slot
,
fs
);
...
...
@@ -156,7 +156,7 @@ bool is_dl_slot(const slot_t slot, const frame_structure_t *fs)
*/
bool
is_mixed_slot
(
const
slot_t
slot
,
const
frame_structure_t
*
fs
)
{
if
(
!
fs
->
is_tdd
)
if
(
fs
->
frame_type
==
FDD
)
return
false
;
slot_t
s
=
get_slot_idx_in_period
(
slot
,
fs
);
const
tdd_period_config_t
*
pc
=
&
fs
->
period_cfg
;
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
d0ba1a30
...
...
@@ -971,7 +971,7 @@ static bool get_feasible_msg3_tda(const NR_ServingCellConfigCommon_t *scc,
int
abs_slot
=
slot
+
k2
+
mu_delta
;
int
temp_frame
=
(
frame
+
(
abs_slot
/
slots_per_frame
))
&
1023
;
int
temp_slot
=
abs_slot
%
slots_per_frame
;
// msg3 slot according to 8.3 in 38.213
if
(
fs
->
is_tdd
&&
!
is_ul_slot
(
temp_slot
,
fs
))
if
(
fs
->
frame_type
==
TDD
&&
!
is_ul_slot
(
temp_slot
,
fs
))
continue
;
const
tdd_bitmap_t
*
tdd_slot_bitmap
=
fs
->
period_cfg
.
tdd_slot_bitmap
;
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
d0ba1a30
...
...
@@ -61,7 +61,7 @@ int get_dl_tda(const gNB_MAC_INST *nrmac, int slot)
if
(
nrmac
->
UE_info
.
sched_csirs
>
0
)
return
1
;
if
(
fs
->
is_tdd
)
{
if
(
fs
->
frame_type
==
TDD
)
{
int
s
=
get_slot_idx_in_period
(
slot
,
fs
);
// if there is a mixed slot where we can transmit DL
const
tdd_bitmap_t
*
tdd_slot_bitmap
=
fs
->
period_cfg
.
tdd_slot_bitmap
;
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
d0ba1a30
...
...
@@ -1036,7 +1036,7 @@ int nr_acknack_scheduling(gNB_MAC_INST *mac,
continue
;
const
int
pucch_slot
=
(
slot
+
pdsch_to_harq_feedback
[
f
]
+
NTN_gNB_Koffset
)
%
n_slots_frame
;
// check if the slot is UL
if
(
fs
->
is_tdd
)
{
if
(
fs
->
frame_type
==
TDD
)
{
int
mod_slot
=
pucch_slot
%
fs
->
numb_slots_period
;
if
(
!
is_ul_slot
(
mod_slot
,
fs
))
continue
;
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
d0ba1a30
...
...
@@ -48,7 +48,7 @@ int get_ul_tda(gNB_MAC_INST *nrmac, int frame, int slot)
/* there is a mixed slot only when in TDD */
frame_structure_t
*
fs
=
&
nrmac
->
frame_structure
;
if
(
fs
->
is_tdd
)
{
if
(
fs
->
frame_type
==
TDD
)
{
// if there is uplink symbols in mixed slot
int
s
=
get_slot_idx_in_period
(
slot
,
fs
);
tdd_bitmap_t
*
tdd_slot_bitmap
=
fs
->
period_cfg
.
tdd_slot_bitmap
;
...
...
@@ -1535,7 +1535,7 @@ static bool nr_UE_is_to_be_scheduled(const frame_structure_t *fs,
* Force the default transmission in a full slot as early
* as possible in the UL portion of TDD period (last_ul_slot) */
int
num_slots_per_period
=
fs
->
numb_slots_period
;
int
last_ul_slot
=
fs
->
is_tdd
?
get_first_ul_slot
(
fs
,
false
)
:
sched_ctrl
->
last_ul_slot
;
int
last_ul_slot
=
fs
->
frame_type
==
TDD
?
get_first_ul_slot
(
fs
,
false
)
:
sched_ctrl
->
last_ul_slot
;
const
int
last_ul_sched
=
sched_ctrl
->
last_ul_frame
*
n
+
last_ul_slot
;
const
int
diff
=
(
now
-
last_ul_sched
+
1024
*
n
)
%
(
1024
*
n
);
/* UE is to be scheduled if
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/NR/nr_rrc_config.c
View file @
d0ba1a30
...
...
@@ -1262,7 +1262,7 @@ static void set_SR_periodandoffset(NR_SchedulingRequestResourceConfig_t *schedul
{
const
frame_structure_t
*
fs
=
&
RC
.
nrmac
[
0
]
->
frame_structure
;
int
sr_slot
=
1
;
// in FDD SR in slot 1
if
(
fs
->
is_tdd
)
if
(
fs
->
frame_type
==
TDD
)
sr_slot
=
get_first_ul_slot
(
fs
,
true
);
schedulingRequestResourceConfig
->
periodicityAndOffset
=
calloc
(
1
,
sizeof
(
*
schedulingRequestResourceConfig
->
periodicityAndOffset
));
...
...
This diff is collapsed.
Click to expand it.
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