Transmit data to USRP after finishing the producing thread
This commit is contained in:
+13
-13
@@ -728,7 +728,7 @@ void *UE_thread(void *arg) {
|
|||||||
|
|
||||||
for (int i=0; i<UE->frame_parms.nb_antennas_tx; i++)
|
for (int i=0; i<UE->frame_parms.nb_antennas_tx; i++)
|
||||||
txp[i] = (void *)&UE->common_vars.txdata[i][UE->frame_parms.get_samples_slot_timestamp(
|
txp[i] = (void *)&UE->common_vars.txdata[i][UE->frame_parms.get_samples_slot_timestamp(
|
||||||
((curMsg->proc.nr_tti_rx + DURATION_RX_TO_TX -2)%nb_slot_frame),&UE->frame_parms,0)];
|
((curMsg->proc.nr_tti_rx + DURATION_RX_TO_TX - RX_NB_TH)%nb_slot_frame),&UE->frame_parms,0)];
|
||||||
|
|
||||||
int readBlockSize, writeBlockSize;
|
int readBlockSize, writeBlockSize;
|
||||||
|
|
||||||
@@ -750,17 +750,6 @@ void *UE_thread(void *arg) {
|
|||||||
readBlockSize,
|
readBlockSize,
|
||||||
UE->frame_parms.nb_antennas_rx),"");
|
UE->frame_parms.nb_antennas_rx),"");
|
||||||
|
|
||||||
AssertFatal( writeBlockSize ==
|
|
||||||
UE->rfdevice.trx_write_func(&UE->rfdevice,
|
|
||||||
timestamp+
|
|
||||||
UE->frame_parms.get_samples_slot_timestamp(slot_nr,
|
|
||||||
&UE->frame_parms,DURATION_RX_TO_TX -2) - firstSymSamp -
|
|
||||||
openair0_cfg[0].tx_sample_advance,
|
|
||||||
txp,
|
|
||||||
writeBlockSize,
|
|
||||||
UE->frame_parms.nb_antennas_tx,
|
|
||||||
1),"");
|
|
||||||
|
|
||||||
if( slot_nr==(nb_slot_frame-1)) {
|
if( slot_nr==(nb_slot_frame-1)) {
|
||||||
// read in first symbol of next frame and adjust for timing drift
|
// read in first symbol of next frame and adjust for timing drift
|
||||||
int first_symbols=UE->frame_parms.ofdm_symbol_size+UE->frame_parms.nb_prefix_samples0; // first symbol of every frames
|
int first_symbols=UE->frame_parms.ofdm_symbol_size+UE->frame_parms.nb_prefix_samples0; // first symbol of every frames
|
||||||
@@ -794,7 +783,7 @@ void *UE_thread(void *arg) {
|
|||||||
pushNotifiedFIFO_nothreadSafe(&freeBlocks,res);
|
pushNotifiedFIFO_nothreadSafe(&freeBlocks,res);
|
||||||
}
|
}
|
||||||
|
|
||||||
usleep(200);
|
usleep(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( (decoded_frame_rx != curMsg->proc.frame_rx) &&
|
if ( (decoded_frame_rx != curMsg->proc.frame_rx) &&
|
||||||
@@ -803,6 +792,17 @@ void *UE_thread(void *arg) {
|
|||||||
LOG_E(PHY,"Decoded frame index (%d) is not compatible with current context (%d), UE should go back to synch mode\n",
|
LOG_E(PHY,"Decoded frame index (%d) is not compatible with current context (%d), UE should go back to synch mode\n",
|
||||||
decoded_frame_rx, curMsg->proc.frame_rx );
|
decoded_frame_rx, curMsg->proc.frame_rx );
|
||||||
|
|
||||||
|
AssertFatal( writeBlockSize ==
|
||||||
|
UE->rfdevice.trx_write_func(&UE->rfdevice,
|
||||||
|
timestamp+
|
||||||
|
UE->frame_parms.get_samples_slot_timestamp(slot_nr,
|
||||||
|
&UE->frame_parms,DURATION_RX_TO_TX - RX_NB_TH) - firstSymSamp -
|
||||||
|
openair0_cfg[0].tx_sample_advance,
|
||||||
|
txp,
|
||||||
|
writeBlockSize,
|
||||||
|
UE->frame_parms.nb_antennas_tx,
|
||||||
|
1),"");
|
||||||
|
|
||||||
nbSlotProcessing++;
|
nbSlotProcessing++;
|
||||||
msgToPush->key=slot_nr;
|
msgToPush->key=slot_nr;
|
||||||
pushTpool(Tpool, msgToPush);
|
pushTpool(Tpool, msgToPush);
|
||||||
|
|||||||
Reference in New Issue
Block a user