Commit 1cd1d03e authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent b679aea3
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
{#- XXX -> nr ? #} {#- XXX -> nr ? #}
{%- macro default_ssb_nr_arfcn(dl_nr_arfcn) %} {%- macro default_ssb_nr_arfcn(dl_nr_arfcn) %}
{%- set f = nr.get_frequency(nrarfcn=632628) %} {#- NOTE: rechecked computations wrt https://tech-academy.amarisoft.com/OutOfBox_UEsim_SA.html#Tips_SSB_Frequency #}
{%- set f = nr.get_frequency(nrarfcn=dl_nr_arfcn) %}
{%- set gscn = nr.get_gscn_by_frequency(f)-1 %}{# nrarfcn round up, amari down #} {%- set gscn = nr.get_gscn_by_frequency(f)-1 %}{# nrarfcn round up, amari down #}
{%- 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) %}
......
{%- if slapparameter_dict.get('bandwidth', slap_configuration['configuration.default_lte_bandwidth']) == '1.4 MHz' %} {#- defaults provide default values for parameters.
#define N_RB_DL 6 it should be kept in sync with "default" in json schemas #}
{%- elif slapparameter_dict.get('bandwidth', slap_configuration['configuration.default_lte_bandwidth']) == '3 MHz' %} {#- XXX opc='milenage' is not meaningful ? #}
#define N_RB_DL 15 {%- set defaults = {
{%- elif slapparameter_dict.get('bandwidth', slap_configuration['configuration.default_lte_bandwidth']) == '5 MHz' %} 'ue': {
#define N_RB_DL 25 'sim_algo': 'milenage',
{%- elif slapparameter_dict.get('bandwidth', slap_configuration['configuration.default_lte_bandwidth']) == '10 MHz' %} 'opc': 'milenage',
#define N_RB_DL 50 'amf': '0x9001',
{%- elif slapparameter_dict.get('bandwidth', slap_configuration['configuration.default_lte_bandwidth']) == '15 MHz' %} 'sqn': '000000000000',
#define N_RB_DL 75 'impu': '',
{%- elif slapparameter_dict.get('bandwidth', slap_configuration['configuration.default_lte_bandwidth']) == '20 MHz' %} 'impi': '',
#define N_RB_DL 100 'imsi': slap_configuration['configuration.default_lte_imsi'],
{%- endif %} 'k': slap_configuration['configuration.default_lte_k'],
}
}
%}
{#- iue_dict keeps ue slave instances: reference -> iue
in the kept instances _ is automatically json-decoded
#}
{%- set iue_dict = {} %}
{%- for slave in slap_configuration.get('slave-instance-list', []) %}
{%- set ref = J(jref_of_shared(slave)) %}
{%- set _ = J(slave['_']) %}
{%- do slave.update({'_': _}) %}
{%- if 'ue_type' in _ %}
{%- set iue = slave %}
{%- for k, v in defaults['ue'].items() %}
{%- do _.setdefault(k, v) %}
{%- endfor %}
{%- do iue_dict.update({ref: iue}) %}
{%- else %}
{%- do error(slave, "unknown shared instance type") %}
{%- endif %}
{%- endfor %}
{#- XXX verify ue.ue_type in lte|nr #}
{#- start of the config -#}
{ {
log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1,phy.level=info,file.rotate=1G,file.path=/dev/null", log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,rrc.level=debug,rrc.max_size=1,phy.level=info,file.rotate=1G,file.path=/dev/null",
log_filename: "{{ directory['log'] }}/ue.log", log_filename: "{{ directory['log'] }}/ue.log",
...@@ -18,6 +45,7 @@ ...@@ -18,6 +45,7 @@
rue_bind_addr: "{{ pub_info['rue_bind_addr'] }}", rue_bind_addr: "{{ pub_info['rue_bind_addr'] }}",
com_addr: "{{ pub_info['com_addr'] }}", com_addr: "{{ pub_info['com_addr'] }}",
# XXX instantiate RU
rf_driver: { rf_driver: {
name: "sdr", name: "sdr",
args: "dev0=/dev/sdr0", args: "dev0=/dev/sdr0",
...@@ -25,6 +53,8 @@ rf_driver: { ...@@ -25,6 +53,8 @@ rf_driver: {
}, },
tx_gain: {{ slapparameter_dict.get('tx_gain', 60) }}, tx_gain: {{ slapparameter_dict.get('tx_gain', 60) }},
rx_gain: {{ slapparameter_dict.get('rx_gain', 40) }}, rx_gain: {{ slapparameter_dict.get('rx_gain', 40) }},
cell_groups: [{ cell_groups: [{
multi_ue: true, multi_ue: true,
cells: [ cells: [
...@@ -39,20 +69,31 @@ rf_driver: { ...@@ -39,20 +69,31 @@ rf_driver: {
pdcch_decode_opt: false, pdcch_decode_opt: false,
pdcch_decode_opt_threshold: 0.1, pdcch_decode_opt_threshold: 0.1,
}], }],
ue_list: [ ue_list: [
{%- for ue_ref, iue in iue_dict|dictsort %}
{%- set ue = iue['_'] %}
{ {
sim_algo: "{{ slapparameter_dict.get('sim_algo', 'milenage') }}", sim_algo: "{{ ue.sim_algo }}",
opc: "{{ slapparameter_dict.get('opc', '') }}", opc: "{{ ue.opc }}",
amf: {{ slapparameter_dict.get('amf', '0x9001') }}, amf: {{ ue.amf }},
sqn: "{{ slapparameter_dict.get('sqn', '000000000000') }}", sqn: "{{ ue.sqn }}",
impu: "{{ slapparameter_dict.get('impu', '') }}", impu: "{{ ue.impu }}",
impi: "{{ slapparameter_dict.get('impi', '') }}", impi: "{{ ue.impi }}",
imsi: "{{ slapparameter_dict.get('imsi', slap_configuration['configuration.default_lte_imsi']) }}", imsi: "{{ ue.imsi }}",
K: "{{ slapparameter_dict.get('k', slap_configuration['configuration.default_lte_k']) }}", K: "{{ ue.k }}",
rue_addr: "{{ slapparameter_dict.get('rue_addr', '') }}", rue_addr: "{{ ue.rue_addr }}",
ue_category: 12, {%- if ue.ue_type == 'lte' %}
tun_setup_script: "ue-ifup", ue_category: 12,
apn: "internet", {%- elif ue.ur_type == 'nr' %}
as_release: 15,
ue_category: "nr",
{%- else %}
{%- do bug('unreachable') %}
{%- endif %}
tun_setup_script: "ue-ifup",
apn: "internet",
} }
{%- endfor %}
], ],
} }
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