Commit 961b6a94 authored by magounak's avatar magounak

revert to IDLE on fronthaul or RF fault instead of aborting

parent 68871924
......@@ -238,7 +238,7 @@ void send_IF4p5(RU_t *ru, int frame, int subframe, uint16_t packet_type) {
#endif
rxF = &prach_rxsigF[antenna_id][0];
LOG_D(PHY,"PRACH_if4P5: rxsigF%d energy %d\n",antenna_id,dB_fixed(signal_energy((int*)rxF,839)));
//LOG_D(PHY,"PRACH_if4P5: rxsigF%d energy %d\n",antenna_id,dB_fixed(signal_energy((int*)rxF,839)));
AssertFatal(rxF!=NULL,"rxF is null\n");
if (eth->flags == ETH_RAW_IF4p5_MODE) {
memcpy((void *)(tx_buffer_prach + MAC_HEADER_SIZE_BYTES + sizeof_IF4p5_header_t+PRACH_BLOCK_SIZE_BYTES*antenna_id),
......@@ -249,8 +249,8 @@ void send_IF4p5(RU_t *ru, int frame, int subframe, uint16_t packet_type) {
(void *)rxF,
PRACH_BLOCK_SIZE_BYTES);
}
LOG_D(PHY,"signal energy prach antenna %d => %d dB\n",
antenna_id, dB_fixed(signal_energy((int*)rxF,839)));
/* LOG_D(PHY,"signal energy prach antenna %d => %d dB\n",
antenna_id, dB_fixed(signal_energy((int*)rxF,839)));*/
}
if (ru->idx<=1) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_IF0+ru->idx, 1 );
if ((ru->ifdevice.trx_write_func(&ru->ifdevice,
......@@ -309,11 +309,11 @@ void recv_IF4p5(RU_t *ru, int *frame, int *subframe, uint16_t *packet_type, uint
0) < 0) {
perror("ETHERNET read");
read_cnt++;
/*
if (read_cnt == 2) {
if (read_cnt == 1) {
ru->cmd = STOP_RU;
return;
}*/
}
LOG_E(PHY,"if4p5 read_cnt %d\n",read_cnt);
}
if (ru->idx<=1) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ_IF0+ru->idx, 0 );
......@@ -337,13 +337,13 @@ void recv_IF4p5(RU_t *ru, int *frame, int *subframe, uint16_t *packet_type, uint
db_fulllength/=ru->nb_tx;
db_halflength/=ru->nb_tx;
*symbol_number = ((packet_header->frame_status)>>26)&0x000f;
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_RECV_IF4_SYMBOL, *symbol_number );
//VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_RECV_IF4_SYMBOL, *symbol_number );
LOG_D(PHY,"DL_IF4p5: RU %d frame %d, subframe %d, symbol %d\n",ru->idx,*frame,*subframe,*symbol_number);
slotoffsetF = (*symbol_number)*(fp->ofdm_symbol_size)+1;// + (*subframe)*(fp->ofdm_symbol_size)*((fp->Ncp==1) ? 12 : 14) + 1;
blockoffsetF = slotoffsetF + fp->ofdm_symbol_size - db_halflength - 1;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_DECOMPR_IF, 1 );
//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_DECOMPR_IF, 1 );
for (int antenna_id=0;antenna_id<ru->nb_tx;antenna_id++) {
for (element_id=0; element_id<db_halflength; element_id++) {
i = (uint16_t*) &txdataF[antenna_id][blockoffsetF+element_id];
......@@ -356,14 +356,14 @@ void recv_IF4p5(RU_t *ru, int *frame, int *subframe, uint16_t *packet_type, uint
}
data_block+=db_fulllength;
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_DECOMPR_IF, 0 );
//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_DECOMPR_IF, 0 );
} else if (*packet_type == IF4p5_PULFFT) {
db_fulllength/=ru->nb_rx;
db_halflength/=ru->nb_rx;
*symbol_number = ((packet_header->frame_status)>>26)&0x000f;
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_RECV_IF4_SYMBOL, *symbol_number );
//VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_RECV_IF4_SYMBOL, *symbol_number );
if (ru->idx==0) LOG_D(PHY,"UL_IF4p5: RU %d : frame %d, subframe %d, symbol %d\n",ru->idx,*frame,*subframe,*symbol_number);
......@@ -382,9 +382,9 @@ void recv_IF4p5(RU_t *ru, int *frame, int *subframe, uint16_t *packet_type, uint
//if (element_id==0) LOG_I(PHY,"recv_if4p5: symbol %d rxdata0 = (%u,%u)\n",*symbol_number,*i,*(i+1));
}
LOG_D(PHY,"PULFFT_IF4p5: CC_id %d : frame %d, subframe %d (symbol %d)=> %d dB\n",ru->idx,*frame,*subframe,*symbol_number,
/* LOG_D(PHY,"PULFFT_IF4p5: CC_id %d : frame %d, subframe %d (symbol %d)=> %d dB\n",ru->idx,*frame,*subframe,*symbol_number,
dB_fixed(signal_energy((int*)&rxdataF[antenna_id][slotoffsetF],db_halflength)+
signal_energy((int*)&rxdataF[antenna_id][blockoffsetF],db_halflength)));
signal_energy((int*)&rxdataF[antenna_id][blockoffsetF],db_halflength)));*/
data_block+=db_fulllength;
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_DECOMPR_IF, 0 );
......@@ -412,9 +412,11 @@ void recv_IF4p5(RU_t *ru, int *frame, int *subframe, uint16_t *packet_type, uint
PRACH_BLOCK_SIZE_BYTES);
}
}
/*
if (*frame == 0) LOG_D(PHY,"PRACH_IF4p5: CC_id %d : frame %d, subframe %d => (%d,%d) dB\n",ru->idx,*frame,*subframe,
dB_fixed(signal_energy((int*)&prach_rxsigF[0][0],839)),
dB_fixed(signal_energy((int*)&prach_rxsigF[1][0],839)));
*/
for (idx=0;idx<ru->num_eNB;idx++) ru->wakeup_prach_eNB(ru->eNB_list[idx],ru,*frame,*subframe);
} else if (*packet_type == IF4p5_PULTICK) {
......
......@@ -616,11 +616,12 @@ void rx_rf(RU_t *ru,int *frame,int *subframe) {
proc->timestamp_rx = ts-ru->ts_offset;
// AssertFatal(rxs == fp->samples_per_tti,
//AssertFatal(rxs == fp->samples_per_tti,
// "rx_rf: Asked for %d samples, got %d from SDR\n",fp->samples_per_tti,rxs);
if(rxs != fp->samples_per_tti) {
LOG_E(PHY,"rx_rf: Asked for %d samples, got %d from SDR\n",fp->samples_per_tti,rxs);
late_control=STATE_BURST_TERMINATE;
ru->cmd=STOP_RU;
}
if (proc->first_rx == 1) {
......@@ -1053,7 +1054,7 @@ void do_ru_synch(RU_t *ru) {
fp->samples_per_tti*10,
ru->nb_rx);
if (rxs != fp->samples_per_tti*10) LOG_E(PHY,"requested %d samples, got %d\n",fp->samples_per_tti*10,rxs);
AssertFatal(rxs == fp->samples_per_tti*10,"requested %d samples, got %d\n",fp->samples_per_tti*10,rxs);
// wakeup synchronization processing thread
wakeup_synch(ru);
......
[*]
[*] GTKWave Analyzer v3.3.66 (w)1999-2015 BSI
[*] Fri Aug 24 12:15:17 2018
[*] Sun Nov 10 21:14:20 2019
[*]
[dumpfile] "/tmp/openair_rru_dump.vcd"
[dumpfile_mtime] "Fri Aug 24 12:10:15 2018"
[dumpfile_size] 27839039
[savefile] "/home/libra/oai/openairinterface5g/targets/RT/USER/rru_if4p5_usrp.gtkw"
[timestart] 10300310000
[dumpfile] "/tmp/openair_dump_eNB.vcd"
[dumpfile_mtime] "Sun Nov 10 20:51:43 2019"
[dumpfile_size] 7512351
[savefile] "/home/cepheus/openairinterface5g/targets/RT/USER/rru_if4p5_usrp.gtkw"
[timestart] 18334000
[size] 1301 716
[pos] 309 0
*-23.793451 29983948856 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
*-20.793451 18778591 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
[sst_width] 391
[signals_width] 262
[signals_width] 374
[sst_expanded] 1
[sst_vpaned_height] 294
@28
......@@ -20,17 +20,17 @@ functions.trx_write
@24
variables.trx_write_flags[63:0]
@28
functions.send_if4
@29
functions.phy_procedures_ru_feprx0
@28
functions.send_if4_ru
functions.recv_if4_ru
functions.phy_procedures_ru_feptx_ofdm0
functions.recv_if4
@24
variables.trx_ts[63:0]
variables.trx_tst[63:0]
variables.frame_number_RX0_RU[63:0]
variables.subframe_number_RX0_RU[63:0]
variables.frame_number_if4p5_north_asynch_in[63:0]
variables.subframe_number_if4p5_north_asynch_in[63:0]
variables.frame_number_if4p5_north_out[63:0]
variables.subframe_number_if4p5_north_out[63:0]
variables.frame_number_TX0_RU[63:0]
variables.subframe_number_TX0_RU[63:0]
[pattern_trace] 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment