Pau Espin Pedrol | 786a6bc | 2020-03-30 13:51:21 +0200 | [diff] [blame] | 1 | rf_driver: { |
Pau Espin Pedrol | 65beb8f | 2020-03-31 12:03:19 +0200 | [diff] [blame] | 2 | name: "${trx.rf_dev_type}", |
Pau Espin Pedrol | 65beb8f | 2020-03-31 12:03:19 +0200 | [diff] [blame] | 3 | args: "${trx.rf_dev_args}", |
Andre Puschmann | c489f19 | 2020-10-09 14:46:38 +0200 | [diff] [blame] | 4 | sync: "${trx.rf_dev_sync}", |
Andre Puschmann | 5e08075 | 2021-04-14 21:30:08 +0200 | [diff] [blame] | 5 | % if trx.get('rx_ant', None) != None: |
| 6 | rx_antenna: "${trx.rx_ant}", |
| 7 | % endif |
Andre Puschmann | 9a5be2c | 2020-04-06 22:08:24 +0200 | [diff] [blame] | 8 | |
Pau Espin Pedrol | 65beb8f | 2020-03-31 12:03:19 +0200 | [diff] [blame] | 9 | % if trx.rf_dev_type == 'zmq': |
Andre Puschmann | 9a5be2c | 2020-04-06 22:08:24 +0200 | [diff] [blame] | 10 | dl_sample_bits: 16, |
| 11 | ul_sample_bits: 16, |
Pau Espin Pedrol | d45a29e | 2020-04-02 17:21:47 +0200 | [diff] [blame] | 12 | % endif |
Pau Espin Pedrol | 786a6bc | 2020-03-30 13:51:21 +0200 | [diff] [blame] | 13 | }, |
| 14 | |
Pau Espin Pedrol | a6d6304 | 2020-04-20 15:14:51 +0200 | [diff] [blame] | 15 | tx_gain: ${trx.tx_gain}, /* TX gain (in dB) B2x0: 0 to 89.8 dB */ |
| 16 | rx_gain: ${trx.rx_gain}, /* RX gain (in dB) B2x0: 0 to 73 dB */ |
Andre Puschmann | 374a175 | 2021-04-23 16:35:48 +0200 | [diff] [blame] | 17 | |
Andre Puschmann | 7879143 | 2021-05-04 21:38:53 +0200 | [diff] [blame] | 18 | // Only SDR and ZMQ devices require dedicated rf_port parameters |
| 19 | % if trx.rf_dev_type != 'uhd': |
| 20 | |
Andre Puschmann | 6e081aa | 2021-05-04 16:56:25 +0200 | [diff] [blame] | 21 | rf_ports: [ |
| 22 | % if trx.rf_dev_type == 'sdr': |
Andre Puschmann | 7879143 | 2021-05-04 21:38:53 +0200 | [diff] [blame] | 23 | // NSA specific configuration |
Andre Puschmann | 6e081aa | 2021-05-04 16:56:25 +0200 | [diff] [blame] | 24 | { |
| 25 | sample_rate: 23.04, |
| 26 | }, |
| 27 | { |
| 28 | sample_rate: 61.44, |
| 29 | dl_freq: 3502.8, // Moves NR DL LO frequency -5.76 MHz |
| 30 | ul_freq: 3502.8, // Moves NR UL LO frequency -5.76 MHz |
| 31 | } |
| 32 | % else: |
Andre Puschmann | 7879143 | 2021-05-04 21:38:53 +0200 | [diff] [blame] | 33 | // default case for UHD and ZMQ usage |
| 34 | <% |
| 35 | # determine ports and sample rate from either eNB or UE object |
| 36 | num_ports = 1 |
| 37 | try: |
| 38 | obj_sample_rate = enb.sample_rate |
| 39 | num_ports = int(enb.num_cells) + int(enb.num_nr_cells) |
| 40 | except AttributeError: |
| 41 | obj_sample_rate = ue.sample_rate |
| 42 | %> |
| 43 | |
| 44 | %for port in range(num_ports): |
Andre Puschmann | 6e081aa | 2021-05-04 16:56:25 +0200 | [diff] [blame] | 45 | { |
Andre Puschmann | 7879143 | 2021-05-04 21:38:53 +0200 | [diff] [blame] | 46 | sample_rate: ${obj_sample_rate}, |
Andre Puschmann | 6e081aa | 2021-05-04 16:56:25 +0200 | [diff] [blame] | 47 | }, |
Andre Puschmann | 7879143 | 2021-05-04 21:38:53 +0200 | [diff] [blame] | 48 | %endfor |
| 49 | |
| 50 | % endif |
Andre Puschmann | 6e081aa | 2021-05-04 16:56:25 +0200 | [diff] [blame] | 51 | ], |
| 52 | |
Andre Puschmann | 7879143 | 2021-05-04 21:38:53 +0200 | [diff] [blame] | 53 | % endif |
| 54 | |
Andre Puschmann | 374a175 | 2021-04-23 16:35:48 +0200 | [diff] [blame] | 55 | // only the B210 requires a sample offset |
| 56 | % if "b200" in trx.rf_dev_args: |
Andre Puschmann | a70f05c | 2020-04-06 12:13:15 +0200 | [diff] [blame] | 57 | tx_time_offset: -150, |
Andre Puschmann | 374a175 | 2021-04-23 16:35:48 +0200 | [diff] [blame] | 58 | % else: |
| 59 | tx_time_offset: 0, |
| 60 | % endif |