Merge branch 'NR_2port_CSIRS' into CSI-SA
Conflicts: openair1/PHY/NR_TRANSPORT/nr_ulsch.c openair1/SIMULATION/NR_PHY/dlsim.c openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
This commit is contained in:
@@ -648,30 +648,29 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp
|
||||
AssertFatal(1==0,"Shouldn't be here\n");
|
||||
}
|
||||
|
||||
samples_received=0;
|
||||
while (samples_received != nsamps) {
|
||||
samples_received=0;
|
||||
while (samples_received != nsamps) {
|
||||
|
||||
if (cc>1) {
|
||||
if (cc>1) {
|
||||
// receive multiple channels (e.g. RF A and RF B)
|
||||
std::vector<void *> buff_ptrs;
|
||||
std::vector<void *> buff_ptrs;
|
||||
|
||||
for (int i=0; i<cc; i++) buff_ptrs.push_back(buff_tmp[i]+samples_received);
|
||||
|
||||
samples_received += s->rx_stream->recv(buff_ptrs, nsamps, s->rx_md);
|
||||
} else {
|
||||
for (int i=0; i<cc; i++) buff_ptrs.push_back(buff_tmp[i]+samples_received);
|
||||
samples_received += s->rx_stream->recv(buff_ptrs, nsamps, s->rx_md);
|
||||
} else {
|
||||
// receive a single channel (e.g. from connector RF A)
|
||||
|
||||
samples_received += s->rx_stream->recv((void*)((int32_t*)buff_tmp[0]+samples_received),
|
||||
nsamps-samples_received, s->rx_md);
|
||||
}
|
||||
if ((s->wait_for_first_pps == 0) && (s->rx_md.error_code!=uhd::rx_metadata_t::ERROR_CODE_NONE))
|
||||
break;
|
||||
|
||||
if ((s->wait_for_first_pps == 1) && (samples_received != nsamps)) {
|
||||
printf("sleep...\n"); //usleep(100);
|
||||
}
|
||||
samples_received += s->rx_stream->recv((void*)((int32_t*)buff_tmp[0]+samples_received),
|
||||
nsamps-samples_received, s->rx_md);
|
||||
}
|
||||
if (samples_received == nsamps) s->wait_for_first_pps=0;
|
||||
if ((s->wait_for_first_pps == 0) && (s->rx_md.error_code!=uhd::rx_metadata_t::ERROR_CODE_NONE))
|
||||
break;
|
||||
|
||||
if ((s->wait_for_first_pps == 1) && (samples_received != nsamps)) {
|
||||
printf("sleep...\n"); //usleep(100);
|
||||
}
|
||||
}
|
||||
if (samples_received == nsamps) s->wait_for_first_pps=0;
|
||||
|
||||
// bring RX data into 12 LSBs for softmodem RX
|
||||
for (int i=0; i<cc; i++) {
|
||||
@@ -694,12 +693,12 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp
|
||||
for (int j=0; j<nsamps2; j++)
|
||||
((int16x8_t *)buff[i])[j] = vshrq_n_s16(buff_tmp[i][j],rxshift);
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (samples_received < nsamps) {
|
||||
LOG_E(HW,"[recv] received %d samples out of %d\n",samples_received,nsamps);
|
||||
}
|
||||
if (samples_received < nsamps) {
|
||||
LOG_E(HW,"[recv] received %d samples out of %d\n",samples_received,nsamps);
|
||||
}
|
||||
|
||||
if ( s->rx_md.error_code != uhd::rx_metadata_t::ERROR_CODE_NONE)
|
||||
LOG_E(HW, "%s\n", s->rx_md.to_pp_string(true).c_str());
|
||||
|
||||
Reference in New Issue
Block a user