An error occurred fetching the project authors.
- 24 May, 2024 1 commit
-
-
Lu Xu authored
Follow https://tech-academy.amarisoft.com/NR_TDD_Pattern.html#Test_4
-
- 21 Mar, 2024 2 commits
- 13 Feb, 2024 24 commits
-
-
Kirill Smelkov authored
Typos, whitespace changes, etc...
-
Kirill Smelkov authored
Rework UEsim to be able to work with multiple cells, multiple radio units(*), multiple UE all at the same time. RU, CELLs and UEs are now configured, simiularly to eNB, via shared instances. Add tests. Contrary to ORS don't care about backward compatibility here because currently we have just a few UEsim deployments and migrating them should be easy. Please see added schemas, tests and updates slapos-render-config on how to use the new system. (*) contrary to eNB UEsim does not allow to use one RU for two cells,
-
Kirill Smelkov authored
It should be already generally supported, but many parameters needs in NR case are currently hardcoded to their TDD values. I've adjusted only a few of them and stopped, becuase there is currently no practical case at hand for me to test it. Still I think it makes sense to save this first step. For ORS, who uses TDD, rendered config stays practically the same: ``` $ ./pythonwitheggs slapos-render-config.py && xdiff -C -C config/{old,out}/ors/ ``` ```diff diff --git a/config/old/ors/gnb/enb.cfg b/config/out/ors/gnb/enb.cfg index ead7f0160..9a260d73f 100644 --- a/config/old/ors/gnb/enb.cfg +++ b/config/out/ors/gnb/enb.cfg @@ -97,6 +97,7 @@ prach: { + ra_response_window: 20, }, pdcch: { @@ -180,7 +181,6 @@ preamble_received_target_power: -110, preamble_trans_max: 7, power_ramping_step: 4, - ra_response_window: 20, restricted_set_config: "unrestricted_set", ra_contention_resolution_timer: 64, ssb_per_prach_occasion: 1, ```
-
Kirill Smelkov authored
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.
-
Kirill Smelkov authored
We already had CA for LTE+LTE case. Let's also setup it for NR+NR and LTE+NR cases as well. Add tests for everything.
-
Kirill Smelkov authored
Currently when setting up cells we allow users to input - dl_earfcn for LTE, and - dl_nr_arfcn and nr_band for NR and from that lteenb automatically computes - ul_earfcn for LTE, and - ul_nr_arfcn and ssb_nr_arfcn for NR everything kind of works out of the box for eNB case when there is simple SDR Radio Unit. Then there are also the following cases: 1. we also need to set UL frequency when configuring Lopcomm RU, or any other ORAN-based Radio Unit. 2. we also need to specify DL/UL frequencies in MHz when configuring Lopcomm RU. 3. when configuring NR peercell it is required to set ssb_nr_arfcn. It is also required to set both dl_nr_arfcn and ul_nr_arfcn, and so far we were setting only DL one and using it for both assuming TDD band. 4. when configuring UEsim we need to specify both dl_nr_arfcn and ssb_nr_arfcn for NR cells. So the problem is that even though lteenb automatically computes UL and SSB frequencies, there is no way for us to reuse results of that computation for scenarios outside of "simple enb" case. As the result we kind of workaround that currently with exposing additional parameters and asking users to look into enb, probably its `cell phy` output, with the following: ---- 8< ---- (from UEsim) "ssb_nr_arfcn": { "title": "SSB NR ARFCN", "description": "SSB NR ARFCN, you can retrieve from ENB/GNB side", or use additional parameters just for ul_earfcn and frequency-in-MHz: ---- 8< ---- (from ru/lopcomm) "txa0cc00_center_frequency": { "title": "Lopcomm ORAN DL Center Frequency in MHz (TXA0CC00)", "description": "Lopcomm ORAN Center Frequency in MHz (TXA0CC00)", "type": "number", "default": 2140 }, "rxa0cc00_center_frequency_earfcn": { "title": "Lopcomm ORAN UL Center Frequency EARFCN (RXA0CC00)", "description": "Lopcomm ORAN Center Frequency EARFCN (RXA0CC00)", "type": "number", "default": 18300 }, "rxa0cc00_center_frequency": { "title": "Lopcomm ORAN UL Center Frequency in MHz (RXA0CC00)", "description": "Lopcomm ORAN Center Frequency in MHz (RXA0CC00)", "type": "number", "default": 1950 }, which prevents automation, opens the door for inconsistencies and puts the load to resolve all that on users. The root cause of the problem is that there is no way to access at instantiation time what lteenb would compute internally. But DL<->UL conversion and DL->SSB conversion is not a difficult task and we can do that on our own. -> Do that here and solve all the problems listed above in one go. For frequency computations we use my xlte.earfcn and xlte.nrarfcn modules and upstream nrarfcn egg. For this xlte is updated(*) to primarily pick up kirr/xlte@6cb9d37f kirr/xlte@b8065120 and the rest of the conversion is in slaplte to use corresponding dl2ul and dl2ssb routines. For consistency ul_earfcn and ul_nr_arfcn now become input parameters for LTE and NR cells, but optional. If they are absent - they are computed with defaults, but a user can now control them explicitly. The same applies for ssb_nr_arfcn. This patch does not convert UEsim yet, because UEsim does not use rulib yet and will be handled all in one go in a follow-up step. The computation routines are thoroughly tested. First they have unit tests inside XLTE itself, then we also update our tests in generic test/test.py here with explicitly checking that correct numbers are emitted for UL and SSB frequencies, and third I've also verified SSB computation results with respect to https://tech-academy.amarisoft.com/OutOfBox_UEsim_SA.html#Tips_SSB_Frequency . All this creates a base to be sure that the computations are correct and we are indeed safe to switch our frequencies computation modules. (*) full upgrade brings kirr/xlte@e716ab51...8e606c64 ; nrarfcn egg: https://pypi.org/project/nrarfcn/
-
Kirill Smelkov authored
We currently have at least the following problem: 1. a malfored shared instance reference leads to instantiation failure and potential buildout code injection. For example if reference of shared instance contains space then buildout fails with something like zc.buildout.configparser.ParsingError: File contains parsing errors: .../instance-enb.cfg [line 45]: '[promise-testing partition 0.RU-sdr-busy]\n' since, when requesting, it is possible to use arbitrary characters for references, including newline, it also opens the door for code injection attacks. 2. we currently use `json` directive of slapos.recipe.template e.g. as extra-context = json iru_dict {{ rulib.iru_dict | tojson }} this also potentially leads to instantiation failure if JSON(rulib.iru_dict) contains buildout control characters. Solve this problems. For 1 we develop "buildout encoding" that encodes arbitrary string into form that is safe to be used as a name of buildout section. This encoding never fails and does not loose information, which means it is safe to be applied unconditionanly and there is no chance for two string inputs to result in the same encoded form. The encoding also has practical property that it leaves most of the strings, that we use in our buildot profiles, intact. Which means that the result of the encoding is readable and the encoding can be applied almost unconditionally to all strings without hurting instantiation. Then this encoding is applied wherever reference of a shared instance is used to form e.g. name of buildout section or inside other codes. We apply this encoding universally - in config files too to avoid breakage there - e.g. in enb.cfg to protect from e.g. \n being inserted in the middle of comment resulting in YAML breakage. See documentation of added xbuildout.py for details. For 2 we switch from `json` to using `dumps` on an object and referring that dumps result via `key` directive. See the following links for preliminary discussions with Jérome and Vincent on this topic: kirr/slapos@d5d4f7c8 nexedi/slapos@bf6b2ef3
-
Kirill Smelkov authored
software/ors-amarisoft: enb/generic: Switch configuration of RU, cell, peer and peercell to shared instances Previously we had cell_list, ncell_list and peers parameters and we now remove them and rework the software release to accept configuration for said objects via shared instances. In other words now it is possible to add Radio Units, cells, peers and peer cells on on top of main eNB service. Schema for parameters of those shared instances is based on what we just recently generalized and established in ru/ cell/ peer/ and peer/cell/ input schemas. We only add cell_kind=enb|enb_peer addition field to be able to distinguish a cell from peercell object, and we add a way for cell to reference RU one way or another. RU-CELL relation is no longer 1-1: one RU can be generally serving multiple cells. For example transmission bandwidth of SDR100 board is ~ 100MHz while bandwidth of one LTE cell is max 20MHz. This way it is possible to put several cells whose frequencies are nearby each other to be run on the same SDR board(*). And in general one Radio Unit can be serving transmission/reception in multiple frequency ranges, thus providing ability for multiple cells to be served by RU. This way RU is split off from CELL object and each CELL needs to say which RU object it wants to use. There are 3 ways to configure CELL->RU links: 1. CELL references a RU object. This is the most general. 2. CELL embeds definition of RU object. This variant is provided for simplicity of management for users that do not want to split CELL/RU relations. 3. CELL2 references another cell object and says to use the same RU as CELL1. Again, this variant is provided for simplicity of management when users want to add a cell on top of same RU when they already started with "2". Full backward compatibility is provided for ORS. For this instance-ors-enb.jinja2.cfg is adjusted to inject synthetic RU/CELL/PEER/PEERCELL shared instances instead of translating to slapparameter_dict. As the result for ORS users it works without visible change as parameters with original ORS schema are handled as expected. Rendered files for ORS also stay practically the same as before this patch. The main change is in slaplte.jinja2 - in the loading routines. The other changes are mostly straightforward adaptation because details of how ru_dict, cell_dict, peer_dict and peercell_dict are loaded were already localized to slaplte and the rest of the code independent from that. Now, once we switched to shared instances, we will be finally able to add tests for updated enb. Please see a soon follow-up patch for that. And for existing test_ors.py we also temporary workaround breakage of tests, because currently generic code does not handle well special characters in partition references. For example it currently breaks on spaces with buildout complaining that sections with spaces in their name are invalid. We will fix that in another soon-followup patch as well, but apply a workaround for now. (*) see https://tech-academy.amarisoft.com/SDR_MultiCell_OneSdr.html for details. -------- Appendix. Diff for rendered ORS enb.cfg and gnb.cfg before and after this patch: ``` $ ./pythonwitheggs slapos-render-config.py && xdiff config/{old,out} ``` ```diff diff --git a/config/old/ors/enb/enb.cfg b/config/out/ors/enb/enb.cfg index 15f3b68e9..6046d366e 100644 --- a/config/old/ors/enb/enb.cfg +++ b/config/out/ors/enb/enb.cfg @@ -6,7 +6,7 @@ // Radio Units rf_driver: { - // CELL-RU 2T2R (sdr) + // RU 2T2R (sdr) name: "sdr", args: "dev0=/dev/sdr0", rx_antenna:"tx_rx", @@ -28,7 +28,7 @@ // LTE cells cell_list: [ - // CELL (CELL-RU) + // CELL (RU) { rf_port: 0, n_antenna_dl: 2, @@ -46,7 +46,7 @@ // Inter-ENB HO { rat: "eutra", - cell_id: 0x12345, // -> 1 + cell_id: 0x12345, // -> PEERCELL1 n_id_cell: 35, dl_earfcn: 700, tac: 123, diff --git a/config/old/ors/gnb/enb.cfg b/config/out/ors/gnb/enb.cfg index ac564db6c..9473f3207 100644 --- a/config/old/ors/gnb/enb.cfg +++ b/config/out/ors/gnb/enb.cfg @@ -6,7 +6,7 @@ // Radio Units rf_driver: { - // CELL-RU 2T2R (sdr) + // RU 2T2R (sdr) name: "sdr", args: "dev0=/dev/sdr0", rx_antenna:"tx_rx", @@ -35,7 +35,7 @@ // NR cells nr_cell_list: [ - // CELL (CELL-RU) + // CELL (RU) { rf_port: 0, n_antenna_dl: 2, @@ -58,7 +58,7 @@ // Inter-ENB HO { rat: "nr", - nr_cell_id: 0x77712, // -> 1 + nr_cell_id: 0x77712, // -> PEERCELL2 gnb_id_bits: 22, n_id_cell: 75, dl_nr_arfcn: 520000, ```
-
Kirill Smelkov authored
In other words merge enb and gnb into sole enb that can handle both LTE and NR cells at the same time and simultaneously. Previously which type of Radio Access Technology to use - LTE or NR - was static parameter of particular software - it was possible to instantiate cells only with selected RAT for particular template. In MultiRU it is possible to generally instantiate all kind of cells - LTE/NR and TDD/FDD all at the same time and each served by a different kind of Radio Unit. -> Switch cell type to be runtime parameter as the final step to be able to do that. For generic cell definitions are now required to come with cell_type=lte|nr parameter. In schemas cell_list now includes oneOf for lte|nr cell instead of particular cell type. Similar adaption is done for ncell_list and x2_peers/xn_peers are merged into just peers with similar oneOf. Global gnb-specific parameters of went-away gnb are also added as global ones to enb: - gnb_id - gnb_id_bits - amf_list - plmn_list (as plmn_list_5g not to conflict with plmn_list) - nssai They must be present if there are NR cells. Full backward compatibility is preserved for ORS: now it injects cells to generic with particular cell_type annotations and translates ORS-specific x2_peers/xn_peers and gnb/plmn_list to proper generic parameters. In ORS-gnb schema gnb_stats_fetch_period and gnb_drb_stats_enabled had to be renamed to enb_stats_fetch_period and enb_drb_stats_enabled, but once again, full backward compatibility is preserved because ORS mode already had the following in its proxy: {#- backward compatibility: if ORS is running in gnb mode, and gnb_* parameters are present, replace their generic enb_* counterparts with gnb_* ones #} ... The diff for rendered enb.cfg and gnb.cfg, that simulate ORS, before and after hereby patch is also empty.
-
Kirill Smelkov authored
As with Radio Units and cells organize a registry of peer cells and start to handle that registry generally everywhere. The registry is still populated with only LTE cells on enb and only NR cells on gnb, but the only place that is aware of that is registry loading routine. In the old code defaults were noticed for tac to be 1 if not provided, and so those defaults are pushed to live in ORS now. ORS schemas are also updated because that defaults were not declared there. Generic switches to use peer/cell/lte directly which means that now it accepts e_cell_id instead of cell_id as the name for full E-UTRAN cell identity. Full backward compatibility is provided for ORS which implements translation of its original schema to the new generic one. Tests will be added later as full tests for generic MultiRU. Rendered enb.cfg and gnb.cfg change a bit, but the changes are mostly due to reordering of fields. The only change with semantic value is - ssb_nr_arfcn: , + ssb_nr_arfcn: 520090, in gnb.cfg . The old configuration was invalid anyway because if it is only ssb_nr_arfcn: , then enb does not start with the following error: # ../lteenb gnb.cfg gnb.cfg:119: unexpected token: ',' Like with many other handover-related fields https://tech-academy.amarisoft.com/lteenb.doc#prop.ncell_list.ssb_nr_arfcn documents that ssb_nr_arfcn "Must be present" for Inter-gNB HO case. The old code was erroneously doing `ncell.get(name, '')` with yielding empty string in case a parameter is missing, which is corrected here. -------- Appendix. Diff for rendered enb.cfg and gnb.cfg before and after this patch: ``` $ ./pythonwitheggs slapos-render-config.py && xdiff -w config/{old,out} ``` ```diff diff --git a/config/old/enb.cfg b/config/out/enb.cfg index 1a2c41b6b..252c2e379 100644 --- a/config/old/enb.cfg +++ b/config/out/enb.cfg @@ -46,9 +46,9 @@ // Inter-ENB HO { rat: "eutra", + cell_id: 0x12345, // -> 1 n_id_cell: 35, dl_earfcn: 700, - cell_id: 0x12345, tac: 123, }, ], diff --git a/config/old/gnb.cfg b/config/out/gnb.cfg index 635c4baf2..b401f3513 100644 --- a/config/old/gnb.cfg +++ b/config/out/gnb.cfg @@ -58,14 +58,14 @@ // Inter-ENB HO { rat: "nr", + nr_cell_id: 0x77712, // -> 1 + gnb_id_bits: 22, + n_id_cell: 75, dl_nr_arfcn: 520000, - ssb_nr_arfcn: , + band: 38, + ssb_nr_arfcn: 520090, ul_nr_arfcn: 520000, - n_id_cell: 75, - gnb_id_bits: 22, - nr_cell_id: 0x77712, tac: 321, - band: 38, ssb_subcarrier_spacing: 30, ssb_period: 20, ssb_offset: 0, ```
-
Kirill Smelkov authored
Add X2 peers support for symmetry with XN peers. As with Radio Units and cells organize a registry of peers and start to handle that registry generally everywhere. The registry is still populated with only LTE peers on enb and only NR peers on gnb, but the only place that is aware of that is registry loading routine. Tests will be added later as full tests for generic MultiRU. Rendered gnb.cfg stays the same, but there is a small change in rendered enb but the config remains with the previous semantic as before hereby patch: ``` $ ./pythonwitheggs slapos-render-config.py && xdiff -w config/{old,out} ``` ```diff diff --git a/config/old/enb.cfg b/config/out/enb.cfg index 5842dfc22..1a2c41b6b 100644 --- a/config/old/enb.cfg +++ b/config/out/enb.cfg @@ -22,6 +22,7 @@ }, ], gtp_addr: "127.0.1.1", + x2_peers: [], enb_id: 0x1A2D0, // LTE cells ```
-
Kirill Smelkov authored
For uniformity with NR which already has bandwidth specified as number in MHz. For ORS mode everything stays as is which inputs bandwidth as string with MHz suffix, e.g. "20 MHz" instead of number `20`.
-
Kirill Smelkov authored
We currently have 2 kinds of software: - ORS, whose intended usage is small private networks, and - generic, whose intended usage is small-to-medium networks. and currently they both share defaults for their parameters inherited from ORS. But what is appropriate for small private networks, might be not so appropriate for medium networks. For example ORS has default enb_id/gnb_id, but in a network with 100 nodes, it is better to force every node to be explicitly assigned an id and error otherwise. Similarly for cells ORS has defaults for cell_id, but in network with many nodes, cell_id needs to be explicitly assigned. With having a default there is also a chance to misspell the parameter name, and do not notice it because the software will instantiate without an error but work incorrectly. So in this patch we tighten the defaults for generic: - enb_id, mme_list become non-optional for LTE - gnb_id, afm_list become non-optional for NR - plmn_list becomes non-optional for both LTE and NR. The format is different in between RATs and so later we will use plmn_list and plmn_list_5g when merging enb and gnb. - the following parameters of LTE cells now needs to be explicitly configured: rf_mode, dl_earfcn, bandwidth, cell_id, pci, tac. - the following parameters of NR cells now needs to be explicitly configured: rf_mode, dl_nr_arfcn, nr_band, bandwidth, cell_id, pci. We rework ORS mode to translate its own set of parameters and defaults into generic enb/gnb parameters. We similarly pull some global generic defaults into instance-enb.cfg.jinja2 with the idea that they could be maintained in one central place. In the future it would be good to automatically load them from JSON schemas to avoid duplication. This patch should be backward compatible for ORS, but it introduces the change in cell_id and pci in rendered enb.cfg which become 1 instead of 0: --- a/config/old/enb.cfg +++ b/config/out/enb.cfg @@ -33,9 +33,9 @@ n_antenna_dl: 2, n_antenna_ul: 2, - cell_id: 0x00, + cell_id: 0x01, tac: 0x0001, - n_id_cell: 0, + n_id_cell: 1, root_sequence_index: 204, dl_earfcn: 36100, inactivity_timer: 10000, The defaults for those parameters according to instance-enb-input-schema.json are 0x01 and 1. And it looks like enb.jinja2.cfg was changed to emit them starting from 0 instead of 1 in c4d0958e due to probable thinko in that patch because before that patch those parameters were emitted as 0x01 and 1: nexedi/slapos@c4d0958e and, once again, the schema says their defaults should be 0x01 and 1 as well. The rest of the changes in rendered enb.cfg and gnb.cfg should not introduce any semantic difference. Please see the appendix for full details. -------- Appendix. Diff for rendered enb.cfg and gnb.cfg before and after this patch: ``` $ ./pythonwitheggs slapos-render-config.py && xdiff -w config/{old,out} ``` ```diff diff --git a/config/old/enb.cfg b/config/out/enb.cfg index 89862f1d9..5842dfc22 100644 --- a/config/old/enb.cfg +++ b/config/out/enb.cfg @@ -33,9 +33,9 @@ n_antenna_dl: 2, n_antenna_ul: 2, - cell_id: 0x00, + cell_id: 0x01, tac: 0x0001, - n_id_cell: 0, + n_id_cell: 1, root_sequence_index: 204, dl_earfcn: 36100, inactivity_timer: 10000, @@ -102,8 +102,11 @@ ], cell_default: { plmn_list: [ - "00101", - + { + plmn: "00101", + reserved: false, + attach_without_pdn: false, + }, ], cyclic_prefix: "normal", diff --git a/config/old/gnb.cfg b/config/out/gnb.cfg index 1df699a22..635c4baf2 100644 --- a/config/old/gnb.cfg +++ b/config/out/gnb.cfg @@ -22,7 +22,7 @@ }, ], gtp_addr: "127.0.1.1", - + xn_peers: [], gnb_id_bits: 28, gnb_id: 0x12345, en_dc_support: true, @@ -142,6 +142,7 @@ nr_cell_default: { ssb_period: 20, + plmn_list: [ { plmn: "00101", @@ -151,10 +152,10 @@ { sst: 1, }, - ], }, ], + si_window_length: 40, cell_barred: false, intra_freq_reselection: true, ```
-
Kirill Smelkov authored
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 Backward compatibility: no change for ORS and everything else.
-
Kirill Smelkov authored
So far CA was setup only for lte case and it is possible to simplify generation of all pair of cells to be done without extra loop and state. Tests will be added later as full tests for generic MultiRU. Backward compatibility: no change for ORS, which has only one cell, and rendered enb.cfg and gnb.cfg stay the same.
-
Kirill Smelkov authored
For uniformity with LTE where it already is. We do not expose it in ORS schema because it will be exposed only in generic LTE and NR schemas, but for ORS schemas I prefer to keep them intact myself. Tests will be added later as full tests for generic MultiRU. Backward compatibility: no change for ORS and everything else. Diff for rendered configs: $ ./pythonwitheggs slapos-render-config.py && git diff -w --no-index config/{old,out} diff --git a/config/old/gnb.cfg b/config/out/gnb.cfg index 5849bb924..b8a385a71 100644 --- a/config/old/gnb.cfg +++ b/config/out/gnb.cfg @@ -56,6 +56,7 @@ subcarrier_spacing: 30, ssb_pos_bitmap: "10000000", + root_sequence_index: 1, inactivity_timer: 10000, // Handover @@ -176,7 +176,6 @@ intra_freq_reselection: true, q_rx_lev_min: -70, q_qual_min: -20, - root_sequence_index: 1, sr_period: 40, dmrs_type_a_pos: 2, prach: {
-
Kirill Smelkov authored
As with Radio Units organize a registry of cells and start to handle that registry generally everywhere. Make parameters that configure cells, for example tdd_ul_dl_config, dl_earfcn, bandwidth, pci, etc to be per-cell. Cell registry is still populated from cell_list and slapparameter_dict. Tests will be added later as full tests for generic MultiRU. Rendered enb.cfg and gnb.cfg stay practically the same. Backward compatibility: no change for ORS; For everything else cell parameters stop to be global and are moved to cell_list. -------- Appendix. Diff for rendered enb.cfg and gnb.cfg before and after this patch: ``` $ ./pythonwitheggs slapos-render-config.py && xdiff -w config/{old,out} ``` ```diff diff --git a/config/old/enb.cfg b/config/out/enb.cfg index 5c6743c21..1b39f7044 100644 --- a/config/old/enb.cfg +++ b/config/out/enb.cfg @@ -1,6 +1,3 @@ - - - { log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,s1ap.level=debug,s1ap.max_size=1,x2ap.level=debug,x2ap.max_size=1,rrc.level=debug,rrc.max_size=1,ngap.level=debug,ngap.max_size=1,xnap.level=debug,xnap.max_size=1,phy.level=info,file.rotate=1G,file.path=/dev/null", log_filename: "log/enb.log", @@ -93,11 +90,11 @@ srs_hopping_bandwidth: 0, }, - drb_config: "drb", + drb_config: "default-drb.cfg", sib_sched_list: [ { - filename: "sib", + filename: "default-sib23.asn", si_periodicity: 16, }, ], diff --git a/config/old/gnb.cfg b/config/out/gnb.cfg index 6b04559c6..1fa637925 100644 --- a/config/old/gnb.cfg +++ b/config/out/gnb.cfg @@ -1,6 +1,3 @@ - - - { log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,s1ap.level=debug,s1ap.max_size=1,x2ap.level=debug,x2ap.max_size=1,rrc.level=debug,rrc.max_size=1,ngap.level=debug,ngap.max_size=1,xnap.level=debug,xnap.max_size=1,phy.level=info,file.rotate=1G,file.path=/dev/null", log_filename: "log/enb.log", @@ -77,7 +74,6 @@ manual_ref_signal_power: true, ss_pbch_block_power: 8, - tdd_ul_dl_config: { pattern1: { period: 5, /* in ms */ @@ -148,7 +144,7 @@ ], }, - drb_config: "drb", + drb_config: "default-drb.cfg", }, ], nr_cell_default: { ```
-
Kirill Smelkov authored
Add code to organize a registry of Radio Units and handle that registry generally everywhere. RU registry is still populated from cell_list and in practice there still can be radio units only of the same type, but besides slaplte.load_ru_and_cell which is aware of that, the rest of the code tries to do everything as if RUs of different type could be present simultaneously. Now it is not only lopcomm who can do multiCELL, but also sunwave and SDR as well. gNB also starts to gain support for cell_list, because cell_list loading is uniformly applied to both eNB and gNB. However, since enb.cfg is not yet prepared to handle multiple NR cells yet, there is an assert that in case of NR there is only one RU/cell present there. We will remove this limitation in a follow-up patch. Later we will also change the loading to load RU descriptions from shared instances and they won't be constrained to be Radio Units of the same type. But we need to prepare a lot to be able to do that. One more step forward towards MultiRU. Tests will be added later as full tests for generic MultiRU. Backward compatibility: no change for ORS and practically no breaking change for everything else. -------- Appendix. Diff for rendered enb.cfg and gnb.cfg before and after this patch: ``` $ ./pythonwitheggs slapos-render-config.py && git diff -w --no-index config/{old,out} ``` ```diff diff --git a/config/old/enb.cfg b/config/out/enb.cfg index 884483b0a..cafdf42be 100644 --- a/config/old/enb.cfg +++ b/config/out/enb.cfg @@ -1,24 +1,22 @@ - { log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,s1ap.level=debug,s1ap.max_size=1,x2ap.level=debug,x2ap.max_size=1,rrc.level=debug,rrc.max_size=1,ngap.level=debug,ngap.max_size=1,xnap.level=debug,xnap.max_size=1,phy.level=info,file.rotate=1G,file.path=/dev/null", log_filename: "log/enb.log", - + // Radio Units rf_driver: { + // default-RU 2T2R (ors) name: "sdr", args: "dev0=/dev/sdr0", - rx_antenna:"tx_rx", tdd_tx_mod: 1, }, - tx_gain: 62, - rx_gain: 43, - + tx_gain: [62, 62], + rx_gain: [43, 43], com_addr: "127.0.1.2:9001", // LTE core network mme_list: [ @@ -36,6 +34,8 @@ // LTE cells cell_list: [ + + // default (default-RU) { rf_port: 0, n_antenna_dl: 2, diff --git a/config/old/gnb.cfg b/config/out/gnb.cfg index fd57ca3dc..7818b4ea8 100644 --- a/config/old/gnb.cfg +++ b/config/out/gnb.cfg @@ -1,24 +1,22 @@ - { log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,s1ap.level=debug,s1ap.max_size=1,x2ap.level=debug,x2ap.max_size=1,rrc.level=debug,rrc.max_size=1,ngap.level=debug,ngap.max_size=1,xnap.level=debug,xnap.max_size=1,phy.level=info,file.rotate=1G,file.path=/dev/null", log_filename: "log/enb.log", - + // Radio Units rf_driver: { + // default-RU 2T2R (ors) name: "sdr", args: "dev0=/dev/sdr0", - rx_antenna:"tx_rx", tdd_tx_mod: 1, }, - tx_gain: 62, - rx_gain: 43, - + tx_gain: [62, 62], + rx_gain: [43, 43], com_addr: "127.0.1.2:9001", // NR core network amf_list: [ ```
-
Kirill Smelkov authored
We are currently querying it in instance.cfg and later, once again, in e.g. instance-enb.jinja2.cfg . However ORS mode will need to adjust slapparameter_dict with ORS defaults and pass it further to generic enb. So it won't work if we use slapparameter_dict obtained the second time because the second query will return unadjusted original slapparameter_dict. In this patch we are only doing preparatory step - redo the code not query the master from instance-{enb,ue}.jinja2.cfg and work with slapparameter_dict and slap_configuration already queried by instance.cfg For UE the change is trivial. For eNB instance-enb.jinja2.cfg used to set the defaults for com, mme, amf and gtp in the same section used for the second query. We rework those defaults to be applied to slapparameter_dict via jinja2 - via the same way we are going to later use in ORS mode. Handling defaults for everything besides gtp_addr is straightforward. For gtp_addr it has the semantic difference when explicitly given, and given only implicitly. In the latter case the intent of original code is to autodetect whether to use an address on loopback, or externally-visible address. Original code used the check for emptiness of mme_list/amf_list as the condition for "use loopback". Since now those lists, after applying their defaults, are never empty we rework the code to see if core address is on the loopback or not, and use auto-GTP-on-loopback only if core is also on loopback. This should, hopefully, be more convenient as it also works ok out of the box if core is on loopback, but its address was explicitly specified. Previously for such cases gtp_addr was also needed to be specified, and now it should work without that. No change to rendered enb.cfg and gnb.cfg besides whitespace. Adjust ipv6-random usage in core-network for consistency with enb as well.
-
Kirill Smelkov authored
That data structure is really a dict, not list. It is more clear to name it appropriately. -> Do the renaming but keep cell_list intact as described in JSON schemas so that external interface remains unchanged. Rendered enb.cfg and gnb.cfg remain the same.
-
Kirill Smelkov authored
instance-enb and instance-ue currently setup that slap_configuration with LTE/NR defaults to be accessible from enb.jinja2.cfg and ue.jinja2.cfg. But we will soon need to have access to those defaults from slaplte.jinja2 as well, and it will break if left as is because when slaplte is imported from e.g. enb.jinja2 - it will work, but when slaplte is imported from instance-enb it will break because parent of instance-enb (instance.cfg) does not setup defaults in slap_configuration at that level. The fix is to either duplicate slap_configuration at instance.cfg level, or to switch access to the defaults to go via original default_* parameters. We go the second way for simplicity.
-
Kirill Smelkov authored
software/ors-amarisoft: enb.jinja2.cfg: Switch internal ru.ru_type to be 'sunwave' for Sunwave M2RU Radio Unit ru/libinstance and everything inside there already refer to that unit as 'sunwave'. Do the same for uniformity in enb.cfg and because we already refer to Lopcomm ORAN Radio Unit as just 'lopcomm'. In the future, if we will need to distinguish different models of one manufacturer, we could extend ru type to be e.g. manufacturer/model or do something similar. Template rendering is still done with ru='m2ru' coming from outside but internally it is now ru.ru_type='sunwave' instead of ru.ru_type='m2ru'.
-
Kirill Smelkov authored
Even though I introduced cell object in 79370ebf (software/ors-amarisoft: enb.jinja2.cfg: Stop using C Preprocessor and switch to Jinja2 completely) it is currently only cell.bandwidth that is living there, while all other cell parameters are still fetched from slapparameter_dict directly. We will soon introduce cell variable - that will iterate over cell_dict, and also keeping global cell won't work due to name shadowing. On the other hand we are not yet ready to start migrating all cell parameters to be accessible via cell object. -> So inline code for lte bandwidth parameter until the time comes to rework all cell parameters to be accessible via cell object. Rendered enb.cfg and gnb.cfg stay the same.
-
Kirill Smelkov authored
To handle multiple radio units we will need to rework this code significantly. Move this to a dedicated routine as a preparatory step. The code moves out of enb.cfg because later it will be also used in UEsim to configure simulator radio units as well. No non-whitespace changes in rendered enb.cfg and gnb.cfg . /cc @jhuge, @lu.xu, @tomo, @xavier_thompson, @Daetalus
-
- 30 Jan, 2024 6 commits
-
-
Kirill Smelkov authored
Don't repeat slapparameter_dict['ncell_list'][k] - we can introduce a name for current neighbour cell, and use that name in the loop. And align entries to that they read more clearly. No non-whitespace changes in rendered enb.cfg and gnb.cfg . /cc @jhuge, @lu.xu, @tomo, @xavier_thompson, @Daetalus /proposed-for-review-on nexedi/slapos!1526 /reviewed-by TrustMe
-
Kirill Smelkov authored
We currently have LTE-specific handover configuration in under cell_list and NR-specific handover configuration in under nr_cell_list. Those configuration are different. However in upcoming MultiRU we will need to handle LTE->NR handover, NR->LTE handover, and also Intra-ENB handover in addition to Inter-ENB handover we currently do. -> Move handover code into common function as a preparatory step for that. In the future the handover code for LTE and NR cells will be the same, so it makes sense to move that code to common place to avoid duplication. For rendered enb.cfg this unification introduces only space and trivial changes as shown in the appendix. /cc @jhuge, @lu.xu, @tomo, @xavier_thompson, @Daetalus /proposed-for-review-on nexedi/slapos!1528 /reviewed-by TrustMe Appendix. Diff for rendered enb.cfg and gnb.cfg before and after this patch ``` $ git diff -w --no-index config/{old,out} ``` ```diff diff --git a/config/old/enb.cfg b/config/out/enb.cfg index 43301ee13..9dcca16c7 100644 --- a/config/old/enb.cfg +++ b/config/out/enb.cfg @@ -45,16 +45,18 @@ root_sequence_index: 204, dl_earfcn: 36100, inactivity_timer: 10000, + // Handover ncell_list: [ // Inter-ENB HO { + rat: "eutra", n_id_cell: 35, dl_earfcn: 700, cell_id: 0x12345, tac: 123, - }], - + }, + ], // Carrier Aggregation scell_list: [ diff --git a/config/old/gnb.cfg b/config/out/gnb.cfg index 2127a2f6b..23b07d6e1 100644 --- a/config/old/gnb.cfg +++ b/config/out/gnb.cfg @@ -57,6 +57,7 @@ ssb_pos_bitmap: "10000000", inactivity_timer: 10000, + // Handover ncell_list: [ // Inter-ENB HO @@ -74,8 +75,8 @@ ssb_period: 20, ssb_offset: 0, ssb_duration: 1, - }], - + }, + ], // tune NR parameters for the cell manual_ref_signal_power: true, ```
-
Kirill Smelkov authored
1. Currently we have separate log_options for LTE and NR cases with listing different subsystems in each. But in MultiRU one enb will be driving both LTE and NR cells at the same time, so we will need to define both LTE- and NR-related levels. -> Merge all log settings into one log_options as a preparatory step For current state it does not hurt for an LTE if we set e.g. ngap.level, and it does not hurt for NR if we set e.g. s1ap.level - since those layers will be unused. This way merging log settings for both LTE and NR subsystems is ok. -------- 2. Factorize log_phy_debug handling: instead of duplicating whole log_options line and changing only phy.level settings there, construct the log_options line programmatically and handle phy.level on its own. -------- 3. Use log/enb.log log_filename for both LTE and NR cases. In the upcoming MultiRU there might be several cells activated at the same time and in general it will be not possible to say are we doing "enb" or "gnb" now - for example if there will be two cells - one LTE and one NR. -> Use enb.log for log filename uniformly similarly to how the software is named (lteenb) even though it can work as both enb and gnb. For the reference we do the same with enb.xlog in nexedi/slapos!1522 . /cc @jhuge, @lu.xu, @tomo, @xavier_thompson, @Daetalus /proposed-for-review-on nexedi/slapos!1527 /reviewed-by TrustMe Appendix. Diff for rendered enb.cfg and gnb.cfg before and after this patch ``` $ git diff --no-index config/{old,out} ``` ```diff diff --git a/config/old/enb.cfg b/config/out/enb.cfg index 467bb6364..1843e0f24 100644 --- a/config/old/enb.cfg +++ b/config/out/enb.cfg @@ -3,9 +3,7 @@ { - - log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,s1ap.level=debug,s1ap.max_size=1,x2ap.level=debug,x2ap.max_size=1,rrc.level=debug,rrc.max_size=1,phy.level=info,file.rotate=1G,file.path=/dev/null", - + log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,s1ap.level=debug,s1ap.max_size=1,x2ap.level=debug,x2ap.max_size=1,rrc.level=debug,rrc.max_size=1,ngap.level=debug,ngap.max_size=1,xnap.level=debug,xnap.max_size=1,phy.level=info,file.rotate=1G,file.path=/dev/null", log_filename: "log/enb.log", diff --git a/config/old/gnb.cfg b/config/out/gnb.cfg index 18523818a..d76b45d3c 100644 --- a/config/old/gnb.cfg +++ b/config/out/gnb.cfg @@ -3,10 +3,8 @@ { - - log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,ngap.level=debug,ngap.max_size=1,xnap.level=debug,xnap.max_size=1,rrc.level=debug,rrc.max_size=1,phy.level=info,file.rotate=1G,file.path=/dev/null", - - log_filename: "log/gnb.log", + log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,s1ap.level=debug,s1ap.max_size=1,x2ap.level=debug,x2ap.max_size=1,rrc.level=debug,rrc.max_size=1,ngap.level=debug,ngap.max_size=1,xnap.level=debug,xnap.max_size=1,phy.level=info,file.rotate=1G,file.path=/dev/null", + log_filename: "log/enb.log", rf_driver: { ```
-
Kirill Smelkov authored
Current enb config is already quite complex and with MultiRU it will be growing more - both with added features and with more sections emitted because there will be multiple radio units, multiple cells and cross cell interactions. So for clarity we will want to annotate with a comment to which cell or ru object a section belongs, or to which cell-cell pair a particular interaction belongs. Amarisoft supports C-style comments and preprocessor directives out of the box, but if we use them in the configuration files, yaml.load, that we use in the test to load generated configs, will break, because // and /* ... */ is not valid YAML. It looks like Amarisoft does preprocessing as a separate step before further loading given configuration via yaml. So to be able to use the comments and still have tests working we need to do the same - in the tests preprocess the files before feeding them to yaml loader. -> Do that with the help of https://pypi.org/project/pcpp/ In my view that library has good quality and in my experience it worked flawlessly. Anyway we need it to only handle comments, not sophisticated CPP features, and for that it works just ok. Add some comments to existing enb.cfg and ue.cfg to make sure it really works. Those are simple comments, and in current state it they might seem as not 100% necessary, but with more upcoming config changes it would be good to have those descriptionary anchors present in the generated configs, so I suggest we add them. Anyway they should not do any harm at all. /cc @jhuge, @lu.xu, @tomo, @xavier_thompson, @Daetalus /proposed-for-review-on nexedi/slapos!1526 /reviewed-by TrustMe
-
Kirill Smelkov authored
In MultiRU we are going to have generic software with flexible configuration and many features + ORS software, which wraps the generic part, adds ORS specific features, and translates simple ORS schema to generic ones. Let's first move ORS-specific bits to dedicated place as a preparatory step for that: - add software-ors.cfg . In the future software-ors.cfg will be the entry point for ORS mode, but for now it is only a place from where software-ors-* extend from. - add instance-ors.cfg . We move ORS-specific code from instance.cfg here and set it to use instance-ors-enb.jinja2.cfg when instantiating enb/gnb. - add instance-ors-enb.jinja2.cfg . This pulls ORS-specific code from instance-enb.jinja2.cfg + instance-gnb.jinja2.cfg and wraps them with ORS context built by instance-ors.cfg - in the templates the way to see whether it is ORS or not, and if yes, to access ORS parameters is changed: now it is always via checking `ors` object, which can be either False for non-ORS mode, or dict for ORS mode, and if it is dict the keys inside that dict are ORS specific properties, e.g. ors['one-watt']. This adjustment is handy to organize ORS mode extension from generic with generic setting `json ors false` in the context, and ORS mode undoing that and setting ORS context properly. I think the code also reads more clear this way, i.e. with {%- if one_watt == "True" %} changed to {%- if ors['one-watt'] %} because in the second variant it is clear that one-watt is a property of ORS. The rendered configs for enb.cfg and gnb.cfg stay unchanged. /cc @jhuge, @lu.xu, @tomo, @xavier_thompson, @Daetalus /proposed-for-review-on nexedi/slapos!1522 /reviewed-by TrustMe
-
Kirill Smelkov authored
When there are multiple cells and CA configured, without those parameters enb fails to start with e.g. n1_pucch_an_cs_count must be > 0 for the CA Primary cell Set them on all cell like illustrated in enb-2cc.cfg and enb-3cc.cfg Amarisoft examples. Not sure selected values are best - I took them from above mentioned examples as is. Reference to documentation about those parameters: https://tech-academy.amarisoft.com/lteenb.doc#prop.pucch_dedicated.n1_pucch_an_cs_count https://tech-academy.amarisoft.com/lteenb.doc#prop.pucch_dedicated.n3_pucch_an_n_rb https://tech-academy.amarisoft.com/lteenb.doc#prop.pucch_dedicated.ack_nack_feedback_mode_ca /cc @lu.xu, @tomo, @xavier_thompson, @Daetalus /helped-by @jhuge /reviewed-on nexedi/slapos!1519
-
- 25 Jan, 2024 2 commits
-
-
Kirill Smelkov authored
To support multiple Radio Units and multiple cells, we will need to loop over them and emit corresponding configuration parts taking RU/Cell parameters into account for each part. We currently handle some such parameters at Jinja2 level (e.g. dl_earfcn), while some other parameters at CPP level (e.g. cell bandwidth) and rely on enb to preprocess generated enb.cfg with CPP on its own. While CPP works ok for simple 1RU-1CELL cases, and CPP is also the tool that Amarisoft itself uses in its examples, it has the limitation that it cannot cooperate with loops. In other words there can be only one global N_RB_DL #define, and it cannot be different for different cells while we are looping over them at Jinja2 level. That means that we cannot use CPP to handle multiple cells. For this reason switch enb.jinja2.cfg to be using Jinja2 only without CPP. While rendered enb.cfg/gnb.cfg change, we can see that they change in expected way, with leaving only blocks that should be active for input parameters. See the Appendix for details. The switch is straightforward but one thing deserves to be mentioned: due to limitation of Jinja2, where macros can return only strings, we use JSON encoding to be able to return arbitrary types - integers, floats, dicts, etc, and use a convention to name such macros with j prefix and wrap their usage with J so that whole invocation does not add much noise. See added slaplte.J documentation for details. /cc @lu.xu, @tomo, @xavier_thompson, @Daetalus /reviewed-by @jhuge /reviewed-on nexedi/slapos!1520 -------- Appendix. Diff for rendered enb.cfg/gnb.cfg before and after this patch ``` $ git diff --no-index config/{old,out} ``` ```diff diff --git a/config/old/enb.cfg b/config/out/enb.cfg index 23e56c9a9..ee2661640 100644 --- a/config/old/enb.cfg +++ b/config/out/enb.cfg @@ -1,14 +1,6 @@ -#define TDD 1 - -#define N_RB_DL 50 - -#define N_ANTENNA_DL 2 - -#define N_ANTENNA_UL 2 - { @@ -44,8 +36,8 @@ cell_list: [ { rf_port: 0, - n_antenna_dl: N_ANTENNA_DL, - n_antenna_ul: N_ANTENNA_UL, + n_antenna_dl: 2, + n_antenna_ul: 2, cell_id: 0x00, tac: 0x0001, @@ -59,83 +51,33 @@ manual_ref_signal_power: true, - -#if TDD == 1 uldl_config: 6, sp_config: 7, -#endif - - n_rb_dl: N_RB_DL, -#if N_RB_DL == 6 - si_coderate: 0.30, -#else - si_coderate: 0.20, -#endif + n_rb_dl: 50, + si_coderate: 0.2, pdsch_dedicated: { -#if N_ANTENNA_DL == 4 - p_a: -6, -#elif N_ANTENNA_DL == 2 p_a: -3, -#else - p_a: 0, -#endif p_b: -1, }, -#if N_RB_DL == 6 - pdcch_format: 1, -#else - pdcch_format: 2, -#endif - -#if N_RB_DL == 6 - prach_config_index: 15, -#else + pdcch_format: 2, prach_config_index: 4, -#endif - -#if N_RB_DL == 6 - initial_cqi: 5, -#else - initial_cqi: 3, -#endif + initial_cqi: 3, pucch_dedicated: { n1_pucch_sr_count: 11, cqi_pucch_n_rb: 1, n1_pucch_an_cs_count: 8, n3_pucch_an_n_rb: 3, -#if TDD == 1 tdd_ack_nack_feedback_mode: "multiplexing", /* TDD only */ -#endif }, - -#if N_ANTENNA_DL >= 2 m_ri: 8, transmission_mode: 3, -#endif srs_dedicated: { -#if N_RB_DL == 6 - srs_bandwidth_config: 7, - srs_bandwidth: 1, -#elif N_RB_DL == 15 - srs_bandwidth_config: 6, - srs_bandwidth: 1, -#elif N_RB_DL == 25 - srs_bandwidth_config: 3, - srs_bandwidth: 1, -#elif N_RB_DL == 50 srs_bandwidth_config: 2, srs_bandwidth: 2, -#elif N_RB_DL == 75 - srs_bandwidth_config: 2, - srs_bandwidth: 2, -#else - srs_bandwidth_config: 2, - srs_bandwidth: 3, -#endif srs_subframe_config: 3, srs_period: 40, srs_hopping_bandwidth: 0, diff --git a/config/old/gnb.cfg b/config/out/gnb.cfg index 5bfd3bb01..0b6a1445c 100644 --- a/config/old/gnb.cfg +++ b/config/out/gnb.cfg @@ -1,13 +1,6 @@ -#define TDD 1 - - -#define N_ANTENNA_DL 2 - -#define N_ANTENNA_UL 2 - { @@ -50,8 +43,8 @@ nr_cell_list: [ { rf_port: 0, - n_antenna_dl: N_ANTENNA_DL, - n_antenna_ul: N_ANTENNA_UL, + n_antenna_dl: 2, + n_antenna_ul: 2, cell_id: 0x01, n_id_cell: 500, @@ -108,29 +101,10 @@ csi_rs: { nzp_csi_rs_resource: [ { -#if N_ANTENNA_DL == 1 - n_ports: 1, - frequency_domain_allocation: "row2", - bitmap: "100000000000", - cdm_type: "no_cdm", -#elif N_ANTENNA_DL == 2 n_ports: 2, frequency_domain_allocation: "other", bitmap: "100000", cdm_type: "fd_cdm2", -#elif N_ANTENNA_DL == 4 - n_ports: 4, - frequency_domain_allocation: "row4", - bitmap: "100", - cdm_type: "fd_cdm2", -#elif N_ANTENNA_DL == 8 - n_ports: 8, - frequency_domain_allocation: "other", - bitmap: "110011", - cdm_type: "fd_cdm2", -#else -#error unsupported number of DL antennas -#endif }, ], @@ -148,22 +122,10 @@ csi_report_config: [ { -#if N_ANTENNA_DL > 1 codebook_config: { codebook_type: "type1", sub_type: "typeI_SinglePanel", -#if N_ANTENNA_DL == 2 -#elif N_ANTENNA_DL == 4 - n1: 2, - n2: 1, - codebook_mode: 1, -#elif N_ANTENNA_DL == 8 - n1: 4, - n2: 1, - codebook_mode: 1, -#endif }, -#endif }, ], }, ```
-
Kirill Smelkov authored
In the next patch we will switch usage of C Preprocessor to Jinja2, and in jinja2 doing set from under if, as e.g. in {%- if ru == 'm2ru' %} {%- set n_antenna_ul = 1 %} {%- endif %} does _not_ have the effect of setting n_antenna_ul=1 outside of the if block. That, however, can be worked around with usage of namespace objects, so the following works as intended: {%- set x = namespace() %} {%- if ru == 'm2ru' %} {%- set x.n_antenna_ul = 1 %} {%- endif %} with x.n_antenna_ul=1 if ru was m2ru. So taking into account this, and that in MultiRU ru will be denoting RadioUnit-related configuration, let's switch ru to be a namespace object with ru.ru_type denoting type of attached radio unit. This both goes as a preparatory step for MultiRU and also allows to switch from CPP to Jinja2 in the next patch. /cc @lu.xu, @tomo, @xavier_thompson, @Daetalus /reviewed-by @jhuge /reviewed-on nexedi/slapos!1520
-
- 23 Jan, 2024 2 commits
-
-
Kirill Smelkov authored
software/ors-amarisoft: enb.jinja2.cfg: nr: Move tunable parameters from nr_cell_default to nr_cell_list This patch is similar and has the same rationale as the previous patch (software/ors-amarisoft: enb.jinja2.cfg: lte: Move tunable parameters from cell_default to cell_list). Please see its description for context and details. Like with previous patch I've made sure via json_util that effective gnb configuration stays exactly the same. Also, since for NR case we move more code, and also use enb merging feature(*) I tested that the effective gnb configuration stays exactly the same with both * tdd_config = 3 (5ms 8UL 1DL 2/10 (maximum uplink)), and * tdd_config = 1 (5ms 2UL 7DL 4/6 (default)) In all the cases effective gnb configuration stayed exactly the same before and after this patch which proves that effective configuration for single cell case remains unchanged. (*) enb implements merging process for cell/cell_default and nr_cell/nr_cell_default as demonstrated below: cell={a: 10, d:15} cell_default={a:1, b:2, c:3} -> cell={a:10, b:2, c: 3, d: 15} cell={x: [{}, 2]} cell_default={x: [{a:1}]} -> cell={x: [{a:1}, 2]} cell={x: [{c:11}]} cell_default={x: [{a:1}, {b:2}] -> cell={x: [{a:1, c:11}, {b:2}]} /cc @lu.xu, @tomo, @xavier_thompson, @Daetalus /reviewed-by @jhuge /reviewed-on nexedi/slapos!1515
-
Kirill Smelkov authored
Currently we set some cell tunable parameters on the cell object itself (e.g. dl_earfcn), while other cell tunable parameters on the cell_default object, e.g. cell bandwidth. This works ok when there is only one cell, but with multiple cells it makes a problem because different cells can have e.g. different bandwidth. So as preparatory step for MultiRU move the code, that sets tunable parameters for lte cells, from cell_default to cell object itself. Rendered config changes but we can verify that the configuration, that enb actually uses, stays the same: When enb starts it builds internal configuration for all configured cell objects by merging cell_default + cell's explicit configuration and using the result as the actual configuration for the cell. There is no more cell_default in that actual configuration. And also enb emits that actual runtime configuration in the beginning of enb.log which we can extract and investigate(*) So this way we can run enb with old and new generated enb.cfg and then compare the actual configuration. It turns out to be empty: ~/enb# ./lteenb -n x/old/enb.cfg ... RF0: sample_rate=11.520 MHz dl_freq=1910.000 MHz ul_freq=1910.000 MHz (band 33) dl_ant=2 ul_ant=2 (enb) quit ~/enb# mv log/enb.log log/enb.log.old ~/enb# ./lteenb -n x/out/enb.cfg ... RF0: sample_rate=11.520 MHz dl_freq=1910.000 MHz ul_freq=1910.000 MHz (band 33) dl_ant=2 ul_ant=2 (enb) quit ~/enb# mv log/enb.log log/enb.log.new ~/enb# ../ots/json_util log log/enb.log.old >a ~/enb# ../ots/json_util log log/enb.log.new >b ~/enb# diff -u a b # output is empty which means that effective enb configuration before and after this patch is exactly the same. For the reference, how internal configuration looks like is provided in the appendix. (*) see https://tech-academy.amarisoft.com/ExtractConfigFromLog.html for details. /cc @lu.xu, @tomo, @xavier_thompson, @Daetalus /reviewed-by @jhuge /reviewed-on nexedi/slapos!1515 P.S. for now I do not plan to expose full measurement configuration in the generic MultiRU and so it stays in cell_default with corresponding TODO. -------- Appendix. Dump of internal enb configuration for enb.cfg before and after the patch ``` $ ../ots/json_util log log/enb.log.old ``` ```json { "cell_list": [ { "cell_barred": false, "cell_id": 0, "cipher_algo_pref": [], "cqi_period": 40, "cyclic_prefix": "normal", "dl_256qam": true, "dl_earfcn": 36100, "dpc": true, "dpc_pucch_snr_target": 25, "dpc_pusch_snr_target": 25, "drb_config": [ ... ], # removed for brevity "ho_from_meas": true, "inactivity_timer": 10000, "initial_cqi": 3, "integ_algo_pref": [2, 1], "intra_freq_reselection": true, "m_ri": 8, "mac_config": { "dl_max_harq_tx": 5, "ul_max_harq_tx": 5 }, "manual_ref_signal_power": true, "meas_config_desc": { "a1_hysteresis": 0, "a1_report_type": "rsrp", "a1_rsrp": -70, "a1_time_to_trigger": 640, "a2_hysteresis": 0, "a2_report_type": "rsrp", "a2_rsrp": -80, "a2_time_to_trigger": 640, "a3_hysteresis": 0, "a3_offset": 6, "a3_report_type": "rsrp", "a3_time_to_trigger": 480 }, "meas_gap_config": "gp0", "n_antenna_dl": 2, "n_antenna_ul": 2, "n_id_cell": 0, "n_rb_dl": 50, "n_symb_cch": 0, "pdcch_format": 2, "pdsch_dedicated": { "p_a": -3, "p_b": -1 }, "phich_duration": "normal", "phich_resource": "1", "plmn_list": ["00101"], "prach_config_index": 4, "prach_freq_offset": -1, "pucch_dedicated": { "cqi_pucch_n_rb": 1, "n1_pucch_sr_count": 11, "tdd_ack_nack_feedback_mode": "multiplexing" }, "pusch_dedicated": { "beta_offset_ack_index": 9, "beta_offset_cqi_index": 6, "beta_offset_ri_index": 6 }, "pusch_hopping_offset": -1, "pusch_max_its": 6, "pusch_msg3_mcs": 0, "q_rx_lev_min": -70, "rf_port": 0, "root_sequence_index": 204, "scell_list": [], "si_coderate": 0.2, "si_pdcch_format": 2, "si_value_tag": 0, "si_window_length": 40, "sib_sched_list": [ ... ], # remove for brevity "sp_config": 7, "sr_period": 20, "srb_config": [ { "id": 1, "maxRetxThreshold": 32, "t_PollRetransmit": 60, "t_Reordering": 45 }, { "id": 2, "maxRetxThreshold": 32, "t_PollRetransmit": 60, "t_Reordering": 45 } ], "srs_dedicated": { "srs_bandwidth": 2, "srs_bandwidth_config": 2, "srs_hopping_bandwidth": 0, "srs_period": 40, "srs_subframe_config": 3 }, "tac": 1, "transmission_mode": 3, "ul_64qam": true, "uldl_config": 6 } ], "com_addr": "127.0.1.2:9001", "enb_id": 107216, "gtp_addr": "127.0.1.1", "log_filename": "log/enb.log", "log_options": "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,s1ap.level=debug,s1ap.max_size=1,x2ap.level=debug,x2ap.max_size=1,rrc.level=debug,rrc.max_size=1,phy.level=info,file.rotate=1G,file.path=/dev/null", "mme_list": [ { "mme_addr": "127.0.1.100" } ], "rf_driver": { "args": "dev0=/dev/sdr0", "name": "sdr", "realtime": 1, "rx_antenna": "tx_rx", "tdd_tx_mod": 1 }, "rx_gain": 43, "tx_gain": 62 } ```
-
- 19 Jan, 2024 2 commits
-
-
Kirill Smelkov authored
In MultiRU there will be only one ENB which supports all TDD, FDD, LTE and NR cells and different types of radio units - all at the same time. This patch is preparatory step for that: it merges gnb configuration template into enb configuration template, so that enb.jinja2.cfg now serves both enb and gnb instances. In this patch for now we only move code from gnb.jinja2.cfg without changing it(*) and wrap parts with `if do_lte` and `if do_nr` correspondingly. The end result of rendered enb.cfg and gnb.cfg stays the same modulo space changes and added innoccent `#define TDD` as Appendix shows. (*) the only exception is set up of gtp_addr which has practically the same code, was wrapped with `if mme_list` in enb and `if amf_list` in gnb, and is now wrapped with `if mme_list or amf_list`. /cc @lu.xu, @tomo, @xavier_thompson, @Daetalus /reviewed-by @jhuge /reviewed-on nexedi/slapos!1512 -------- Appendix. Diff for rendered enb.cfg and gnb.cfg before and after this patch. ``` $ ./pythonwitheggs slapos-render-config.py && (git diff -w --no-index config/enb.cfg.old config/enb.cfg ; git diff -w --no-index config/gnb.cfg.old config/gnb.cfg) ``` ```diff diff --git a/config/enb.cfg.old b/config/enb.cfg index fdf3ab24d..cb46697ea 100644 --- a/config/enb.cfg.old +++ b/config/enb.cfg @@ -1,11 +1,15 @@ + #define TDD 1 #define N_RB_DL 50 + #define N_ANTENNA_DL 2 + #define N_ANTENNA_UL 2 + { log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,s1ap.level=debug,s1ap.max_size=1,x2ap.level=debug,x2ap.max_size=1,rrc.level=debug,rrc.max_size=1,phy.level=info,file.rota> @@ -24,7 +28,6 @@ rx_gain: 43, com_addr: "127.0.1.2:9001", - mme_list: [ { @@ -33,9 +36,9 @@ ], + gtp_addr: "127.0.1.1", - enb_id: 0x1A2D0, cell_list: [{ @@ -49,7 +52,6 @@ ], } ], - cell_default: { plmn_list: [ "00101", @@ -226,4 +228,6 @@ meas_gap_config: "gp0", ho_from_meas: true, }, + + } \ No newline at end of file diff --git a/config/gnb.cfg.old b/config/gnb.cfg index e3d671e09..4e47a2094 100644 --- a/config/gnb.cfg.old +++ b/config/gnb.cfg @@ -1,15 +1,21 @@ + +#define TDD 1 + + #define N_ANTENNA_DL 2 #define N_ANTENNA_UL 2 + { log_options: "all.level=error,all.max_size=0,nas.level=debug,nas.max_size=1,ngap.level=debug,ngap.max_size=1,xnap.level=debug,xnap.max_size=1,rrc.level=debug,rrc.max_size=1,phy.level=info,file.rota> log_filename: "log/gnb.log", + rf_driver: { name: "sdr", args: "dev0=/dev/sdr0", @@ -30,15 +36,17 @@ ], - - gtp_addr: "127.0.1.1", gnb_id_bits: 28, gnb_id: 0x12345, en_dc_support: true, - cell_list: [], + + cell_list: [ + ], + + nr_cell_list: [ { rf_port: 0, ```
-
Kirill Smelkov authored
It stopped to be used after 49ce8ef5 (software/ors-amarisoft: Provide dedicated TAP interface for each Radio Unit). /cc @lu.xu, @tomo, @xavier_thompson, @Daetalus /reviewed-by @jhuge /reviewed-on nexedi/slapos!1512
-
- 21 Nov, 2023 1 commit
-
-
Kirill Smelkov authored
In b0c37a4a (software/ors-amarisoft: Start to generalize existing lopcomm/multicell into multiRU slowly) I deduplicated cell_list initialization and moved it into single place, but overlooked that enb.cfg build became broken in standalone mode: .../software/ors-amarisoft$ ./pythonwitheggs slapos-render-config.py Traceback (most recent call last): File "/srv/slapgrid/slappart35/srv/project/slapos/software/ors-amarisoft/./pythonwitheggs", line 47, in <module> exec(compile(__file__f.read(), __file__, "exec")) File "slapos-render-config.py", line 88, in <module> do('enb', {"tdd_ul_dl_config": "[Configuration 6] 5ms 5UL 3DL (maximum uplink)"}) File "slapos-render-config.py", line 86, in do j2render(cfg, json_params % locals()) File "slapos-render-config.py", line 34, in j2render f.write(r._render().decode()) File ".../eggs/slapos.recipe.template-5.1-py3.9.egg/slapos/recipe/template/jinja2_template.py", line 215, in _render return template_object.render(**self.context).encode(self.encoding) File ".../eggs/Jinja2-2.11.3-py3.9.egg/jinja2/environment.py", line 1090, in render self.environment.handle_exception() File ".../eggs/Jinja2-2.11.3-py3.9.egg/jinja2/environment.py", line 832, in handle_exception reraise(*rewrite_traceback_stack(source=source)) File ".../eggs/Jinja2-2.11.3-py3.9.egg/jinja2/_compat.py", line 28, in reraise raise value.with_traceback(tb) File "config/enb.jinja2.cfg", line 1, in top-level template code {%- set cell_count = cell_list|length %} jinja2.exceptions.UndefinedError: 'cell_list' is undefined -> Fix it by teaching enb.jinja2.cfg to also load cell list in standalone by itself. Not touching gnb.jinja2.cfg as currently gnb does not support multicell at all, and in the future it will be sole enb.cfg to handle both LTE and NR simultaneously. /cc @jhuge, @lu.xu, @xavier_thompson, @Daetalus
-