amarisoftue: solve conflict of sample rate param in rf_driver

move sample_rate setting into rf_driver template that is shared
between enb and ue

Change-Id: Icc8042c3eec2a1e8bfc6823c06430c1cb18355b7
This commit is contained in:
Andre Puschmann 2021-05-04 21:38:53 +02:00
parent 8d37a9857d
commit 7879143d34
2 changed files with 22 additions and 10 deletions

View File

@ -10,12 +10,7 @@
}, },
%endif %endif
% if ue.rf_dev_type == 'zmq':
/* Force sampling rate (if uncommented) */
sample_rate: ${ue.sample_rate},
% else:
bandwidth: ${ue.bandwidth}, bandwidth: ${ue.bandwidth},
%endif
// log_options: "all.level=debug,all.max_size=32", // log_options: "all.level=debug,all.max_size=32",
log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1", log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1",

View File

@ -15,8 +15,12 @@ rf_driver: {
tx_gain: ${trx.tx_gain}, /* TX gain (in dB) B2x0: 0 to 89.8 dB */ tx_gain: ${trx.tx_gain}, /* TX gain (in dB) B2x0: 0 to 89.8 dB */
rx_gain: ${trx.rx_gain}, /* RX gain (in dB) B2x0: 0 to 73 dB */ rx_gain: ${trx.rx_gain}, /* RX gain (in dB) B2x0: 0 to 73 dB */
// Only SDR and ZMQ devices require dedicated rf_port parameters
% if trx.rf_dev_type != 'uhd':
rf_ports: [ rf_ports: [
% if trx.rf_dev_type == 'sdr': % if trx.rf_dev_type == 'sdr':
// NSA specific configuration
{ {
sample_rate: 23.04, sample_rate: 23.04,
}, },
@ -26,15 +30,28 @@ rf_ports: [
ul_freq: 3502.8, // Moves NR UL LO frequency -5.76 MHz ul_freq: 3502.8, // Moves NR UL LO frequency -5.76 MHz
} }
% else: % else:
// default case for UHD and ZMQ usage
<%
# determine ports and sample rate from either eNB or UE object
num_ports = 1
try:
obj_sample_rate = enb.sample_rate
num_ports = int(enb.num_cells) + int(enb.num_nr_cells)
except AttributeError:
obj_sample_rate = ue.sample_rate
%>
%for port in range(num_ports):
{ {
sample_rate: ${enb.sample_rate}, sample_rate: ${obj_sample_rate},
}, },
{ %endfor
sample_rate: ${enb.sample_rate},
} % endif
% endif
], ],
% endif
// only the B210 requires a sample offset // only the B210 requires a sample offset
% if "b200" in trx.rf_dev_args: % if "b200" in trx.rf_dev_args:
tx_time_offset: -150, tx_time_offset: -150,