Commit d73c3f2b authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 1fbcbde1
......@@ -24,7 +24,7 @@
'cell/lte': {
'pci': 1,
'tac': "0x0001",
'tac': '0x0001',
'tdd_ul_dl_config': '[Configuration 2] 5ms 2UL 6DL (default)',
},
'cell/nr': {
......@@ -32,6 +32,16 @@
'ssb_pos_bitmap': '10000000',
'tdd_ul_dl_config': '5ms 2UL 7DL 4/6 (default)',
},
'peercell/lte': {
'pci': 1,
'tac': '0x0001',
},
'peercell/nr': {
'pci': 500,
'tac': '0x0001',
},
'cpri_link': {
'mapping': 'hw',
'mult': 16,
......@@ -302,7 +312,30 @@
ipeercell_dict keeps peer cell shared instances: reference -> ipeercell
#}
{%- macro load_ipeercell(ipeercell_dict) %}
// XXX TODO
{%- set qother = [] %}
{%- for ishared in qshared_instance_list %}
{%- set ref = J(jref_of_shared(ishared)) %}
{%- set _ = ishared['_'] %}
{%- if 'peer_cell_type' in _ %}
{%- set ipeercell = ishared %}
{%- for k, v in defaults['peercell/' + _.peer_cell_type].items() %}
{%- do _.setdefault(k, v) %}
{%- endfor %}
{%- if _.peer_cell_type == 'lte' %}
{%- do _.setdefault('ul_earfcn', J(jdefault_ul_earfcn(_.dl_earfcn))) %}
{%- elif _.peer_cell_type == 'nr' %}
{%- do _.setdefault('ul_nr_arfcn', J(jdefault_ul_nr_arfcn(_.dl_nr_arfcn, _.nr_band))) %}
{%- do _.setdefault('ssb_nr_arfcn', J(jdefault_ssb_nr_arfcn(_.dl_nr_arfcn))) %}
{%- else %}
{%- do bug('unreachable') %}
{%- endif %}
{%- do ipeercell_dict.update({ref: ipeercell}) %}
{%- else %}
{%- do qother.append(ishared) %}
{%- endif %}
{%- endfor %}
{%- do qshared_instance_list.clear() %}
{%- do qshared_instance_list.extend(qother) %}
{%- endmacro %}
......
......@@ -40,6 +40,6 @@
"type": "integer"
},
"pci": { "$ref": "../../../cell/nr/input-schema.json#/properties/pci" },
"tac": { "$ref": "../../../cell/nr/input-schema.json#/properties/tac" }
"tac": { "$ref": "../../../cell/lte/input-schema.json#/properties/tac" }
}
}
......@@ -140,24 +140,10 @@
cell_id: {{ cfg('enb_id') }}{{ cell2.cell_id.removeprefix('0x') }}, // -> {{ cell2_ref }}
n_id_cell: {{ cell2.pci }},
dl_earfcn: {{ cell2.dl_earfcn }},
//ul_earfcn: {{ cell2.ul_earfcn }},
tac: {{ cell2.tac }},
{%- elif cell2.cell_type == 'nr' %}
rat: "nr",
cell_id: {{ cell2.cell_id }}, // -> {{ cell2_ref }}
nr_cell_id: {{ cfg('gnb_id') }}{{ cell2.cell_id.removeprefix('0x') }}, // -> {{ cell2_ref }}
n_id_cell: {{ cell2.pci }},
gnb_id_bits: {{ cfg('gnb_id_bits') }},
dl_nr_arfcn: {{ cell2.dl_nr_arfcn }},
ssb_nr_arfcn: {{ cell2.ssb_nr_arfcn }},
ul_nr_arfcn: {{ cell2.ul_nr_arfcn }},
tac: XXX cell2.tac,
band: {{ cell2.nr_band }},
ssb_subcarrier_spacing: 30,
ssb_period: 20,
ssb_offset: 0,
ssb_duration: 1,
{%- else %}
{%- do bug('unreachable') %}
{%- endif %}
......@@ -169,6 +155,34 @@
{#- TODO: add info about peers as shared instances - one instance per peer *ENB*.
then query SlapOS Master about cells configured on that peer ENB and
put them as peers here #}
{%- for peercell_ref, ipeercell in ipeercell_dict|dictsort %}
{%- set ncell = ipeercell['_'] %}
{
{%- if ncell.peer_cell_type == 'lte' %}
rat: "eutra",
cell_id: {{ ncell.e_cell_id }}, // -> {{ peercell_ref }}
n_id_cell: {{ ncell.pci }},
dl_earfcn: {{ ncell.dl_earfcn }},
tac: {{ ncell.tac }},
{%- elif ncell.peer_cell_type == 'nr' %}
rat: "nr",
nr_cell_id: {{ ncell.nr_cell_id }}, // -> {{ peercell_ref }}
gnb_id_bits: {{ ncell.gnb_id_bits }},
n_id_cell: {{ ncell.pci }},
dl_nr_arfcn: {{ ncell.dl_nr_arfcn }},
ssb_nr_arfcn: {{ ncell.ssb_nr_arfcn }},
ul_nr_arfcn: {{ ncell.ul_nr_arfcn }},
tac: {{ ncell.tac }},
band: {{ ncell.nr_band }},
ssb_subcarrier_spacing: 30,
ssb_period: 20,
ssb_offset: 0,
ssb_duration: 1,
{%- else %}
{%- do bug('unreachable') %}
{%- endif %}
},
{%- endfor %}
],
......
......@@ -71,23 +71,32 @@
{
rat: "nr",
cell_id: 0x22, // -> CELL2_b
},
nr_cell_id: 0x1234522, // -> CELL2_b
n_id_cell: 22,
gnb_id_bits: 28,
dl_nr_arfcn: 537200,
ssb_nr_arfcn: 537170,
ul_nr_arfcn: 513200,
tac: XXX cell2.tac,
band: 7,
// Inter-ENB HO
{
rat: "eutra",
cell_id: 0x12345, // -> PEER1
n_id_cell: 35,
dl_earfcn: 700,
tac: 123,
},
{
rat: "nr",
nr_cell_id: 0x77712, // -> PEER2
gnb_id_bits: 22,
n_id_cell: 75,
dl_nr_arfcn: 520000,
ssb_nr_arfcn: 519890,
ul_nr_arfcn: 520000,
tac: 321,
band: 38,
ssb_subcarrier_spacing: 30,
ssb_period: 20,
ssb_offset: 0,
ssb_duration: 1,
},
// Inter-ENB HO
],
// Carrier Aggregation // XXX + CA LTE-NR
......
......@@ -285,6 +285,25 @@ def do_enb():
#iRU3_SDR1_fLTE2(ienb)
#iRU2_LOPCOMM_fLTE2(ienb)
# add 2 peer cells
if 1:
ienb.ishared('PEER1', {
'peer_cell_type': 'lte',
'e_cell_id': '0x12345',
'pci': 35,
'dl_earfcn': 700,
'tac': 123,
})
ienb.ishared('PEER2', {
'peer_cell_type': 'nr',
'nr_cell_id': '0x77712',
'gnb_id_bits': 22,
'dl_nr_arfcn': 520000,
'nr_band': 38,
'pci': 75,
'tac': 321,
})
jshared_instance_list = json.dumps(ienb.shared_instance_list)
json_params = """{
"sib23_file": "sib2_3.asn",
......@@ -312,8 +331,9 @@ def do_enb():
j2render('enb.jinja2.cfg', 'enb.cfg', json_params)
# drb.cfg + sib.asn for all cells
iru_dict = {}
icell_dict = {}
iru_dict = {}
icell_dict = {}
ipeercell_dict = {}
for ishared in ienb.shared_instance_list:
ref = ref_of_shared(ishared)
_ = json.loads(ishared['_'])
......@@ -322,6 +342,8 @@ def do_enb():
iru_dict[ref] = ishared
elif 'cell_type' in _:
icell_dict[ref] = ishared
elif 'peer_cell_type' in _:
ipeercell_dict[ref] = ishared
else:
raise AssertionError('enb: unknown shared instance %r' % (ishared,))
......
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