Merge remote-tracking branch 'origin/develop' into NR_FAPI_beamindex_SSB_RO
This commit is contained in:
+12
-11
@@ -623,6 +623,7 @@ void rx_rf(RU_t *ru,int *frame,int *slot) {
|
||||
unsigned int rxs;
|
||||
int i;
|
||||
uint32_t samples_per_slot = fp->get_samples_per_slot(*slot,fp);
|
||||
uint32_t samples_per_slot_prev ;
|
||||
openair0_timestamp ts,old_ts;
|
||||
AssertFatal(*slot<fp->slots_per_frame && *slot>=0, "slot %d is illegal (%d)\n",*slot,fp->slots_per_frame);
|
||||
|
||||
@@ -658,16 +659,16 @@ void rx_rf(RU_t *ru,int *frame,int *slot) {
|
||||
ru->ts_offset = proc->timestamp_rx;
|
||||
proc->timestamp_rx = 0;
|
||||
} else {
|
||||
if (proc->timestamp_rx - old_ts != fp->get_samples_per_slot((*slot-1)%fp->slots_per_frame,fp)) {
|
||||
LOG_D(PHY,"rx_rf: rfdevice timing drift of %"PRId64" samples (ts_off %"PRId64")\n",proc->timestamp_rx - old_ts - samples_per_slot,ru->ts_offset);
|
||||
ru->ts_offset += (proc->timestamp_rx - old_ts - samples_per_slot);
|
||||
samples_per_slot_prev = fp->get_samples_per_slot((*slot-1)%fp->slots_per_frame,fp);
|
||||
if (proc->timestamp_rx - old_ts != samples_per_slot_prev) {
|
||||
LOG_D(PHY,"rx_rf: rfdevice timing drift of %"PRId64" samples (ts_off %"PRId64")\n",proc->timestamp_rx - old_ts - samples_per_slot_prev,ru->ts_offset);
|
||||
ru->ts_offset += (proc->timestamp_rx - old_ts - samples_per_slot_prev);
|
||||
proc->timestamp_rx = ts-ru->ts_offset;
|
||||
}
|
||||
}
|
||||
|
||||
proc->frame_rx = (proc->timestamp_rx / (fp->samples_per_subframe*10))&1023;
|
||||
uint32_t idx_sf = proc->timestamp_rx / fp->samples_per_subframe;
|
||||
proc->tti_rx = (idx_sf * fp->slots_per_subframe + (int)round((float)(proc->timestamp_rx % fp->samples_per_subframe) / fp->samples_per_slot0))%(fp->slots_per_frame);
|
||||
proc->tti_rx = fp->get_slot_from_timestamp(proc->timestamp_rx,fp);
|
||||
// synchronize first reception to frame 0 subframe 0
|
||||
LOG_D(PHY,"RU %d/%d TS %llu (off %d), frame %d, slot %d.%d / %d\n",
|
||||
ru->idx,
|
||||
@@ -688,7 +689,7 @@ void rx_rf(RU_t *ru,int *frame,int *slot) {
|
||||
}
|
||||
|
||||
if (proc->frame_rx != *frame) {
|
||||
LOG_E(PHY,"Received Timestamp (%llu) doesn't correspond to the time we think it is (proc->frame_rx %d frame %d)\n",(long long unsigned int)proc->timestamp_rx,proc->frame_rx,*frame);
|
||||
LOG_E(PHY,"Received Timestamp (%llu) doesn't correspond to the time we think it is (proc->frame_rx %d frame %d, proc->tti_rx %d, slot %d)\n",(long long unsigned int)proc->timestamp_rx,proc->frame_rx,*frame,proc->tti_rx,*slot);
|
||||
exit_fun("Exiting");
|
||||
}
|
||||
} else {
|
||||
@@ -761,14 +762,14 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
|
||||
int beam=0;
|
||||
if (slot%10==0) {
|
||||
if (ru->common.beam_id[0][slot*fp->symbols_per_slot] < 8) {
|
||||
beam = ru->common.beam_id[0][slot*fp->symbols_per_slot] & 8;
|
||||
beam = ru->common.beam_id[0][slot*fp->symbols_per_slot] | 8;
|
||||
}
|
||||
}
|
||||
/*
|
||||
if (slot==0 || slot==40) beam=0&8;
|
||||
if (slot==10 || slot==50) beam=1&8;
|
||||
if (slot==20 || slot==60) beam=2&8;
|
||||
if (slot==30 || slot==70) beam=3&8;
|
||||
if (slot==0 || slot==40) beam=0|8;
|
||||
if (slot==10 || slot==50) beam=1|8;
|
||||
if (slot==20 || slot==60) beam=2|8;
|
||||
if (slot==30 || slot==70) beam=3|8;
|
||||
*/
|
||||
flags |= beam<<8;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user