Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
slapos
Commits
03b6a970
Commit
03b6a970
authored
Mar 19, 2024
by
Lu Xu
👀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/ors-amarisoft: deactivate CU before activate for Lopcomm RUs
parent
7e3a45d2
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
224 additions
and
4 deletions
+224
-4
software/ors-amarisoft/buildout.hash.cfg
software/ors-amarisoft/buildout.hash.cfg
+7
-3
software/ors-amarisoft/instance.cfg
software/ors-amarisoft/instance.cfg
+2
-0
software/ors-amarisoft/ru/lopcomm/buildout.cfg
software/ors-amarisoft/ru/lopcomm/buildout.cfg
+3
-0
software/ors-amarisoft/ru/lopcomm/config.jinja2.py
software/ors-amarisoft/ru/lopcomm/config.jinja2.py
+1
-1
software/ors-amarisoft/ru/lopcomm/cu_inactive_config.jinja2.xml
...re/ors-amarisoft/ru/lopcomm/cu_inactive_config.jinja2.xml
+132
-0
software/ors-amarisoft/ru/lopcomm/libinstance.jinja2.cfg
software/ors-amarisoft/ru/lopcomm/libinstance.jinja2.cfg
+13
-0
software/ors-amarisoft/test/test.py
software/ors-amarisoft/test/test.py
+66
-0
No files found.
software/ors-amarisoft/buildout.hash.cfg
View file @
03b6a970
...
...
@@ -16,7 +16,7 @@
[template]
filename = instance.cfg
md5sum =
2e131f4542e059b48349ec0411241c31
md5sum =
acd9dd8dbe613e7101e62930a8380ef0
[template-ors]
filename = instance-ors.cfg
...
...
@@ -44,7 +44,7 @@ md5sum = b7906ca3a6b17963f78f680fc0842b74
[ru_lopcomm_libinstance.jinja2.cfg]
_update_hash_filename_ = ru/lopcomm/libinstance.jinja2.cfg
md5sum =
41ea7248b54ea893cb83a01655018711
md5sum =
7d05f6a3980a79bfd35677dbb8b988ee
[ru_sunwave_libinstance.jinja2.cfg]
_update_hash_filename_ = ru/sunwave/libinstance.jinja2.cfg
...
...
@@ -60,7 +60,7 @@ md5sum = b7ec0025a92e0947e4ac6abc4b06bf19
[ru_lopcomm_config.jinja2.py]
_update_hash_filename_ = ru/lopcomm/config.jinja2.py
md5sum = 1
67537a6aa2762355ee703d4c96351ea
md5sum = 1
22726666d147447171dcae9ebf8d093
[ru_lopcomm_reset-info.jinja2.py]
_update_hash_filename_ = ru/lopcomm/reset-info.jinja2.py
...
...
@@ -154,6 +154,10 @@ md5sum = e435990eb0a0d4be41efa9bd16dce09b
_update_hash_filename_ = ru/lopcomm/cu_config.jinja2.xml
md5sum = 346c911e1ac5e5001a39c8926b44c91e
[ru_lopcomm_cu_inactive_config.jinja2.xml]
_update_hash_filename_ = ru/lopcomm/cu_inactive_config.jinja2.xml
md5sum = 9d48c35f9939446ce75ae9f85e44c26a
[software.cfg.html]
_update_hash_filename_ = gadget/software.cfg.html
md5sum = 61a2f783fbf683a34aed3d13e00baca2
...
...
software/ors-amarisoft/instance.cfg
View file @
03b6a970
...
...
@@ -165,6 +165,7 @@ extra-context =
raw ru_lopcomm_reset_template ${ru_lopcomm_reset.jinja2.py:target}
raw ru_lopcomm_CreateProcessingEle_template ${ru_lopcomm_CreateProcessingEle.jinja2.xml:target}
raw ru_lopcomm_cu_config_template ${ru_lopcomm_cu_config.jinja2.xml:target}
raw ru_lopcomm_cu_inactive_config_template ${ru_lopcomm_cu_inactive_config.jinja2.xml:target}
raw ru_lopcomm_firmware_path ${ru_lopcomm_firmware-dl:target}
raw ru_lopcomm_firmware_filename ${ru_lopcomm_firmware-dl:filename}
raw ru_tapsplit ${ru_tapsplit:target}
...
...
@@ -220,6 +221,7 @@ extra-context =
raw ru_lopcomm_reset_template ${ru_lopcomm_reset.jinja2.py:target}
raw ru_lopcomm_CreateProcessingEle_template ${ru_lopcomm_CreateProcessingEle.jinja2.xml:target}
raw ru_lopcomm_cu_config_template ${ru_lopcomm_cu_config.jinja2.xml:target}
raw ru_lopcomm_cu_inactive_config_template ${ru_lopcomm_cu_inactive_config.jinja2.xml:target}
raw ru_lopcomm_firmware_path ${ru_lopcomm_firmware-dl:target}
raw ru_lopcomm_firmware_filename ${ru_lopcomm_firmware-dl:filename}
raw ru_tapsplit ${ru_tapsplit:target}
...
...
software/ors-amarisoft/ru/lopcomm/buildout.cfg
View file @
03b6a970
...
...
@@ -32,6 +32,9 @@ destination = ${buildout:directory}/ncclient_common.py
[ru_lopcomm_cu_config.jinja2.xml]
<= download-base
[ru_lopcomm_cu_inactive_config.jinja2.xml]
<= download-base
[ru_lopcomm_firmware-dl]
recipe = slapos.recipe.build:download
url = https://lab.nexedi.com/nexedi/ors-utils/raw/master/lopcomm-firmware/${:filename}
...
...
software/ors-amarisoft/ru/lopcomm/config.jinja2.py
View file @
03b6a970
...
...
@@ -9,7 +9,7 @@ if __name__ == '__main__':
while
True
:
try
:
nc
.
connect
(
"{{ netaddr.IPAddress(vtap.gateway) }}"
,
830
,
"oranuser"
,
"oranpassword"
)
nc
.
edit_config
([
"{{ CreateProcessingEle_template }}"
,
"{{ cu_config_template }}"
])
nc
.
edit_config
([
"{{ CreateProcessingEle_template }}"
,
"{{ cu_
inactive_config_template }}"
,
"{{ cu_
config_template }}"
])
break
except
Exception
as
e
:
nc
.
logger
.
debug
(
'Got exception, waiting 10 seconds before reconnecting...'
)
...
...
software/ors-amarisoft/ru/lopcomm/cu_inactive_config.jinja2.xml
0 → 100644
View file @
03b6a970
<xc:config
xmlns:xc=
"urn:ietf:params:xml:ns:netconf:base:1.0"
>
<user-plane-configuration
xc:operation=
"replace"
xmlns=
"urn:o-ran:uplane-conf-option8:1.0"
>
<!-- TX path: eaxcid → TxEndpoint
↘
mod → static TxEndpoint → TxArray
↗
TxCarrier
(static TxEndpoint, TxArray and their association are defined by RU itself)
-->
{%- set TxCarrier = 'TXA0CC00' %}
{%- for ant in range(ru.n_antenna_dl) %}
{%- set port = ant // 2 %}
{%- set chan = ant % 2 %}
{%- set txep = 'TXA0P%02dC%02d' % (port, chan) %}
<!-- TxAntenna{{ ant }} -->
<tx-endpoints>
<name>
{{ txep }}
</name>
<e-axcid>
<o-du-port-bitmask>
61440
</o-du-port-bitmask>
<band-sector-bitmask>
3968
</band-sector-bitmask>
<ccid-bitmask>
112
</ccid-bitmask>
<ru-port-bitmask>
15
</ru-port-bitmask>
<eaxc-id>
{{ ant }}
</eaxc-id>
</e-axcid>
</tx-endpoints>
<tx-links>
<name>
{{ txep }}
</name>
<processing-element>
PE0
</processing-element>
<tx-array-carrier>
{{ TxCarrier }}
</tx-array-carrier>
<tx-endpoint>
{{ txep }}
</tx-endpoint>
</tx-links>
{%- endfor %}
<!--
RX path: eaxcid ← RxEndpoint
(data ∪ prach)
↖
demod ← static RxEndpoint ← RxArray
↗
RxCarrier
(static RxEndpoint, RxArray and their association are defined by RU itself)
-->
{%- set RxCarrier = 'RXA0CC00' %}
{%- for ant in range(ru.n_antenna_ul) %}
{%- set port = ant // 2 %}
{%- set chan = ant % 2 %}
{%- set rxep = 'RXA0P%02dC%02d' % (port, chan) %}
{%- set prachep = 'PRACH0P%02dC%02d' % (port, chan) %}
<!-- RxAntenna{{ ant }} -->
<rx-endpoints>
<name>
{{ rxep }}
</name>
<e-axcid>
<o-du-port-bitmask>
61440
</o-du-port-bitmask>
<band-sector-bitmask>
3968
</band-sector-bitmask>
<ccid-bitmask>
112
</ccid-bitmask>
<ru-port-bitmask>
15
</ru-port-bitmask>
<eaxc-id>
{{ ant }}
</eaxc-id>
</e-axcid>
</rx-endpoints>
<rx-endpoints>
<name>
{{ prachep }}
</name>
<e-axcid>
<o-du-port-bitmask>
61440
</o-du-port-bitmask>
<band-sector-bitmask>
3968
</band-sector-bitmask>
<ccid-bitmask>
112
</ccid-bitmask>
<ru-port-bitmask>
15
</ru-port-bitmask>
<eaxc-id>
{{ 16*chan + 8 + port }}
</eaxc-id>
</e-axcid>
</rx-endpoints>
<rx-links>
<name>
{{ rxep }}
</name>
<processing-element>
PE0
</processing-element>
<rx-array-carrier>
{{ RxCarrier }}
</rx-array-carrier>
<rx-endpoint>
{{ rxep }}
</rx-endpoint>
</rx-links>
<rx-links>
<name>
{{ prachep }}
</name>
<processing-element>
PE0
</processing-element>
<rx-array-carrier>
{{ RxCarrier }}
</rx-array-carrier>
<rx-endpoint>
{{ prachep }}
</rx-endpoint>
</rx-links>
{%- endfor %}
<!-- TX/RX carriers -->
<!-- TODO support multiple cells over 1 RU -->
{%- if cell.cell_type == 'lte' %}
{%- set dl_arfcn = cell.dl_earfcn %}
{%- set ul_arfcn = cell.ul_earfcn %}
{%- set dl_freq = int(xearfcn_module.frequency(dl_arfcn) * 1e6) %}
{%- set ul_freq = int(xearfcn_module.frequency(ul_arfcn) * 1e6) %}
{%- elif cell.cell_type == 'nr' %}
{%- set dl_arfcn = cell.dl_nr_arfcn %}
{%- set ul_arfcn = cell.ul_nr_arfcn %}
{%- set dl_freq = int(xnrarfcn_module.frequency(dl_arfcn) * 1e6) %}
{%- set ul_freq = int(xnrarfcn_module.frequency(ul_arfcn) * 1e6) %}
{%- else %}
{%- do bug('unreachable') %}
{%- endif %}
{%- set bw = int(cell.bandwidth * 1e6) %}
<tx-array-carriers>
<name>
{{ TxCarrier }}
</name>
<absolute-frequency-center>
{{ dl_arfcn }}
</absolute-frequency-center>
<center-of-channel-bandwidth>
{{ dl_freq }}
</center-of-channel-bandwidth>
<channel-bandwidth>
{{ bw }}
</channel-bandwidth>
<active>
INACTIVE
</active>
<rw-type>
{{ cell.cell_type | upper }}
</rw-type>
<rw-duplex-scheme>
{{ cell.rf_mode | upper }}
</rw-duplex-scheme>
<gain>
{{ ru.tx_gain }}
</gain>
<downlink-radio-frame-offset>
0
</downlink-radio-frame-offset>
<downlink-sfn-offset>
0
</downlink-sfn-offset>
</tx-array-carriers>
<rx-array-carriers>
<name>
{{ RxCarrier }}
</name>
<absolute-frequency-center>
{{ ul_arfcn }}
</absolute-frequency-center>
<center-of-channel-bandwidth>
{{ ul_freq }}
</center-of-channel-bandwidth>
<channel-bandwidth>
{{ bw }}
</channel-bandwidth>
<active>
INACTIVE
</active>
<downlink-radio-frame-offset>
0
</downlink-radio-frame-offset>
<downlink-sfn-offset>
0
</downlink-sfn-offset>
<!-- <gain>{{ ru.rx_gain }}</gain> -->
<!-- TODO(lu.xu): clarify with Lopcomm regaring rx gain -->
<gain-correction>
0.0
</gain-correction>
<n-ta-offset>
0
</n-ta-offset>
</rx-array-carriers>
</user-plane-configuration>
</xc:config>
software/ors-amarisoft/ru/lopcomm/libinstance.jinja2.cfg
View file @
03b6a970
...
...
@@ -80,6 +80,18 @@ extra-context =
ru = {{ dumps(ru) }}
cell = {{ dumps(cell) }}
[{{ B('%s-cu-inactive-config' % ru_ref) }}]
<= config-base
url = {{ ru_lopcomm_cu_inactive_config_template }}
output = ${directory:etc}/{{B('%s-cu_inactive_config.xml' % ru_ref)}}
extra-context =
import xearfcn_module xlte.earfcn
import xnrarfcn_module xlte.nrarfcn
key ru :ru
key cell :cell
ru = {{ dumps(ru) }}
cell = {{ dumps(cell) }}
[{{ B('%s-config-template' % ru_ref) }}]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
...
...
@@ -93,6 +105,7 @@ context =
raw buildout_directory_path {{ buildout_directory }}
raw CreateProcessingEle_template {{ ru_lopcomm_CreateProcessingEle_template }}
key cu_config_template {{B('%s-cu-config' % ru_ref)}}:output
key cu_inactive_config_template {{B('%s-cu-inactive-config' % ru_ref)}}:output
import netaddr netaddr
mode = 0775
url = {{ ru_lopcomm_config_template }}
...
...
software/ors-amarisoft/test/test.py
View file @
03b6a970
...
...
@@ -600,6 +600,72 @@ class Lopcomm4:
}
})
# RU configuration in cu_inactive_config.xml
def
test_ru_cu_inactive_config_xml
(
t
):
def
uctx
(
rf_mode
,
cell_type
,
dl_arfcn
,
ul_arfcn
,
bw
,
dl_freq
,
ul_freq
,
tx_gain
,
rx_gain
):
return
{
'tx-array-carriers'
:
{
'rw-duplex-scheme'
:
rf_mode
,
'rw-type'
:
cell_type
,
'absolute-frequency-center'
:
'%d'
%
dl_arfcn
,
'center-of-channel-bandwidth'
:
'%d'
%
dl_freq
,
'channel-bandwidth'
:
'%d'
%
bw
,
'gain'
:
'%d'
%
tx_gain
,
'active'
:
'INACTIVE'
,
},
'rx-array-carriers'
:
{
'absolute-frequency-center'
:
'%d'
%
ul_arfcn
,
'center-of-channel-bandwidth'
:
'%d'
%
ul_freq
,
'channel-bandwidth'
:
'%d'
%
bw
,
# XXX no rx_gain
'active'
:
'INACTIVE'
,
},
}
_
=
t
.
_test_ru_cu_inactive_config_xml
# rf_mode ctype dl_arfcn ul_arfcn bw dl_freq ul_freq txg rxg
_
(
1
,
uctx
(
'FDD'
,
'LTE'
,
100
,
18100
,
5000000
,
2120000000
,
1930000000
,
11
,
21
))
_
(
2
,
uctx
(
'TDD'
,
'LTE'
,
40200
,
40200
,
10000000
,
2551000000
,
2551000000
,
12
,
22
))
_
(
3
,
uctx
(
'FDD'
,
'NR'
,
300300
,
290700
,
15000000
,
1501500000
,
1453500000
,
13
,
23
))
_
(
4
,
uctx
(
'TDD'
,
'NR'
,
470400
,
470400
,
20000000
,
2352000000
,
2352000000
,
14
,
24
))
def
_test_ru_cu_inactive_config_xml
(
t
,
i
,
uctx
):
cu_xml
=
t
.
ipath
(
'etc/%s'
%
xbuildout
.
encode
(
'%s-cu_inactive_config.xml'
%
t
.
ref
(
'RU%d'
%
i
)))
with
open
(
cu_xml
,
'r'
)
as
f
:
cu
=
f
.
read
()
cu
=
xmltodict
.
parse
(
cu
)
assertMatch
(
t
,
cu
,
{
'xc:config'
:
{
'user-plane-configuration'
:
{
'tx-endpoints'
:
[
{
'name'
:
'TXA0P00C00'
,
'e-axcid'
:
{
'eaxc-id'
:
'0'
}},
{
'name'
:
'TXA0P00C01'
,
'e-axcid'
:
{
'eaxc-id'
:
'1'
}},
{
'name'
:
'TXA0P01C00'
,
'e-axcid'
:
{
'eaxc-id'
:
'2'
}},
{
'name'
:
'TXA0P01C01'
,
'e-axcid'
:
{
'eaxc-id'
:
'3'
}},
],
'tx-links'
:
[
{
'name'
:
'TXA0P00C00'
,
'tx-endpoint'
:
'TXA0P00C00'
},
{
'name'
:
'TXA0P00C01'
,
'tx-endpoint'
:
'TXA0P00C01'
},
{
'name'
:
'TXA0P01C00'
,
'tx-endpoint'
:
'TXA0P01C00'
},
{
'name'
:
'TXA0P01C01'
,
'tx-endpoint'
:
'TXA0P01C01'
},
],
'rx-endpoints'
:
[
{
'name'
:
'RXA0P00C00'
,
'e-axcid'
:
{
'eaxc-id'
:
'0'
}},
{
'name'
:
'PRACH0P00C00'
,
'e-axcid'
:
{
'eaxc-id'
:
'8'
}},
{
'name'
:
'RXA0P00C01'
,
'e-axcid'
:
{
'eaxc-id'
:
'1'
}},
{
'name'
:
'PRACH0P00C01'
,
'e-axcid'
:
{
'eaxc-id'
:
'24'
}},
],
'rx-links'
:
[
{
'name'
:
'RXA0P00C00'
,
'rx-endpoint'
:
'RXA0P00C00'
},
{
'name'
:
'PRACH0P00C00'
,
'rx-endpoint'
:
'PRACH0P00C00'
},
{
'name'
:
'RXA0P00C01'
,
'rx-endpoint'
:
'RXA0P00C01'
},
{
'name'
:
'PRACH0P00C01'
,
'rx-endpoint'
:
'PRACH0P00C01'
},
],
}
|
uctx
}
})
# Sunwave4 is mixin to verify Sunwave driver wrt all LTE/NR x FDD/TDD modes.
class
Sunwave4
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment