Commit 8be18c36 authored by Raymond Knopp's avatar Raymond Knopp

debugging for RRU if4p5 TDD

parent 2da964bb
...@@ -98,6 +98,7 @@ const char* eurecomVariablesNames[] = { ...@@ -98,6 +98,7 @@ const char* eurecomVariablesNames[] = {
"rxcnt", "rxcnt",
"trx_ts", "trx_ts",
"trx_tst", "trx_tst",
"trx_write_flags",
"tx_ts", "tx_ts",
"rx_ts", "rx_ts",
"hw_cnt_rx", "hw_cnt_rx",
......
...@@ -70,6 +70,7 @@ typedef enum { ...@@ -70,6 +70,7 @@ typedef enum {
VCD_SIGNAL_DUMPER_VARIABLES_RXCNT, VCD_SIGNAL_DUMPER_VARIABLES_RXCNT,
VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS, VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS,
VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST,
VCD_SIGNAL_DUMPER_VARIABLES_TRX_WRITE_FLAGS,
VCD_SIGNAL_DUMPER_VARIABLES_TX_TS, VCD_SIGNAL_DUMPER_VARIABLES_TX_TS,
VCD_SIGNAL_DUMPER_VARIABLES_RX_TS, VCD_SIGNAL_DUMPER_VARIABLES_RX_TS,
VCD_SIGNAL_DUMPER_VARIABLES_RX_HWCNT, VCD_SIGNAL_DUMPER_VARIABLES_RX_HWCNT,
......
...@@ -177,17 +177,24 @@ static int trx_usrp_write(openair0_device *device, openair0_timestamp timestamp, ...@@ -177,17 +177,24 @@ static int trx_usrp_write(openair0_device *device, openair0_timestamp timestamp,
s->tx_md.time_spec = uhd::time_spec_t::from_ticks(timestamp, s->sample_rate); s->tx_md.time_spec = uhd::time_spec_t::from_ticks(timestamp, s->sample_rate);
if(flags) if(flags>0)
s->tx_md.has_time_spec = true; s->tx_md.has_time_spec = true;
else else
s->tx_md.has_time_spec = false; s->tx_md.has_time_spec = false;
if (device->openair0_cfg[0].tx_freq[0] == device->openair0_cfg[0].rx_freq[0]) { if (flags == 2) { // start of burst
// for TDD each write should be considered as a burst to trigger the switch on GPIO
s->tx_md.start_of_burst = true; s->tx_md.start_of_burst = true;
s->tx_md.end_of_burst = false;
}
else if (flags == 3) { // end of burst
s->tx_md.start_of_burst = false;
s->tx_md.end_of_burst = true; s->tx_md.end_of_burst = true;
} }
else { else if (flags == 4) { // start and end
s->tx_md.start_of_burst = true;
s->tx_md.end_of_burst = true;
}
else if (flags==1) { // middle of burst
s->tx_md.start_of_burst = false; s->tx_md.start_of_burst = false;
s->tx_md.end_of_burst = false; s->tx_md.end_of_burst = false;
} }
......
...@@ -899,26 +899,48 @@ void rx_rf(PHY_VARS_eNB *eNB,int *frame,int *subframe) { ...@@ -899,26 +899,48 @@ void rx_rf(PHY_VARS_eNB *eNB,int *frame,int *subframe) {
// printf("trx_write -> USRP TS %llu (sf %d)\n", (proc->timestamp_rx+(3*fp->samples_per_tti)),(proc->subframe_rx+2)%10); // printf("trx_write -> USRP TS %llu (sf %d)\n", (proc->timestamp_rx+(3*fp->samples_per_tti)),(proc->subframe_rx+2)%10);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, (proc->timestamp_rx+(tx_sfoffset*fp->samples_per_tti)-openair0_cfg[0].tx_sample_advance)&0xffffffff ); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, (proc->timestamp_rx+(tx_sfoffset*fp->samples_per_tti)-openair0_cfg[0].tx_sample_advance)&0xffffffff );
// prepare tx buffer pointers // prepare tx buffer pointers
if ((subframe_select(fp,proc->subframe_rx+tx_sfoffset) == SF_DL) || lte_subframe_t SF_type = subframe_select(fp,(proc->subframe_rx+tx_sfoffset)%10);
(subframe_select(fp,proc->subframe_rx+tx_sfoffset) == SF_S)) { lte_subframe_t prevSF_type = subframe_select(fp,(proc->subframe_rx+tx_sfoffset+9)%10);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 1 ); lte_subframe_t nextSF_type = subframe_select(fp,(proc->subframe_rx+tx_sfoffset+1)%10);
if ((SF_type == SF_DL) ||
(SF_type == SF_S)) {
for (i=0; i<fp->nb_antennas_tx; i++) for (i=0; i<fp->nb_antennas_tx; i++)
txp[i] = (void*)&eNB->common_vars.txdata[0][i][((proc->subframe_rx+tx_sfoffset)%10)*fp->samples_per_tti]; txp[i] = (void*)&eNB->common_vars.txdata[0][i][((proc->subframe_rx+tx_sfoffset)%10)*fp->samples_per_tti];
int siglen=fp->samples_per_tti,flags=1;
if (SF_type == SF_S) {
siglen = fp->dl_symbols_in_S_subframe*(fp->ofdm_symbol_size+fp->nb_prefix_samples0);
flags=3; // end of burst
}
if ((fp->frame_type == TDD) &&
(SF_type == SF_DL)&&
(prevSF_type == SF_UL) &&
(nextSF_type == SF_DL))
flags = 2; // start of burst
if ((fp->frame_type == TDD) &&
(SF_type == SF_DL)&&
(prevSF_type == SF_UL) &&
(nextSF_type == SF_UL))
flags = 4; // start of burst and end of burst (only one DL SF between two UL)
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 1 );
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_WRITE_FLAGS,flags);
txs = eNB->rfdevice.trx_write_func(&eNB->rfdevice, txs = eNB->rfdevice.trx_write_func(&eNB->rfdevice,
proc->timestamp_rx+eNB->ts_offset+(tx_sfoffset*fp->samples_per_tti)-openair0_cfg[0].tx_sample_advance, proc->timestamp_rx+eNB->ts_offset+(tx_sfoffset*fp->samples_per_tti)-openair0_cfg[0].tx_sample_advance,
txp, txp,
fp->samples_per_tti, siglen,
fp->nb_antennas_tx, fp->nb_antennas_tx,
1); flags);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 0 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 0 );
if (txs != fp->samples_per_tti) { if (txs != siglen) {
LOG_E(PHY,"TX : Timeout (sent %d/%d)\n",txs, fp->samples_per_tti); LOG_E(PHY,"TX : Timeout (sent %d/%d)\n",txs, fp->samples_per_tti);
exit_fun( "problem transmitting samples" ); exit_fun( "problem transmitting samples" );
} }
......
[*] [*]
[*] GTKWave Analyzer v3.3.58 (w)1999-2014 BSI [*] GTKWave Analyzer v3.3.58 (w)1999-2014 BSI
[*] Thu Jan 5 06:19:58 2017 [*] Sun Jan 15 07:26:50 2017
[*] [*]
[dumpfile] "/tmp/openair_dump_eNB.vcd" [dumpfile] "/tmp/openair_dump_eNB.vcd"
[dumpfile_mtime] "Thu Jan 5 06:09:13 2017" [dumpfile_mtime] "Sun Jan 15 07:04:19 2017"
[dumpfile_size] 24570356 [dumpfile_size] 18140627
[savefile] "/home/uprru1/oai/openairinterface5g/targets/RT/USER/rru_if4p5_usrp.gtkw" [savefile] "/home/uprru1/oai/openairinterface5g/targets/RT/USER/rru_if4p5_usrp.gtkw"
[timestart] 23491157000 [timestart] 29977510000
[size] 1301 716 [size] 1301 716
[pos] 309 0 [pos] 309 0
*-19.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 *-21.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
[sst_width] 284 [sst_width] 284
[signals_width] 262 [signals_width] 262
[sst_expanded] 1 [sst_expanded] 1
...@@ -17,6 +17,9 @@ ...@@ -17,6 +17,9 @@
@28 @28
functions.trx_read functions.trx_read
functions.trx_write functions.trx_write
@25
variables.trx_write_flags[63:0]
@28
functions.trx_write_if functions.trx_write_if
functions.send_if4 functions.send_if4
functions.trx_read_if functions.trx_read_if
......
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