Commit cecb9568 authored by Raymond Knopp's avatar Raymond Knopp

warning removal

parent 10d288e9
...@@ -283,7 +283,7 @@ void fh_if5_south_out(RU_t *ru, int frame, int slot, uint64_t timestamp) { ...@@ -283,7 +283,7 @@ void fh_if5_south_out(RU_t *ru, int frame, int slot, uint64_t timestamp) {
struct timespec txmeas; struct timespec txmeas;
clock_gettime(CLOCK_MONOTONIC, &txmeas); clock_gettime(CLOCK_MONOTONIC, &txmeas);
LOG_D(PHY,"IF5 TX %d.%d, TS %llu, buffs[0] %p, buffs[1] %p ener0 %f dB, tx start %d\n",frame,slot,(unsigned long long)timestamp,buffs[0],buffs[1], LOG_D(PHY,"IF5 TX %d.%d, TS %llu, buffs[0] %p, buffs[1] %p ener0 %f dB, tx start %d\n",frame,slot,(unsigned long long)timestamp,buffs[0],buffs[1],
10*log10((double)signal_energy(buffs[0],ru->nr_frame_parms->get_samples_per_slot(slot,ru->nr_frame_parms))),txmeas.tv_nsec); 10*log10((double)signal_energy(buffs[0],ru->nr_frame_parms->get_samples_per_slot(slot,ru->nr_frame_parms))),(int)txmeas.tv_nsec);
ru->ifdevice.trx_write_func2(&ru->ifdevice, ru->ifdevice.trx_write_func2(&ru->ifdevice,
timestamp, timestamp,
buffs, buffs,
...@@ -345,8 +345,8 @@ void fh_if5_south_in(RU_t *ru, ...@@ -345,8 +345,8 @@ void fh_if5_south_in(RU_t *ru,
struct timespec rxmeas; struct timespec rxmeas;
clock_gettime(CLOCK_MONOTONIC, &rxmeas); clock_gettime(CLOCK_MONOTONIC, &rxmeas);
double fhtime = ru->rx_fhaul.p_time/(cpu_freq_GHz*1000.0); double fhtime = ru->rx_fhaul.p_time/(cpu_freq_GHz*1000.0);
if (fhtime > 800) LOG_W(PHY,"IF5 %d.%d => RX %d.%d first_rx %d: time %f, rxstart %d\n",*frame,*tti,proc->frame_rx,proc->tti_rx,proc->first_rx,ru->rx_fhaul.p_time/(cpu_freq_GHz*1000.0),rxmeas.tv_nsec); if (fhtime > 800) LOG_W(PHY,"IF5 %d.%d => RX %d.%d first_rx %d: time %f, rxstart %d\n",*frame,*tti,proc->frame_rx,proc->tti_rx,proc->first_rx,ru->rx_fhaul.p_time/(cpu_freq_GHz*1000.0),(int)rxmeas.tv_nsec);
else LOG_D(PHY,"IF5 %d.%d => RX %d.%d first_rx %d: time %f, rxstart %d\n",*frame,*tti,proc->frame_rx,proc->tti_rx,proc->first_rx,ru->rx_fhaul.p_time/(cpu_freq_GHz*1000.0),rxmeas.tv_nsec); else LOG_D(PHY,"IF5 %d.%d => RX %d.%d first_rx %d: time %f, rxstart %d\n",*frame,*tti,proc->frame_rx,proc->tti_rx,proc->first_rx,ru->rx_fhaul.p_time/(cpu_freq_GHz*1000.0),(int)rxmeas.tv_nsec);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS, proc->timestamp_rx&0xffffffff ); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS, proc->timestamp_rx&0xffffffff );
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF5, 0 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF5, 0 );
......
...@@ -311,7 +311,7 @@ void *trx_eth_write_udp_cmd(udpTXelem_t *udpTXelem) { ...@@ -311,7 +311,7 @@ void *trx_eth_write_udp_cmd(udpTXelem_t *udpTXelem) {
uint64_t TS_advance=0; uint64_t TS_advance=0;
if (timestamp > last_rxTS) TS_advance = timestamp - last_rxTS; if (timestamp > last_rxTS) TS_advance = timestamp - last_rxTS;
LOG_D(PHY,"Starting TX FH for TS %llu absslot %d(%d) last_rxTS %llu TS_advance %llu samples\n",timestamp,timestamp/nsamps,(timestamp/nsamps)%20,last_rxTS,TS_advance); LOG_D(PHY,"Starting TX FH for TS %llu absslot %llu(%llu) last_rxTS %llu TS_advance %llu samples\n",(unsigned long long)timestamp,(unsigned long long)timestamp/nsamps,((unsigned long long)timestamp/nsamps)%20,(unsigned long long)last_rxTS,(unsigned long long)TS_advance);
void *buff2; void *buff2;
#if defined(__x86_64) || defined(__i386__) #if defined(__x86_64) || defined(__i386__)
#ifdef __AVX2__ #ifdef __AVX2__
...@@ -343,7 +343,7 @@ void *trx_eth_write_udp_cmd(udpTXelem_t *udpTXelem) { ...@@ -343,7 +343,7 @@ void *trx_eth_write_udp_cmd(udpTXelem_t *udpTXelem) {
int TSinc = (6*256*device->sampling_rate_ratio_d)/device->sampling_rate_ratio_n; int TSinc = (6*256*device->sampling_rate_ratio_d)/device->sampling_rate_ratio_n;
int len=256; int len=256;
LOG_D(PHY,"TS %llu (%llu),txrx_offset %d,d %d, n %d, buff[0] %p buff[1] %p\n", LOG_D(PHY,"TS %llu (%llu),txrx_offset %d,d %d, n %d, buff[0] %p buff[1] %p\n",
(unsigned long long)TS,timestamp,device->txrx_offset,device->sampling_rate_ratio_d,device->sampling_rate_ratio_n, (unsigned long long)TS,(unsigned long long)timestamp,device->txrx_offset,device->sampling_rate_ratio_d,device->sampling_rate_ratio_n,
buff[0],buff[1]); buff[0],buff[1]);
for (int offset=0;offset<nsamps;offset+=256,TS+=TSinc) { for (int offset=0;offset<nsamps;offset+=256,TS+=TSinc) {
// OAI modified SEQ_ID (4 bytes) // OAI modified SEQ_ID (4 bytes)
...@@ -398,6 +398,7 @@ void *trx_eth_write_udp_cmd(udpTXelem_t *udpTXelem) { ...@@ -398,6 +398,7 @@ void *trx_eth_write_udp_cmd(udpTXelem_t *udpTXelem) {
} // aid } // aid
} // offset } // offset
free(buff); free(buff);
return(NULL);
} }
int trx_eth_write_udp(openair0_device *device, openair0_timestamp timestamp, void **buff, int fd_ind, int nsamps, int flags, int nant) { int trx_eth_write_udp(openair0_device *device, openair0_timestamp timestamp, void **buff, int fd_ind, int nsamps, int flags, int nant) {
...@@ -415,21 +416,22 @@ int trx_eth_write_udp(openair0_device *device, openair0_timestamp timestamp, voi ...@@ -415,21 +416,22 @@ int trx_eth_write_udp(openair0_device *device, openair0_timestamp timestamp, voi
udptxelem->nant = nant; udptxelem->nant = nant;
pushNotifiedFIFO(device->utx[fd_ind]->resp, req); pushNotifiedFIFO(device->utx[fd_ind]->resp, req);
LOG_D(PHY,"Pushed to TX FH FIFO, TS %llu, nsamps %d, nant %d buffs[0] %p buffs[1] %p\n", LOG_D(PHY,"Pushed to TX FH FIFO, TS %llu, nsamps %d, nant %d buffs[0] %p buffs[1] %p\n",
timestamp,nsamps,nant,udptxelem->buff[0],udptxelem->buff[1]); (unsigned long long)timestamp,nsamps,nant,udptxelem->buff[0],udptxelem->buff[1]);
return(0);
} }
extern int oai_exit; extern int oai_exit;
void *udp_write_thread(void *arg) { void *udp_write_thread(void *arg) {
udp_ctx_t *utx = (udp_ctx_t *)arg; udp_ctx_t *utx = (udp_ctx_t *)arg;
utx->resp = (notifiedFIFO_elt_t*) malloc(sizeof(notifiedFIFO_elt_t)); utx->resp = (notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_elt_t));
initNotifiedFIFO(utx->resp); initNotifiedFIFO(utx->resp);
LOG_D(PHY,"UDP write thread started on core %d\n",sched_getcpu()); LOG_D(PHY,"UDP write thread started on core %d\n",sched_getcpu());
reset_meas(&utx->device->tx_fhaul); reset_meas(&utx->device->tx_fhaul);
while (oai_exit == 0) { while (oai_exit == 0) {
notifiedFIFO_elt_t *res = pullNotifiedFIFO(utx->resp); notifiedFIFO_elt_t *res = pullNotifiedFIFO(utx->resp);
udpTXelem_t *udptxelem = (udpTXelem_t *)NotifiedFifoData(res); udpTXelem_t *udptxelem = (udpTXelem_t *)NotifiedFifoData(res);
LOG_D(PHY,"Pulled from TX FH FIFO, TS %llu, nsamps %d, nant %d\n",udptxelem->timestamp,udptxelem->nsamps,udptxelem->nant); LOG_D(PHY,"Pulled from TX FH FIFO, TS %llu, nsamps %d, nant %d\n",(unsigned long long)udptxelem->timestamp,udptxelem->nsamps,udptxelem->nant);
start_meas(&utx->device->tx_fhaul); start_meas(&utx->device->tx_fhaul);
trx_eth_write_udp_cmd(udptxelem); trx_eth_write_udp_cmd(udptxelem);
stop_meas(&utx->device->tx_fhaul); stop_meas(&utx->device->tx_fhaul);
...@@ -437,6 +439,7 @@ void *udp_write_thread(void *arg) { ...@@ -437,6 +439,7 @@ void *udp_write_thread(void *arg) {
delNotifiedFIFO_elt(res); delNotifiedFIFO_elt(res);
} }
free(utx->resp); free(utx->resp);
return(NULL);
} }
void *udp_read_thread(void *arg) { void *udp_read_thread(void *arg) {
...@@ -475,7 +478,7 @@ void *udp_read_thread(void *arg) { ...@@ -475,7 +478,7 @@ void *udp_read_thread(void *arg) {
memcpy((void*)(device->openair0_cfg->rxbase[aid]+offset), memcpy((void*)(device->openair0_cfg->rxbase[aid]+offset),
(void*)&buffer[APP_HEADER_SIZE_BYTES], (void*)&buffer[APP_HEADER_SIZE_BYTES],
count-APP_HEADER_SIZE_BYTES); count-APP_HEADER_SIZE_BYTES);
LOG_D(PHY,"UDP read thread_id %d (%d), aid %d, TS %llu, TS0 %llu, offset %d\n",u->thread_id,sched_getcpu(),aid,(unsigned long long)TS,fhstate->TS0,offset); LOG_D(PHY,"UDP read thread_id %d (%d), aid %d, TS %llu, TS0 %llu, offset %d\n",(int)u->thread_id,(int)sched_getcpu(),aid,(unsigned long long)TS,(unsigned long long)fhstate->TS0,offset);
} }
sleep(1); sleep(1);
} }
...@@ -505,13 +508,13 @@ int trx_eth_read_udp(openair0_device *device, openair0_timestamp *timestamp, uin ...@@ -505,13 +508,13 @@ int trx_eth_read_udp(openair0_device *device, openair0_timestamp *timestamp, uin
if (fhstate->first_read == 0) { if (fhstate->first_read == 0) {
*timestamp = 0; *timestamp = 0;
fhstate->TS_read = *timestamp+nsamps; fhstate->TS_read = *timestamp+nsamps;
LOG_D(PHY,"first read : TS_read %llu, TS %llu state (%d,%d,%d,%d,%d,%d,%d,%d)\n",fhstate->TS_read,*timestamp, LOG_D(PHY,"first read : TS_read %llu, TS %llu state (%d,%d,%d,%d,%d,%d,%d,%d)\n",(unsigned long long)fhstate->TS_read,(unsigned long long)*timestamp,
fhstate->r[0],fhstate->r[1],fhstate->r[2],fhstate->r[3],fhstate->r[4],fhstate->r[5],fhstate->r[6],fhstate->r[7]); fhstate->r[0],fhstate->r[1],fhstate->r[2],fhstate->r[3],fhstate->r[4],fhstate->r[5],fhstate->r[6],fhstate->r[7]);
} }
else { else {
*timestamp = fhstate->TS_read; *timestamp = fhstate->TS_read;
fhstate->TS_read = prev_read_TS + nsamps; fhstate->TS_read = prev_read_TS + nsamps;
LOG_D(PHY,"TS_read %llu, min_TS %llu, prev_read_TS %llu, nsamps %d, fhstate->TS0+prev_TS+nsamps %llu, wait count %d x 100us\n",fhstate->TS_read,min_TS,prev_read_TS,nsamps,fhstate->TS0+prev_read_TS+nsamps,count); LOG_D(PHY,"TS_read %llu (%llu, %llu), min_TS %llu, prev_read_TS %llu, nsamps %d, fhstate->TS0+prev_TS+nsamps %llu, wait count %d x 100us\n",(unsigned long long)fhstate->TS_read,(unsigned long long)*timestamp/nsamps,((unsigned long long)*timestamp/nsamps)%20,(unsigned long long)min_TS,(unsigned long long)prev_read_TS,nsamps,(unsigned long long)(fhstate->TS0+prev_read_TS+nsamps),count);
} }
fhstate->first_read = 1; fhstate->first_read = 1;
return (nsamps); return (nsamps);
......
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