Commit e62da00d authored by Kirill Smelkov's avatar Kirill Smelkov

software/ors-amarisoft: enb: nr: Handle multiple cells

Similarly with cell_list, organize a loop in under nr_cell_list and emit
configuration for each NR cell we have.

Tests will be added later as full tests for generic MultiRU.

Only trivial space and comments changes in rendered gnb.cfg
parent 1a678c78
...@@ -12,9 +12,12 @@ ...@@ -12,9 +12,12 @@
{%- endif %} {%- endif %}
{#- do_lte/do_nr indicate whether we have LTE or NR cell #} {#- do_lte/do_nr indicate whether we have LTE and/or NR cells
{%- do assert(do_lte or do_nr) %} cell_dict_lte/cell_dict_nr keep LTE/NR parts of cell_dict registry #}
{%- do assert(not (do_lte and do_nr)) %} {%- set cell_dict_lte = dict(cell_dict|dictsort | selectattr('1.cell_type', '==', 'lte')) %}
{%- set cell_dict_nr = dict(cell_dict|dictsort | selectattr('1.cell_type', '==', 'nr' )) %}
{%- set do_lte = len(cell_dict_lte) > 0 %}
{%- set do_nr = len(cell_dict_nr) > 0 %}
{#- handover_config emits handover configuration #} {#- handover_config emits handover configuration #}
...@@ -163,7 +166,7 @@ ...@@ -163,7 +166,7 @@
// LTE cells // LTE cells
cell_list: [ cell_list: [
{%- if do_lte %} {%- if do_lte %}
{%- for cell_ref, cell in cell_dict|dictsort %} {%- for cell_ref, cell in cell_dict_lte|dictsort %}
{%- set ru_ref = cell.ru_ref %} {%- set ru_ref = cell.ru_ref %}
{%- set ru = ru_dict[ru_ref] %} {%- set ru = ru_dict[ru_ref] %}
...@@ -185,7 +188,7 @@ ...@@ -185,7 +188,7 @@
// Carrier Aggregation // Carrier Aggregation
scell_list: [ scell_list: [
{%- for cell2_ref, cell2 in cell_dict|dictsort %} {%- for cell2_ref, cell2 in cell_dict_lte|dictsort %}
{%- if cell2_ref != cell_ref %} {%- if cell2_ref != cell_ref %}
{ {
cell_id: {{ cell2.cell_id }}, // + {{ cell2_ref }} cell_id: {{ cell2.cell_id }}, // + {{ cell2_ref }}
...@@ -227,11 +230,11 @@ ...@@ -227,11 +230,11 @@
n1_pucch_sr_count: 11, n1_pucch_sr_count: 11,
cqi_pucch_n_rb: 1, cqi_pucch_n_rb: 1,
{#- for CA with 2 cells it is possible to use PUCCH 1b CS ack/nack #} {#- for CA with 2 cells it is possible to use PUCCH 1b CS ack/nack #}
{%- if len(cell_dict) == 2 %} {%- if len(cell_dict_lte) == 2 %}
ack_nack_feedback_mode_ca: "cs", ack_nack_feedback_mode_ca: "cs",
n1_pucch_an_cs_count: 8, n1_pucch_an_cs_count: 8,
{#- starting from 3 cells it is always PUCCH 3 for ack/nack in CA #} {#- starting from 3 cells it is always PUCCH 3 for ack/nack in CA #}
{%- elif len(cell_dict) >= 3 %} {%- elif len(cell_dict_lte) >= 3 %}
ack_nack_feedback_mode_ca: "pucch3", ack_nack_feedback_mode_ca: "pucch3",
n3_pucch_an_n_rb: 3, n3_pucch_an_n_rb: 3,
{%- endif %} {%- endif %}
...@@ -386,11 +389,13 @@ ...@@ -386,11 +389,13 @@
{%- endif %} {%- endif %}
{% if do_nr %} {% if do_nr %}
{%- do assert(len(ru_dict) == len(cell_dict) == 1, 'MultiCELL/MultiRU is TODO for NR') %}
{%- set ru = list(ru_dict.values())[0] %}
{%- set cell = list(cell_dict.values())[0] %}
// NR cells // NR cells
nr_cell_list: [ nr_cell_list: [
{%- for cell_ref, cell in cell_dict_nr|dictsort %}
{%- set ru_ref = cell.ru_ref %}
{%- set ru = ru_dict[ru_ref] %}
// {{ cell_ref }} ({{ ru_ref }})
{ {
rf_port: {{ ru._rf_port }}, rf_port: {{ ru._rf_port }},
n_antenna_dl: {{ ru.n_antenna_dl }}, n_antenna_dl: {{ ru.n_antenna_dl }},
...@@ -461,51 +466,49 @@ ...@@ -461,51 +466,49 @@
{% endif %} {% endif %}
prach: { prach: {
{% if ru.ru_type == "sunwave" %} {%- if ru.ru_type == "sunwave" %}
msg1_frequency_start: 0, msg1_frequency_start: 0,
{% endif %} {%- endif %}
}, },
pdcch: { pdcch: {
{% if ru.ru_type == "sunwave" %} {%- if ru.ru_type == "sunwave" %}
n_rb_coreset0: 48, n_rb_coreset0: 48,
n_symb_coreset0: 1, n_symb_coreset0: 1,
dedicated_coreset: { dedicated_coreset: {
{% if ru.ru_type == "sunwave" %}
duration: 1, duration: 1,
{% endif %}
}, },
{% endif %} {%- endif %}
{% if tdd_config == 3 %} {%- if tdd_config == 3 %}
uss: { uss: {
n_candidates: [ 0, 8, 1, 0, 0 ], n_candidates: [ 0, 8, 1, 0, 0 ],
dci_0_1_and_1_1: true, dci_0_1_and_1_1: true,
}, },
{% else %} {%- else %}
uss: { uss: {
n_candidates: [ 0, 2, 1, 0, 0 ], n_candidates: [ 0, 2, 1, 0, 0 ],
dci_0_1_and_1_1: true, dci_0_1_and_1_1: true,
}, },
{% endif %} {%- endif %}
}, },
pdsch: { pdsch: {
{% if ru.ru_type == "sunwave" %} {%- if ru.ru_type == "sunwave" %}
k0: 0, k0: 0,
k1: [ 8, 7, 7, 6, 5, 4, 12, 11 ], k1: [ 8, 7, 7, 6, 5, 4, 12, 11 ],
{% elif tdd_config == 3 %} {%- elif tdd_config == 3 %}
k1: [4, 11], k1: [4, 11],
{% endif %} {%- endif %}
}, },
pusch: { pusch: {
{% if ru.ru_type == "sunwave" %} {%- if ru.ru_type == "sunwave" %}
k2: 4, k2: 4,
msg3_k2: 7, msg3_k2: 7,
{% elif tdd_config == 3 %} {%- elif tdd_config == 3 %}
k2: [11, 12, 4, 5, 6, 7, 7, 8], k2: [11, 12, 4, 5, 6, 7, 7, 8],
msg3_k2: 7, msg3_k2: 7,
{% endif %} {%- endif %}
}, },
csi_rs: { csi_rs: {
...@@ -535,7 +538,7 @@ ...@@ -535,7 +538,7 @@
{%- do error('n_antenna_dl=%d is not supported' % ru.n_antenna_dl) %} {%- do error('n_antenna_dl=%d is not supported' % ru.n_antenna_dl) %}
{%- endif %} {%- endif %}
}, },
{% if tdd_config != 3 %} {%- if tdd_config != 3 %}
{ {
csi_rs_id: 1, csi_rs_id: 1,
n_ports: 1, n_ports: 1,
...@@ -600,31 +603,31 @@ ...@@ -600,31 +603,31 @@
offset: 12, offset: 12,
qcl_info_periodic_csi_rs: 0, qcl_info_periodic_csi_rs: 0,
}, },
{% endif %} {%- endif %}
], ],
nzp_csi_rs_resource_set: [ nzp_csi_rs_resource_set: [
{}, {},
{% if tdd_config != 3 %} {%- if tdd_config != 3 %}
{ {
csi_rs_set_id: 1, csi_rs_set_id: 1,
nzp_csi_rs_resources: [ 1, 2, 3, 4 ], nzp_csi_rs_resources: [ 1, 2, 3, 4 ],
repetition: false, repetition: false,
trs_info: true, trs_info: true,
}, },
{% endif %} {%- endif %}
], ],
csi_resource_config: [ csi_resource_config: [
{}, {},
{}, {},
{% if tdd_config != 3 %} {%- if tdd_config != 3 %}
{ {
csi_rsc_config_id: 2, csi_rsc_config_id: 2,
nzp_csi_rs_resource_set_list: [ 1 ], nzp_csi_rs_resource_set_list: [ 1 ],
resource_type: "periodic", resource_type: "periodic",
}, },
{% endif %} {%- endif %}
], ],
csi_report_config: [ csi_report_config: [
...@@ -651,7 +654,9 @@ ...@@ -651,7 +654,9 @@
drb_config: "{{ '%s-drb.cfg' % cell_ref }}", drb_config: "{{ '%s-drb.cfg' % cell_ref }}",
}, },
{%- endfor %}
], ],
nr_cell_default: { nr_cell_default: {
ssb_period: 20, ssb_period: 20,
plmn_list: [ plmn_list: [
......
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