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
Labels
Merge Requests
106
Merge Requests
106
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
11b66832
Commit
11b66832
authored
Nov 22, 2023
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
29189ef2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
18 deletions
+30
-18
software/ors-amarisoft/config/out/enb.cfg
software/ors-amarisoft/config/out/enb.cfg
+3
-3
software/ors-amarisoft/config/out/ue.cfg
software/ors-amarisoft/config/out/ue.cfg
+1
-1
software/ors-amarisoft/k/ssb_nr_arfcn_test.py
software/ors-amarisoft/k/ssb_nr_arfcn_test.py
+1
-1
software/ors-amarisoft/slaplte.jinja2
software/ors-amarisoft/slaplte.jinja2
+24
-12
software/ors-amarisoft/slapos-render-config.py
software/ors-amarisoft/slapos-render-config.py
+1
-1
No files found.
software/ors-amarisoft/config/out/enb.cfg
View file @
11b66832
...
...
@@ -85,7 +85,7 @@
gnb_id_bits: 22,
n_id_cell: 75,
dl_nr_arfcn: 520000,
ssb_nr_arfcn: 5198
9
0,
ssb_nr_arfcn: 5198
7
0,
ul_nr_arfcn: 520000,
tac: 321,
band: 38,
...
...
@@ -260,7 +260,7 @@
bandwidth: 10,
subcarrier_spacing: 30,
ssb_nr_arfcn: 52
301
0,
ssb_nr_arfcn: 52
275
0,
ssb_pos_bitmap: "10000000",
root_sequence_index: 2,
...
...
@@ -294,7 +294,7 @@
gnb_id_bits: 22,
n_id_cell: 75,
dl_nr_arfcn: 520000,
ssb_nr_arfcn: 5198
9
0,
ssb_nr_arfcn: 5198
7
0,
ul_nr_arfcn: 520000,
tac: 321,
band: 38,
...
...
software/ors-amarisoft/config/out/ue.cfg
View file @
11b66832
...
...
@@ -60,7 +60,7 @@
band: 7,
dl_nr_arfcn: 537200,
ul_nr_arfcn: 513200,
ssb_nr_arfcn: 5371
7
0,
ssb_nr_arfcn: 5371
5
0,
bandwidth: 5,
subcarrier_spacing: 15,
...
...
software/ors-amarisoft/k/ssb_nr_arfcn_test.py
View file @
11b66832
...
...
@@ -10,8 +10,8 @@ def default_ssb_nr_arfcn(dl_nr_arfcn, scs_khz):
gscn
=
nr
.
get_gscn_by_frequency
(
f
)
if
nr
.
get_frequency_by_gscn
(
gscn
)
>
f
:
gscn
-=
1
# align fg to be multiple of scs
scs
=
scs_khz
*
khz
# align fb to be multiple of scs
while
1
:
fg
=
nr
.
get_frequency_by_gscn
(
gscn
)
if
fg
%
scs
<
1e-5
*
scs
:
# == 0 with tolerating fp
...
...
software/ors-amarisoft/slaplte.jinja2
View file @
11b66832
...
...
@@ -106,17 +106,27 @@
{{- (ul_lo + (dl_nr_arfcn - dl_lo)) | tojson }}
{%- endmacro %}
{#- jdefault_ssb_nr_arfcn returns default SSB NR ARFCN corresponding to DL NR ARFCN #}
{%- macro jdefault_ssb_nr_arfcn(dl_nr_arfcn) %}
{#- jdefault_ssb_nr_arfcn returns default SSB NR ARFCN corresponding to DL NR ARFCN
and subcarrier spacing #}
{%- macro jdefault_ssb_nr_arfcn(dl_nr_arfcn, scs_khz) %}
{#- NOTE: computations rechecked wrt https://tech-academy.amarisoft.com/OutOfBox_UEsim_SA.html#Tips_SSB_Frequency #}
{%- set nr = nrarfcn_module %}
{%- set f = nr.get_frequency(nrarfcn=dl_nr_arfcn) %}
{%- set gscn = nr.get_gscn_by_frequency(f) %}
{%- if nr.get_frequency_by_gscn(gscn) > f %}{# nrarfcn rounds up, amari down #}
{%- set gscn = gscn - 1 %}
{%- endif %}
{%- set fg = nr.get_frequency_by_gscn(gscn) %}
{%- set fg_arfcn = nr.get_nrarfcn(fg) %}
{%- set nr = nrarfcn_module %}
{%- set _ = namespace() %}
{%- set _.f = nr.get_frequency(nrarfcn=dl_nr_arfcn) %}
{%- set _.gscn = nr.get_gscn_by_frequency(_.f) %}
{%- if nr.get_frequency_by_gscn(_.gscn) > _.f %}{# nrarfcn rounds up, amari down #}
{%- set _.gscn = _.gscn - 1 %}
{%- endif %}
{#- align fg to be multiple of scs #}
{%- set scs = scs_khz * 1e-3 %}
{%- for i in range(10000) %}{# = `while 1` #}
{%- set _.fg = nr.get_frequency_by_gscn(_.gscn) %}
{%- if _.fg % scs < 1e-5*scs %}{# == 0 with tolerating fp #}
{%- break %}
{%- endif %}
{%- set _.gscn = _.gscn - 1 %}
{%- endfor %}
{%- set fg_arfcn = nr.get_nrarfcn(_.fg) %}
{{- fg_arfcn | tojson }}
{%- endmacro %}
...
...
@@ -222,7 +232,8 @@
{%- elif xcell_type == 'nr' %}
{%- do _.setdefault('ul_nr_arfcn', J(jdefault_ul_nr_arfcn(_.dl_nr_arfcn, _.nr_band))) %}
{%- do _.setdefault('subcarrier_spacing', 30 if _.rf_mode == 'tdd' else 15) %}
{%- do _.setdefault('ssb_nr_arfcn', J(jdefault_ssb_nr_arfcn(_.dl_nr_arfcn))) %}
{%- do _.setdefault('ssb_nr_arfcn', J(jdefault_ssb_nr_arfcn(_.dl_nr_arfcn,
_.subcarrier_spacing))) %}
{%- else %}
{%- do bug('unreachable') %}
{%- endif %}
...
...
@@ -347,7 +358,8 @@
{%- do _.setdefault('subcarrier_spacing',
30 if nrarfcn_module.get_duplex_mode(_.nr_band).lower() == 'tdd' else
15) %}
{%- do _.setdefault('ssb_nr_arfcn', J(jdefault_ssb_nr_arfcn(_.dl_nr_arfcn))) %}
{%- do _.setdefault('ssb_nr_arfcn', J(jdefault_ssb_nr_arfcn(_.dl_nr_arfcn,
_.subcarrier_spacing))) %}
{%- else %}
{%- do bug('unreachable') %}
{%- endif %}
...
...
software/ors-amarisoft/slapos-render-config.py
View file @
11b66832
...
...
@@ -22,7 +22,7 @@ def j2render(src, out, jcfg):
textctx
+=
'import nrarfcn_module nrarfcn
\
n
'
buildout
=
None
# stub
r
=
jinja2_template
.
Recipe
(
buildout
,
"recipe"
,
{
'extensions'
:
'jinja2.ext.do'
,
'extensions'
:
'jinja2.ext.do
jinja2.ext.loopcontrols
'
,
'url'
:
'config/{}'
.
format
(
src
),
'output'
:
'config/out/{}'
.
format
(
out
),
'context'
:
textctx
,
...
...
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