Commit 97ecce86 authored by Kirill Smelkov's avatar Kirill Smelkov

software/ors-amarisoft: enb/generic: Allow SDR RU to consist of multiple SDR boards

For example if we need to do 4T4R but have SDR boards with only 2T2R ports, we
need to combine two such boards into single RF port. Allow to do that via
changing SDR schema from taking sdr_dev into accepting sdr_dev_list and
adjusting the code everywhere correspondingly.

For ORS full backward compatibility is preserved via adjusting "ORS mode" proxy
correspondingly.

One example in slapos-render-config.py is changed from 2T2R to be 4T2R on such
RF port combined from two SDR boards. For that example the diff for rendered
enb.cfg is as follows:

    --- a/config/old/enb/iRU1_SDR_tLTE2_tNR/enb.cfg
    +++ b/config/out/enb/iRU1_SDR_tLTE2_tNR/enb.cfg
    @@ -8,7 +8,7 @@
       rf_driver: {
           // __CELL__a__ru 4T2R  (sdr)
           name: "sdr",
    -      args: "dev0=/dev/sdr0",
    +      args: "dev0=/dev/sdr0,dev1=/dev/sdr1",
       },
       tx_gain: [51, 51, 51, 51],
       rx_gain: [52, 52],

All other cases, including ORS, remain without any change.
parent c83fa3cb
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
'_': { '_': {
'ru_type': 'sdr', 'ru_type': 'sdr',
'ru_link_type': 'sdr', 'ru_link_type': 'sdr',
'sdr_dev': 0, 'sdr_dev_list': [0],
'n_antenna_dl': slapparameter_dict.n_antenna_dl, 'n_antenna_dl': slapparameter_dict.n_antenna_dl,
'n_antenna_ul': slapparameter_dict.n_antenna_ul, 'n_antenna_ul': slapparameter_dict.n_antenna_ul,
'tx_gain': ors_version['current-tx-gain'], 'tx_gain': ors_version['current-tx-gain'],
......
...@@ -193,11 +193,13 @@ hash-files = ...@@ -193,11 +193,13 @@ hash-files =
# {{ dumps(ru_ref) }} {{ ru.n_antenna_dl }}T{{ ru.n_antenna_ul }}R ({{ ru.ru_type }}) # {{ dumps(ru_ref) }} {{ ru.n_antenna_dl }}T{{ ru.n_antenna_ul }}R ({{ ru.ru_type }})
{%- if ru.ru_link_type == 'sdr' %} {%- if ru.ru_link_type == 'sdr' %}
{{ promise('%s-sdr-busy' % ru_ref) }} {%- for (i, n) in enumerate(ru.sdr_dev_list) %}
{{ promise('%s-sdr-busy%s' % (ru_ref, '-%d' % (i+1) if i > 0 else '')) }}
promise = check_sdr_busy promise = check_sdr_busy
config-sdr = {{ sdr }} config-sdr = {{ sdr }}
config-sdr_dev = {{ ru.sdr_dev }} config-sdr_dev = {{ n }}
config-dma_chan = 0 config-dma_chan = 0
{%- endfor %}
{%- elif ru.ru_link_type == 'cpri' %} {%- elif ru.ru_link_type == 'cpri' %}
{{ promise('%s-sdr-busy' % ru_ref) }} {{ promise('%s-sdr-busy' % ru_ref) }}
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"$schema": "https://json-schema.org/draft/2020-12/schema", "$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "SDR transiever", "title": "SDR transiever",
"description": "Radio Unit constituted of single SDR board", "description": "Radio Unit constituted of several SDR boards",
"type": "object", "type": "object",
"required": [ "required": [
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
"n_antenna_dl", "n_antenna_dl",
"n_antenna_ul", "n_antenna_ul",
"sdr_dev", "sdr_dev_list",
"tx_gain", "tx_gain",
"rx_gain" "rx_gain"
], ],
...@@ -30,22 +30,16 @@ ...@@ -30,22 +30,16 @@
"template": "sdr" "template": "sdr"
}, },
"sdr_dev": { "sdr_dev_list": {
"title": "SDR board", "title": "SDR boards",
"description": "/dev/sdr # of SDR board", "description": "Which SDR boards to use as combined RF port",
"type": "integer" "type": "array",
}, "items": {
"title": "/dev/sdr # of SDR board",
"tx_gain": { "type": "integer"
"title": "Tx gain", },
"description": "Tx gain (in dB)", "minItems": 1,
"type": "number" "uniqueItems": true
},
"rx_gain": {
"title": "Rx gain",
"description": "Rx gain (in dB)",
"type": "number"
} }
} }
} }
...@@ -377,7 +377,9 @@ ...@@ -377,7 +377,9 @@
// {{ B(ru_ref) }} {{ ru.n_antenna_dl }}T{{ ru.n_antenna_ul }}R ({{ ru.ru_type }}) // {{ B(ru_ref) }} {{ ru.n_antenna_dl }}T{{ ru.n_antenna_ul }}R ({{ ru.ru_type }})
{%- if ru.ru_link_type == 'sdr' %} {%- if ru.ru_link_type == 'sdr' %}
{%- do ru_sdr_dict.update({len(dev_argv): ru}) %} {%- do ru_sdr_dict.update({len(dev_argv): ru}) %}
{%- do dev_argv.append("dev%d=/dev/sdr%d" % (len(dev_argv), ru.sdr_dev)) %} {%- for n in ru.sdr_dev_list %}
{%- do dev_argv.append("dev%d=/dev/sdr%d" % (len(dev_argv), n)) %}
{%- endfor %}
{%- elif ru.ru_link_type == 'cpri' %} {%- elif ru.ru_link_type == 'cpri' %}
{%- do ru_cpri_dict.update({len(dev_argv): ru}) %} {%- do ru_cpri_dict.update({len(dev_argv): ru}) %}
{%- set link = ru.cpri_link %} {%- set link = ru.cpri_link %}
......
...@@ -84,13 +84,13 @@ def ref_of_shared(ishared): ...@@ -84,13 +84,13 @@ def ref_of_shared(ishared):
# ---- eNB ---- # ---- eNB ----
# 3 cells sharing SDR-based RU consisting of one SDR board (2tx + 2rx ports max) # 3 cells sharing SDR-based RU consisting of 2 SDR boards (4tx + 4rx ports max)
# RU definition is embedded into cell for simplicity of management # RU definition is embedded into cell for simplicity of management
def iRU1_SDR_tLTE2_tNR(ienb): def iRU1_SDR_tLTE2_tNR(ienb):
RU = { RU = {
'ru_type': 'sdr', 'ru_type': 'sdr',
'ru_link_type': 'sdr', 'ru_link_type': 'sdr',
'sdr_dev': 0, 'sdr_dev_list': [0, 1],
'n_antenna_dl': 4, 'n_antenna_dl': 4,
'n_antenna_ul': 2, 'n_antenna_ul': 2,
'tx_gain': 51, 'tx_gain': 51,
...@@ -150,7 +150,7 @@ def iRU2_SDR_tLTE_tNR(ienb): ...@@ -150,7 +150,7 @@ def iRU2_SDR_tLTE_tNR(ienb):
RU1 = { RU1 = {
'ru_type': 'sdr', 'ru_type': 'sdr',
'ru_link_type': 'sdr', 'ru_link_type': 'sdr',
'sdr_dev': 1, 'sdr_dev_list': [1],
'n_antenna_dl': 2, 'n_antenna_dl': 2,
'n_antenna_ul': 1, 'n_antenna_ul': 1,
'tx_gain': 51, 'tx_gain': 51,
...@@ -158,7 +158,7 @@ def iRU2_SDR_tLTE_tNR(ienb): ...@@ -158,7 +158,7 @@ def iRU2_SDR_tLTE_tNR(ienb):
} }
RU2 = copy.deepcopy(RU1) RU2 = copy.deepcopy(RU1)
RU2['sdr_dev'] = 2 RU2['sdr_dev_list'] = [2]
ienb.ishared('RU1', RU1) ienb.ishared('RU1', RU1)
ienb.ishared('RU2', RU2) ienb.ishared('RU2', RU2)
...@@ -260,7 +260,7 @@ def iRU1_SDR1_fLTE2(ienb): ...@@ -260,7 +260,7 @@ def iRU1_SDR1_fLTE2(ienb):
RU = { RU = {
'ru_type': 'sdr', 'ru_type': 'sdr',
'ru_link_type': 'sdr', 'ru_link_type': 'sdr',
'sdr_dev': 1, 'sdr_dev_list': [1],
'n_antenna_dl': 1, 'n_antenna_dl': 1,
'n_antenna_ul': 1, 'n_antenna_ul': 1,
'tx_gain': 67, 'tx_gain': 67,
...@@ -356,7 +356,7 @@ def iRU2_LOPCOMM_fLTE2(ienb): ...@@ -356,7 +356,7 @@ def iRU2_LOPCOMM_fLTE2(ienb):
ORS_ru = { ORS_ru = {
'ru_type': 'sdr', 'ru_type': 'sdr',
'ru_link_type': 'sdr', 'ru_link_type': 'sdr',
'sdr_dev': 0, 'sdr_dev_list': [0],
'n_antenna_dl': 2, 'n_antenna_dl': 2,
'n_antenna_ul': 2, 'n_antenna_ul': 2,
'tx_gain': 62, 'tx_gain': 62,
......
...@@ -366,14 +366,15 @@ class SDR4: ...@@ -366,14 +366,15 @@ class SDR4:
return { return {
'ru_type': 'sdr', 'ru_type': 'sdr',
'ru_link_type': 'sdr', 'ru_link_type': 'sdr',
'sdr_dev': i, 'sdr_dev_list': [2*i,2*i+1],
} }
# radio units configuration # radio units configuration
def test_rf_cfg_ru(t): def test_rf_cfg_ru(t):
assertMatch(t, t.rf_cfg['rf_driver'], dict( assertMatch(t, t.rf_cfg['rf_driver'], dict(
name='sdr', name='sdr',
args='dev0=/dev/sdr1,dev1=/dev/sdr2,dev2=/dev/sdr3,dev3=/dev/sdr4', args='dev0=/dev/sdr2,dev1=/dev/sdr3,dev2=/dev/sdr4,dev3=/dev/sdr5,' +
'dev4=/dev/sdr6,dev5=/dev/sdr7,dev6=/dev/sdr8,dev7=/dev/sdr9',
cpri_mapping=NO, cpri_mapping=NO,
cpri_mult=NO, cpri_mult=NO,
cpri_rx_delay=NO, cpri_rx_delay=NO,
......
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