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
c9f58179
Commit
c9f58179
authored
Mar 20, 2024
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve Preamble detection log and reformat code
parent
0716d1d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
32 deletions
+38
-32
openair1/SCHED_NR/nr_prach_procedures.c
openair1/SCHED_NR/nr_prach_procedures.c
+38
-32
No files found.
openair1/SCHED_NR/nr_prach_procedures.c
View file @
c9f58179
...
...
@@ -152,38 +152,44 @@ void L1_nr_prach_procedures(PHY_VARS_gNB *gNB,int frame,int slot) {
gNB
->
prach_energy_counter
);
if
((
gNB
->
prach_energy_counter
==
100
)
&&
(
max_preamble_energy
[
0
]
>
gNB
->
measurements
.
prach_I0
+
gNB
->
prach_thres
))
{
LOG_I
(
NR_PHY
,
"[gNB %d][RAPROC] Frame %d, slot %d Initiating RA procedure with preamble %d, energy %d.%d dB (I0 %d, thres %d), delay %d start symbol %u freq index %u
\n
"
,
gNB
->
Mod_id
,
frame
,
slot
,
max_preamble
[
0
],
max_preamble_energy
[
0
]
/
10
,
max_preamble_energy
[
0
]
%
10
,
gNB
->
measurements
.
prach_I0
,
gNB
->
prach_thres
,
max_preamble_delay
[
0
],
prachStartSymbol
,
prach_pdu
->
num_ra
);
T
(
T_ENB_PHY_INITIATE_RA_PROCEDURE
,
T_INT
(
gNB
->
Mod_id
),
T_INT
(
frame
),
T_INT
(
slot
),
T_INT
(
max_preamble
[
0
]),
T_INT
(
max_preamble_energy
[
0
]),
T_INT
(
max_preamble_delay
[
0
]));
gNB
->
UL_INFO
.
rach_ind
.
number_of_pdus
+=
1
;
gNB
->
prach_pdu_indication_list
[
pdu_index
].
phy_cell_id
=
gNB
->
gNB_config
.
cell_config
.
phy_cell_id
.
value
;
gNB
->
prach_pdu_indication_list
[
pdu_index
].
symbol_index
=
prachStartSymbol
;
gNB
->
prach_pdu_indication_list
[
pdu_index
].
slot_index
=
slot
;
gNB
->
prach_pdu_indication_list
[
pdu_index
].
freq_index
=
prach_pdu
->
num_ra
;
gNB
->
prach_pdu_indication_list
[
pdu_index
].
avg_rssi
=
(
max_preamble_energy
[
0
]
<
631
)
?
(
128
+
(
max_preamble_energy
[
0
]
/
5
))
:
254
;
gNB
->
prach_pdu_indication_list
[
pdu_index
].
avg_snr
=
0xff
;
// invalid for now
gNB
->
prach_pdu_indication_list
[
pdu_index
].
num_preamble
=
1
;
gNB
->
prach_pdu_indication_list
[
pdu_index
].
preamble_list
=
gNB
->
preamble_list
;
gNB
->
prach_pdu_indication_list
[
pdu_index
].
preamble_list
[
0
].
preamble_index
=
max_preamble
[
0
];
gNB
->
prach_pdu_indication_list
[
pdu_index
].
preamble_list
[
0
].
timing_advance
=
max_preamble_delay
[
0
];
gNB
->
prach_pdu_indication_list
[
pdu_index
].
preamble_list
[
0
].
preamble_pwr
=
0xffffffff
;
pdu_index
++
;
LOG_I
(
NR_PHY
,
"[RAPROC] %d.%d Initiating RA procedure with preamble %d, energy %d.%d dB (I0 %d, thres %d), delay %d start symbol "
"%u freq index %u
\n
"
,
frame
,
slot
,
max_preamble
[
0
],
max_preamble_energy
[
0
]
/
10
,
max_preamble_energy
[
0
]
%
10
,
gNB
->
measurements
.
prach_I0
,
gNB
->
prach_thres
,
max_preamble_delay
[
0
],
prachStartSymbol
,
prach_pdu
->
num_ra
);
T
(
T_ENB_PHY_INITIATE_RA_PROCEDURE
,
T_INT
(
gNB
->
Mod_id
),
T_INT
(
frame
),
T_INT
(
slot
),
T_INT
(
max_preamble
[
0
]),
T_INT
(
max_preamble_energy
[
0
]),
T_INT
(
max_preamble_delay
[
0
]));
gNB
->
UL_INFO
.
rach_ind
.
number_of_pdus
+=
1
;
nfapi_nr_prach_indication_pdu_t
*
ind
=
&
gNB
->
prach_pdu_indication_list
[
pdu_index
];
ind
->
phy_cell_id
=
gNB
->
gNB_config
.
cell_config
.
phy_cell_id
.
value
;
ind
->
symbol_index
=
prachStartSymbol
;
ind
->
slot_index
=
slot
;
ind
->
freq_index
=
prach_pdu
->
num_ra
;
ind
->
avg_rssi
=
(
max_preamble_energy
[
0
]
<
631
)
?
(
128
+
(
max_preamble_energy
[
0
]
/
5
))
:
254
;
ind
->
avg_snr
=
0xff
;
// invalid for now
ind
->
num_preamble
=
1
;
ind
->
preamble_list
=
gNB
->
preamble_list
;
ind
->
preamble_list
[
0
].
preamble_index
=
max_preamble
[
0
];
ind
->
preamble_list
[
0
].
timing_advance
=
max_preamble_delay
[
0
];
ind
->
preamble_list
[
0
].
preamble_pwr
=
0xffffffff
;
pdu_index
++
;
}
gNB
->
measurements
.
prach_I0
=
((
gNB
->
measurements
.
prach_I0
*
900
)
>>
10
)
+
((
max_preamble_energy
[
0
]
*
124
)
>>
10
);
if
(
frame
==
0
)
LOG_I
(
PHY
,
"prach_I0 = %d.%d dB
\n
"
,
gNB
->
measurements
.
prach_I0
/
10
,
gNB
->
measurements
.
prach_I0
%
10
);
...
...
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