Commit b04e166e authored by Robert Schmidt's avatar Robert Schmidt

gNB: take into account timing_advance option -A

parent 3e9d3100
...@@ -102,6 +102,7 @@ int attach_rru(RU_t *ru); ...@@ -102,6 +102,7 @@ int attach_rru(RU_t *ru);
int connect_rau(RU_t *ru); int connect_rau(RU_t *ru);
static void NRRCconfig_RU(configmodule_interface_t *cfg); static void NRRCconfig_RU(configmodule_interface_t *cfg);
extern uint32_t timing_advance;
extern int emulate_rf; extern int emulate_rf;
extern int numerology; extern int numerology;
...@@ -846,11 +847,11 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) { ...@@ -846,11 +847,11 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
txp[i] = (void *)&ru->common.txdata[i][fp->get_samples_slot_timestamp(slot, fp, 0)] - sf_extension * sizeof(int32_t); txp[i] = (void *)&ru->common.txdata[i][fp->get_samples_slot_timestamp(slot, fp, 0)] - sf_extension * sizeof(int32_t);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST,
(timestamp + ru->ts_offset - ru->openair0_cfg.tx_sample_advance) & 0xffffffff); (timestamp + ru->ts_offset - ru->openair0_cfg.tx_sample_advance - timing_advance) & 0xffffffff);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 1); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 1);
// prepare tx buffer pointers // prepare tx buffer pointers
txs = ru->rfdevice.trx_write_func(&ru->rfdevice, txs = ru->rfdevice.trx_write_func(&ru->rfdevice,
timestamp + ru->ts_offset - ru->openair0_cfg.tx_sample_advance - sf_extension, timestamp + ru->ts_offset - ru->openair0_cfg.tx_sample_advance - timing_advance - sf_extension,
txp, txp,
siglen + sf_extension, siglen + sf_extension,
ru->nb_tx, ru->nb_tx,
...@@ -860,7 +861,7 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) { ...@@ -860,7 +861,7 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
"returned %d, E %f\n", "returned %d, E %f\n",
ru->idx, ru->idx,
i, i,
(long long unsigned int)(timestamp + ru->ts_offset - ru->openair0_cfg.tx_sample_advance - sf_extension), (long long unsigned int)(timestamp + ru->ts_offset - ru->openair0_cfg.tx_sample_advance - timing_advance - sf_extension),
frame, frame,
slot, slot,
proc->frame_tx_unwrap, proc->frame_tx_unwrap,
......
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