Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos
Commits
96be37c3
Commit
96be37c3
authored
Jan 17, 2024
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X disable_sdr is gone from generic
Whether RU is enabled or disabled is controlled via per-ru ru.txrx_active
parent
28b0b098
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
67 additions
and
61 deletions
+67
-61
software/ors-amarisoft/config/out/enb.cfg
software/ors-amarisoft/config/out/enb.cfg
+1
-3
software/ors-amarisoft/config/out/ue.cfg
software/ors-amarisoft/config/out/ue.cfg
+2
-4
software/ors-amarisoft/instance-enb-input-schema.json
software/ors-amarisoft/instance-enb-input-schema.json
+0
-6
software/ors-amarisoft/instance-ors-enb.jinja2.cfg
software/ors-amarisoft/instance-ors-enb.jinja2.cfg
+1
-1
software/ors-amarisoft/slaplte.jinja2
software/ors-amarisoft/slaplte.jinja2
+57
-46
software/ors-amarisoft/slapos-render-config.py
software/ors-amarisoft/slapos-render-config.py
+1
-0
software/ors-amarisoft/test/test.py
software/ors-amarisoft/test/test.py
+5
-1
No files found.
software/ors-amarisoft/config/out/enb.cfg
View file @
96be37c3
...
...
@@ -6,11 +6,9 @@
// Radio Units
rf_driver: {
// XXX vvv <- ru.txrx_active ? XXX how to handle txrx_active for SDR ?
// (tx_gain=-1000 does not work - it still sets tx_gain to min.possible value 14)
name: "sdr",
// RU1 2T1R (sdr)
// RU2 2T1R (sdr)
name: "sdr",
args: "dev0=/dev/sdr1,dev1=/dev/sdr2",
rx_antenna:"tx_rx",
tdd_tx_mod: 1,
...
...
software/ors-amarisoft/config/out/ue.cfg
View file @
96be37c3
...
...
@@ -9,16 +9,14 @@
// Radio Units
rf_driver: {
// XXX vvv <- ru.txrx_active ? XXX how to handle txrx_active for SDR ?
// (tx_gain=-1000 does not work - it still sets tx_gain to min.possible value 14)
name: "sdr",
// __UCELL1__ru 2T1R (sdr)
// __UCELL2__ru 2T2R (sdr)
name: "dummy",
args: "dev0=/dev/sdr0,dev1=/dev/sdr2",
rx_antenna:"tx_rx",
tdd_tx_mod: 1,
},
tx_gain: [
41, 41, 31, 31
],
tx_gain: [
-1000, -1000, -1000, -1000
],
rx_gain: [42, 32, 32],
...
...
software/ors-amarisoft/instance-enb-input-schema.json
View file @
96be37c3
...
...
@@ -163,12 +163,6 @@
"description"
:
"True if GPS should be used for synchronisation"
,
"type"
:
"boolean"
},
"disable_sdr"
:
{
"default"
:
false
,
"title"
:
"Disable SDR XXX kill ?"
,
"description"
:
"Disables radio"
,
"type"
:
"boolean"
},
"use_ipv4"
:
{
"default"
:
false
,
"title"
:
"Use IPv4"
,
...
...
software/ors-amarisoft/instance-ors-enb.jinja2.cfg
View file @
96be37c3
...
...
@@ -74,7 +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',
'txrx_active': 'ACTIVE'
if (not slapparameter_dict.disable_sdr) else 'INACTIVE'
,
} |tojson
})
%}
...
...
software/ors-amarisoft/slaplte.jinja2
View file @
96be37c3
...
...
@@ -194,42 +194,16 @@
{%- set _ = ishared['_'] %}
{%- if 'ru_type' in _ %}
{%- set iru = ishared %}
{%- for k, v in defaults['ru'].items() %}
{%- do _.setdefault(k, v) %}
{%- endfor %}
{%- for k, v in defaults.get('ru/'+_.ru_type, {}).items() %}
{%- do _.setdefault(k, v) %}
{%- endfor %}
{%- if _.ru_link_type == 'cpri' %}
{%- set link = _.cpri_link %}
{%- for k, v in defaults['ru/cpri_link'].items() %}
{%- do link.setdefault(k, v) %}
{%- endfor %}
{%- endif %}
{%- do _ru_set_defaults(_) %}
{%- do iru_dict.update({ref: iru}) %}
{%- elif 'cell_type' in _ and _.get('cell_kind') == icell_kind %}
{%- set icell = ishared %}
{%- if icell_kind == 'enb' %}
{%- for k, v in defaults['cell/%s' % _.cell_type].items() %}
{%- do _.setdefault(k, v) %}
{%- endfor %}
{%- for k, v in defaults['cell/%s/%s' % (_.cell_type, _.rf_mode)].items() %}
{%- do _.setdefault(k, v) %}
{%- endfor %}
{%- endif %}
{%- if _.cell_type == 'lte' %}
{%- do _.setdefault('ul_earfcn', J(jdefault_ul_earfcn(_.dl_earfcn))) %}
{%- elif _.cell_type == 'nr' %}
{%- do _.setdefault('ul_nr_arfcn', J(jdefault_ul_nr_arfcn(_.dl_nr_arfcn, _.nr_band))) %}
{%- do _.setdefault('subcarrier_spacing', 30 if _.rf_mode == 'tdd' else 15) %} {# XXX just leave at 30 ? #}
{%- do _.setdefault('ssb_nr_arfcn', J(jdefault_ssb_nr_arfcn(_.dl_nr_arfcn, _.nr_band))) %}
{%- else %}
{%- do bug('unreachable') %}
{%- endif %}
{%- do _cell_set_defaults(_, icell_kind) %}
{%- do icell_dict.update({ref: icell}) %}
{%- set ru = _['ru'] %}
{%- if ru.ru_type not in ('ru_ref', 'ruincell_ref') %}
{#- embedded ru definition -> expose it as `_<cell_ref>_ru` #}
{%- do _ru_set_defaults(ru) %}
{%- do iru_dict.update({'_%s_ru' % ref: {
'_': ru,
'slave_title': '%s. RU' % icell.slave_title,
...
...
@@ -246,7 +220,6 @@
{#- do print('\n>>> iru_dict:'), pprint(iru_dict) #}
{#- do print('\n>>> icell_dict:'), pprint(icell_dict) #}
{#- verify that there is no dangling cell->ru references #}
{#- XXX also verify that there is no dangling cell -> cell refs in ruincell_ref #}
{%- for _, icell in icell_dict|dictsort %}
...
...
@@ -280,6 +253,42 @@
{%- endmacro %}
{%- macro _ru_set_defaults(ru) %}
{%- for k, v in defaults['ru'].items() %}
{%- do ru.setdefault(k, v) %}
{%- endfor %}
{%- for k, v in defaults.get('ru/'+ru.ru_type, {}).items() %}
{%- do ru.setdefault(k, v) %}
{%- endfor %}
{%- if ru.ru_link_type == 'cpri' %}
{%- set link = ru.cpri_link %}
{%- for k, v in defaults['ru/cpri_link'].items() %}
{%- do link.setdefault(k, v) %}
{%- endfor %}
{%- endif %}
{%- endmacro %}
{%- macro _cell_set_defaults(cell, icell_kind) %}
{%- if icell_kind == 'enb' %}
{%- for k, v in defaults['cell/%s' % cell.cell_type].items() %}
{%- do cell.setdefault(k, v) %}
{%- endfor %}
{%- for k, v in defaults['cell/%s/%s' % (cell.cell_type, cell.rf_mode)].items() %}
{%- do cell.setdefault(k, v) %}
{%- endfor %}
{%- endif %}
{%- if cell.cell_type == 'lte' %}
{%- do cell.setdefault('ul_earfcn', J(jdefault_ul_earfcn(cell.dl_earfcn))) %}
{%- elif cell.cell_type == 'nr' %}
{%- do cell.setdefault('ul_nr_arfcn', J(jdefault_ul_nr_arfcn(cell.dl_nr_arfcn, cell.nr_band))) %}
{%- do cell.setdefault('subcarrier_spacing', 30 if cell.rf_mode == 'tdd' else 15) %} {# XXX just leave at 30 ? #}
{%- do cell.setdefault('ssb_nr_arfcn', J(jdefault_ssb_nr_arfcn(cell.dl_nr_arfcn, cell.nr_band))) %}
{%- else %}
{%- do bug('unreachable') %}
{%- endif %}
{%- endmacro %}
{#- jcell_ru_ref returns RU reference linked from a cell.
if the cell embeds RU definition, its reference comes as `_<cell_ref>_ru`. #}
{%- macro jcell_ru_ref(icell, icell_dict) %}
...
...
@@ -413,17 +422,6 @@
{%- macro ru_config(iru_dict, slapparameter_dict) %}
// Radio Units
rf_driver: {
// XXX vvv <- ru.txrx_active ? XXX how to handle txrx_active for SDR ?
// (tx_gain=-1000 does not work - it still sets tx_gain to min.possible value 14)
{%- if slapparameter_dict.get('disable_sdr', False) %}
name: "dummy",
{%- else %}
name: "sdr",
{%- endif %}
{%- if slapparameter_dict.get('gps_sync', False) %}
sync: "gps",
{%- endif %}
{%- set dev_argv = [] %}
{%- set ru_sdr_dict = {} %} {#- dev -> ru for ru with ru_type = sdr #}
{%- set ru_cpri_dict = {} %} {#- dev -> ru for ru with link_type = cpri #}
...
...
@@ -444,11 +442,12 @@
{%- 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 %}
{#- emit big
warning
if both sdr and cpri are present
{#- emit big
error
if both sdr and cpri are present
to protect users from unclear eNB failures in such unsupported combination #}
{%- set do_sdr = len(ru_sdr_dict) > 0 %}
{%- set do_cpri = len(ru_cpri_dict) > 0 %}
...
...
@@ -456,18 +455,30 @@
#error Mixing SDR and CPRI is not supported and breaks subtly. See https://support.amarisoft.com/issues/26021 for details.
{%- endif %}
{#- disable trx completely if all we have is only inactive sdr(s) #}
{%- if do_sdr and (not do_cpri) and
len(iru_dict|dictsort | selectattr('1._.txrx_active', '==', 'ACTIVE') | list) == 0 %}
name: "dummy",
{%- else %}
name: "sdr",
{%- endif %}
{%- if slapparameter_dict.get('gps_sync', False) %}
sync: "gps",
{%- endif %}
{#- below we continue as if sdr and cpri are both supported by enb simultaneously #}
args: "{{(dev_argv | join(',')) or '---'}}",
{#- emit sdr-related options if an sdr ru is present #}
{%- if
len(ru_sdr_dict) > 0
%}
{%- if
do_sdr
%}
rx_antenna:"tx_rx",
tdd_tx_mod: 1,
{%- endif %}
{#- emit cpri_* options if a cpri ru is present #}
{#- NOTE values for non-cpri links come as empty #}
{%- if
len(ru_cpri_dict) > 0
%}
{%- if
do_cpri
%}
{%- set vcpri = [None]*len(dev_argv) %}
{%- for dev, ru in ru_cpri_dict|dictsort %}
{%- do vcpri.__setitem__(dev, ru.cpri_link) %}
...
...
software/ors-amarisoft/slapos-render-config.py
View file @
96be37c3
...
...
@@ -156,6 +156,7 @@ def iRU2_SDR_tLTE_tNR(ienb):
'n_antenna_ul'
:
1
,
'tx_gain'
:
51
,
'rx_gain'
:
52
,
'txrx_active'
:
'ACTIVE'
,
}
RU2
=
copy
.
deepcopy
(
RU1
)
...
...
software/ors-amarisoft/test/test.py
View file @
96be37c3
...
...
@@ -224,7 +224,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
,
'txrx_active'
:
'
IN
ACTIVE'
}
ru
|=
{
'tx_gain'
:
10
+
i
,
'rx_gain'
:
20
+
i
,
'txrx_active'
:
'ACTIVE'
}
cls
.
requestShared
(
imain
,
'RU%d'
%
i
,
ru
)
def
CELL
(
i
,
ctx
):
...
...
@@ -450,6 +450,7 @@ class SDR4:
# radio units configuration
def
test_rf_cfg_ru
(
t
):
assertMatch
(
t
,
t
.
rf_cfg
[
'rf_driver'
],
dict
(
name
=
'sdr'
,
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
,
...
...
@@ -482,6 +483,7 @@ class Lopcomm4:
# radio units configuration in enb.cfg
def
test_rf_cfg_ru
(
t
):
assertMatch
(
t
,
t
.
rf_cfg
[
'rf_driver'
],
dict
(
name
=
'sdr'
,
args
=
'dev0=/dev/sdr0@1,dev1=/dev/sdr0@2,dev2=/dev/sdr0@3,dev3=/dev/sdr0@4'
,
cpri_mapping
=
'hw,hw,hw,hw'
,
cpri_mult
=
'4,4,4,4'
,
...
...
@@ -580,6 +582,7 @@ class Sunwave4:
# radio units configuration in enb.cfg
def
test_rf_cfg_ru
(
t
):
assertMatch
(
t
,
t
.
rf_cfg
[
'rf_driver'
],
dict
(
name
=
'sdr'
,
args
=
'dev0=/dev/sdr1@1,dev1=/dev/sdr1@2,dev2=/dev/sdr1@3,dev3=/dev/sdr1@4'
,
cpri_mapping
=
'bf1,bf1,bf1,bf1'
,
cpri_mult
=
'5,5,5,5'
,
...
...
@@ -603,6 +606,7 @@ class RUMultiType4:
# radio units configuration in enb.cfg
def
test_rf_cfg_ru
(
t
):
assertMatch
(
t
,
t
.
rf_cfg
[
'rf_driver'
],
dict
(
name
=
'sdr'
,
args
=
'dev0=/dev/sdr0@1,dev1=/dev/sdr0@2,dev2=/dev/sdr1@3,dev3=/dev/sdr1@4'
,
cpri_mapping
=
'hw,hw,bf1,bf1'
,
cpri_mult
=
'4,4,5,5'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment