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 @@
{%- endif %}
{#- do_lte/do_nr indicate whether we have LTE or NR cell #}
{%- do assert(do_lte or do_nr) %}
{%- do assert(not (do_lte and do_nr)) %}
{#- do_lte/do_nr indicate whether we have LTE and/or NR cells
cell_dict_lte/cell_dict_nr keep LTE/NR parts of cell_dict registry #}
{%- 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 #}
......@@ -163,7 +166,7 @@
// LTE cells
cell_list: [
{%- 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 = ru_dict[ru_ref] %}
......@@ -185,7 +188,7 @@
// Carrier Aggregation
scell_list: [
{%- for cell2_ref, cell2 in cell_dict|dictsort %}
{%- for cell2_ref, cell2 in cell_dict_lte|dictsort %}
{%- if cell2_ref != cell_ref %}
{
cell_id: {{ cell2.cell_id }}, // + {{ cell2_ref }}
......@@ -227,11 +230,11 @@
n1_pucch_sr_count: 11,
cqi_pucch_n_rb: 1,
{#- 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",
n1_pucch_an_cs_count: 8,
{#- 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",
n3_pucch_an_n_rb: 3,
{%- endif %}
......@@ -386,11 +389,13 @@
{%- endif %}
{% 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_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 }},
n_antenna_dl: {{ ru.n_antenna_dl }},
......@@ -461,51 +466,49 @@
{% endif %}
prach: {
{% if ru.ru_type == "sunwave" %}
{%- if ru.ru_type == "sunwave" %}
msg1_frequency_start: 0,
{% endif %}
{%- endif %}
},
pdcch: {
{% if ru.ru_type == "sunwave" %}
{%- if ru.ru_type == "sunwave" %}
n_rb_coreset0: 48,
n_symb_coreset0: 1,
dedicated_coreset: {
{% if ru.ru_type == "sunwave" %}
duration: 1,
{% endif %}
},
{% endif %}
{% if tdd_config == 3 %}
{%- endif %}
{%- if tdd_config == 3 %}
uss: {
n_candidates: [ 0, 8, 1, 0, 0 ],
dci_0_1_and_1_1: true,
},
{% else %}
{%- else %}
uss: {
n_candidates: [ 0, 2, 1, 0, 0 ],
dci_0_1_and_1_1: true,
},
{% endif %}
{%- endif %}
},
pdsch: {
{% if ru.ru_type == "sunwave" %}
{%- if ru.ru_type == "sunwave" %}
k0: 0,
k1: [ 8, 7, 7, 6, 5, 4, 12, 11 ],
{% elif tdd_config == 3 %}
{%- elif tdd_config == 3 %}
k1: [4, 11],
{% endif %}
{%- endif %}
},
pusch: {
{% if ru.ru_type == "sunwave" %}
{%- if ru.ru_type == "sunwave" %}
k2: 4,
msg3_k2: 7,
{% elif tdd_config == 3 %}
{%- elif tdd_config == 3 %}
k2: [11, 12, 4, 5, 6, 7, 7, 8],
msg3_k2: 7,
{% endif %}
{%- endif %}
},
csi_rs: {
......@@ -535,7 +538,7 @@
{%- do error('n_antenna_dl=%d is not supported' % ru.n_antenna_dl) %}
{%- endif %}
},
{% if tdd_config != 3 %}
{%- if tdd_config != 3 %}
{
csi_rs_id: 1,
n_ports: 1,
......@@ -600,31 +603,31 @@
offset: 12,
qcl_info_periodic_csi_rs: 0,
},
{% endif %}
{%- endif %}
],
nzp_csi_rs_resource_set: [
{},
{% if tdd_config != 3 %}
{%- if tdd_config != 3 %}
{
csi_rs_set_id: 1,
nzp_csi_rs_resources: [ 1, 2, 3, 4 ],
repetition: false,
trs_info: true,
},
{% endif %}
{%- endif %}
],
csi_resource_config: [
{},
{},
{% if tdd_config != 3 %}
{%- if tdd_config != 3 %}
{
csi_rsc_config_id: 2,
nzp_csi_rs_resource_set_list: [ 1 ],
resource_type: "periodic",
},
{% endif %}
{%- endif %}
],
csi_report_config: [
......@@ -651,7 +654,9 @@
drb_config: "{{ '%s-drb.cfg' % cell_ref }}",
},
{%- endfor %}
],
nr_cell_default: {
ssb_period: 20,
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