Commit 5c300a7d authored by Kirill Smelkov's avatar Kirill Smelkov

software/ors-amarisoft: enb: Intra-ENB handover

If a base station has multiple cells, it should be possible for UE to be handed
over from one cell into another, for example when UE crosses border of sectors.

So far we had only Inter-ENB HO and now we are also adding configuration for
HO in between all own cells.

Add tests for everything.

NOTE: we use allowed_meas_bandwidth, antenna_port_1 in dst=LTE case because
otherwise, e.g. for NR->LTE HO if they are not present, lteenb complains:

    enb.cfg:260: expecting 'allowed_meas_bandwidth' field
    enb.cfg:260: expecting 'antenna_port_1' field

for both Intra-ENB and Inter-ENB handovers.

For Intra-ENB case we can compute those numbers from cell definition. For
Inter-ENB case, when we don't know target context, we use conservative values.
parent 881b5104
...@@ -27,9 +27,35 @@ ...@@ -27,9 +27,35 @@
{%- set do_nr = len(icell_dict_nr) > 0 %} {%- set do_nr = len(icell_dict_nr) > 0 %}
{#- handover_config emits handover configuration #} {#- handover_config emits handover configuration for specified cell #}
{%- macro handover_config() %} {%- macro handover_config(cell_ref) %}
ncell_list: [ ncell_list: [
// Intra-ENB HO
{%- for cell2_ref, icell2 in icell_dict|dictsort %}
{%- set cell2 = icell2['_'] %}
{%- if cell2_ref != cell_ref %} {#- NOTE: HO to both LTE and NR #}
{%- set ru2_ref = J(jcell_ru_ref(icell2, icell_dict)) %}
{%- set iru2 = iru_dict[ru2_ref] %}
{%- set ru2 = iru2['_'] %}
{
{%- if cell2.cell_type == 'lte' %}
rat: "eutra",
cell_id: {{ slapparameter_dict.enb_id }}{{ cell2.cell_id.removeprefix('0x') }}, // -> {{ B(cell2_ref) }}
n_id_cell: {{ cell2.pci }},
dl_earfcn: {{ cell2.dl_earfcn }},
tac: {{ cell2.tac }},
allowed_meas_bandwidth: {{ jlte_n_rb_dl(cell2.bandwidth) }},
antenna_port_1: {{ (ru2.n_antenna_dl > 1) | tojson }},
{%- elif cell2.cell_type == 'nr' %}
rat: "nr",
cell_id: {{ cell2.cell_id }}, // -> {{ B(cell2_ref) }}
{%- else %}
{%- do bug('unreachable') %}
{%- endif %}
},
{%- endif %}
{%- endfor %}
// Inter-ENB HO // Inter-ENB HO
{#- TODO: add info about peers as shared instances - one instance per peer *ENB*. {#- 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 then query SlapOS Master about cells configured on that peer ENB and
...@@ -43,6 +69,10 @@ ...@@ -43,6 +69,10 @@
n_id_cell: {{ ncell.pci }}, n_id_cell: {{ ncell.pci }},
dl_earfcn: {{ ncell.dl_earfcn }}, dl_earfcn: {{ ncell.dl_earfcn }},
tac: {{ ncell.tac }}, tac: {{ ncell.tac }},
{#- TODO: consider extending peer/cell/lte with
.allowed_meas_bandwidth and .antenna_port_1 #}
allowed_meas_bandwidth: {{ jlte_n_rb_dl(1.4) }}, // (minimum possible bw)
antenna_port_1: false, // (conservative stub)
{%- elif ncell.cell_type == 'nr' %} {%- elif ncell.cell_type == 'nr' %}
rat: "nr", rat: "nr",
nr_cell_id: {{ ncell.nr_cell_id }}, // -> {{ B(peercell_ref) }} nr_cell_id: {{ ncell.nr_cell_id }}, // -> {{ B(peercell_ref) }}
...@@ -225,7 +255,7 @@ ...@@ -225,7 +255,7 @@
inactivity_timer: {{ cell.inactivity_timer }}, inactivity_timer: {{ cell.inactivity_timer }},
// Handover // Handover
{{- handover_config() }} {{- handover_config(cell_ref) }}
// Carrier Aggregation: LTE + LTE // Carrier Aggregation: LTE + LTE
scell_list: [ scell_list: [
...@@ -467,7 +497,7 @@ ...@@ -467,7 +497,7 @@
inactivity_timer: {{ cell.inactivity_timer }}, inactivity_timer: {{ cell.inactivity_timer }},
// Handover // Handover
{{- handover_config() }} {{- handover_config(cell_ref) }}
// Carrier Aggregation: NR + NR // Carrier Aggregation: NR + NR
scell_list: [ scell_list: [
......
...@@ -338,6 +338,12 @@ class ENBTestCase4(RFTestCase4): ...@@ -338,6 +338,12 @@ class ENBTestCase4(RFTestCase4):
_('PEERCELL4', LTE(700) | LTE_PEER(0x12345, 35, 0x123)) _('PEERCELL4', LTE(700) | LTE_PEER(0x12345, 35, 0x123))
_('PEERCELL5', NR(520000,38) | NR_PEER(0x77712,22, 75, 0x321)) _('PEERCELL5', NR(520000,38) | NR_PEER(0x77712,22, 75, 0x321))
cls.ho_inter = [
dict(rat='eutra', cell_id=0x12345, n_id_cell=35, dl_earfcn= 700, tac=0x123),
dict(rat='nr', nr_cell_id=0x77712, gnb_id_bits=22, n_id_cell=75,
dl_nr_arfcn=520000, ul_nr_arfcn=520000, ssb_nr_arfcn=520090, band=38,
tac = 0x321),
]
def CELLcfg(i): def CELLcfg(i):
return CENB(i, 0x10+i) | TAC(0x100+i) | { return CENB(i, 0x10+i) | TAC(0x100+i) | {
...@@ -429,6 +435,42 @@ class ENBTestCase4(RFTestCase4): ...@@ -429,6 +435,42 @@ class ENBTestCase4(RFTestCase4):
]) ])
# Handover
def test_enb_cfg_ho(t):
assertMatch(t, t.enb_cfg['cell_list'], [
{ # CELL1
'ncell_list': [
dict(rat='eutra', cell_id= 0x1702, n_id_cell=0x12, dl_earfcn=40200, tac=0x102), # CELL2
dict(rat='nr', cell_id= 3), # CELL3
dict(rat='nr', cell_id= 4), # CELL4
] + t.ho_inter,
},
{ # CELL2
'ncell_list': [
dict(rat='eutra', cell_id= 0x1701, n_id_cell=0x11, dl_earfcn= 100, tac=0x101), # CELL1
dict(rat='nr', cell_id= 3), # CELL3
dict(rat='nr', cell_id= 4), # CELL4
] + t.ho_inter,
},
])
assertMatch(t, t.enb_cfg['nr_cell_list'], [
{ # CELL3
'ncell_list': [
dict(rat='eutra', cell_id= 0x1701, n_id_cell=0x11, dl_earfcn= 100, tac=0x101), # CELL1
dict(rat='eutra', cell_id= 0x1702, n_id_cell=0x12, dl_earfcn=40200, tac=0x102), # CELL2
dict(rat='nr', cell_id= 4), # CELL4
] + t.ho_inter,
},
{ # CELL4
'ncell_list': [
dict(rat='eutra', cell_id= 0x1701, n_id_cell=0x11, dl_earfcn= 100, tac=0x101), # CELL1
dict(rat='eutra', cell_id= 0x1702, n_id_cell=0x12, dl_earfcn=40200, tac=0x102), # CELL2
dict(rat='nr', cell_id= 3), # CELL3
] + t.ho_inter,
},
])
# ---- RU mixins to be used with RFTestCase4 ---- # ---- RU mixins to be used with RFTestCase4 ----
# SDR4 is mixin to verify SDR driver wrt all LTE/NR x FDD/TDD modes. # SDR4 is mixin to verify SDR driver wrt all LTE/NR x FDD/TDD modes.
......
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