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
ad346a6a
Commit
ad346a6a
authored
Sep 17, 2020
by
Sakthivel Velumani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wait for sometime for ulsch to finish
parent
ce7ec91e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
23 deletions
+41
-23
executables/nr-gnb.c
executables/nr-gnb.c
+30
-14
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+11
-9
No files found.
executables/nr-gnb.c
View file @
ad346a6a
...
@@ -545,6 +545,8 @@ int wakeup_rxtx(PHY_VARS_gNB *gNB,RU_t *ru) {
...
@@ -545,6 +545,8 @@ int wakeup_rxtx(PHY_VARS_gNB *gNB,RU_t *ru) {
int
i
;
int
i
;
struct
timespec
abstime
;
struct
timespec
abstime
;
int
time_ns
=
50000
;
int
time_ns
=
50000
;
int
wait_timer
=
0
;
bool
do_last_check
=
1
;
AssertFatal
((
ret
=
pthread_mutex_lock
(
&
proc
->
mutex_RU
))
==
0
,
"mutex_lock returns %d
\n
"
,
ret
);
AssertFatal
((
ret
=
pthread_mutex_lock
(
&
proc
->
mutex_RU
))
==
0
,
"mutex_lock returns %d
\n
"
,
ret
);
for
(
i
=
0
;
i
<
gNB
->
num_RU
;
i
++
)
{
for
(
i
=
0
;
i
<
gNB
->
num_RU
;
i
++
)
{
...
@@ -565,22 +567,36 @@ int wakeup_rxtx(PHY_VARS_gNB *gNB,RU_t *ru) {
...
@@ -565,22 +567,36 @@ int wakeup_rxtx(PHY_VARS_gNB *gNB,RU_t *ru) {
AssertFatal
((
ret
=
pthread_mutex_unlock
(
&
proc
->
mutex_RU
))
==
0
,
"muex_unlock returns %d
\n
"
,
ret
);
AssertFatal
((
ret
=
pthread_mutex_unlock
(
&
proc
->
mutex_RU
))
==
0
,
"muex_unlock returns %d
\n
"
,
ret
);
}
}
clock_gettime
(
CLOCK_REALTIME
,
&
abstime
);
abstime
.
tv_nsec
=
abstime
.
tv_nsec
+
time_ns
;
if
(
abstime
.
tv_nsec
>=
1000
*
1000
*
1000
)
{
abstime
.
tv_nsec
-=
1000
*
1000
*
1000
;
abstime
.
tv_sec
+=
1
;
}
// wake up TX for subframe n+sf_ahead
// wake up TX for subframe n+sf_ahead
// lock the TX mutex and make sure the thread is ready
// lock the TX mutex and make sure the thread is ready
AssertFatal
((
ret
=
pthread_mutex_timedlock
(
&
L1_proc
->
mutex
,
&
abstime
))
==
0
,
"mutex_lock returns %d
\n
"
,
ret
);
while
(
wait_timer
<
200
)
{
clock_gettime
(
CLOCK_REALTIME
,
&
abstime
);
abstime
.
tv_nsec
=
abstime
.
tv_nsec
+
time_ns
;
if
(
L1_proc
->
instance_cnt
==
0
)
{
// L1_thread is busy so abort the subframe
if
(
abstime
.
tv_nsec
>=
1000
*
1000
*
1000
)
{
AssertFatal
((
ret
=
pthread_mutex_unlock
(
&
L1_proc
->
mutex
))
==
0
,
"muex_unlock return %d
\n
"
,
ret
);
abstime
.
tv_nsec
-=
1000
*
1000
*
1000
;
LOG_W
(
PHY
,
"L1_thread isn't ready in %d.%d, aborting RX processing
\n
"
,
ru_proc
->
frame_rx
,
ru_proc
->
tti_rx
);
abstime
.
tv_sec
+=
1
;
return
(
-
1
);
}
AssertFatal
((
ret
=
pthread_mutex_timedlock
(
&
L1_proc
->
mutex
,
&
abstime
))
==
0
,
"mutex_lock returns %d
\n
"
,
ret
);
if
(
L1_proc
->
instance_cnt
==
0
)
{
// L1_thread is busy so wait for a bit
AssertFatal
((
ret
=
pthread_mutex_unlock
(
&
L1_proc
->
mutex
))
==
0
,
"muex_unlock return %d
\n
"
,
ret
);
wait_timer
+=
50
;
usleep
(
50
);
}
else
{
do_last_check
=
0
;
break
;
}
}
if
(
do_last_check
)
{
AssertFatal
((
ret
=
pthread_mutex_timedlock
(
&
L1_proc
->
mutex
,
&
abstime
))
==
0
,
"mutex_lock returns %d
\n
"
,
ret
);
if
(
L1_proc
->
instance_cnt
==
0
)
{
// L1_thread is busy so abort the subframe
AssertFatal
((
ret
=
pthread_mutex_unlock
(
&
L1_proc
->
mutex
))
==
0
,
"muex_unlock return %d
\n
"
,
ret
);
LOG_W
(
PHY
,
"L1_thread isn't ready in %d.%d, aborting RX processing
\n
"
,
ru_proc
->
frame_rx
,
ru_proc
->
tti_rx
);
return
(
-
1
);
}
}
}
++
L1_proc
->
instance_cnt
;
++
L1_proc
->
instance_cnt
;
...
@@ -796,7 +812,7 @@ void init_gNB_proc(int inst) {
...
@@ -796,7 +812,7 @@ void init_gNB_proc(int inst) {
gNB
->
threadPool
=
(
tpool_t
*
)
malloc
(
sizeof
(
tpool_t
));
gNB
->
threadPool
=
(
tpool_t
*
)
malloc
(
sizeof
(
tpool_t
));
gNB
->
respDecode
=
(
notifiedFIFO_t
*
)
malloc
(
sizeof
(
notifiedFIFO_t
));
gNB
->
respDecode
=
(
notifiedFIFO_t
*
)
malloc
(
sizeof
(
notifiedFIFO_t
));
char
ul_pool
[]
=
"-1,-1,-1,-1,-1,-1,-1,-1
,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
"
;
char
ul_pool
[]
=
"-1,-1,-1,-1,-1,-1,-1,-1"
;
initTpool
(
ul_pool
,
gNB
->
threadPool
,
false
);
initTpool
(
ul_pool
,
gNB
->
threadPool
,
false
);
initNotifiedFIFO
(
gNB
->
respDecode
);
initNotifiedFIFO
(
gNB
->
respDecode
);
}
}
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
ad346a6a
...
@@ -613,21 +613,23 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
...
@@ -613,21 +613,23 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
uint8_t
symbol_start
=
ulsch_harq
->
ulsch_pdu
.
start_symbol_index
;
uint8_t
symbol_start
=
ulsch_harq
->
ulsch_pdu
.
start_symbol_index
;
uint8_t
symbol_end
=
symbol_start
+
ulsch_harq
->
ulsch_pdu
.
nr_of_symbols
;
uint8_t
symbol_end
=
symbol_start
+
ulsch_harq
->
ulsch_pdu
.
nr_of_symbols
;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RX_PUSCH
,
1
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RX_PUSCH
,
1
);
start_meas
(
&
gNB
->
rx_pusch_stats
);
start_meas
(
&
gNB
->
rx_pusch_stats
);
for
(
uint8_t
symbol
=
symbol_start
;
symbol
<
symbol_end
;
symbol
++
)
{
if
(
!
get_softmodem_params
()
->
phy_test
)
{
no_sig
=
nr_rx_pusch
(
gNB
,
ULSCH_id
,
frame_rx
,
slot_rx
,
symbol
,
harq_pid
);
for
(
uint8_t
symbol
=
symbol_start
;
symbol
<
symbol_end
;
symbol
++
)
{
if
(
no_sig
)
{
no_sig
=
nr_rx_pusch
(
gNB
,
ULSCH_id
,
frame_rx
,
slot_rx
,
symbol
,
harq_pid
);
LOG_I
(
PHY
,
"PUSCH not detected in symbol %d
\n
"
,
symbol
);
if
(
no_sig
)
{
nr_fill_indication
(
gNB
,
frame_rx
,
slot_rx
,
ULSCH_id
,
harq_pid
,
1
);
LOG_I
(
PHY
,
"PUSCH not detected in symbol %d
\n
"
,
symbol
);
return
;
nr_fill_indication
(
gNB
,
frame_rx
,
slot_rx
,
ULSCH_id
,
harq_pid
,
1
);
return
;
}
}
}
}
}
stop_meas
(
&
gNB
->
rx_pusch_stats
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RX_PUSCH
,
0
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RX_PUSCH
,
0
);
//LOG_M("rxdataF_comp.m","rxF_comp",gNB->pusch_vars[0]->rxdataF_comp[0],6900,1,1);
//LOG_M("rxdataF_comp.m","rxF_comp",gNB->pusch_vars[0]->rxdataF_comp[0],6900,1,1);
//LOG_M("rxdataF_ext.m","rxF_ext",gNB->pusch_vars[0]->rxdataF_ext[0],6900,1,1);
//LOG_M("rxdataF_ext.m","rxF_ext",gNB->pusch_vars[0]->rxdataF_ext[0],6900,1,1);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_ULSCH_PROCEDURES_RX
,
1
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_ULSCH_PROCEDURES_RX
,
1
);
nr_ulsch_procedures
(
gNB
,
frame_rx
,
slot_rx
,
ULSCH_id
,
harq_pid
);
nr_ulsch_procedures
(
gNB
,
frame_rx
,
slot_rx
,
ULSCH_id
,
harq_pid
);
stop_meas
(
&
gNB
->
rx_pusch_stats
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_ULSCH_PROCEDURES_RX
,
0
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_ULSCH_PROCEDURES_RX
,
0
);
break
;
break
;
}
}
...
...
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