• Kirill Smelkov's avatar
    software/ors-amarisoft: enb: Start to generalize the code to handle multiple Radio Units · 0a285a34
    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: [
    ```
    0a285a34
testFDD.py 17.8 KB