Commit b55814ea authored by Kirill Smelkov's avatar Kirill Smelkov

software/ors-amarisoft: enb/generic: Introduce txrx_active generic RU parameter

Radio Units like Lopcomm ORAN require explicit activation for the radio.
Generalize this and introduce a generic parameter for explicit activation of
the radio on any RU. Default it to _INACTIVE_ so that radio happens only when
it is explicitly asked to be on for real. But preserve backward compatibility
for ORS which used to do "radio on" by default. disable_sdr becomes
ORS-specific parameter.

Lopcomm-specific txa0cc00_active and rxa0cc00_active go away and are replaced
by txrx_active usage.
parent 1de30f86
......@@ -167,12 +167,6 @@
"description": "True if GPS should be used for synchronisation",
"type": "boolean"
},
"disable_sdr": {
"default": false,
"title": "Disable SDR",
"description": "Disables radio",
"type": "boolean"
},
"use_ipv4": {
"default": false,
"title": "Use IPv4",
......
......@@ -22,6 +22,7 @@
"ncell_list": {},
"x2_peers": {},
"inactivity_timer": 10000,
"disable_sdr": false
} %}
{%- set ors_gnb_defaults = {
"nr_bandwidth": 40,
......@@ -39,6 +40,7 @@
"ncell_list": {},
"xn_peers": {},
"inactivity_timer": 10000,
"disable_sdr": false
} %}
{%- set ors_defaults = {'enb': ors_enb_defaults, 'gnb': ors_gnb_defaults} [enb_mode] %}
......@@ -72,6 +74,7 @@
'n_antenna_ul': slapparameter_dict.n_antenna_ul,
'tx_gain': ors_version['current-tx-gain'],
'rx_gain': ors_version['current-rx-gain'],
'txrx_active': 'ACTIVE' if (not slapparameter_dict.disable_sdr) else 'INACTIVE',
} |tojson
})
%}
......
......@@ -45,6 +45,14 @@
"type": "number"
},
"txrx_active": {
"title": "Activate Tx/Rx",
"description": "Activate or inactivate Tx transmission and Rx reception. When inactive RU does no radio.",
"type": "string",
"enum": ["ACTIVE", "INACTIVE"],
"default": "INACTIVE"
},
"cpri_link": {
"title": "CPRI link settings",
......
......@@ -248,6 +248,7 @@ ipv6 = ${vtap.{{ ru.cpri_link._tap }}:gateway}
{%- endif %}
tx_gain = {{ dumps(ru.tx_gain) }}
rx_gain = {{ dumps(ru.rx_gain) }}
txrx_active = {{ dumps(ru.txrx_active) }}
{%- endif %}
{%- endfor %}
......
......@@ -102,7 +102,7 @@
<absolute-frequency-center>{{ dl_arfcn }}</absolute-frequency-center>
<center-of-channel-bandwidth>{{ 1000000*ru.get('txa0cc00_center_frequency', 2140) }}</center-of-channel-bandwidth>
<channel-bandwidth>{{ bw }}</channel-bandwidth>
<active>{{ ru.get('txa0cc00_active', 'INACTIVE') }}</active>
<active>{{ ru.txrx_active }}</active>
<rw-type>{{ cell.cell_type | upper }}</rw-type>
<rw-duplex-scheme>{{ cell.rf_mode | upper }}</rw-duplex-scheme>
<gain>{{ ru.tx_gain }}</gain>
......@@ -114,7 +114,7 @@
<absolute-frequency-center>{{ ru.get('rxa0cc00_center_frequency_earfcn', 18300) }}</absolute-frequency-center>
<center-of-channel-bandwidth>{{ 1000000*ru.get('rxa0cc00_center_frequency', 1950) }}</center-of-channel-bandwidth>
<channel-bandwidth>{{ bw }}</channel-bandwidth>
<active>{{ ru.get('rxa0cc00_active', 'INACTIVE') }}</active>
<active>{{ ru.txrx_active }}</active>
<downlink-radio-frame-offset>0</downlink-radio-frame-offset>
<downlink-sfn-offset>0</downlink-sfn-offset>
<!-- <gain>{{ ru.rx_gain }}</gain> -->
......
......@@ -63,26 +63,6 @@
}
},
"txa0cc00_active": {
"title": "Lopcomm ORAN TX array carriers (TXA0CC00)",
"description": "Activate or inactivate Lopcomm ORAN TX array carriers (TXA0CC00)",
"type": "string",
"default": "INACTIVE",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
"rxa0cc00_active": {
"title": "Lopcomm ORAN RX array carriers (RXA0CC00)",
"description": "Activate or inactivate Lopcomm ORAN RX array carriers (RXA0CC00)",
"type": "string",
"default": "INACTIVE",
"enum": [
"ACTIVE",
"INACTIVE"
]
},
"txa0cc00_center_frequency": {
"title": "Lopcomm ORAN DL Center Frequency in MHz (TXA0CC00)",
"description": "Lopcomm ORAN Center Frequency in MHz (TXA0CC00)",
......
......@@ -24,6 +24,7 @@
TODO automatically load defaults from JSON schemas #}
{%- set defaults = {
'ru': {
'txrx_active': 'INACTIVE',
},
'ru/cpri_link': {
'mult': 16,
......@@ -382,7 +383,8 @@
{%- else %}
{%- do bug('unreachable') %}
{%- endif %}
{%- do tx_gainv.extend([ru.tx_gain]*ru.n_antenna_dl) %}
{%- set ru_tx_gain = ru.tx_gain if ru.txrx_active == 'ACTIVE' else -1000 %}
{%- do tx_gainv.extend([ru_tx_gain]*ru.n_antenna_dl) %}
{%- do rx_gainv.extend([ru.rx_gain]*ru.n_antenna_ul) %}
{%- endfor %}
......@@ -402,7 +404,12 @@
)) %}
{%- endif %}
{%- if slapparameter_dict.get('disable_sdr', False) %}
{#- disable trx completely if all we have is only inactive sdr(s).
do not disable if there is cpri, because for cpri whether to activate
radio or not is natively controlled via RU-specific config.
See e.g. ru/lopcomm/cu_config.jinja2.xml for details #}
{%- if do_sdr and (not do_cpri) and
len(iru_dict|dictsort | selectattr('1._.txrx_active', '==', 'ACTIVE') | list) == 0 %}
name: "dummy",
{%- else %}
name: "sdr",
......
......@@ -155,6 +155,7 @@ def iRU2_SDR_tLTE_tNR(ienb):
'n_antenna_ul': 1,
'tx_gain': 51,
'rx_gain': 52,
'txrx_active': 'ACTIVE',
}
RU2 = copy.deepcopy(RU1)
......
......@@ -240,7 +240,7 @@ class RFTestCase4(AmariTestCase):
def RU(i):
ru = cls.RUcfg(i)
ru |= {'n_antenna_dl': 4, 'n_antenna_ul': 2}
ru |= {'tx_gain': 10+i, 'rx_gain': 20+i}
ru |= {'tx_gain': 10+i, 'rx_gain': 20+i, 'txrx_active': 'ACTIVE'}
return cls.requestShared(imain, 'RU%d' % i, ru)
def CELL(i, ctx):
......@@ -269,10 +269,10 @@ class RFTestCase4(AmariTestCase):
def test_published_ru_and_cell(t):
q = t.querySharedPublished
assertMatch(t, q('RU1'), {'tx_gain': 11, 'rx_gain': 21})
assertMatch(t, q('RU2'), {'tx_gain': 12, 'rx_gain': 22})
assertMatch(t, q('RU3'), {'tx_gain': 13, 'rx_gain': 23})
assertMatch(t, q('RU4'), {'tx_gain': 14, 'rx_gain': 24})
assertMatch(t, q('RU1'), {'tx_gain': 11, 'rx_gain': 21, 'txrx_active': 'ACTIVE'})
assertMatch(t, q('RU2'), {'tx_gain': 12, 'rx_gain': 22, 'txrx_active': 'ACTIVE'})
assertMatch(t, q('RU3'), {'tx_gain': 13, 'rx_gain': 23, 'txrx_active': 'ACTIVE'})
assertMatch(t, q('RU4'), {'tx_gain': 14, 'rx_gain': 24, 'txrx_active': 'ACTIVE'})
assertMatch(t, q('RU1.CELL'), dict(
dl_earfcn= 100,
......@@ -473,10 +473,12 @@ class Lopcomm4:
'absolute-frequency-center': '%d' % dl_arfcn,
'channel-bandwidth': '%d' % bw,
'gain': '%d' % tx_gain,
'active': 'ACTIVE',
},
'rx-array-carriers': {
'channel-bandwidth': '%d' % bw,
# XXX no rx_gain
'active': 'ACTIVE',
},
}
......
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