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,272 +389,274 @@
{%- 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: [
{
rf_port: {{ ru._rf_port }},
n_antenna_dl: {{ ru.n_antenna_dl }},
n_antenna_ul: {{ ru.n_antenna_ul }},
cell_id: {{ cell.cell_id }},
n_id_cell: {{ cell.pci }},
band: {{ cell.nr_band }},
dl_nr_arfcn: {{ cell.dl_nr_arfcn }},
bandwidth: {{ cell.bandwidth }},
subcarrier_spacing: 30,
ssb_pos_bitmap: "{{ cell.ssb_pos_bitmap }}",
root_sequence_index: {{ cell.root_sequence_index }},
inactivity_timer: {{ cell.inactivity_timer }},
// Handover
{{- handover_config() }}
// tune NR parameters for the cell
{%- if ors %}
manual_ref_signal_power: true,
{%- if ors['one-watt'] %}
ss_pbch_block_power: {{ ru.tx_gain - 54 }},
{%- else %}
ss_pbch_block_power: {{ ru.tx_gain - 35 }},
{%- endif -%}
{%- endif %}
{%- set tdd = (cell.rf_mode == 'tdd') %}
{%- set tdd_config =
{'5ms 2UL 7DL 4/6 (default)': 1,
'2.5ms 1UL 3DL 2/10': 2,
'5ms 8UL 1DL 2/10 (maximum uplink)': 3}
[cell.tdd_ul_dl_config]
if tdd else None %}
{% if tdd_config == 1 %}
tdd_ul_dl_config: {
pattern1: {
period: 5,
dl_slots: 7,
dl_symbols: 6,
ul_slots: 2,
ul_symbols: 4,
},
},
{% elif tdd_config == 2 %}
tdd_ul_dl_config: {
pattern1: {
period: 2.5,
dl_slots: 3,
dl_symbols: 10,
ul_slots: 1,
ul_symbols: 2,
},
},
{% elif tdd_config == 3 %}
tdd_ul_dl_config: {
pattern1: {
period: 5, /* in ms */
dl_slots: 1,
dl_symbols: 10,
ul_slots: 8,
ul_symbols: 2,
},
},
{% endif %}
prach: {
{% if ru.ru_type == "sunwave" %}
msg1_frequency_start: 0,
{% endif %}
},
pdcch: {
{% 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 %}
uss: {
n_candidates: [ 0, 8, 1, 0, 0 ],
dci_0_1_and_1_1: true,
},
{% else %}
uss: {
n_candidates: [ 0, 2, 1, 0, 0 ],
dci_0_1_and_1_1: true,
},
{% endif %}
},
pdsch: {
{% if ru.ru_type == "sunwave" %}
k0: 0,
k1: [ 8, 7, 7, 6, 5, 4, 12, 11 ],
{% elif tdd_config == 3 %}
k1: [4, 11],
{% endif %}
},
{%- for cell_ref, cell in cell_dict_nr|dictsort %}
{%- set ru_ref = cell.ru_ref %}
{%- set ru = ru_dict[ru_ref] %}
pusch: {
{% if ru.ru_type == "sunwave" %}
k2: 4,
msg3_k2: 7,
{% elif tdd_config == 3 %}
k2: [11, 12, 4, 5, 6, 7, 7, 8],
msg3_k2: 7,
{% endif %}
},
// {{ cell_ref }} ({{ ru_ref }})
{
rf_port: {{ ru._rf_port }},
n_antenna_dl: {{ ru.n_antenna_dl }},
n_antenna_ul: {{ ru.n_antenna_ul }},
cell_id: {{ cell.cell_id }},
n_id_cell: {{ cell.pci }},
band: {{ cell.nr_band }},
dl_nr_arfcn: {{ cell.dl_nr_arfcn }},
bandwidth: {{ cell.bandwidth }},
subcarrier_spacing: 30,
ssb_pos_bitmap: "{{ cell.ssb_pos_bitmap }}",
root_sequence_index: {{ cell.root_sequence_index }},
inactivity_timer: {{ cell.inactivity_timer }},
// Handover
{{- handover_config() }}
// tune NR parameters for the cell
{%- if ors %}
manual_ref_signal_power: true,
{%- if ors['one-watt'] %}
ss_pbch_block_power: {{ ru.tx_gain - 54 }},
{%- else %}
ss_pbch_block_power: {{ ru.tx_gain - 35 }},
{%- endif -%}
{%- endif %}
csi_rs: {
nzp_csi_rs_resource: [
{
{%- if ru.n_antenna_dl == 1 %}
n_ports: 1,
frequency_domain_allocation: "row2",
bitmap: "100000000000",
cdm_type: "no_cdm",
{%- elif ru.n_antenna_dl == 2 %}
n_ports: 2,
frequency_domain_allocation: "other",
bitmap: "100000",
cdm_type: "fd_cdm2",
{%- elif ru.n_antenna_dl == 4 %}
n_ports: 4,
frequency_domain_allocation: "row4",
bitmap: "100",
cdm_type: "fd_cdm2",
{%- elif ru.n_antenna_dl == 8 %}
n_ports: 8,
frequency_domain_allocation: "other",
bitmap: "110011",
cdm_type: "fd_cdm2",
{%- else %}
{%- do error('n_antenna_dl=%d is not supported' % ru.n_antenna_dl) %}
{%- endif %}
},
{% if tdd_config != 3 %}
{
csi_rs_id: 1,
n_ports: 1,
frequency_domain_allocation: "row1",
bitmap: "0001",
cdm_type: "no_cdm",
density: 3,
first_symb: 4,
rb_start: 0,
l_crb: -1,
power_control_offset: 0,
power_control_offset_ss: 0,
period: 40,
offset: 11,
qcl_info_periodic_csi_rs: 0,
},
{
csi_rs_id: 2,
n_ports: 1,
frequency_domain_allocation: "row1",
bitmap: "0001",
cdm_type: "no_cdm",
density: 3,
first_symb: 8,
rb_start: 0,
l_crb: -1,
power_control_offset: 0,
power_control_offset_ss: 0,
period: 40,
offset: 11,
qcl_info_periodic_csi_rs: 0,
},
{
csi_rs_id: 3,
n_ports: 1,
frequency_domain_allocation: "row1",
bitmap: "0001",
cdm_type: "no_cdm",
density: 3,
first_symb: 4,
rb_start: 0,
l_crb: -1,
power_control_offset: 0,
power_control_offset_ss: 0,
period: 40,
offset: 12,
qcl_info_periodic_csi_rs: 0,
{%- set tdd = (cell.rf_mode == 'tdd') %}
{%- set tdd_config =
{'5ms 2UL 7DL 4/6 (default)': 1,
'2.5ms 1UL 3DL 2/10': 2,
'5ms 8UL 1DL 2/10 (maximum uplink)': 3}
[cell.tdd_ul_dl_config]
if tdd else None %}
{% if tdd_config == 1 %}
tdd_ul_dl_config: {
pattern1: {
period: 5,
dl_slots: 7,
dl_symbols: 6,
ul_slots: 2,
ul_symbols: 4,
},
},
{% elif tdd_config == 2 %}
tdd_ul_dl_config: {
pattern1: {
period: 2.5,
dl_slots: 3,
dl_symbols: 10,
ul_slots: 1,
ul_symbols: 2,
},
},
{% elif tdd_config == 3 %}
tdd_ul_dl_config: {
pattern1: {
period: 5, /* in ms */
dl_slots: 1,
dl_symbols: 10,
ul_slots: 8,
ul_symbols: 2,
},
},
{% endif %}
prach: {
{%- if ru.ru_type == "sunwave" %}
msg1_frequency_start: 0,
{%- endif %}
},
{
csi_rs_id: 4,
n_ports: 1,
frequency_domain_allocation: "row1",
bitmap: "0001",
cdm_type: "no_cdm",
density: 3,
first_symb: 8,
rb_start: 0,
l_crb: -1,
power_control_offset: 0,
power_control_offset_ss: 0,
period: 40,
offset: 12,
qcl_info_periodic_csi_rs: 0,
pdcch: {
{%- if ru.ru_type == "sunwave" %}
n_rb_coreset0: 48,
n_symb_coreset0: 1,
dedicated_coreset: {
duration: 1,
},
{%- endif %}
{%- if tdd_config == 3 %}
uss: {
n_candidates: [ 0, 8, 1, 0, 0 ],
dci_0_1_and_1_1: true,
},
{%- else %}
uss: {
n_candidates: [ 0, 2, 1, 0, 0 ],
dci_0_1_and_1_1: true,
},
{%- endif %}
},
{% endif %}
],
nzp_csi_rs_resource_set: [
{},
{% if tdd_config != 3 %}
{
csi_rs_set_id: 1,
nzp_csi_rs_resources: [ 1, 2, 3, 4 ],
repetition: false,
trs_info: true,
pdsch: {
{%- if ru.ru_type == "sunwave" %}
k0: 0,
k1: [ 8, 7, 7, 6, 5, 4, 12, 11 ],
{%- elif tdd_config == 3 %}
k1: [4, 11],
{%- endif %}
},
{% endif %}
],
csi_resource_config: [
{},
{},
{% if tdd_config != 3 %}
{
csi_rsc_config_id: 2,
nzp_csi_rs_resource_set_list: [ 1 ],
resource_type: "periodic",
pusch: {
{%- if ru.ru_type == "sunwave" %}
k2: 4,
msg3_k2: 7,
{%- elif tdd_config == 3 %}
k2: [11, 12, 4, 5, 6, 7, 7, 8],
msg3_k2: 7,
{%- endif %}
},
{% endif %}
],
csi_report_config: [
{
{%- if ru.n_antenna_dl > 1 %}
codebook_config: {
codebook_type: "type1",
sub_type: "typeI_SinglePanel",
{%- if ru.n_antenna_dl == 2 %}
{%- elif ru.n_antenna_dl == 4 %}
n1: 2,
n2: 1,
codebook_mode: 1,
{%- elif ru.n_antenna_dl == 8 %}
n1: 4,
n2: 1,
codebook_mode: 1,
csi_rs: {
nzp_csi_rs_resource: [
{
{%- if ru.n_antenna_dl == 1 %}
n_ports: 1,
frequency_domain_allocation: "row2",
bitmap: "100000000000",
cdm_type: "no_cdm",
{%- elif ru.n_antenna_dl == 2 %}
n_ports: 2,
frequency_domain_allocation: "other",
bitmap: "100000",
cdm_type: "fd_cdm2",
{%- elif ru.n_antenna_dl == 4 %}
n_ports: 4,
frequency_domain_allocation: "row4",
bitmap: "100",
cdm_type: "fd_cdm2",
{%- elif ru.n_antenna_dl == 8 %}
n_ports: 8,
frequency_domain_allocation: "other",
bitmap: "110011",
cdm_type: "fd_cdm2",
{%- else %}
{%- do error('n_antenna_dl=%d is not supported' % ru.n_antenna_dl) %}
{%- endif %}
},
{%- endif %}
},
{%- if tdd_config != 3 %}
{
csi_rs_id: 1,
n_ports: 1,
frequency_domain_allocation: "row1",
bitmap: "0001",
cdm_type: "no_cdm",
density: 3,
first_symb: 4,
rb_start: 0,
l_crb: -1,
power_control_offset: 0,
power_control_offset_ss: 0,
period: 40,
offset: 11,
qcl_info_periodic_csi_rs: 0,
},
{
csi_rs_id: 2,
n_ports: 1,
frequency_domain_allocation: "row1",
bitmap: "0001",
cdm_type: "no_cdm",
density: 3,
first_symb: 8,
rb_start: 0,
l_crb: -1,
power_control_offset: 0,
power_control_offset_ss: 0,
period: 40,
offset: 11,
qcl_info_periodic_csi_rs: 0,
},
{
csi_rs_id: 3,
n_ports: 1,
frequency_domain_allocation: "row1",
bitmap: "0001",
cdm_type: "no_cdm",
density: 3,
first_symb: 4,
rb_start: 0,
l_crb: -1,
power_control_offset: 0,
power_control_offset_ss: 0,
period: 40,
offset: 12,
qcl_info_periodic_csi_rs: 0,
},
{
csi_rs_id: 4,
n_ports: 1,
frequency_domain_allocation: "row1",
bitmap: "0001",
cdm_type: "no_cdm",
density: 3,
first_symb: 8,
rb_start: 0,
l_crb: -1,
power_control_offset: 0,
power_control_offset_ss: 0,
period: 40,
offset: 12,
qcl_info_periodic_csi_rs: 0,
},
{%- endif %}
],
nzp_csi_rs_resource_set: [
{},
{%- if tdd_config != 3 %}
{
csi_rs_set_id: 1,
nzp_csi_rs_resources: [ 1, 2, 3, 4 ],
repetition: false,
trs_info: true,
},
{%- endif %}
],
csi_resource_config: [
{},
{},
{%- if tdd_config != 3 %}
{
csi_rsc_config_id: 2,
nzp_csi_rs_resource_set_list: [ 1 ],
resource_type: "periodic",
},
{%- endif %}
],
csi_report_config: [
{
{%- if ru.n_antenna_dl > 1 %}
codebook_config: {
codebook_type: "type1",
sub_type: "typeI_SinglePanel",
{%- if ru.n_antenna_dl == 2 %}
{%- elif ru.n_antenna_dl == 4 %}
n1: 2,
n2: 1,
codebook_mode: 1,
{%- elif ru.n_antenna_dl == 8 %}
n1: 4,
n2: 1,
codebook_mode: 1,
{%- endif %}
},
{%- endif %}
},
],
},
],
},
drb_config: "{{ '%s-drb.cfg' % cell_ref }}",
},
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