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
1056e53a
Commit
1056e53a
authored
May 01, 2024
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mostly formatting
parent
c719b3f0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
37 deletions
+40
-37
openair1/PHY/NR_TRANSPORT/nr_prach.c
openair1/PHY/NR_TRANSPORT/nr_prach.c
+2
-2
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+1
-1
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+2
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+35
-32
No files found.
openair1/PHY/NR_TRANSPORT/nr_prach.c
View file @
1056e53a
...
...
@@ -73,8 +73,8 @@ int16_t find_nr_prach(PHY_VARS_gNB *gNB,int frame, int slot, find_type_t type) {
void
nr_fill_prach
(
PHY_VARS_gNB
*
gNB
,
int
SFN
,
int
Slot
,
nfapi_nr_prach_pdu_t
*
prach_pdu
)
{
nfapi_nr_prach_pdu_t
*
prach_pdu
)
{
int
prach_id
=
find_nr_prach
(
gNB
,
SFN
,
Slot
,
SEARCH_EXIST_OR_FREE
);
AssertFatal
(((
prach_id
>=
0
)
&&
(
prach_id
<
NUMBER_OF_NR_PRACH_MAX
)),
"illegal or no prach_id found!!! prach_id %d
\n
"
,
prach_id
);
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
1056e53a
...
...
@@ -81,7 +81,7 @@ void nr_common_signal_procedures(PHY_VARS_gNB *gNB,int frame,int slot, nfapi_nr_
fp
->
print_ue_help_cmdline_log
=
false
;
if
(
fp
->
dl_CarrierFreq
!=
fp
->
ul_CarrierFreq
)
LOG_A
(
PHY
,
"Command line parameters for the UE: -C %lu --CO %l
u
-r %d --numerology %d --ssb %d
\n
"
,
"Command line parameters for the UE: -C %lu --CO %l
d
-r %d --numerology %d --ssb %d
\n
"
,
fp
->
dl_CarrierFreq
,
fp
->
dl_CarrierFreq
-
fp
->
ul_CarrierFreq
,
fp
->
N_RB_DL
,
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
View file @
1056e53a
...
...
@@ -702,8 +702,8 @@ static const int16_t N_RA_RB[16] = {6, 3, 2, 24, 12, 6, 12, 6, 3, 24, 12, 6, 12,
/* Function to get number of RBs required for prach occasion based on
* 38.211 Table 6.3.3.2-1 */
int16_t
get_N_RA_RB
(
int
delta_f_RA_PRACH
,
int
delta_f_PUSCH
)
{
int16_t
get_N_RA_RB
(
int
delta_f_RA_PRACH
,
int
delta_f_PUSCH
)
{
int8_t
index
=
0
;
switch
(
delta_f_RA_PRACH
)
{
case
0
:
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
1056e53a
...
...
@@ -266,9 +266,10 @@ void schedule_nr_prach(module_id_t module_idP, frame_t frameP, sub_frame_t slotP
NR_COMMON_channels_t
*
cc
=
gNB
->
common_channels
;
NR_ServingCellConfigCommon_t
*
scc
=
cc
->
ServingCellConfigCommon
;
NR_RACH_ConfigCommon_t
*
rach_ConfigCommon
=
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
rach_ConfigCommon
->
choice
.
setup
;
int
mu
;
if
(
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
rach_ConfigCommon
->
choice
.
setup
->
msg1_SubcarrierSpacing
)
mu
=
*
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
rach_ConfigCommon
->
choice
.
setup
->
msg1_SubcarrierSpacing
;
if
(
rach_ConfigCommon
->
msg1_SubcarrierSpacing
)
mu
=
*
rach_ConfigCommon
->
msg1_SubcarrierSpacing
;
else
mu
=
scc
->
downlinkConfigCommon
->
frequencyInfoDL
->
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
subcarrierSpacing
;
int
index
=
ul_buffer_index
(
frameP
,
slotP
,
mu
,
gNB
->
UL_tti_req_ahead_size
);
...
...
@@ -276,8 +277,8 @@ void schedule_nr_prach(module_id_t module_idP, frame_t frameP, sub_frame_t slotP
nfapi_nr_config_request_scf_t
*
cfg
=
&
RC
.
nrmac
[
module_idP
]
->
config
[
0
];
if
(
is_nr_UL_slot
(
scc
->
tdd_UL_DL_ConfigurationCommon
,
slotP
,
cc
->
frame_type
))
{
uint8_t
config_index
=
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
rach_ConfigCommon
->
choice
.
setup
->
rach_ConfigGeneric
.
prach_ConfigurationIndex
;
const
NR_RACH_ConfigGeneric_t
*
rach_ConfigGeneric
=
&
rach_ConfigCommon
->
rach_ConfigGeneric
;
uint8_t
config_index
=
rach_ConfigGeneric
->
prach_ConfigurationIndex
;
uint8_t
N_dur
,
N_t_slot
,
start_symbol
=
0
,
N_RA_slot
;
uint16_t
RA_sfn_index
=
-
1
;
uint8_t
config_period
=
1
;
...
...
@@ -289,22 +290,22 @@ void schedule_nr_prach(module_id_t module_idP, frame_t frameP, sub_frame_t slotP
uint8_t
fdm
=
cfg
->
prach_config
.
num_prach_fd_occasions
.
value
;
// prach is scheduled according to configuration index and tables 6.3.3.2.2 to 6.3.3.2.4
if
(
get_nr_prach_info_from_index
(
config_index
,
(
int
)
frameP
,
(
int
)
slotP
,
scc
->
downlinkConfigCommon
->
frequencyInfoDL
->
absoluteFrequencyPointA
,
mu
,
cc
->
frame_type
,
&
format
,
&
start_symbol
,
&
N_t_slot
,
&
N_dur
,
&
RA_sfn_index
,
&
N_RA_slot
,
&
config_period
)
)
{
uint16_t
format0
=
format
&
0xff
;
// first column of format from table
uint16_t
format1
=
(
format
>>
8
)
&
0xff
;
// second column of format from table
if
(
get_nr_prach_info_from_index
(
config_index
,
(
int
)
frameP
,
(
int
)
slotP
,
scc
->
downlinkConfigCommon
->
frequencyInfoDL
->
absoluteFrequencyPointA
,
mu
,
cc
->
frame_type
,
&
format
,
&
start_symbol
,
&
N_t_slot
,
&
N_dur
,
&
RA_sfn_index
,
&
N_RA_slot
,
&
config_period
)
)
{
uint16_t
format0
=
format
&
0xff
;
// first column of format from table
uint16_t
format1
=
(
format
>>
8
)
&
0xff
;
// second column of format from table
if
(
N_RA_slot
>
1
)
{
//more than 1 PRACH slot in a subframe
if
(
slotP
%
2
==
1
)
...
...
@@ -339,15 +340,19 @@ void schedule_nr_prach(module_id_t module_idP, frame_t frameP, sub_frame_t slotP
prach_pdu
->
num_prach_ocas
=
N_t_slot
;
prach_pdu
->
prach_start_symbol
=
start_symbol
;
prach_pdu
->
num_ra
=
fdm_index
;
prach_pdu
->
num_cs
=
get_NCS
(
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
rach_ConfigCommon
->
choice
.
setup
->
rach_ConfigGeneric
.
zeroCorrelationZoneConfig
,
prach_pdu
->
num_cs
=
get_NCS
(
rach_ConfigGeneric
->
zeroCorrelationZoneConfig
,
format0
,
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
rach_ConfigCommon
->
choice
.
setup
->
restrictedSetConfig
);
LOG_D
(
NR_MAC
,
"Frame %d, Slot %d: Prach Occasion id = %u fdm index = %u start symbol = %u slot index = %u subframe index = %u
\n
"
,
frameP
,
slotP
,
prach_occasion_id
,
prach_pdu
->
num_ra
,
rach_ConfigCommon
->
restrictedSetConfig
);
LOG_D
(
NR_MAC
,
"Frame %d, Slot %d: Prach Occasion id = %u fdm index = %u start symbol = %u slot index = %u subframe index = %u
\n
"
,
frameP
,
slotP
,
prach_occasion_id
,
prach_pdu
->
num_ra
,
prach_pdu
->
prach_start_symbol
,
slot_index
,
RA_sfn_index
);
slot_index
,
RA_sfn_index
);
// SCF PRACH PDU format field does not consider A1/B1 etc. possibilities
// We added 9 = A1/B1 10 = A2/B2 11 A3/B3
if
(
format1
!=
0xff
)
{
...
...
@@ -409,15 +414,13 @@ void schedule_nr_prach(module_id_t module_idP, frame_t frameP, sub_frame_t slotP
}
// block resources in vrb_map_UL
const
NR_RACH_ConfigGeneric_t
*
rach_ConfigGeneric
=
&
scc
->
uplinkConfigCommon
->
initialUplinkBWP
->
rach_ConfigCommon
->
choice
.
setup
->
rach_ConfigGeneric
;
const
uint8_t
mu_pusch
=
scc
->
uplinkConfigCommon
->
frequencyInfoUL
->
scs_SpecificCarrierList
.
list
.
array
[
0
]
->
subcarrierSpacing
;
const
int16_t
N_RA_RB
=
get_N_RA_RB
(
cfg
->
prach_config
.
prach_sub_c_spacing
.
value
,
mu_pusch
);
const
int16_t
n_ra_rb
=
get_N_RA_RB
(
cfg
->
prach_config
.
prach_sub_c_spacing
.
value
,
mu_pusch
);
index
=
ul_buffer_index
(
frameP
,
slotP
,
mu
,
gNB
->
vrb_map_UL_size
);
uint16_t
*
vrb_map_UL
=
&
cc
->
vrb_map_UL
[
index
*
MAX_BWP_SIZE
];
for
(
int
i
=
0
;
i
<
N_RA_RB
*
fdm
;
++
i
)
vrb_map_UL
[
bwp_start
+
rach_ConfigGeneric
->
msg1_FrequencyStart
+
i
]
|=
SL_to_bitmap
(
start_symbol
,
N_t_slot
*
N_dur
);
for
(
int
i
=
0
;
i
<
n_ra_rb
*
fdm
;
++
i
)
vrb_map_UL
[
bwp_start
+
rach_ConfigGeneric
->
msg1_FrequencyStart
+
i
]
|=
SL_to_bitmap
(
start_symbol
,
N_t_slot
*
N_dur
);
}
}
}
...
...
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