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
bc3d0a2e
Commit
bc3d0a2e
authored
Nov 21, 2023
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
cfa7c5f5
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
107 additions
and
128 deletions
+107
-128
software/ors-amarisoft/amari/lte.jinja2
software/ors-amarisoft/amari/lte.jinja2
+0
-111
software/ors-amarisoft/amari/slap.jinja2
software/ors-amarisoft/amari/slap.jinja2
+78
-2
software/ors-amarisoft/buildout.hash.cfg
software/ors-amarisoft/buildout.hash.cfg
+0
-4
software/ors-amarisoft/config/enb.jinja2.cfg
software/ors-amarisoft/config/enb.jinja2.cfg
+28
-3
software/ors-amarisoft/config/ue.jinja2.cfg
software/ors-amarisoft/config/ue.jinja2.cfg
+1
-2
software/ors-amarisoft/instance-enb.jinja2.cfg
software/ors-amarisoft/instance-enb.jinja2.cfg
+0
-1
software/ors-amarisoft/instance.cfg
software/ors-amarisoft/instance.cfg
+0
-1
software/ors-amarisoft/slapos-render-config.py
software/ors-amarisoft/slapos-render-config.py
+0
-1
software/ors-amarisoft/software-base.cfg
software/ors-amarisoft/software-base.cfg
+0
-3
No files found.
software/ors-amarisoft/amari/lte.jinja2
deleted
100644 → 0
View file @
cfa7c5f5
{#- Package amari/lte provides helpers for configuring Amarisoft LTE services in SlapOS.
- ru_config emits RF driver configutation for specified Radio Units.
- cell_tdd_config and nr_cell_tdd_config return TDD configutation for LTE
and NR cells correspondingly.
- cell_n_rb_dl returns #(resource-blocks) for an LTE cell.
XXX amari/slap is assumed to be loaded and `import with context`
-#}
{#- ru_config emits RF driver configuration for specified Radio Units. #}
{%- 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 %}
{#- XXX emit big warning if both cpri and sdr are present
to protect users from unclear eNB failues
see https://support.amarisoft.com/issues/26021 for details
XXX belowe we continue as if sdr and cpri are both supported by enb simultaneously #}
{%- 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 #}
{%- set tx_gainv = [] %} {#- tx_gain by tx channel #}
{%- set rx_gainv = [] %} {#- rx_gain by rx channel #}
{%- for (ru_ref, iru) in iru_dict.items() | sort(attribute="1._._rf_port") %}
{%- set ru = iru['_'] %}
// {{ ru_ref }} {{ ru.n_antenna_dl }}T{{ ru.n_antenna_ul }}R ({{ ru.ru_type }})
{%- if ru.ru_type == 'sdr' %}
{%- do ru_sdr_dict.update({len(dev_argv): ru}) %}
{%- 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' %}
{%- do ru_cpri_dict.update({len(dev_argv): ru}) %}
{%- set link = ru.cpri_link %}
{%- do dev_argv.append("dev%d=/dev/sdr%d@%d" % (len(dev_argv), link.sdr_dev, link.sfp_port)) %}
{%- else %}
{%- do bug('unreachable') %}
{%- endif %}
{%- do tx_gainv.extend([ru.tx_gain]*ru.n_antenna_dl) %}
{%- do rx_gainv.extend([ru.rx_gain]*ru.n_antenna_ul) %}
{%- endfor %}
args: "{{dev_argv | join(',')}}",
{#- emit sdr-related options if an sdr ru is present #}
{%- if len(ru_sdr_dict) > 0 %}
rx_antenna:"tx_rx",
tdd_tx_mod: 1,
{%- endif %}
{#- emit cpri_* optins if a cpri ru is present #}
{#- NOTE values for non-cpri links come as empty XXX recheck this is ok #}
{%- if len(ru_cpri_dict) > 0 %}
{%- set vcpri = [None]*len(dev_argv) %}
{%- for dev, ru in ru_cpri_dict|dictsort %}
{%- do vcpri.__setitem__(dev, ru.cpri_link) %}
{%- endfor %}
cpri_mapping: "{{ vcpri | map(attribute='mapping') | map('default', '') | join(',') }}",
cpri_mult: "{{ vcpri | map(attribute='mult') | map('default', '') | join(',') }}",
cpri_rx_delay: "{{ vcpri | map(attribute='rx_delay') | map('default', '') | join(',') }}",
cpri_tx_delay: "{{ vcpri | map(attribute='tx_delay') | map('default', '') | join(',') }}",
cpri_tx_dbm: "{{ vcpri | map(attribute='tx_dbm') | map('default', '') | join(',') }}",
ifname: "{{ vcpri | map(attribute='_tap') | map('default', '') | join(',') }}",
{%- endif %}
},
{#- emit tx/rx gain for all channels #}
tx_gain: {{ tx_gainv }},
rx_gain: {{ rx_gainv }},
{%- endmacro %}
{#- cell_tdd_config returns tdd_config for LTE cell. #}
{%- macro cell_tdd_config(cell) %}
{%- set _ = {'[Configuration 2] 5ms 2UL 6DL (default)': 2,
'[Configuration 6] 5ms 5UL 3DL (maximum uplink)': 6} %}
{{- _[cell.tdd_ul_dl_config] }}
{%- endmacro -%}
{#- nr_cell_tdd_config returns tdd_config for NR cell. #}
{%- macro nr_cell_tdd_config(cell) %}
{%- set _ = {'5ms 2UL 7DL 4/6 (default)': 1,
'2.5ms 1UL 3DL 2/10': 2,
'5ms 8UL 1DL 2/10 (maximum uplink)': 3} %}
{{- _[cell.tdd_ul_dl_config] }}
{%- endmacro -%}
{#- cell_n_rb_dl returns n_rb_dl for an LTE cell. #}
{%- macro cell_n_rb_dl(cell) %}
{%- set _ = {'1.4 MHz': 6,
'3 MHz': 15,
'5 MHz': 25,
'10 MHz': 50,
'15 MHz': 75,
'20 MHz': 100} %}
{{- _[cell.bandwidth] }}
{%- endmacro -%}
software/ors-amarisoft/amari/slap.jinja2
View file @
bc3d0a2e
{#- Package
amari/slap provides helpers for configuring Amarisoft LTE services in SlapOS. XXX ..
.
{#- Package
slaplte provides helpers for configuring Amarisoft LTE services in SlapOS
.
XXX overview
XXX see also amari/lte for ..
.
- ru_config emits RF driver configutation for specified Radio Units
.
-#}
...
...
@@ -362,3 +362,79 @@
{%- do qshared_instance_list.clear() %}
{%- do qshared_instance_list.extend(qother) %}
{%- endmacro %}
{#- ---- building configuration ---- #}
{#- ru_config emits RF driver configuration for specified Radio Units. #}
{%- 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 %}
{#- XXX emit big warning if both cpri and sdr are present
to protect users from unclear eNB failues
see https://support.amarisoft.com/issues/26021 for details
XXX belowe we continue as if sdr and cpri are both supported by enb simultaneously #}
{%- 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 #}
{%- set tx_gainv = [] %} {#- tx_gain by tx channel #}
{%- set rx_gainv = [] %} {#- rx_gain by rx channel #}
{%- for (ru_ref, iru) in iru_dict.items() | sort(attribute="1._._rf_port") %}
{%- set ru = iru['_'] %}
// {{ ru_ref }} {{ ru.n_antenna_dl }}T{{ ru.n_antenna_ul }}R ({{ ru.ru_type }})
{%- if ru.ru_type == 'sdr' %}
{%- do ru_sdr_dict.update({len(dev_argv): ru}) %}
{%- 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' %}
{%- do ru_cpri_dict.update({len(dev_argv): ru}) %}
{%- set link = ru.cpri_link %}
{%- do dev_argv.append("dev%d=/dev/sdr%d@%d" % (len(dev_argv), link.sdr_dev, link.sfp_port)) %}
{%- else %}
{%- do bug('unreachable') %}
{%- endif %}
{%- do tx_gainv.extend([ru.tx_gain]*ru.n_antenna_dl) %}
{%- do rx_gainv.extend([ru.rx_gain]*ru.n_antenna_ul) %}
{%- endfor %}
args: "{{dev_argv | join(',')}}",
{#- emit sdr-related options if an sdr ru is present #}
{%- if len(ru_sdr_dict) > 0 %}
rx_antenna:"tx_rx",
tdd_tx_mod: 1,
{%- endif %}
{#- emit cpri_* optins if a cpri ru is present #}
{#- NOTE values for non-cpri links come as empty XXX recheck this is ok #}
{%- if len(ru_cpri_dict) > 0 %}
{%- set vcpri = [None]*len(dev_argv) %}
{%- for dev, ru in ru_cpri_dict|dictsort %}
{%- do vcpri.__setitem__(dev, ru.cpri_link) %}
{%- endfor %}
cpri_mapping: "{{ vcpri | map(attribute='mapping') | map('default', '') | join(',') }}",
cpri_mult: "{{ vcpri | map(attribute='mult') | map('default', '') | join(',') }}",
cpri_rx_delay: "{{ vcpri | map(attribute='rx_delay') | map('default', '') | join(',') }}",
cpri_tx_delay: "{{ vcpri | map(attribute='tx_delay') | map('default', '') | join(',') }}",
cpri_tx_dbm: "{{ vcpri | map(attribute='tx_dbm') | map('default', '') | join(',') }}",
ifname: "{{ vcpri | map(attribute='_tap') | map('default', '') | join(',') }}",
{%- endif %}
},
{#- emit tx/rx gain for all channels #}
tx_gain: {{ tx_gainv }},
rx_gain: {{ rx_gainv }},
{%- endmacro %}
software/ors-amarisoft/buildout.hash.cfg
View file @
bc3d0a2e
...
...
@@ -18,10 +18,6 @@
filename = instance.cfg
md5sum = e97c99f90b5f3aaa1c2ee9c62857851a
[amari_lte.jinja2]
_update_hash_filename_ = amari/lte.jinja2
md5sum = 2148b96ee3782e1fa1f7b2a4394a78aa
[amari_slap.jinja2]
_update_hash_filename_ = amari/slap.jinja2
md5sum = 4fae7413d143b6c9b1734ffbe5c8e94b
...
...
software/ors-amarisoft/config/enb.jinja2.cfg
View file @
bc3d0a2e
...
...
@@ -2,8 +2,7 @@
{#- XXX icell vs cell / iru vs ru everyhere + document it #}
{#- XXX TDD check #}
{%- import 'amari_lte.jinja2' as lte with context %}
{%- import 'amari_slap.jinja2' as slaplte with context %}
{%- import 'slaplte.jinja2' as slaplte with context %}
{%- set J = slaplte.J %}
{%- set jcell_ru_ref = slaplte.jcell_ru_ref %}
{%- set cfg = slaplte.cfg %}
...
...
@@ -24,6 +23,32 @@
{%- set do_nr = len(list(icell_dict|dictsort | selectattr('1._.cell_type', '==', 'nr'))) > 0 %}
{#- cell_tdd_config returns tdd_config for LTE cell. #}
{%- macro cell_tdd_config(cell) %}
{%- set _ = {'[Configuration 2] 5ms 2UL 6DL (default)': 2,
'[Configuration 6] 5ms 5UL 3DL (maximum uplink)': 6} %}
{{- _[cell.tdd_ul_dl_config] }}
{%- endmacro -%}
{#- nr_cell_tdd_config returns tdd_config for NR cell. #}
{%- macro nr_cell_tdd_config(cell) %}
{%- set _ = {'5ms 2UL 7DL 4/6 (default)': 1,
'2.5ms 1UL 3DL 2/10': 2,
'5ms 8UL 1DL 2/10 (maximum uplink)': 3} %}
{{- _[cell.tdd_ul_dl_config] }}
{%- endmacro -%}
{#- cell_n_rb_dl returns n_rb_dl for an LTE cell. #}
{%- macro cell_n_rb_dl(cell) %}
{%- set _ = {'1.4 MHz': 6,
'3 MHz': 15,
'5 MHz': 25,
'10 MHz': 50,
'15 MHz': 75,
'20 MHz': 100} %}
{{- _[cell.bandwidth] }}
{%- endmacro -%}
{#- handover_config emits handover configuration for specified cell #}
{%- macro handover_config(cell_ref) %}
ncell_list: [
...
...
@@ -97,7 +122,7 @@
log_filename: "{{ directory['log'] }}/enb.log",
{# instantiate radio units #}
{{ lte.ru_config(iru_dict, slapparameter_dict) }}
{{
slap
lte.ru_config(iru_dict, slapparameter_dict) }}
{%- if slapparameter_dict.get('websocket_password', '') %}
com_addr: "[{{ gtp_addr_v6 }}]:{{ slap_configuration['configuration.com_ws_port'] }}",
...
...
software/ors-amarisoft/config/ue.jinja2.cfg
View file @
bc3d0a2e
{%- import 'amari_lte.jinja2' as lte with context %}
{%- import 'amari_slap.jinja2' as slaplte with context %}
{%- set J = slaplte.J %}
{%- set jcell_ru_ref = slaplte.jcell_ru_ref %}
...
...
@@ -24,7 +23,7 @@
com_addr: "{{ pub_info['com_addr'] }}",
{# instantiate radio units #}
{{ lte.ru_config(iru_dict, slapparameter_dict) }}
{{
slap
lte.ru_config(iru_dict, slapparameter_dict) }}
cell_groups: [{
...
...
software/ors-amarisoft/instance-enb.jinja2.cfg
View file @
bc3d0a2e
...
...
@@ -358,7 +358,6 @@ extra-context =
json ipeercell_dict {{ ipeercell_dict | tojson }}
import json_module json
import-list =
rawfile amari_lte.jinja2 {{ amari_lte_template }}
rawfile amari_slap.jinja2 {{ amari_slap_template }}
...
...
software/ors-amarisoft/instance.cfg
View file @
bc3d0a2e
...
...
@@ -294,7 +294,6 @@ extra-context =
key enb amarisoft:enb
key sdr amarisoft:sdr
raw enb_template ${enb.jinja2.cfg:target}
raw amari_lte_template ${amari_lte.jinja2:target}
raw amari_slap_template ${amari_slap.jinja2:target}
raw drb_lte_template ${drb_lte.jinja2.cfg:target}
raw drb_nr_template ${drb_nr.jinja2.cfg:target}
...
...
software/ors-amarisoft/slapos-render-config.py
View file @
bc3d0a2e
...
...
@@ -27,7 +27,6 @@ def j2render(src, out, jcfg):
'output'
:
'config/out/{}'
.
format
(
out
),
'context'
:
textctx
,
'import-list'
:
'''
rawfile amari_lte.jinja2 amari/lte.jinja2
rawfile amari_slap.jinja2 amari/slap.jinja2'''
,
})
...
...
software/ors-amarisoft/software-base.cfg
View file @
bc3d0a2e
...
...
@@ -31,7 +31,6 @@ parts +=
gnb.jinja2.cfg
ue_db.jinja2.cfg
ue.jinja2.cfg
amari_lte.jinja2
drb_lte.jinja2.cfg
drb_nr.jinja2.cfg
sib23.jinja2.asn
...
...
@@ -136,8 +135,6 @@ destination = ${buildout:directory}/gadget/${:_buildout_section_name_}
[ue.jinja2.cfg]
<= copy-config-to-instance
[amari_lte.jinja2]
<= download-base
[amari_slap.jinja2]
<= download-base
...
...
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