Commit 57ade8ff authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 2d2a9b21
...@@ -45,18 +45,18 @@ ...@@ -45,18 +45,18 @@
} }
%} %}
{%- macro default_ul_earfcn(dl_earfcn) %} {%- macro jdefault_ul_earfcn(dl_earfcn) %}
{{- earfcn_module.dl2ul(dl_earfcn) }} {{- earfcn_module.dl2ul(dl_earfcn) | tojson }}
{%- endmacro %} {%- endmacro %}
{%- macro default_ul_nr_arfcn(dl_nr_arfcn, nr_band) %} {%- macro jdefault_ul_nr_arfcn(dl_nr_arfcn, nr_band) %}
{%- set nr = nrarfcn_module %} {%- set nr = nrarfcn_module %}
{%- set dl_lo, dl_hi = nr.get_nrarfcn_range(nr_band, 'dl') %} {%- set dl_lo, dl_hi = nr.get_nrarfcn_range(nr_band, 'dl') %}
{%- set ul_lo, ul_hi = nr.get_nrarfcn_range(nr_band, 'ul') %} {%- set ul_lo, ul_hi = nr.get_nrarfcn_range(nr_band, 'ul') %}
{{- ul_lo + (dl_nr_arfcn - dl_lo) }} {{- (ul_lo + (dl_nr_arfcn - dl_lo)) | tojson }}
{%- endmacro %} {%- endmacro %}
{%- macro default_ssb_nr_arfcn(dl_nr_arfcn) %} {%- macro jdefault_ssb_nr_arfcn(dl_nr_arfcn) %}
{#- NOTE: computations rechecked wrt https://tech-academy.amarisoft.com/OutOfBox_UEsim_SA.html#Tips_SSB_Frequency #} {#- NOTE: computations rechecked wrt https://tech-academy.amarisoft.com/OutOfBox_UEsim_SA.html#Tips_SSB_Frequency #}
{%- set nr = nrarfcn_module %} {%- set nr = nrarfcn_module %}
{%- set f = nr.get_frequency(nrarfcn=dl_nr_arfcn) %} {%- set f = nr.get_frequency(nrarfcn=dl_nr_arfcn) %}
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
{%- endif %} {%- endif %}
{%- set fg = nr.get_frequency_by_gscn(gscn) %} {%- set fg = nr.get_frequency_by_gscn(gscn) %}
{%- set fg_arfcn = nr.get_nrarfcn(fg) %} {%- set fg_arfcn = nr.get_nrarfcn(fg) %}
{{- fg_arfcn }} {{- fg_arfcn | tojson }}
{%- endmacro %} {%- endmacro %}
...@@ -139,55 +139,55 @@ ...@@ -139,55 +139,55 @@
XXX defaults ? XXX defaults ?
#} #}
{%- macro load_iru_and_icell(iru_dict, icell_dict, icell_kind) %} {%- macro load_iru_and_icell(iru_dict, icell_dict, icell_kind) %}
{%- set qother = [] %} {%- set qother = [] %}
{%- for ishared in qshared_instance_list %} {%- for ishared in qshared_instance_list %}
{%- set ref = J(jref_of_shared(ishared)) %} {%- set ref = J(jref_of_shared(ishared)) %}
{%- set _ = ishared['_'] %} {%- set _ = ishared['_'] %}
{%- if 'ru_type' in _ %} {%- if 'ru_type' in _ %}
{%- set iru = ishared %} {%- set iru = ishared %}
{%- if _.ru_link_type == 'cpri' %} {%- if _.ru_link_type == 'cpri' %}
{%- set link = _.cpri_link %} {%- set link = _.cpri_link %}
{%- 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 %}
{%- endif %} {%- endif %}
{%- do iru_dict.update({ref: iru}) %} {%- do iru_dict.update({ref: iru}) %}
{%- elif (icell_kind == 'enb' and 'cell_type' in _) or {%- elif (icell_kind == 'enb' and 'cell_type' in _) or
(icell_kind == 'ue' and 'ue_cell_type' in _) %} (icell_kind == 'ue' and 'ue_cell_type' in _) %}
{%- set icell = ishared %} {%- set icell = ishared %}
{%- if icell_kind == 'enb' %} {%- if icell_kind == 'enb' %}
{%- for k, v in defaults['cell/' + _.cell_type].items() %} {%- for k, v in defaults['cell/' + _.cell_type].items() %}
{%- do _.setdefault(k, v) %} {%- do _.setdefault(k, v) %}
{%- endfor %} {%- endfor %}
{%- set xcell_type = _.cell_type %} {%- set xcell_type = _.cell_type %}
{%- else %} {%- else %}
{%- set xcell_type = _.ue_cell_type %} {%- set xcell_type = _.ue_cell_type %}
{%- endif %} {%- endif %}
{%- if xcell_type == 'lte' %} {%- if xcell_type == 'lte' %}
{%- do _.setdefault('ul_earfcn', default_ul_earfcn(_.dl_earfcn)) %} {%- do _.setdefault('ul_earfcn', J(jdefault_ul_earfcn(_.dl_earfcn))) %}
{%- elif xcell_type == 'nr' %} {%- elif xcell_type == 'nr' %}
{%- do _.setdefault('ul_nr_arfcn', default_ul_nr_arfcn(_.dl_nr_arfcn, _.nr_band)) %} {%- do _.setdefault('ul_nr_arfcn', J(jdefault_ul_nr_arfcn(_.dl_nr_arfcn, _.nr_band))) %}
{%- do _.setdefault('ssb_nr_arfcn', default_ssb_nr_arfcn(_.dl_nr_arfcn)) %} {%- do _.setdefault('ssb_nr_arfcn', J(jdefault_ssb_nr_arfcn(_.dl_nr_arfcn))) %}
{%- else %} {%- else %}
{%- do bug('unreachable') %} {%- do bug('unreachable') %}
{%- endif %} {%- endif %}
{%- do icell_dict.update({ref: icell}) %} {%- do icell_dict.update({ref: icell}) %}
{%- set ru = _['ru'] %} {%- set ru = _['ru'] %}
{%- if ru.ru_type not in ('ru_ref', 'ruincell_ref') %} {%- if ru.ru_type not in ('ru_ref', 'ruincell_ref') %}
{#- embedded ru definition -> expose it as `_<cell_ref>_ru` #} {#- embedded ru definition -> expose it as `_<cell_ref>_ru` #}
{%- do iru_dict.update({'_%s_ru' % ref: { {%- do iru_dict.update({'_%s_ru' % ref: {
'_': ru, '_': ru,
'slave_title': '%s. RU' % icell.slave_title, 'slave_title': '%s. RU' % icell.slave_title,
'slave_reference': icell.slave_reference, 'slave_reference': icell.slave_reference,
}}) %} }}) %}
{%- endif %} {%- endif %}
{%- else %} {%- else %}
{%- do qother.append(ishared) %} {%- do qother.append(ishared) %}
{%- endif %} {%- endif %}
{%- endfor %} {%- endfor %}
{%- do qshared_instance_list.clear() %} {%- do qshared_instance_list.clear() %}
{%- do qshared_instance_list.extend(qother) %} {%- do qshared_instance_list.extend(qother) %}
{#- do print('\n>>> iru_dict:'), pprint(iru_dict) #} {#- do print('\n>>> iru_dict:'), pprint(iru_dict) #}
{#- do print('\n>>> icell_dict:'), pprint(icell_dict) #} {#- do print('\n>>> icell_dict:'), pprint(icell_dict) #}
......
...@@ -24,7 +24,7 @@ md5sum = bcb9011d930de644827ec9c713837d71 ...@@ -24,7 +24,7 @@ md5sum = bcb9011d930de644827ec9c713837d71
[amari_slap.jinja2] [amari_slap.jinja2]
_update_hash_filename_ = amari/slap.jinja2 _update_hash_filename_ = amari/slap.jinja2
md5sum = c30fa5e9843212f94ae595d8394ac6b8 md5sum = 4120fe398197ef49922bcfbc0e2116c6
[ru_libinstance.jinja2.cfg] [ru_libinstance.jinja2.cfg]
_update_hash_filename_ = ru/libinstance.jinja2.cfg _update_hash_filename_ = ru/libinstance.jinja2.cfg
...@@ -140,7 +140,7 @@ md5sum = e435990eb0a0d4be41efa9bd16dce09b ...@@ -140,7 +140,7 @@ md5sum = e435990eb0a0d4be41efa9bd16dce09b
[ru_lopcomm_cu_config.jinja2.xml] [ru_lopcomm_cu_config.jinja2.xml]
_update_hash_filename_ = ru/lopcomm/cu_config.jinja2.xml _update_hash_filename_ = ru/lopcomm/cu_config.jinja2.xml
md5sum = c9ba974fd94ffacd8d72144c950fdf9a md5sum = 3589be1efdfa9c2ebb26c6dcd07c0e02
[software.cfg.html] [software.cfg.html]
_update_hash_filename_ = gadget/software.cfg.html _update_hash_filename_ = gadget/software.cfg.html
......
...@@ -92,14 +92,14 @@ ...@@ -92,14 +92,14 @@
{%- if cell.cell_type == 'lte' %} {%- if cell.cell_type == 'lte' %}
{%- set dl_arfcn = cell.dl_earfcn %} {%- set dl_arfcn = cell.dl_earfcn %}
{%- set ul_arfcn = cell.ul_earfcn %} {%- set ul_arfcn = cell.ul_earfcn %}
{%- set dl_freq = earfcn_module.frequency(dl_arfcn) * 1e6 %} {%- set dl_freq = int(earfcn_module.frequency(dl_arfcn) * 1e6) %}
{%- set ul_freq = earfcn_module.frequency(ul_arfcn) * 1e6 %} {%- set ul_freq = int(earfcn_module.frequency(ul_arfcn) * 1e6) %}
{%- set bw = int(float(cell.bandwidth.removesuffix(' MHz')) * 1e6) %} {%- set bw = int(float(cell.bandwidth.removesuffix(' MHz')) * 1e6) %}
{%- elif cell.cell_type == 'nr' %} {%- elif cell.cell_type == 'nr' %}
{%- set dl_arfcn = cell.dl_nr_arfcn %} {%- set dl_arfcn = cell.dl_nr_arfcn %}
{%- set ul_arfcn = cell.ul_nr_arfcn %} {%- set ul_arfcn = cell.ul_nr_arfcn %}
{%- set dl_freq = nrarfcn_module.get_frequency(dl_arfcn) * 1e6 %} {%- set dl_freq = int(nrarfcn_module.get_frequency(dl_arfcn) * 1e6) %}
{%- set ul_freq = nrarfcn_module.get_frequency(ul_arfcn) * 1e6 %} {%- set ul_freq = int(nrarfcn_module.get_frequency(ul_arfcn) * 1e6) %}
{%- set bw = int(cell.bandwidth * 1e6) %} {%- set bw = int(cell.bandwidth * 1e6) %}
{%- else %} {%- else %}
{%- do bug('unreachable') %} {%- do bug('unreachable') %}
......
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