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
6cedf114
Commit
6cedf114
authored
Aug 24, 2023
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
049235aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
8 deletions
+20
-8
software/ors-amarisoft/config/enb.jinja2.cfg
software/ors-amarisoft/config/enb.jinja2.cfg
+20
-8
No files found.
software/ors-amarisoft/config/enb.jinja2.cfg
View file @
6cedf114
...
@@ -42,6 +42,12 @@
...
@@ -42,6 +42,12 @@
{%- do assert(False, msg) %}
{%- do assert(False, msg) %}
{%- endmacro %}
{%- endmacro %}
{#- bug indicates an error in template logic.
it should not happen. #}
{%- macro bug(msg) %}
{%- do assert(False, msg) %}
{%- endmacro %}
{#- jcell_ru_ref returns RU reference linked from a cell.
{#- jcell_ru_ref returns RU reference linked from a cell.
if the cell embeds RU definition, its reference comes as `_<cell_ref>_ru`. #}
if the cell embeds RU definition, its reference comes as `_<cell_ref>_ru`. #}
...
@@ -156,25 +162,25 @@
...
@@ -156,25 +162,25 @@
{% endif %}
{% endif %}
{%- set dev_argv = [] %}
{%- set dev_argv = [] %}
{%- set ru_cpri_dict = {} %} {# dev -> ru for ru with link_kind = cpri #}
{%- set ru_sdr_dict = {} %} {# dev -> ru for ru with ru_type = sdr #}
{%- for rf_port, (ru_ref, iru) in enumerate(iru_dict|dictsort) %}
{%- set ru_cpri_dict = {} %} {# dev -> ru for ru with link_kind = cpri #}
{%- set ru = iru['_'] %}
{%- for rf_port, (ru_ref, iru) in enumerate(iru_dict|dictsort) %}
{%- set ru = iru['_'] %}
{%- do ru.update({'.rf_port': rf_port}) %}
{%- do ru.update({'.rf_port': rf_port}) %}
{%- if ru['ru_type'] == 'sdr' %}
{%- if ru['ru_type'] == 'sdr' %}
{%- do ru_sdr_dict.update({len(dev_argv): ru}) %}
XXX move to ru/sdr ?
XXX move to ru/sdr ?
{%- for n in ru['sdr_dev_list']
%}
{%- for n in ru['sdr_dev_list'] %}
{%- do dev_argv.append("dev%d=/dev/sdr%d" % (len(dev_argv), n)) %}
{%- do dev_argv.append("dev%d=/dev/sdr%d" % (len(dev_argv), n)) %}
{%- endfor %}
{%- endfor %}
rx_antenna:"tx_rx", XXX -> ru/sdr ? FIXME don't repeat multiple times
tdd_tx_mod: 1,
{%- 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'] %}
{%- do dev_argv.append("dev%d=/dev/sdr%d@%d" % (len(dev_argv), link['sdr_dev'], link['sfp_port'])) %}
{#- set cpri_link parameters to default #}
{#- set cpri parameters to default #}
{%- for k, v in defaults['cpri_link'].items() %}
{%- for k, v in defaults['cpri_link'].items() %}
{%- do link.setdefault(k, v) %}
{%- do link.setdefault(k, v) %}
{%- endfor %}
{%- endfor %}
{%- do dev_argv.append("dev%d=/dev/sdr%d@%d" % (len(dev_argv), link['sdr_dev'], link['sfp_port'])) %}
{%- else %}
{%- else %}
{%- do bug('unreachable') %}
{%- do bug('unreachable') %}
{%- endif %}
{%- endif %}
...
@@ -182,6 +188,12 @@
...
@@ -182,6 +188,12 @@
args: "{{dev_argv | join(',')}}",
args: "{{dev_argv | join(',')}}",
{#- emit sdr-related options if an sdr ru is present #}
{%- if len(ru_sdr_dict) > 0 %}
rx_antenna:"tx_rx", XXX -> ru/sdr ?
tdd_tx_mod: 1,
{%- endif %}
{#- emit cpri_* optins if a cpri ru is present #}
{#- emit cpri_* optins if a cpri ru is present #}
{#- NOTE values for non-cpri links come as empty XXX recheck this is ok #}
{#- NOTE values for non-cpri links come as empty XXX recheck this is ok #}
{%- if len(ru_cpri_dict) > 0 %}
{%- if len(ru_cpri_dict) > 0 %}
...
...
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