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
lizhongxiao
OpenXG-RAN
Commits
ce338ed5
Commit
ce338ed5
authored
Jun 11, 2019
by
magounak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added "missed_synch_events" functionality
parent
45965287
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
81 additions
and
48 deletions
+81
-48
openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c
openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c
+2
-2
openair1/PHY/MODULATION/ul_7_5_kHz.c
openair1/PHY/MODULATION/ul_7_5_kHz.c
+5
-4
openair1/PHY/defs_eNB.h
openair1/PHY/defs_eNB.h
+2
-0
openair1/SCHED/fapi_l1.c
openair1/SCHED/fapi_l1.c
+1
-1
openair1/SCHED/prach_procedures.c
openair1/SCHED/prach_procedures.c
+1
-1
openair1/SCHED/ru_procedures.c
openair1/SCHED/ru_procedures.c
+32
-13
targets/RT/USER/lte-ru.c
targets/RT/USER/lte-ru.c
+38
-27
No files found.
openair1/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c
View file @
ce338ed5
...
...
@@ -123,8 +123,8 @@ int lte_est_timing_advance_pusch(PHY_VARS_eNB *eNB,module_id_t UE_id)
LTE_DL_FRAME_PARMS
*
frame_parms
=
(
eNB
==
NULL
)
?
&
ru
->
frame_parms
:
&
eNB
->
frame_parms
;
LTE_eNB_PUSCH
*
eNB_pusch_vars
=
eNB
->
pusch_vars
[
UE_id
];
RU_CALIBRATION
*
calibration
=
&
ru
->
calibration
;
int32_t
**
ul_ch_estimates_time
=
(
eNB
==
NULL
)
?
calibration
->
drs_ch_estimates_time
:
eNB_pusch_vars
->
drs_ch_estimates_time
;
//
int32_t **ul_ch_estimates_time = calibration->drs_ch_estimates_time;
//
int32_t **ul_ch_estimates_time = (eNB==NULL) ? calibration->drs_ch_estimates_time : eNB_pusch_vars->drs_ch_estimates_time;
int32_t
**
ul_ch_estimates_time
=
calibration
->
drs_ch_estimates_time
;
uint8_t
cyclic_shift
=
0
;
int
sync_pos
=
(
frame_parms
->
ofdm_symbol_size
-
cyclic_shift
*
frame_parms
->
ofdm_symbol_size
/
12
)
%
(
frame_parms
->
ofdm_symbol_size
);
...
...
openair1/PHY/MODULATION/ul_7_5_kHz.c
View file @
ce338ed5
...
...
@@ -160,7 +160,8 @@ void remove_7_5_kHz(RU_t *ru,uint8_t slot)
}
// undo 7.5 kHz offset for symbol 10 in case RU is master (for OTA synchronization)
if
(
ru
->
is_slave
==
0
&&
slot
==
3
){
/* if (slot == 3){
memcpy((void*)&rxdata_7_5kHz[aa][(3*frame_parms->ofdm_symbol_size)+
(2*frame_parms->nb_prefix_samples)+
frame_parms->nb_prefix_samples0],
...
...
@@ -169,9 +170,9 @@ void remove_7_5_kHz(RU_t *ru,uint8_t slot)
(2*frame_parms->nb_prefix_samples)+
frame_parms->nb_prefix_samples0],
(frame_parms->ofdm_symbol_size + frame_parms->nb_prefix_samples)*sizeof(int32_t));
}
}
*/
/* if (ru->is_slave == 0 &&
slot == 3){
if
(
slot
==
3
){
memcpy
((
void
*
)
&
rxdata_7_5kHz
[
aa
][(
10
*
frame_parms
->
ofdm_symbol_size
)
+
(
8
*
frame_parms
->
nb_prefix_samples
)
+
2
*
frame_parms
->
nb_prefix_samples0
],
...
...
@@ -180,7 +181,7 @@ void remove_7_5_kHz(RU_t *ru,uint8_t slot)
(
2
*
frame_parms
->
nb_prefix_samples
)
+
frame_parms
->
nb_prefix_samples0
],
(
frame_parms
->
ofdm_symbol_size
+
frame_parms
->
nb_prefix_samples
)
*
sizeof
(
int32_t
));
}
*/
}
}
}
...
...
openair1/PHY/defs_eNB.h
View file @
ce338ed5
...
...
@@ -353,6 +353,8 @@ typedef struct RU_t_s{
int
wait_cnt
;
/// counter to delay start of slave RUs until stable synchronization
int
wait_check
;
/// counter to count missed synch events during synchronization of RU
int
missed_synch_events
;
/// Total gain of receive chain
uint32_t
rx_total_gain_dB
;
/// number of bands that this device can support
...
...
openair1/SCHED/fapi_l1.c
View file @
ce338ed5
...
...
@@ -673,7 +673,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO)
proc
=
&
eNB
->
proc
.
L1_proc
;
/* TODO: check that following line is correct - in the meantime it is disabled */
//
if ((fp->frame_type == TDD) && (subframe_select(fp,subframe)==SF_UL)) return;
if
((
fp
->
frame_type
==
TDD
)
&&
(
subframe_select
(
fp
,
subframe
)
==
SF_UL
))
return
;
ul_subframe
=
pdcch_alloc2ul_subframe
(
fp
,
subframe
);
ul_frame
=
pdcch_alloc2ul_frame
(
fp
,
frame
,
subframe
);
...
...
openair1/SCHED/prach_procedures.c
View file @
ce338ed5
...
...
@@ -138,7 +138,7 @@ void prach_procedures(PHY_VARS_eNB *eNB
*/
if
(
eNB
->
frame_parms
.
prach_emtc_config_common
.
prach_ConfigInfo
.
prach_CElevel_enable
[
0
]
==
1
){
if
((
eNB
->
prach_energy_counter
==
100
)
&&
(
max_preamble_energy
[
0
]
>
eNB
->
measurements
.
prach_I0
+
1
00
))
{
(
max_preamble_energy
[
0
]
>
eNB
->
measurements
.
prach_I0
+
2
00
))
{
eNB
->
UL_INFO
.
rach_ind_br
.
rach_indication_body
.
number_of_preambles
++
;
eNB
->
preamble_list_br
[
ind
].
preamble_rel8
.
timing_advance
=
max_preamble_delay
[
ind
];
//
...
...
openair1/SCHED/ru_procedures.c
View file @
ce338ed5
...
...
@@ -81,7 +81,7 @@ void feptx0(RU_t *ru,int slot) {
slot_offset
=
subframe
*
fp
->
samples_per_tti
+
(
slot
*
(
fp
->
samples_per_tti
>>
1
));
//
LOG_D(PHY,"SFN/SF:RU:TX:%d/%d Generating slot %d\n",ru->proc.frame_tx, ru->proc.subframe_tx,slot);
LOG_D
(
PHY
,
"SFN/SF:RU:TX:%d/%d Generating slot %d
\n
"
,
ru
->
proc
.
frame_tx
,
ru
->
proc
.
subframe_tx
,
slot
);
for
(
aa
=
0
;
aa
<
ru
->
nb_tx
;
aa
++
)
{
if
(
fp
->
Ncp
==
EXTENDED
)
PHY_ofdm_mod
(
&
ru
->
common
.
txdataF_BF
[
aa
][
slot
*
slot_sizeF
],
...
...
@@ -96,7 +96,7 @@ void feptx0(RU_t *ru,int slot) {
fp->frame_type,ru->is_slave);
*/
// generate_drs_pusch() generates dmrs for both slots (symbols 3,10)
if
(
ru
->
generate_dmrs_sync
==
1
&&
slot
==
0
&&
subframe
==
1
&&
aa
==
0
)
{
if
(
ru
->
generate_dmrs_sync
==
1
/*&& slot == 0*/
&&
subframe
==
1
&&
aa
==
0
)
{
generate_drs_pusch
((
PHY_VARS_UE
*
)
NULL
,
(
UE_rxtx_proc_t
*
)
NULL
,
fp
,
...
...
@@ -218,7 +218,7 @@ void feptx_ofdm_2thread(RU_t *ru) {
//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM , 1 );
// The 2nd check is to force the slave RRUs to send DMRS at symbol 10-subframe 1-slot 1
if
(
subframe_select
(
fp
,
subframe
)
==
SF_DL
||
((
subframe_select
(
fp
,
subframe
)
==
SF_DL
||
subframe
==
1
)
&&
ru
->
is_slave
==
1
))
{
if
(
subframe_select
(
fp
,
subframe
)
==
SF_DL
||
((
subframe_select
(
fp
,
subframe
)
==
SF_DL
||
subframe
==
1
)
/*&& ru->is_slave==1*/
))
{
// if (subframe_select(fp,subframe)==SF_DL) {
// If this is not an S-subframe
if
(
pthread_mutex_timedlock
(
&
proc
->
mutex_feptx
,
&
wait
)
!=
0
)
{
...
...
@@ -532,8 +532,7 @@ void fep0(RU_t *ru,int slot) {
LTE_DL_FRAME_PARMS
*
fp
=
&
ru
->
frame_parms
;
int
l
;
//printf("fep0: slot %d\n",slot);
LOG_D
(
PHY
,
"fep0: slot %d, subframe %d
\n
"
,
slot
,
proc
->
subframe_rx
);
//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
));
for
(
l
=
0
;
l
<
fp
->
symbols_per_tti
/
2
;
l
++
)
{
...
...
@@ -703,6 +702,7 @@ void ru_fep_full_2thread(RU_t *ru) {
printf
(
"delay in fep wait on condition in frame_rx: %d subframe_rx: %d
\n
"
,
proc
->
frame_rx
,
proc
->
subframe_rx
);
}
/* if (proc->subframe_rx==1 && ru->is_slave==0) {
// LOG_I(PHY,"******************** Master receives DMRS from slave\n");
ru->wait_check++;
...
...
@@ -802,10 +802,26 @@ void ru_fep_full_2thread(RU_t *ru) {
ru
->
idx
);
if
(
ru
->
state
==
RU_CHECK_SYNC
)
{
if
((
check_sync_pos
>=
0
&&
check_sync_pos
<
8
)
||
(
check_sync_pos
<
0
&&
check_sync_pos
>-
8
))
{
LOG_I
(
PHY
,
"~~~~~~~~~~~ check_sync_pos %d, frame %d, cnt %d
\n
"
,
check_sync_pos
,
proc
->
frame_rx
,
ru
->
wait_check
);
LOG_I
(
PHY
,
"~~~~~~~~~~~ check_sync_pos %d, frame %d, cnt %d
, missed %d
\n
"
,
check_sync_pos
,
proc
->
frame_rx
,
ru
->
wait_check
,
ru
->
missed_synch_events
);
ru
->
wait_check
++
;
}
else
{
ru
->
missed_synch_events
++
;
LOG_I
(
PHY
,
"!!!!!!!!!!!! check_sync_pos %d, frame %d, cnt %d, missed %d
\n
"
,
check_sync_pos
,
proc
->
frame_rx
,
ru
->
wait_check
,
ru
->
missed_synch_events
);
}
if
(
ru
->
missed_synch_events
>
2
)
{
ru
->
in_synch
=
0
;
if
(
ru
->
stop_rf
)
{
ru
->
stop_rf
(
ru
);
ru
->
state
=
RU_SYNC
;
ru
->
cmd
=
EMPTY
;
LOG_I
(
PHY
,
"RU %d rf device stopped
\n
"
,
ru
->
idx
);
LOG_M
(
"rxdata.m"
,
"rxdata"
,
&
ru
->
common
.
rxdata
[
0
][
0
],
fp
->
samples_per_tti
*
2
,
1
,
1
);
exit
(
-
1
);
}
else
AssertFatal
(
1
==
0
,
"ru->stop_rf doesn't exist
\n
"
);
}
if
(
ru
->
wait_check
==
20
)
{
ru
->
state
=
RU_RUN
;
ru
->
wait_check
=
0
;
...
...
@@ -815,19 +831,22 @@ void ru_fep_full_2thread(RU_t *ru) {
LOG_I
(
PHY
,
"Sending RRU_sync_ok to RAU
\n
"
);
AssertFatal
((
ru
->
ifdevice
.
trx_ctlsend_func
(
&
ru
->
ifdevice
,
&
rru_config_msg
,
rru_config_msg
.
len
)
!=-
1
),
"Failed to send msg to RAU %d
\n
"
,
ru
->
idx
);
//LOG_I(PHY,"~~~~~~~~~ RU_RUN\n");
/
*
LOG_M("dmrs_time.m","dmrstime",calibration->drs_ch_estimates_time[0], (fp->ofdm_symbol_size),1,1);
LOG_M("rxdataF_ext.m","rxdataFext",&calibration->rxdataF_ext[0][36*fp->N_RB_DL], 12*(fp->N_RB_DL),1,1);
LOG_M("drs_seq0.m","drsseq0",ul_ref_sigs_rx[0][0][23],600,1,1);
LOG_M("rxdata.m","rxdata",&ru->common.rxdata[0][0], fp->samples_per_tti*2,1,1);
exit(-1);*/
/
/
LOG_M("dmrs_time.m","dmrstime",calibration->drs_ch_estimates_time[0], (fp->ofdm_symbol_size),1,1);
//
LOG_M("rxdataF_ext.m","rxdataFext",&calibration->rxdataF_ext[0][36*fp->N_RB_DL], 12*(fp->N_RB_DL),1,1);
//
LOG_M("drs_seq0.m","drsseq0",ul_ref_sigs_rx[0][0][23],600,1,1);
//
LOG_M("rxdata.m","rxdata",&ru->common.rxdata[0][0], fp->samples_per_tti*2,1,1);
//exit(-1);
}
}
else
if
(
ru
->
state
==
RU_RUN
)
{
// check for synchronization error
if
(
check_sync_pos
>=
8
||
check_sync_pos
<=-
8
)
{
LOG_E
(
PHY
,
"~~~~~~~~~~~~~~ check_sync_pos %d, frame %d ---> LOST SYNC-EXIT
\n
"
,
check_sync_pos
,
proc
->
frame_rx
);
//LOG_M("rxdata.m","rxdata",&ru->common.rxdata[0][0], fp->samples_per_tti*2,1,1);
/*
LOG_M("dmrs_time.m","dmrstime",calibration->drs_ch_estimates_time[0], (fp->ofdm_symbol_size),1,1);
LOG_M("rxdata.m","rxdata",&ru->common.rxdata[0][0], fp->samples_per_tti*2,1,1);
exit(-1);
*/
}
}
...
...
targets/RT/USER/lte-ru.c
View file @
ce338ed5
This diff is collapsed.
Click to expand it.
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