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
alex037yang
OpenXG-RAN
Commits
c4ee45ac
Commit
c4ee45ac
authored
Aug 09, 2018
by
ISIP CS/NCTU
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace ru_procedures.c
parent
e04b8241
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
20 deletions
+33
-20
openair1/SCHED/ru_procedures.c
openair1/SCHED/ru_procedures.c
+33
-20
No files found.
openair1/SCHED/ru_procedures.c
View file @
c4ee45ac
...
@@ -68,7 +68,7 @@ void feptx0(RU_t *ru,int slot) {
...
@@ -68,7 +68,7 @@ void feptx0(RU_t *ru,int slot) {
int
subframe
=
ru
->
proc
.
subframe_tx
;
int
subframe
=
ru
->
proc
.
subframe_tx
;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM
+
slot
,
1
);
//
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM+slot , 1 );
slot_offset
=
subframe
*
fp
->
samples_per_tti
+
(
slot
*
(
fp
->
samples_per_tti
>>
1
));
slot_offset
=
subframe
*
fp
->
samples_per_tti
+
(
slot
*
(
fp
->
samples_per_tti
>>
1
));
...
@@ -128,7 +128,7 @@ void feptx0(RU_t *ru,int slot) {
...
@@ -128,7 +128,7 @@ void feptx0(RU_t *ru,int slot) {
}
}
}*/
}*/
}
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM
+
slot
,
0
);
//
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM+slot , 0);
}
}
static
void
*
feptx_thread
(
void
*
param
)
{
static
void
*
feptx_thread
(
void
*
param
)
{
...
@@ -180,12 +180,12 @@ void feptx_ofdm_2thread(RU_t *ru) {
...
@@ -180,12 +180,12 @@ void feptx_ofdm_2thread(RU_t *ru) {
wait
.
tv_sec
=
0
;
wait
.
tv_sec
=
0
;
wait
.
tv_nsec
=
5000000L
;
wait
.
tv_nsec
=
5000000L
;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM
,
1
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM
+
ru
->
idx
,
1
);
start_meas
(
&
ru
->
ofdm_mod_stats
);
start_meas
(
&
ru
->
ofdm_mod_stats
);
if
(
subframe_select
(
fp
,
subframe
)
==
SF_UL
)
return
;
if
(
subframe_select
(
fp
,
subframe
)
==
SF_UL
)
return
;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM
,
1
);
//
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM , 1 );
if
(
subframe_select
(
fp
,
subframe
)
==
SF_DL
)
{
if
(
subframe_select
(
fp
,
subframe
)
==
SF_DL
)
{
// If this is not an S-subframe
// If this is not an S-subframe
...
@@ -225,10 +225,10 @@ void feptx_ofdm_2thread(RU_t *ru) {
...
@@ -225,10 +225,10 @@ void feptx_ofdm_2thread(RU_t *ru) {
printf("delay in feptx wait on codition in frame_rx: %d subframe_rx: %d \n",proc->frame_tx,proc->subframe_tx);
printf("delay in feptx wait on codition in frame_rx: %d subframe_rx: %d \n",proc->frame_tx,proc->subframe_tx);
}*/
}*/
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM
,
0
);
//
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM , 0 );
stop_meas
(
&
ru
->
ofdm_mod_stats
);
stop_meas
(
&
ru
->
ofdm_mod_stats
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM
,
0
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM
+
ru
->
idx
,
0
);
}
}
...
@@ -247,7 +247,7 @@ void feptx_ofdm(RU_t *ru) {
...
@@ -247,7 +247,7 @@ void feptx_ofdm(RU_t *ru) {
// int CC_id = ru->proc.CC_id;
// int CC_id = ru->proc.CC_id;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM
,
1
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM
+
ru
->
idx
,
1
);
slot_offset_F
=
0
;
slot_offset_F
=
0
;
slot_offset
=
subframe
*
fp
->
samples_per_tti
;
slot_offset
=
subframe
*
fp
->
samples_per_tti
;
...
@@ -369,7 +369,7 @@ void feptx_ofdm(RU_t *ru) {
...
@@ -369,7 +369,7 @@ void feptx_ofdm(RU_t *ru) {
dB_fixed
(
signal_energy_nodc
(
ru
->
common
.
txdataF_BF
[
aa
],
2
*
slot_sizeF
)));
dB_fixed
(
signal_energy_nodc
(
ru
->
common
.
txdataF_BF
[
aa
],
2
*
slot_sizeF
)));
}
}
}
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM
,
0
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM
+
ru
->
idx
,
0
);
}
}
void
feptx_prec
(
RU_t
*
ru
)
{
void
feptx_prec
(
RU_t
*
ru
)
{
...
@@ -382,16 +382,29 @@ void feptx_prec(RU_t *ru) {
...
@@ -382,16 +382,29 @@ void feptx_prec(RU_t *ru) {
if
(
ru
->
num_eNB
==
1
)
{
if
(
ru
->
num_eNB
==
1
)
{
eNB
=
eNB_list
[
0
];
eNB
=
eNB_list
[
0
];
bw
=
ru
->
beam_weights
[
0
];
fp
=
&
eNB
->
frame_parms
;
fp
=
&
eNB
->
frame_parms
;
int
nb_antenna_ports
=
15
;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_PREC
,
1
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_PREC
+
ru
->
idx
,
1
);
/*
for (aa=0;aa<ru->nb_tx;aa++)
for (aa=0;aa<ru->nb_tx;aa++)
memcpy((void*)ru->common.txdataF_BF[aa],
memcpy((void*)ru->common.txdataF_BF[aa],
(void*)&eNB->common_vars.txdataF[aa][subframe*fp->symbols_per_tti*fp->ofdm_symbol_size],
(void*)&eNB->common_vars.txdataF[aa][subframe*fp->symbols_per_tti*fp->ofdm_symbol_size],
fp->symbols_per_tti*fp->ofdm_symbol_size*sizeof(int32_t));
fp->symbols_per_tti*fp->ofdm_symbol_size*sizeof(int32_t));
*/
printf
(
"///////////*******ru id %d:executing beam_precoding_one_eNB
\n
"
,
ru
->
idx
);
beam_precoding_one_eNB
(
eNB
->
common_vars
.
txdataF
,
ru
->
common
.
txdataF_BF
,
bw
,
subframe
,
nb_antenna_ports
,
ru
->
nb_tx
,
fp
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_PREC
,
0
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_PREC
+
ru
->
idx
,
0
);
}
}
else
{
else
{
for
(
i
=
0
;
i
<
ru
->
num_eNB
;
i
++
)
{
for
(
i
=
0
;
i
<
ru
->
num_eNB
;
i
++
)
{
...
@@ -422,7 +435,7 @@ void fep0(RU_t *ru,int slot) {
...
@@ -422,7 +435,7 @@ void fep0(RU_t *ru,int slot) {
// printf("fep0: slot %d\n",slot);
// printf("fep0: slot %d\n",slot);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX
+
slot
,
1
);
//
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX+slot, 1);
remove_7_5_kHz
(
ru
,(
slot
&
1
)
+
(
proc
->
subframe_rx
<<
1
));
remove_7_5_kHz
(
ru
,(
slot
&
1
)
+
(
proc
->
subframe_rx
<<
1
));
for
(
l
=
0
;
l
<
fp
->
symbols_per_tti
/
2
;
l
++
)
{
for
(
l
=
0
;
l
<
fp
->
symbols_per_tti
/
2
;
l
++
)
{
...
@@ -432,7 +445,7 @@ void fep0(RU_t *ru,int slot) {
...
@@ -432,7 +445,7 @@ void fep0(RU_t *ru,int slot) {
0
0
);
);
}
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX
+
slot
,
0
);
//
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX+slot, 0);
}
}
...
@@ -457,9 +470,9 @@ static void *fep_thread(void *param) {
...
@@ -457,9 +470,9 @@ static void *fep_thread(void *param) {
if
(
wait_on_condition
(
&
proc
->
mutex_fep
,
&
proc
->
cond_fep
,
&
proc
->
instance_cnt_fep
,
"fep thread"
)
<
0
)
break
;
if
(
wait_on_condition
(
&
proc
->
mutex_fep
,
&
proc
->
cond_fep
,
&
proc
->
instance_cnt_fep
,
"fep thread"
)
<
0
)
break
;
if
(
oai_exit
)
break
;
if
(
oai_exit
)
break
;
//stop_meas(&ru->ofdm_demod_wakeup_stats);
//stop_meas(&ru->ofdm_demod_wakeup_stats);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX1
,
1
);
//
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX1, 1 );
fep0
(
ru
,
0
);
fep0
(
ru
,
0
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX1
,
0
);
//
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX1, 0 );
if
(
release_thread
(
&
proc
->
mutex_fep
,
&
proc
->
instance_cnt_fep
,
"fep thread"
)
<
0
)
break
;
if
(
release_thread
(
&
proc
->
mutex_fep
,
&
proc
->
instance_cnt_fep
,
"fep thread"
)
<
0
)
break
;
if
(
pthread_cond_signal
(
&
proc
->
cond_fep
)
!=
0
)
{
if
(
pthread_cond_signal
(
&
proc
->
cond_fep
)
!=
0
)
{
...
@@ -543,12 +556,12 @@ void ru_fep_full_2thread(RU_t *ru) {
...
@@ -543,12 +556,12 @@ void ru_fep_full_2thread(RU_t *ru) {
if
((
fp
->
frame_type
==
TDD
)
&&
if
((
fp
->
frame_type
==
TDD
)
&&
(
subframe_select
(
fp
,
proc
->
subframe_rx
)
!=
SF_UL
))
return
;
(
subframe_select
(
fp
,
proc
->
subframe_rx
)
!=
SF_UL
))
return
;
if
(
ru
->
idx
==
0
)
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX
,
1
);
//
if (ru->idx == 0) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX, 1 );
wait
.
tv_sec
=
0
;
wait
.
tv_sec
=
0
;
wait
.
tv_nsec
=
5000000L
;
wait
.
tv_nsec
=
5000000L
;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX
,
1
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX
+
ru
->
idx
,
1
);
start_meas
(
&
ru
->
ofdm_demod_stats
);
start_meas
(
&
ru
->
ofdm_demod_stats
);
if
(
pthread_mutex_timedlock
(
&
proc
->
mutex_fep
,
&
wait
)
!=
0
)
{
if
(
pthread_mutex_timedlock
(
&
proc
->
mutex_fep
,
&
wait
)
!=
0
)
{
...
@@ -588,7 +601,7 @@ void ru_fep_full_2thread(RU_t *ru) {
...
@@ -588,7 +601,7 @@ void ru_fep_full_2thread(RU_t *ru) {
}
}
stop_meas
(
&
ru
->
ofdm_demod_stats
);
stop_meas
(
&
ru
->
ofdm_demod_stats
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX
,
0
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX
+
ru
->
idx
,
0
);
}
}
...
@@ -603,7 +616,7 @@ void fep_full(RU_t *ru) {
...
@@ -603,7 +616,7 @@ void fep_full(RU_t *ru) {
(
subframe_select
(
fp
,
proc
->
subframe_rx
)
!=
SF_UL
))
return
;
(
subframe_select
(
fp
,
proc
->
subframe_rx
)
!=
SF_UL
))
return
;
start_meas
(
&
ru
->
ofdm_demod_stats
);
start_meas
(
&
ru
->
ofdm_demod_stats
);
if
(
ru
->
idx
==
0
)
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX
,
1
);
if
(
ru
->
idx
==
0
)
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX
+
ru
->
idx
,
1
);
remove_7_5_kHz
(
ru
,
proc
->
subframe_rx
<<
1
);
remove_7_5_kHz
(
ru
,
proc
->
subframe_rx
<<
1
);
remove_7_5_kHz
(
ru
,
1
+
(
proc
->
subframe_rx
<<
1
));
remove_7_5_kHz
(
ru
,
1
+
(
proc
->
subframe_rx
<<
1
));
...
@@ -620,7 +633,7 @@ void fep_full(RU_t *ru) {
...
@@ -620,7 +633,7 @@ void fep_full(RU_t *ru) {
0
0
);
);
}
}
if
(
ru
->
idx
==
0
)
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX
,
0
);
if
(
ru
->
idx
==
0
)
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX
+
ru
->
idx
,
0
);
stop_meas
(
&
ru
->
ofdm_demod_stats
);
stop_meas
(
&
ru
->
ofdm_demod_stats
);
...
...
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