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
Michael Black
OpenXG-RAN
Commits
7668a891
Commit
7668a891
authored
Mar 02, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use pointer to MAC instead of module ID
parent
64c59ef5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
23 additions
and
27 deletions
+23
-27
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+11
-11
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+4
-5
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_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+4
-7
openair2/LAYER2/NR_MAC_gNB/main.c
openair2/LAYER2/NR_MAC_gNB/main.c
+2
-2
No files found.
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
7668a891
...
...
@@ -160,10 +160,10 @@ void process_CellGroup(NR_CellGroupConfig_t *CellGroup, NR_UE_sched_ctrl_t *sche
}
void
config_common
(
int
Mod_idP
,
int
pdsch_AntennaPorts
,
int
pusch_AntennaPorts
,
NR_ServingCellConfigCommon_t
*
scc
)
{
void
config_common
(
gNB_MAC_INST
*
nrmac
,
int
pdsch_AntennaPorts
,
int
pusch_AntennaPorts
,
NR_ServingCellConfigCommon_t
*
scc
)
{
nfapi_nr_config_request_scf_t
*
cfg
=
&
RC
.
nrmac
[
Mod_idP
]
->
config
[
0
];
RC
.
nrmac
[
Mod_idP
]
->
common_channels
[
0
].
ServingCellConfigCommon
=
scc
;
nfapi_nr_config_request_scf_t
*
cfg
=
&
nrmac
->
config
[
0
];
nrmac
->
common_channels
[
0
].
ServingCellConfigCommon
=
scc
;
// Carrier configuration
...
...
@@ -233,7 +233,7 @@ void config_common(int Mod_idP, int pdsch_AntennaPorts, int pusch_AntennaPorts,
frequency_range_t
frequency_range
=
band
<
100
?
FR1
:
FR2
;
frame_type_t
frame_type
=
get_frame_type
(
*
scc
->
downlinkConfigCommon
->
frequencyInfoDL
->
frequencyBandList
.
list
.
array
[
0
],
*
scc
->
ssbSubcarrierSpacing
);
RC
.
nrmac
[
Mod_idP
]
->
common_channels
[
0
].
frame_type
=
frame_type
;
nrmac
->
common_channels
[
0
].
frame_type
=
frame_type
;
// Cell configuration
cfg
->
cell_config
.
phy_cell_id
.
value
=
*
scc
->
physCellId
;
...
...
@@ -351,8 +351,8 @@ void config_common(int Mod_idP, int pdsch_AntennaPorts, int pusch_AntennaPorts,
cfg
->
ssb_table
.
ssb_subcarrier_offset
.
tl
.
tag
=
NFAPI_NR_CONFIG_SSB_SUBCARRIER_OFFSET_TAG
;
cfg
->
num_tlv
++
;
RC
.
nrmac
[
Mod_idP
]
->
ssb_SubcarrierOffset
=
cfg
->
ssb_table
.
ssb_subcarrier_offset
.
value
;
RC
.
nrmac
[
Mod_idP
]
->
ssb_OffsetPointA
=
cfg
->
ssb_table
.
ssb_offset_point_a
.
value
;
nrmac
->
ssb_SubcarrierOffset
=
cfg
->
ssb_table
.
ssb_subcarrier_offset
.
value
;
nrmac
->
ssb_OffsetPointA
=
cfg
->
ssb_table
.
ssb_offset_point_a
.
value
;
switch
(
scc
->
ssb_PositionsInBurst
->
present
)
{
case
1
:
...
...
@@ -434,7 +434,7 @@ void config_common(int Mod_idP, int pdsch_AntennaPorts, int pusch_AntennaPorts,
LOG_E
(
NR_MAC
,
"TDD configuration can not be done
\n
"
);
else
{
LOG_I
(
NR_MAC
,
"TDD has been properly configurated
\n
"
);
RC
.
nrmac
[
Mod_idP
]
->
tdd_beam_association
=
(
int16_t
*
)
malloc16
(
periods_per_frame
*
sizeof
(
int16_t
));
nrmac
->
tdd_beam_association
=
(
int16_t
*
)
malloc16
(
periods_per_frame
*
sizeof
(
int16_t
));
}
}
...
...
@@ -486,7 +486,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
int
num_pdsch_antenna_ports
=
pdsch_AntennaPorts
.
N1
*
pdsch_AntennaPorts
.
N2
*
pdsch_AntennaPorts
.
XP
;
RC
.
nrmac
[
Mod_idP
]
->
xp_pdsch_antenna_ports
=
pdsch_AntennaPorts
.
XP
;
config_common
(
Mod_idP
,
config_common
(
RC
.
nrmac
[
Mod_idP
]
,
num_pdsch_antenna_ports
,
pusch_AntennaPorts
,
scc
);
...
...
@@ -507,7 +507,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
}
RC
.
nrmac
[
Mod_idP
]
->
minRXTXTIMEpdsch
=
minRXTXTIMEpdsch
;
find_SSB_and_RO_available
(
Mod_idP
);
find_SSB_and_RO_available
(
RC
.
nrmac
[
Mod_idP
]
);
const
NR_TDD_UL_DL_Pattern_t
*
tdd
=
scc
->
tdd_UL_DL_ConfigurationCommon
?
&
scc
->
tdd_UL_DL_ConfigurationCommon
->
pattern1
:
NULL
;
...
...
@@ -538,8 +538,8 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
RC
.
nrmac
[
Mod_idP
]
->
pre_processor_dl
=
nr_preprocessor_phytest
;
RC
.
nrmac
[
Mod_idP
]
->
pre_processor_ul
=
nr_ul_preprocessor_phytest
;
}
else
{
RC
.
nrmac
[
Mod_idP
]
->
pre_processor_dl
=
nr_init_fr1_dlsch_preprocessor
(
Mod_idP
,
0
);
RC
.
nrmac
[
Mod_idP
]
->
pre_processor_ul
=
nr_init_fr1_ulsch_preprocessor
(
Mod_idP
,
0
);
RC
.
nrmac
[
Mod_idP
]
->
pre_processor_dl
=
nr_init_fr1_dlsch_preprocessor
(
0
);
RC
.
nrmac
[
Mod_idP
]
->
pre_processor_ul
=
nr_init_fr1_ulsch_preprocessor
(
0
);
}
if
(
get_softmodem_params
()
->
sa
>
0
)
{
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
7668a891
...
...
@@ -141,12 +141,11 @@ int16_t ssb_index_from_prach(module_id_t module_idP,
//Compute Total active SSBs and RO available
void
find_SSB_and_RO_available
(
module_id_t
module_idP
)
{
gNB_MAC_INST
*
gNB
=
RC
.
nrmac
[
module_idP
];
NR_COMMON_channels_t
*
cc
=
&
gNB
->
common_channels
[
0
];
void
find_SSB_and_RO_available
(
gNB_MAC_INST
*
nrmac
)
{
NR_COMMON_channels_t
*
cc
=
&
nrmac
->
common_channels
[
0
];
NR_ServingCellConfigCommon_t
*
scc
=
cc
->
ServingCellConfigCommon
;
nfapi_nr_config_request_scf_t
*
cfg
=
&
RC
.
nrmac
[
module_idP
]
->
config
[
0
];
nfapi_nr_config_request_scf_t
*
cfg
=
&
nrmac
->
config
[
0
];
uint8_t
config_index
=
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
rach_ConfigCommon
->
choice
.
setup
->
rach_ConfigGeneric
.
prach_ConfigurationIndex
;
uint8_t
mu
,
N_dur
=
0
,
N_t_slot
=
0
,
start_symbol
=
0
,
N_RA_slot
=
0
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
7668a891
...
...
@@ -844,7 +844,7 @@ void nr_fr1_dlsch_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t
rballoc_mask
);
}
nr_pp_impl_dl
nr_init_fr1_dlsch_preprocessor
(
module_id_t
module_id
,
int
CC_id
)
{
nr_pp_impl_dl
nr_init_fr1_dlsch_preprocessor
(
int
CC_id
)
{
/* in the PF algorithm, we have to use the TBsize to compute the coefficient.
* This would include the number of DMRS symbols, which in turn depends on
* the time domain allocation. In case we are in a mixed slot, we do not want
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
7668a891
...
...
@@ -1944,7 +1944,7 @@ bool nr_fr1_ulsch_preprocessor(module_id_t module_id, frame_t frame, sub_frame_t
return
true
;
}
nr_pp_impl_ul
nr_init_fr1_ulsch_preprocessor
(
module_id_t
module_id
,
int
CC_id
)
nr_pp_impl_ul
nr_init_fr1_ulsch_preprocessor
(
int
CC_id
)
{
/* in the PF algorithm, we have to use the TBsize to compute the coefficient.
* This would include the number of DMRS symbols, which in turn depends on
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
7668a891
...
...
@@ -40,10 +40,7 @@ void set_cset_offset(uint16_t);
void
mac_top_init_gNB
(
ngran_node_t
node_type
);
void
config_common
(
int
Mod_idP
,
int
pdsch_AntennaPorts
,
int
pusch_AntennaPorts
,
NR_ServingCellConfigCommon_t
*
scc
);
void
config_common
(
gNB_MAC_INST
*
nrmac
,
int
pdsch_AntennaPorts
,
int
pusch_AntennaPorts
,
NR_ServingCellConfigCommon_t
*
scc
);
int
nr_mac_enable_ue_rrc_processing_timer
(
module_id_t
Mod_idP
,
rnti_t
rnti
,
...
...
@@ -95,7 +92,7 @@ uint32_t schedule_control_sib1(module_id_t module_id,
uint16_t
num_total_bytes
);
/* \brief default FR1 DL preprocessor init routine, returns preprocessor to call */
nr_pp_impl_dl
nr_init_fr1_dlsch_preprocessor
(
module_id_t
module_id
,
int
CC_id
);
nr_pp_impl_dl
nr_init_fr1_dlsch_preprocessor
(
int
CC_id
);
void
schedule_nr_sib1
(
module_id_t
module_idP
,
frame_t
frameP
,
sub_frame_t
subframeP
);
...
...
@@ -107,7 +104,7 @@ void schedule_nr_mib(module_id_t module_idP, frame_t frameP, sub_frame_t slotP);
void
nr_schedule_ulsch
(
module_id_t
module_id
,
frame_t
frame
,
sub_frame_t
slot
);
/* \brief default FR1 UL preprocessor init routine, returns preprocessor to call */
nr_pp_impl_ul
nr_init_fr1_ulsch_preprocessor
(
module_id_t
module_id
,
int
CC_id
);
nr_pp_impl_ul
nr_init_fr1_ulsch_preprocessor
(
int
CC_id
);
/////// Random Access MAC-PHY interface functions and primitives ///////
...
...
@@ -425,7 +422,7 @@ int16_t ssb_index_from_prach(module_id_t module_idP,
uint8_t
freq_index
,
uint8_t
symbol
);
void
find_SSB_and_RO_available
(
module_id_t
module_idP
);
void
find_SSB_and_RO_available
(
gNB_MAC_INST
*
nrmac
);
NR_pdsch_dmrs_t
get_dl_dmrs_params
(
const
NR_ServingCellConfigCommon_t
*
scc
,
const
NR_UE_DL_BWP_t
*
BWP
,
...
...
openair2/LAYER2/NR_MAC_gNB/main.c
View file @
7668a891
...
...
@@ -239,8 +239,8 @@ void mac_top_init_gNB(ngran_node_t node_type)
RC
.
nrmac
[
i
]
->
pre_processor_dl
=
nr_preprocessor_phytest
;
RC
.
nrmac
[
i
]
->
pre_processor_ul
=
nr_ul_preprocessor_phytest
;
}
else
{
RC
.
nrmac
[
i
]
->
pre_processor_dl
=
nr_init_fr1_dlsch_preprocessor
(
i
,
0
);
RC
.
nrmac
[
i
]
->
pre_processor_ul
=
nr_init_fr1_ulsch_preprocessor
(
i
,
0
);
RC
.
nrmac
[
i
]
->
pre_processor_dl
=
nr_init_fr1_dlsch_preprocessor
(
0
);
RC
.
nrmac
[
i
]
->
pre_processor_ul
=
nr_init_fr1_ulsch_preprocessor
(
0
);
}
if
(
!
IS_SOFTMODEM_NOSTATS_BIT
)
threadCreate
(
&
RC
.
nrmac
[
i
]
->
stats_thread
,
nrmac_stats_thread
,
(
void
*
)
RC
.
nrmac
[
i
],
"MAC_STATS"
,
-
1
,
sched_get_priority_min
(
SCHED_OAI
)
+
1
);
...
...
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