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
ZhouShuya
OpenXG-RAN
Commits
8ad840cb
Commit
8ad840cb
authored
Aug 07, 2020
by
kn.raju
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed issue in finding prach_id
parent
5d4acc2e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
28 deletions
+41
-28
executables/nr-ru.c
executables/nr-ru.c
+0
-1
openair1/PHY/NR_TRANSPORT/nr_prach.c
openair1/PHY/NR_TRANSPORT/nr_prach.c
+39
-24
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
+1
-1
openair1/SCHED_NR/nr_prach_procedures.c
openair1/SCHED_NR/nr_prach_procedures.c
+1
-2
No files found.
executables/nr-ru.c
View file @
8ad840cb
...
...
@@ -1586,7 +1586,6 @@ void *ru_thread( void *param ) {
for
(
i
=
0
;
i
<
NUMBER_OF_NR_RU_PRACH_MAX
;
i
++
)
{
int
prach_id
=
find_nr_prach_ru
(
ru
,
proc
->
frame_rx
,
proc
->
tti_rx
,
SEARCH_EXIST
);
if
(
prach_id
>=
0
)
{
prach_id
=
2
;
rx_nr_prach_ru
(
ru
,
ru
->
prach_list
[
prach_id
].
fmt
,
ru
->
prach_list
[
prach_id
].
numRA
,
...
...
openair1/PHY/NR_TRANSPORT/nr_prach.c
View file @
8ad840cb
...
...
@@ -46,22 +46,33 @@ void init_prach_list(PHY_VARS_gNB *gNB) {
for
(
int
i
=
0
;
i
<
NUMBER_OF_NR_PRACH_MAX
;
i
++
)
gNB
->
prach_vars
.
list
[
i
].
frame
=-
1
;
}
int16_t
find_nr_prach
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
,
find_type_t
type
)
{
void
free_nr_prach_entry
(
PHY_VARS_gNB
*
gNB
,
int
prach_id
)
{
gNB
->
prach_vars
.
list
[
prach_id
].
frame
=
-
1
;
gNB
->
prach_vars
.
list
[
prach_id
].
slot
=
-
1
;
uint16_t
i
;
int16_t
first_free_index
=-
1
;
}
int16_t
find_nr_prach
(
PHY_VARS_gNB
*
gNB
,
int
frame
,
int
slot
,
find_type_t
type
)
{
AssertFatal
(
gNB
!=
NULL
,
"gNB is null
\n
"
);
for
(
i
=
0
;
i
<
NUMBER_OF_NR_PRACH_MAX
;
i
++
)
{
for
(
uint16_t
i
=
0
;
i
<
NUMBER_OF_NR_PRACH_MAX
;
i
++
)
{
LOG_D
(
PHY
,
"searching for PRACH in %d.%d prach_index %d=> %d.%d
\n
"
,
frame
,
slot
,
i
,
gNB
->
prach_vars
.
list
[
i
].
frame
,
gNB
->
prach_vars
.
list
[
i
].
slot
);
if
((
gNB
->
prach_vars
.
list
[
i
].
frame
==
frame
)
&&
(
gNB
->
prach_vars
.
list
[
i
].
slot
==
slot
))
return
i
;
else
if
((
gNB
->
prach_vars
.
list
[
i
].
frame
==
-
1
)
&&
(
first_free_index
==-
1
))
first_free_index
=
i
;
if
((
type
==
SEARCH_EXIST_OR_FREE
)
&&
(
gNB
->
prach_vars
.
list
[
i
].
frame
==
-
1
)
&&
(
gNB
->
prach_vars
.
list
[
i
].
slot
==
-
1
))
{
LOG_I
(
PHY
,
"Providing free prach index %d
\n
"
,
i
);
return
i
;
}
else
if
((
type
==
SEARCH_EXIST
)
&&
(
gNB
->
prach_vars
.
list
[
i
].
frame
==
frame
)
&&
(
gNB
->
prach_vars
.
list
[
i
].
slot
==
slot
))
{
LOG_I
(
PHY
,
"Providing existing prach index %d
\n
"
,
i
);
return
i
;
}
}
if
(
type
==
SEARCH_EXIST
)
return
-
1
;
return
first_free_index
;
return
-
1
;
}
void
nr_fill_prach
(
PHY_VARS_gNB
*
gNB
,
...
...
@@ -70,8 +81,8 @@ void nr_fill_prach(PHY_VARS_gNB *gNB,
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!!!
numRA %d prach_id %d
\n
"
,
prach_pdu
->
num_ra
,
prach_id
);
AssertFatal
(
(
(
prach_id
>=
0
)
&&
(
prach_id
<
NUMBER_OF_NR_PRACH_MAX
))
||
(
prach_id
<
0
),
"illegal or no prach_id found!!!
prach_id %d
\n
"
,
prach_id
);
gNB
->
prach_vars
.
list
[
prach_id
].
frame
=
SFN
;
gNB
->
prach_vars
.
list
[
prach_id
].
slot
=
Slot
;
...
...
@@ -88,25 +99,28 @@ void init_prach_ru_list(RU_t *ru) {
int16_t
find_nr_prach_ru
(
RU_t
*
ru
,
int
frame
,
int
slot
,
find_type_t
type
)
{
uint16_t
i
;
int16_t
first_free_index
=-
1
;
AssertFatal
(
ru
!=
NULL
,
"ru is null
\n
"
);
pthread_mutex_lock
(
&
ru
->
prach_list_mutex
);
for
(
i
=
0
;
i
<
NUMBER_OF_NR_RU_PRACH_MAX
;
i
++
)
{
for
(
uint16_t
i
=
0
;
i
<
NUMBER_OF_NR_RU_PRACH_MAX
;
i
++
)
{
LOG_D
(
PHY
,
"searching for PRACH in %d.%d : prach_index %d=> %d.%d
\n
"
,
frame
,
slot
,
i
,
ru
->
prach_list
[
i
].
frame
,
ru
->
prach_list
[
i
].
slot
);
if
((
ru
->
prach_list
[
i
].
frame
==
frame
)
&&
(
ru
->
prach_list
[
i
].
slot
==
slot
))
{
if
((
type
==
SEARCH_EXIST_OR_FREE
)
&&
(
ru
->
prach_list
[
i
].
frame
==
-
1
)
&&
(
ru
->
prach_list
[
i
].
slot
==
-
1
))
{
LOG_I
(
PHY
,
"Providing free prach index %d in ru
\n
"
,
i
);
pthread_mutex_unlock
(
&
ru
->
prach_list_mutex
);
return
i
;
}
else
if
((
type
==
SEARCH_EXIST
)
&&
(
ru
->
prach_list
[
i
].
frame
==
frame
)
&&
(
ru
->
prach_list
[
i
].
slot
==
slot
))
{
LOG_I
(
PHY
,
"Providing existing prach index %d in ru
\n
"
,
i
);
pthread_mutex_unlock
(
&
ru
->
prach_list_mutex
);
return
i
;
}
else
if
((
ru
->
prach_list
[
i
].
frame
==
-
1
)
&&
(
first_free_index
==-
1
))
first_free_index
=
i
;
}
pthread_mutex_unlock
(
&
ru
->
prach_list_mutex
);
if
(
type
==
SEARCH_EXIST
)
return
-
1
;
return
first_free_index
;
return
-
1
;
}
void
nr_fill_prach_ru
(
RU_t
*
ru
,
...
...
@@ -115,7 +129,7 @@ void nr_fill_prach_ru(RU_t *ru,
nfapi_nr_prach_pdu_t
*
prach_pdu
)
{
int
prach_id
=
find_nr_prach_ru
(
ru
,
SFN
,
Slot
,
SEARCH_EXIST_OR_FREE
);
AssertFatal
(
(
prach_id
>=
0
)
&&
(
prach_id
<
NUMBER_OF_NR_PRACH_MAX
)
,
AssertFatal
(
(
(
prach_id
>=
0
)
&&
(
prach_id
<
NUMBER_OF_NR_PRACH_MAX
))
||
(
prach_id
<
0
)
,
"illegal or no prach_id found!!! prach_id %d
\n
"
,
prach_id
);
pthread_mutex_lock
(
&
ru
->
prach_list_mutex
);
...
...
@@ -132,7 +146,8 @@ void free_nr_ru_prach_entry(RU_t *ru,
int
prach_id
)
{
pthread_mutex_lock
(
&
ru
->
prach_list_mutex
);
ru
->
prach_list
[
prach_id
].
frame
=-
1
;
ru
->
prach_list
[
prach_id
].
frame
=
-
1
;
ru
->
prach_list
[
prach_id
].
slot
=
-
1
;
pthread_mutex_unlock
(
&
ru
->
prach_list_mutex
);
}
...
...
openair1/PHY/NR_TRANSPORT/nr_transport_proto.h
View file @
8ad840cb
...
...
@@ -325,7 +325,7 @@ int nr_find_pucch(uint16_t rnti,
void
init_prach_list
(
PHY_VARS_gNB
*
gNB
);
void
init_prach_ru_list
(
RU_t
*
ru
);
void
free_nr_ru_prach_entry
(
RU_t
*
ru
,
int
prach_id
);
void
free_nr_prach_entry
(
PHY_VARS_gNB
*
gNB
,
int
prach_id
);
void
nr_decode_pucch1
(
int32_t
**
rxdataF
,
pucch_GroupHopping_t
pucch_GroupHopping
,
...
...
openair1/SCHED_NR/nr_prach_procedures.c
View file @
8ad840cb
...
...
@@ -90,8 +90,7 @@ void L1_nr_prach_procedures(PHY_VARS_gNB *gNB,int frame,int slot) {
&
max_preamble_energy
[
0
],
&
max_preamble_delay
[
0
]
);
gNB
->
prach_vars
.
list
[
prach_id
].
frame
=-
1
;
free_nr_prach_entry
(
gNB
,
prach_id
);
LOG_D
(
PHY
,
"[RAPROC] Frame %d, slot %d : Most likely preamble %d, energy %d dB delay %d (prach_energy counter %d)
\n
"
,
frame
,
slot
,
max_preamble
[
0
],
...
...
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