srs{enb,ue}: add rf_dev_sync option to config templates

pass-through the option so they can be used in templates

just concatenate with rf_dev_args for srsLTE eNB/UE, arguments
parsing will handle them

Change-Id: I3818026c159780f29968888f547163cdf730afad
This commit is contained in:
Andre Puschmann 2020-10-12 16:57:10 +02:00
parent c489f190be
commit b5f0444021
4 changed files with 7 additions and 2 deletions

View File

@ -191,6 +191,7 @@ class srsENB(enb.eNodeB, srslte_common):
config.overlay(values, dict(enb={'enable_pcap': self.enable_pcap}))
config.overlay(values, dict(enb={'enable_dl_awgn': util.str2bool(values['enb'].get('enable_dl_awgn', 'false'))}))
config.overlay(values, dict(enb={'rf_dev_sync': values['enb'].get('rf_dev_sync', None)}))
self._additional_args = []
for add_args in values['enb'].get('additional_args', []):

View File

@ -34,6 +34,7 @@ def on_register_schemas():
resource_schema = {
'rf_dev_type': schema.STR,
'rf_dev_args': schema.STR,
'rf_dev_sync': schema.STR,
'num_carriers': schema.UINT,
'additional_args[]': schema.STR,
'airplane_t_on_ms': schema.INT,
@ -257,6 +258,9 @@ class srsUE(MS, srslte_common):
self.num_carriers = int(values['ue'].get('num_carriers', 1))
# Simply pass-through the sync options
config.overlay(values, dict(ue={'rf_dev_sync': values['ue'].get('rf_dev_sync', None)}))
# We need to set some specific variables programatically here to match IP addresses:
if self._conf.get('rf_dev_type') == 'zmq':
base_srate = num_prb2base_srate(self.enb.num_prb())

View File

@ -75,7 +75,7 @@ device_name = ${enb.rf_dev_type}
# For best performance when BW<5 MHz (25 PRB), use the following device_args settings:
# USRP B210: send_frame_size=512,recv_frame_size=512
device_args = ${enb.rf_dev_args}
device_args = ${enb.rf_dev_args},${enb.rf_dev_sync}
#time_adv_nsamples = auto
#burst_preamble_us = auto

View File

@ -54,7 +54,7 @@ device_name = ${ue.rf_dev_type}
# For best performance when BW<5 MHz (25 PRB), use the following device_args settings:
# USRP B210: send_frame_size=512,recv_frame_size=512
device_args = ${ue.rf_dev_args}
device_args = ${ue.rf_dev_args},${ue.rf_dev_sync}
#time_adv_nsamples = auto
#burst_preamble_us = auto
#continuous_tx = auto