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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
bd7d007e
Commit
bd7d007e
authored
Feb 12, 2025
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove global slots_per_frame, use function instead
parent
bec43f01
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
21 additions
and
19 deletions
+21
-19
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+1
-1
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+1
-1
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+6
-7
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
+1
-1
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common_tdd.c
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common_tdd.c
+8
-3
openair2/LAYER2/NR_MAC_COMMON/nr_mac_extern.h
openair2/LAYER2/NR_MAC_COMMON/nr_mac_extern.h
+0
-2
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
+2
-2
openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+1
-1
No files found.
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
bd7d007e
...
...
@@ -862,7 +862,7 @@ printf("%d\n", slot);
nr_l2_init_ue
(
1
);
UE_mac
=
get_mac_inst
(
0
);
ue_init_config_request
(
UE_mac
,
nr_slots_per_frame
[
mu
]
);
ue_init_config_request
(
UE_mac
,
get_slots_per_frame_from_scs
(
mu
)
);
UE
->
if_inst
=
nr_ue_if_module_init
(
0
);
UE
->
if_inst
->
scheduled_response
=
nr_ue_scheduled_response
;
...
...
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
bd7d007e
...
...
@@ -741,7 +741,7 @@ int main(int argc, char *argv[])
nr_l2_init_ue
(
1
);
NR_UE_MAC_INST_t
*
UE_mac
=
get_mac_inst
(
0
);
ue_init_config_request
(
UE_mac
,
nr_slots_per_frame
[
mu
]
);
ue_init_config_request
(
UE_mac
,
get_slots_per_frame_from_scs
(
mu
)
);
UE
->
if_inst
=
nr_ue_if_module_init
(
0
);
UE
->
if_inst
->
scheduled_response
=
nr_ue_scheduled_response
;
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
View file @
bd7d007e
...
...
@@ -4129,6 +4129,7 @@ void get_type0_PDCCH_CSS_config_parameters(NR_Type0_PDCCH_CSS_config_t *type0_PD
// 38.213 table 10.1-1
/// MUX PATTERN 1
int
slots_per_frame
=
get_slots_per_frame_from_scs
(
scs_ssb
);
if
(
type0_PDCCH_CSS_config
->
type0_pdcch_ss_mux_pattern
==
1
&&
frequency_range
==
FR1
){
big_o
=
table_38213_13_11_c1
[
index_4lsb
];
big_m
=
table_38213_13_11_c3
[
index_4lsb
];
...
...
@@ -4145,7 +4146,7 @@ void get_type0_PDCCH_CSS_config_parameters(NR_Type0_PDCCH_CSS_config_t *type0_PD
// 38.213 chapter 13: over two consecutive slots
type0_PDCCH_CSS_config
->
search_space_duration
=
2
;
// two frames
type0_PDCCH_CSS_config
->
search_space_frame_period
=
nr_slots_per_frame
[
scs_ssb
]
<<
1
;
type0_PDCCH_CSS_config
->
search_space_frame_period
=
slots_per_frame
<<
1
;
}
if
(
type0_PDCCH_CSS_config
->
type0_pdcch_ss_mux_pattern
==
1
&&
frequency_range
==
FR2
){
...
...
@@ -4166,7 +4167,7 @@ void get_type0_PDCCH_CSS_config_parameters(NR_Type0_PDCCH_CSS_config_t *type0_PD
// 38.213 chapter 13: over two consecutive slots
type0_PDCCH_CSS_config
->
search_space_duration
=
2
;
// two frames
type0_PDCCH_CSS_config
->
search_space_frame_period
=
nr_slots_per_frame
[
scs_ssb
]
<<
1
;
type0_PDCCH_CSS_config
->
search_space_frame_period
=
slots_per_frame
<<
1
;
}
/// MUX PATTERN 2
...
...
@@ -4233,7 +4234,7 @@ void get_type0_PDCCH_CSS_config_parameters(NR_Type0_PDCCH_CSS_config_t *type0_PD
// 38.213 chapter 13: over one slot
type0_PDCCH_CSS_config
->
search_space_duration
=
1
;
// SSB periodicity in slots
type0_PDCCH_CSS_config
->
search_space_frame_period
=
ssb_period
*
nr_slots_per_frame
[
scs_ssb
]
;
type0_PDCCH_CSS_config
->
search_space_frame_period
=
ssb_period
*
slots_per_frame
;
}
/// MUX PATTERN 3
...
...
@@ -4263,7 +4264,7 @@ void get_type0_PDCCH_CSS_config_parameters(NR_Type0_PDCCH_CSS_config_t *type0_PD
// 38.213 chapter 13: over one slot
type0_PDCCH_CSS_config
->
search_space_duration
=
1
;
// SSB periodicity in slots
type0_PDCCH_CSS_config
->
search_space_frame_period
=
ssb_period
*
nr_slots_per_frame
[
scs_ssb
]
;
type0_PDCCH_CSS_config
->
search_space_frame_period
=
ssb_period
*
slots_per_frame
;
}
AssertFatal
(
type0_PDCCH_CSS_config
->
sfn_c
>=
0
,
""
);
...
...
@@ -4323,9 +4324,7 @@ void fill_coresetZero(NR_ControlResourceSet_t *coreset0, NR_Type0_PDCCH_CSS_conf
coreset0
->
pdcch_DMRS_ScramblingID
=
NULL
;
}
void
fill_searchSpaceZero
(
NR_SearchSpace_t
*
ss0
,
int
slots_per_frame
,
NR_Type0_PDCCH_CSS_config_t
*
type0_PDCCH_CSS_config
)
void
fill_searchSpaceZero
(
NR_SearchSpace_t
*
ss0
,
int
slots_per_frame
,
NR_Type0_PDCCH_CSS_config_t
*
type0_PDCCH_CSS_config
)
{
AssertFatal
(
ss0
,
"SearchSpace0 should have been allocated outside of this function
\n
"
);
if
(
ss0
->
controlResourceSetId
==
NULL
)
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h
View file @
bd7d007e
...
...
@@ -63,7 +63,7 @@ int16_t fill_dmrs_mask(const NR_PDSCH_Config_t *pdsch_Config,
int
startSymbol
,
mappingType_t
mappingtype
,
int
length
);
int
get_slots_per_frame_from_scs
(
int
scs
);
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
);
bool
is_mixed_slot
(
const
slot_t
slot
,
const
frame_structure_t
*
fs
);
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common_tdd.c
View file @
bd7d007e
...
...
@@ -24,7 +24,12 @@
#include "common/utils/nr/nr_common.h"
#include "nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h"
const
uint8_t
nr_slots_per_frame
[
5
]
=
{
10
,
20
,
40
,
80
,
160
};
int
get_slots_per_frame_from_scs
(
int
scs
)
{
const
int
nr_slots_per_frame
[
5
]
=
{
10
,
20
,
40
,
80
,
160
};
return
nr_slots_per_frame
[
scs
];
}
const
float
tdd_ms_period_pattern
[]
=
{
0
.
5
,
0
.
625
,
1
.
0
,
1
.
25
,
2
.
0
,
2
.
5
,
5
.
0
,
10
.
0
};
const
float
tdd_ms_period_ext
[]
=
{
3
.
0
,
4
.
0
};
...
...
@@ -188,7 +193,7 @@ void config_frame_structure(int mu,
uint8_t
frame_type
,
frame_structure_t
*
fs
)
{
fs
->
numb_slots_frame
=
nr_slots_per_frame
[
mu
]
;
fs
->
numb_slots_frame
=
get_slots_per_frame_from_scs
(
mu
)
;
fs
->
frame_type
=
frame_type
;
if
(
frame_type
==
TDD
)
{
fs
->
numb_period_frame
=
get_nb_periods_per_frame
(
tdd_period
);
...
...
@@ -196,7 +201,7 @@ void config_frame_structure(int mu,
config_tdd_patterns
(
tdd_UL_DL_ConfigurationCommon
,
fs
);
}
else
{
// FDD
fs
->
numb_period_frame
=
1
;
fs
->
numb_slots_period
=
nr_slots_per_frame
[
mu
]
;
fs
->
numb_slots_period
=
fs
->
numb_slots_frame
;
}
AssertFatal
(
fs
->
numb_period_frame
>
0
,
"Frame configuration cannot be configured!
\n
"
);
}
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_extern.h
View file @
bd7d007e
...
...
@@ -37,8 +37,6 @@
/*#include "PHY/defs_common.h"*/
extern
const
uint8_t
nr_slots_per_frame
[
5
];
/* Scheduler */
extern
RAN_CONTEXT_t
RC
;
extern
uint8_t
nfapi_mode
;
...
...
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
View file @
bd7d007e
...
...
@@ -94,7 +94,7 @@ void nr_ue_mac_default_configs(NR_UE_MAC_INST_t *mac)
// sf80 default for retxBSR_Timer sf10 for periodicBSR_Timer
int
mu
=
mac
->
current_UL_BWP
?
mac
->
current_UL_BWP
->
scs
:
get_softmodem_params
()
->
numerology
;
int
subframes_per_slot
=
nr_slots_per_frame
[
mu
]
/
10
;
int
subframes_per_slot
=
get_slots_per_frame_from_scs
(
mu
)
/
10
;
nr_timer_setup
(
&
mac
->
scheduling_info
.
retxBSR_Timer
,
80
*
subframes_per_slot
,
1
);
// 1 slot update rate
nr_timer_setup
(
&
mac
->
scheduling_info
.
periodicBSR_Timer
,
10
*
subframes_per_slot
,
1
);
// 1 slot update rate
...
...
@@ -139,7 +139,7 @@ NR_UE_MAC_INST_t *nr_l2_init_ue(int nb_inst)
nr_ue_init_mac
(
mac
);
nr_ue_mac_default_configs
(
mac
);
if
(
IS_SA_MODE
(
get_softmodem_params
()))
ue_init_config_request
(
mac
,
nr_slots_per_frame
[
get_softmodem_params
()
->
numerology
]
);
ue_init_config_request
(
mac
,
get_slots_per_frame_from_scs
(
get_softmodem_params
()
->
numerology
)
);
}
int
rc
=
rlc_module_init
(
0
);
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
View file @
bd7d007e
...
...
@@ -515,7 +515,7 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl
NR_BWP_Id_t
dl_bwp_id
=
current_DL_BWP
?
current_DL_BWP
->
bwp_id
:
0
;
NR_BWP_PDCCH_t
*
pdcch_config
=
&
mac
->
config_BWP_PDCCH
[
dl_bwp_id
];
int
scs
=
current_DL_BWP
?
current_DL_BWP
->
scs
:
get_softmodem_params
()
->
numerology
;
const
int
slots_per_frame
=
nr_slots_per_frame
[
scs
]
;
const
int
slots_per_frame
=
get_slots_per_frame_from_scs
(
scs
)
;
if
(
mac
->
get_sib1
)
{
int
ssb_sc_offset_norm
;
if
(
mac
->
ssb_subcarrier_offset
<
24
&&
mac
->
frequency_range
==
FR1
)
...
...
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
bd7d007e
...
...
@@ -769,7 +769,7 @@ void nr_mac_config_scc(gNB_MAC_INST *nrmac, NR_ServingCellConfigCommon_t *scc, c
scc
->
ssb_PositionsInBurst
->
present
);
const
int
NTN_gNB_Koffset
=
get_NTN_Koffset
(
scc
);
const
int
n
=
nr_slots_per_frame
[
*
scc
->
ssbSubcarrierSpacing
]
;
const
int
n
=
get_slots_per_frame_from_scs
(
*
scc
->
ssbSubcarrierSpacing
)
;
const
int
size
=
n
<<
(
int
)
ceil
(
log2
((
NTN_gNB_Koffset
+
13
)
/
n
+
1
));
// 13 is upper limit for max_fb_time
nrmac
->
vrb_map_UL_size
=
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