Commit a96d23ef authored by 黄灏's avatar 黄灏

change ta advance

parent cbaa5449
...@@ -659,7 +659,8 @@ void rx_rf(RU_t *ru,int *frame,int *slot) { ...@@ -659,7 +659,8 @@ void rx_rf(RU_t *ru,int *frame,int *slot) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ, 0 ); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ, 0 );
proc->timestamp_rx = ts-ru->ts_offset; proc->timestamp_rx = ts-ru->ts_offset;
if (((*frame &1) == 0) && (*slot == 0))
LOG_D(PHY, "rx rf: frame %d %d, stamprx %lu\n",*frame, *slot, proc->timestamp_rx );
//AssertFatal(rxs == fp->samples_per_subframe, //AssertFatal(rxs == fp->samples_per_subframe,
//"rx_rf: Asked for %d samples, got %d from USRP\n",fp->samples_per_subframe,rxs); //"rx_rf: Asked for %d samples, got %d from USRP\n",fp->samples_per_subframe,rxs);
if (rxs != samples_per_slot) LOG_E(PHY, "rx_rf: Asked for %d samples, got %d from USRP\n",samples_per_slot,rxs); if (rxs != samples_per_slot) LOG_E(PHY, "rx_rf: Asked for %d samples, got %d from USRP\n",samples_per_slot,rxs);
...@@ -668,7 +669,7 @@ void rx_rf(RU_t *ru,int *frame,int *slot) { ...@@ -668,7 +669,7 @@ void rx_rf(RU_t *ru,int *frame,int *slot) {
samples_per_slot_prev = fp->get_samples_per_slot((*slot-1)%fp->slots_per_frame,fp); 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) { 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); LOG_W(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); ru->ts_offset += (proc->timestamp_rx - old_ts - samples_per_slot_prev);
proc->timestamp_rx = ts-ru->ts_offset; proc->timestamp_rx = ts-ru->ts_offset;
} }
...@@ -819,8 +820,13 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) { ...@@ -819,8 +820,13 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
siglen+sf_extension, siglen+sf_extension,
ru->nb_tx, ru->nb_tx,
flags); flags);
LOG_D(PHY,"[TXPATH] RU %d aa %d tx_rf, writing to TS %llu, %d.%d, unwrapped_frame %d, slot %d, flags %d, siglen+sf_extension %d, returned %d, E %f\n",ru->idx,i, int ene = signal_energy(txp[0],siglen+sf_extension);
(long long unsigned int)(timestamp+ru->ts_offset-ru->openair0_cfg.tx_sample_advance-sf_extension),frame,slot,proc->frame_tx_unwrap,slot, flags, siglen+sf_extension, txs,10*log10((double)signal_energy(txp[0],siglen+sf_extension))); if ((ene > 1000)&& (slot != 0))
{
short * p = (short *)txp[0];
LOG_D(PHY,"[TXPATH] RU %d aa %d tx_rf, writing to TS %llu, %d.%d, unwrapped_frame %d, slot %d, flags %d, siglen+sf_extension %d, returned %d, E %f, %d,%d\n",ru->idx,i,
(long long unsigned int)(timestamp+ru->ts_offset-ru->openair0_cfg.tx_sample_advance-sf_extension),frame,slot,proc->frame_tx_unwrap,slot, flags, siglen+sf_extension, txs,10*log10((double)ene), p[0], p[1]);
}
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 );
//AssertFatal(txs == 0,"trx write function error %d\n", txs); //AssertFatal(txs == 0,"trx write function error %d\n", txs);
......
...@@ -248,7 +248,8 @@ ...@@ -248,7 +248,8 @@
#ifdef BIT8_TX #ifdef BIT8_TX
#define AMP_SHIFT 7 #define AMP_SHIFT 7
#else #else
#define AMP_SHIFT 9 //#define AMP_SHIFT 9
#define AMP_SHIFT 11
#endif #endif
#define AMP ((1)<<AMP_SHIFT) #define AMP ((1)<<AMP_SHIFT)
......
...@@ -242,6 +242,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frame, sub_frame_ ...@@ -242,6 +242,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frame, sub_frame_
// This schedules the DCI for Downlink and PDSCH // This schedules the DCI for Downlink and PDSCH
start_meas(&gNB->schedule_dlsch); start_meas(&gNB->schedule_dlsch);
if (slot == 10)
nr_schedule_ue_spec(module_idP, frame, slot, &sched_info->DL_req, &sched_info->TX_req); nr_schedule_ue_spec(module_idP, frame, slot, &sched_info->DL_req, &sched_info->TX_req);
stop_meas(&gNB->schedule_dlsch); stop_meas(&gNB->schedule_dlsch);
......
...@@ -216,7 +216,7 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) { ...@@ -216,7 +216,7 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
switch ((int)openair0_cfg->sample_rate) { switch ((int)openair0_cfg->sample_rate) {
case 122880000: case 122880000:
openair0_cfg->samples_per_packet = 122880; openair0_cfg->samples_per_packet = 122880;
openair0_cfg->tx_sample_advance = 70; openair0_cfg->tx_sample_advance = 1232;//1232;
openair0_cfg[0].tx_bw = 100e6; openair0_cfg[0].tx_bw = 100e6;
openair0_cfg[0].rx_bw = 100e6; openair0_cfg[0].rx_bw = 100e6;
break; break;
......
No preview for this file type
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