Commit 84e417ac authored by Kirill Smelkov's avatar Kirill Smelkov

software/ors-amarisoft: enb/generic: lte: Switch bandwidth to MHz

For uniformity with NR which already has bandwidth specified as number in MHz.

For ORS mode everything stays as is which inputs bandwidth as string with MHz
suffix, e.g. "20 MHz" instead of number `20`.
parent 95e1a3bd
......@@ -62,7 +62,7 @@
10: 50,
15: 75,
20: 100} %}
{{- _[float(bandwidth.removesuffix(' MHz'))] | tojson }}
{{- _[bandwidth] | tojson }}
{%- endmacro %}
{#- jhostport splits address into (host,port) pair. #}
......
......@@ -43,15 +43,15 @@
},
"bandwidth": {
"title": "Bandwidth",
"description": "Downlink Bandwidth",
"type": "string",
"description": "Downlink Bandwidth (in MHz)",
"type": "number"
"enum": [
"1.4 MHz",
"3 MHz",
"5 MHz",
"10 MHz",
"15 MHz",
"20 MHz"
1.4,
3,
5,
10,
15,
20
]
},
"pci": {
......
......@@ -125,15 +125,15 @@
},
"bandwidth": {
"title": "Bandwidth",
"description": "Downlink Bandwidth",
"type": "string",
"description": "Downlink Bandwidth (in MHz)",
"type": "number"
"enum": [
"1.4 MHz",
"3 MHz",
"5 MHz",
"10 MHz",
"15 MHz",
"20 MHz"
1.4,
3,
5,
10,
15,
20
]
},
"pci": {
......
......@@ -65,7 +65,7 @@
{%- if enb_mode == 'enb' %}
{%- set cell = {
'dl_earfcn': ors_version['current-earfcn'],
'bandwidth': slapparameter_dict.bandwidth,
'bandwidth': float(slapparameter_dict.bandwidth.removesuffix(' MHz')),
'tac': slapparameter_dict.tac,
'root_sequence_index': slapparameter_dict.root_sequence_index,
}
......
......@@ -90,13 +90,12 @@
<!-- TX/RX carriers -->
{%- if cell.cell_type == 'lte' %}
{%- set dl_arfcn = cell.dl_earfcn %}
{%- set bw = int(float(cell.bandwidth.removesuffix(' MHz')) * 1e6) %}
{%- elif cell.cell_type == 'nr' %}
{%- set dl_arfcn = cell.dl_nr_arfcn %}
{%- set bw = int(cell.bandwidth * 1e6) %}
{%- else %}
{%- do bug('unreachable') %}
{%- endif %}
{%- set bw = int(cell.bandwidth * 1e6) %}
<tx-array-carriers>
<name>{{ TxCarrier }}</name>
<absolute-frequency-center>{{ dl_arfcn }}</absolute-frequency-center>
......
......@@ -122,7 +122,7 @@ def do_enb():
'cell_list': {'CELL': {
'rf_mode': 'tdd',
'dl_earfcn': 36100,
'bandwidth': '10 MHz',
'bandwidth': 10,
'tac': '0x0001',
'root_sequence_index': 204,
'pci': 1,
......
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