Update YANG models for OpenFronthaul M-Plane.
[sim/o1-interface.git] / ntsimulator / deploy / o-ran-ru-fh / yang / o-ran-compression-factors.yang
@@ -13,7 +13,7 @@ module o-ran-compression-factors {
     "This module defines the module capabilities for
     the O-RAN Radio Unit U-Plane configuration.
 
     "This module defines the module capabilities for
     the O-RAN Radio Unit U-Plane configuration.
 
-    Copyright 2020 the O-RAN Alliance.
+    Copyright 2021 the O-RAN Alliance.
 
     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 
     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS'
     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -39,6 +39,27 @@ module o-ran-compression-factors {
     contributors may be used to endorse or promote products derived from
     this software without specific prior written permission.";
 
     contributors may be used to endorse or promote products derived from
     this software without specific prior written permission.";
 
+  revision "2021-12-01" {
+    description
+      "version 8.0.0
+
+      1) typographical corrections in descriptions.
+      2) Configuration for Beamforming weights were added together with changes
+         and updates to compressions.
+      3) add new beamspace compression enumeration for BEAMSPACE_TYPEII.";
+
+   reference "ORAN-WG4.M.0-v08.00";
+  }
+
+  revision "2021-03-22" {
+   description
+     "version 4.1.0
+
+     1) typographical corrections in descriptions.";
+
+   reference "ORAN-WG4.M.0-v04.00";
+  }
+
   revision "2020-08-10" {
    description
      "version 4.0.0
   revision "2020-08-10" {
    description
      "version 4.0.0
@@ -62,7 +83,7 @@ module o-ran-compression-factors {
     description
       "version 1.1.0
 
     description
       "version 1.1.0
 
-      1) changes related to compression bitwidth presentation";
+      1) changes related to compression bit-width presentation";
 
     reference "ORAN-WG4.M.0-v01.00";
   }
 
     reference "ORAN-WG4.M.0-v01.00";
   }
@@ -82,75 +103,264 @@ module o-ran-compression-factors {
       "Presence of this feature means that O-RU supports configurable fs-offset for compression.";
   }
 
       "Presence of this feature means that O-RU supports configurable fs-offset for compression.";
   }
 
+  typedef ci-compression-method-def {
+    type enumeration {
+      enum NO_COMPRESSION {
+        description
+          "No compression will be used";
+      }
+
+      enum BLOCK_FLOATING_POINT {
+        description
+          "Block floating point compression and decompression will be used";
+      }
+
+      enum BLOCK_SCALING {
+        description
+          "Block scaling compression and decompresion will be used";
+      }
+
+      enum U_LAW {
+        description
+          "u-Law compression and decompresion method will be used";
+      }
+    }
+    description
+      "Available compression methods for channel information (e.g., ST6).";
+  }
+
+  typedef compression-type-def {
+    type enumeration {
+      enum STATIC {
+        description
+          "Indicates that static compression method will be used (both compression and IQ bitwidth)";
+      }
+      enum DYNAMIC {
+        description
+          "Indicates that dynamic compression method will be used";
+      }
+    }
+    description
+      "Compression type that O-DU wants to be supported";
+  }
+
+  typedef bf-compression-method-def {
+    type enumeration {
+      enum NO_COMPRESSION {
+        description
+          "No compression will be used";
+      }
+      enum BLOCK_FLOATING_POINT {
+        description
+          "Block floating point compression and decompression will be used";
+      }
+
+      enum BLOCK_SCALING {
+        description
+          "Block scaling compression and decompresion will be used";
+      }
+
+      enum U_LAW {
+        description
+          "u-Law compression and decompresion method will be used";
+      }
+
+      enum BEAMSPACE {
+        description
+          "Beamspace compression and decompression will be used";
+      }
+
+      enum VOID_1 {
+        description
+          "Leftover of modulation, not to be used for beamforming weights";
+      }
+
+      enum VOID_2 {
+        description
+          "Leftover of block-floating-point-selective-re-sending, not to be used for beamforming weights";
+      }
+
+      enum VOID_3 {
+        description
+          "Leftover of modulation-compression-selective-re-sending, not to be used for beamforming weights";
+      }
+
+      enum BEAMSPACE_TYPEII {
+        description
+          "Beamspace compression typeII and decompression will be used ";
+      }
+    }
+    description
+      "Available compression methods for beamforming weights.";
+  }
+
+  typedef compression-method-def {
+    type enumeration {
+      enum NO_COMPRESSION {
+        description
+          "No compression will be used";
+      }
+      enum BLOCK_FLOATING_POINT {
+        description
+          "Block floating point compression and decompression will be used";
+      }
+
+      enum BLOCK_SCALING {
+        description
+          "Block scaling compression and decompresion will be used";
+      }
+
+      enum U_LAW {
+        description
+          "u-Law compression and decompresion method will be used";
+      }
+
+      enum VOID_1 {
+        description
+          "Leftover of beamspace, not to be used for IQ data.";
+      }
+
+      enum MODULATION {
+        description
+          "Modulation compression and decompression will be used";
+      }
+
+      enum BLOCK-FLOATING-POINT-SELECTIVE-RE-SENDING {
+        description
+          "block floating point with selective re sending
+          compression and decompression will be used";
+      }
+
+      enum MODULATION-COMPRESSION-SELECTIVE-RE-SENDING {
+        description
+          "modulation compression with selective re sending
+          compression and decompression will be used";
+      }
+    }
+    description
+      "Available compression methods for the data.";
+  }
+
   grouping compression-method-grouping {
     description
       "Grouping for compression method.";
 
   grouping compression-method-grouping {
     description
       "Grouping for compression method.";
 
+    leaf iq-bitwidth {
+      type uint8;
+      description
+        "Bit-width to be used in compression";
+    }
+
+    leaf compression-method {
+      type compression-method-def;
+      description
+        "Compression method which can be supported by the O-RU";
+    }
+  }
+
+  grouping compression-details {
+    description "";
+
     leaf iq-bitwidth {
       type uint8;
       description
         "Bitwidth to be used in compression";
     }
 
     leaf iq-bitwidth {
       type uint8;
       description
         "Bitwidth to be used in compression";
     }
 
+    leaf compression-type {
+      type compression-type-def;
+      mandatory true;
+      description
+        "Compression type that O-DU wants to be supported";
+    }
+
+    leaf bitwidth {
+      when "../compression-type = 'STATIC'";
+      type uint8;
+      status deprecated;
+      description
+        "Bitwidth to be used in compression.
+        This has since been replaced in M-Plane version
+        2.0.0 with the iq-bitwidth schema node";
+    }
+
     leaf compression-method {
     leaf compression-method {
-      type enumeration {
-        enum NO_COMPRESSION {
-          description
-            "No compression will be used";
-        }
-        enum BLOCK_FLOATING_POINT {
-          description
-            "Block floating point compression and decompression will be used";
-        }
+      type compression-method-def;
+      description
+        "Compression method which can be supported by the O-RU";
+    }
 
 
-        enum BLOCK_SCALING {
-          description
-            "Block scaling compression and decompresion will be used";
-        }
+    uses compresion-format-grp {
+      status deprecated;
+    }
+  }
 
 
-        enum U_LAW {
-          description
-            "u-Law compression and decompresion method will be used";
-        }
+  grouping bf-compression-details {
+    description "Compression formats defined for beamforming";
 
 
-        enum BEAMSPACE {
-          description
-            "Beamspace compression and decompression will be used";
-        }
+    leaf iq-bitwidth {
+      type uint8;
+      description
+        "Bitwidth to be used in compression";
+    }
 
 
-        enum MODULATION {
-          description
-            "Modulation compression and decompression will be used";
-        }
-        enum BLOCK-FLOATING-POINT-SELECTIVE-RE-SENDING {
-          description
-            "block floating point with selective re sending
-            compression and decompression will be used";
-        }
-        enum MODULATION-COMPRESSION-SELECTIVE-RE-SENDING {
-          description
-            "modulation compression with selective re sending
-            compression and decompression will be used";
-        }
-      }
+    leaf compression-type {
+      type compression-type-def;
+      mandatory true;
       description
       description
-        "Compresion method which can be supported by the O-RU";
+        "Compression type that O-DU wants to be supported";
+    }
+
+    leaf bitwidth {
+      when "../compression-type = 'STATIC'";
+      type uint8;
+      status deprecated;
+      description
+        "Bitwidth to be used in compression.
+        This has since been replaced in M-Plane version
+        2.0.0 with the iq-bitwidth schema node";
+    }
+
+    leaf compression-method {
+      type bf-compression-method-def;
+      description
+        "Compression method which can be supported by the beamforming";
+    }
+
+    uses compresion-format-grp {
+      status deprecated;
     }
   }
 
     }
   }
 
+// *********** Deprecated ***********
+
   grouping compression-formats {
   grouping compression-formats {
+    status deprecated;
+    description
+      "Grouping deicated to list compression formats as choice.";
+
+    uses compresion-format-grp {
+      status deprecated;
+    }
+  }
+
+  grouping compresion-format-grp {
+    status deprecated;
     description
     description
-      "Grouping deicated to list compression formats as choice";
+      "Grouping to for compression format choice";
 
     choice compression-format {
 
     choice compression-format {
+      status deprecated;
       description
       description
-        "Choice of compression format for particular element";
+        "Choice of compression format for particular element.
+         Note: This metod is deprecated. All should be done as emumeration as details are configured
+         by udCompHdr in CU-Plane messaging.";
 
       case no-compresison {
         description "Compression for beam weights is not supported.";
       }
       case block-floating-point {
 
       case no-compresison {
         description "Compression for beam weights is not supported.";
       }
       case block-floating-point {
-        description "Block floating point compression and decompression is supported.";
+        description "Block floating-point compression and decompression is supported.";
 
         leaf exponent {
           type uint8 {
 
         leaf exponent {
           type uint8 {
@@ -162,7 +372,7 @@ module o-ran-compression-factors {
 
       case block-floating-point-selective-re-sending {
         description
 
       case block-floating-point-selective-re-sending {
         description
-          "Block floating point with selective re sending compression and decompression is supported.";
+          "Block floating-point with selective re sending compression and decompression is supported.";
 
         leaf sres-exponent {
           type uint8 {
 
         leaf sres-exponent {
           type uint8 {
@@ -173,7 +383,7 @@ module o-ran-compression-factors {
       }
 
       case block-scaling {
       }
 
       case block-scaling {
-        description "Block scaling compression and decompresion is supported.";
+        description "Block scaling compression and decompression is supported.";
         leaf block-scalar {
           type uint8;
             description
         leaf block-scalar {
           type uint8;
             description
@@ -182,7 +392,7 @@ module o-ran-compression-factors {
       }
 
       case u-law {
       }
 
       case u-law {
-        description "u-Law compression and decompresion method is supported.";
+        description "u-Law compression and decompression method is supported.";
         leaf comp-bit-width {
           type uint8 {
             range "0..15";
         leaf comp-bit-width {
           type uint8 {
             range "0..15";
@@ -218,7 +428,7 @@ module o-ran-compression-factors {
           type uint8 {
             range "0..1";
           }
           type uint8 {
             range "0..1";
           }
-          description "Constallation shift flag";
+          description "Constellation shift flag";
         }
 
         leaf mod-comp-scaler {
         }
 
         leaf mod-comp-scaler {
@@ -235,7 +445,7 @@ module o-ran-compression-factors {
           type uint8 {
             range "0..1";
           }
           type uint8 {
             range "0..1";
           }
-          description "Constallation shift flag";
+          description "Constellation shift flag";
         }
 
         leaf sres-mod-comp-scaler {
         }
 
         leaf sres-mod-comp-scaler {
@@ -250,54 +460,50 @@ module o-ran-compression-factors {
   }
 
   grouping compression-params {
   }
 
   grouping compression-params {
+    status deprecated;
     description
       "Parameters to define compression";
 
     leaf compression-type {
     description
       "Parameters to define compression";
 
     leaf compression-type {
-      type enumeration {
-        enum STATIC {
-          description
-            "Indicates that static compression method will be used (both compression and IQ bitwidth)";
-        }
-        enum DYNAMIC {
-          description
-            "Indicates that dynamic compression method will be used";
-        }
-      }
+      type compression-type-def;
       mandatory true;
       description
         "Compression type that O-DU wants to be supported";
     }
 
       mandatory true;
       description
         "Compression type that O-DU wants to be supported";
     }
 
-// *********** TO BE REMOVED ***********
     leaf bitwidth {
       when "../compression-type = 'STATIC'";
       type uint8;
       status deprecated;
       description
     leaf bitwidth {
       when "../compression-type = 'STATIC'";
       type uint8;
       status deprecated;
       description
-        "Bitwidth to be used in compression.
+        "Bit-width to be used in compression.
         This has since been replaced in M-Plane version
         2.0.0 with the iq-bitwidth schema node";
     }
         This has since been replaced in M-Plane version
         2.0.0 with the iq-bitwidth schema node";
     }
-// *************************************
 
 
-    uses compression-formats;
+    uses compression-formats {
+      status deprecated;
+    }
   }
 
   grouping compression-parameters {
   }
 
   grouping compression-parameters {
+    status deprecated;
     description
       "Parameters used to define description type";
 
     leaf iq-bitwidth {
       type uint8;
       description
     description
       "Parameters used to define description type";
 
     leaf iq-bitwidth {
       type uint8;
       description
-        "Bitwidth to be used in compression";
+        "Bit-width to be used in compression";
     }
 
     }
 
-    uses compression-formats;
+    uses compression-formats {
+      status deprecated;
+    }
   }
 
   grouping format-of-iq-sample {
   }
 
   grouping format-of-iq-sample {
+    status deprecated;
     description
       "Indicates module capabilities about IQ samples";
 
     description
       "Indicates module capabilities about IQ samples";
 
@@ -312,17 +518,20 @@ module o-ran-compression-factors {
       type boolean;
 
       description
       type boolean;
 
       description
-        "Informs if O-RU supports realtime variable bit with";
+        "Informs if O-RU supports real-time variable bit with";
     }
 
     list compression-method-supported {
     }
 
     list compression-method-supported {
-      uses compression-parameters;
+      status deprecated;
+      uses compression-parameters {
+        status deprecated;
+      }
 
       description
         "List of supported compression methods by O-RU
          Note: if O-RU supports different compression methods per endpoint
                then please refer do endpoints to have information what
 
       description
         "List of supported compression methods by O-RU
          Note: if O-RU supports different compression methods per endpoint
                then please refer do endpoints to have information what
-               exactly is supported on a paticular endpoint";
+               exactly is supported on a particular endpoint";
     }
 
     leaf syminc-supported {
     }
 
     leaf syminc-supported {
@@ -353,16 +562,6 @@ module o-ran-compression-factors {
     }
   }
 
     }
   }
 
+// *********** Deprecated End ***********
 
 
-  grouping compression-details {
-    description "";
-
-    leaf iq-bitwidth {
-      type uint8;
-      description
-        "Bitwidth to be used in compression";
-    }
-
-    uses compression-params;
-  }
 }
 }