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
spbro
OpenXG-RAN
Commits
e04ed989
Commit
e04ed989
authored
Oct 01, 2024
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused code
parent
0609d31d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
99 deletions
+0
-99
nfapi/oai_integration/aerial/fapi_vnf_p7.c
nfapi/oai_integration/aerial/fapi_vnf_p7.c
+0
-99
No files found.
nfapi/oai_integration/aerial/fapi_vnf_p7.c
View file @
e04ed989
...
...
@@ -35,105 +35,6 @@
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h" // for handle_nr_srs_measurements()
extern
RAN_CONTEXT_t
RC
;
extern
UL_RCC_IND_t
UL_RCC_INFO
;
extern
uint16_t
sf_ahead
;
int
aerialwake_eNB_rxtx
(
PHY_VARS_eNB
*
eNB
,
uint16_t
sfn
,
uint16_t
sf
)
{
L1_proc_t
*
proc
=
&
eNB
->
proc
;
L1_rxtx_proc_t
*
L1_proc
=
(
sf
&
1
)
?
&
proc
->
L1_proc
:
&
proc
->
L1_proc_tx
;
LTE_DL_FRAME_PARMS
*
fp
=
&
eNB
->
frame_parms
;
// NFAPI_TRACE(NFAPI_TRACE_INFO, "%s(eNB:%p, sfn:%d, sf:%d)\n", __FUNCTION__, eNB, sfn, sf);
// int i;
struct
timespec
wait
;
wait
.
tv_sec
=
0
;
wait
.
tv_nsec
=
5000000L
;
// wake up TX for subframe n+sf_ahead
// lock the TX mutex and make sure the thread is ready
// if (pthread_mutex_timedlock(&L1_proc->mutex,&wait) != 0) {
// LOG_E( PHY, "[eNB] ERROR pthread_mutex_lock for eNB RXTX thread %d (IC %d)\n", L1_proc->subframe_rx&1,L1_proc->instance_cnt );
// exit_fun( "error locking mutex_rxtx" );
// return(-1);
//}
{
static
uint16_t
old_sf
=
0
;
static
uint16_t
old_sfn
=
0
;
proc
->
subframe_rx
=
old_sf
;
proc
->
frame_rx
=
old_sfn
;
// Try to be 1 frame back
old_sf
=
sf
;
old_sfn
=
sfn
;
if
(
old_sf
==
0
&&
old_sfn
%
100
==
0
)
LOG_D
(
PHY
,
"[eNB] sfn/sf:%d%d old_sfn/sf:%d%d proc[rx:%d%d]
\n
"
,
sfn
,
sf
,
old_sfn
,
old_sf
,
proc
->
frame_rx
,
proc
->
subframe_rx
);
}
// wake up TX for subframe n+sf_ahead
// lock the TX mutex and make sure the thread is ready
if
(
pthread_mutex_timedlock
(
&
L1_proc
->
mutex
,
&
wait
)
!=
0
)
{
LOG_E
(
PHY
,
"[eNB] ERROR pthread_mutex_lock for eNB RXTX thread %d (IC %d)
\n
"
,
L1_proc
->
subframe_rx
&
1
,
L1_proc
->
instance_cnt
);
// exit_fun( "error locking mutex_rxtx" );
return
(
-
1
);
}
static
int
busy_log_cnt
=
0
;
if
(
L1_proc
->
instance_cnt
<
0
)
{
++
L1_proc
->
instance_cnt
;
if
(
busy_log_cnt
!=
0
)
{
LOG_E
(
MAC
,
"RCC singal to rxtx frame %d subframe %d busy end %d (frame %d subframe %d)
\n
"
,
L1_proc
->
frame_rx
,
L1_proc
->
subframe_rx
,
busy_log_cnt
,
proc
->
frame_rx
,
proc
->
subframe_rx
);
}
busy_log_cnt
=
0
;
}
else
{
if
(
busy_log_cnt
==
0
)
{
LOG_E
(
MAC
,
"RCC singal to rxtx frame %d subframe %d busy %d (frame %d subframe %d)
\n
"
,
L1_proc
->
frame_rx
,
L1_proc
->
subframe_rx
,
L1_proc
->
instance_cnt
,
proc
->
frame_rx
,
proc
->
subframe_rx
);
}
pthread_mutex_unlock
(
&
L1_proc
->
mutex
);
busy_log_cnt
++
;
return
(
0
);
}
pthread_mutex_unlock
(
&
L1_proc
->
mutex
);
// LOG_D( PHY,"[VNF-subframe_ind] sfn/sf:%d:%d proc[frame_rx:%d subframe_rx:%d] L1_proc->instance_cnt_rxtx:%d \n", sfn, sf,
// proc->frame_rx, proc->subframe_rx, L1_proc->instance_cnt_rxtx);
// We have just received and processed the common part of a subframe, say n.
// TS_rx is the last received timestamp (start of 1st slot), TS_tx is the desired
// transmitted timestamp of the next TX slot (first).
// The last (TS_rx mod samples_per_frame) was n*samples_per_tti,
// we want to generate subframe (n+N), so TS_tx = TX_rx+N*samples_per_tti,
// and proc->subframe_tx = proc->subframe_rx+sf_ahead
L1_proc
->
timestamp_tx
=
proc
->
timestamp_rx
+
(
sf_ahead
*
fp
->
samples_per_tti
);
L1_proc
->
frame_rx
=
proc
->
frame_rx
;
L1_proc
->
subframe_rx
=
proc
->
subframe_rx
;
L1_proc
->
frame_tx
=
(
L1_proc
->
subframe_rx
>
(
9
-
sf_ahead
))
?
(
L1_proc
->
frame_rx
+
1
)
&
1023
:
L1_proc
->
frame_rx
;
L1_proc
->
subframe_tx
=
(
L1_proc
->
subframe_rx
+
sf_ahead
)
%
10
;
// LOG_D(PHY, "sfn/sf:%d%d proc[rx:%d%d] L1_proc[instance_cnt_rxtx:%d rx:%d%d] About to wake rxtx thread\n\n", sfn, sf,
// proc->frame_rx, proc->subframe_rx, L1_proc->instance_cnt_rxtx, L1_proc->frame_rx, L1_proc->subframe_rx);
// the thread can now be woken up
if
(
pthread_cond_signal
(
&
L1_proc
->
cond
)
!=
0
)
{
LOG_E
(
PHY
,
"[eNB] ERROR pthread_cond_signal for eNB RXn-TXnp4 thread
\n
"
);
exit_fun
(
"ERROR pthread_cond_signal"
);
return
(
-
1
);
}
return
(
0
);
}
extern
pthread_cond_t
nfapi_sync_cond
;
extern
pthread_mutex_t
nfapi_sync_mutex
;
extern
int
nfapi_sync_var
;
...
...
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