Change in osmo-gsm-tester[master]: enb: refactor ue_max_rate() and move helper function back to sub classes

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

srs_andre gerrit-no-reply at lists.osmocom.org
Wed May 27 16:53:18 UTC 2020


srs_andre has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18534 )


Change subject: enb: refactor ue_max_rate() and move helper function back to sub classes
......................................................................

enb: refactor ue_max_rate() and move helper function back to sub classes

It turned out that the Amarisoft and SRS eNB scheduler produces
slightly different maximum data rates for both UL and DL.

Change-Id: I30fa7006906d101c53ba586fb06bced3945aa960
---
M src/osmo_gsm_tester/obj/enb.py
M src/osmo_gsm_tester/obj/enb_amarisoft.py
M src/osmo_gsm_tester/obj/enb_srs.py
3 files changed, 53 insertions(+), 25 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/34/18534/1

diff --git a/src/osmo_gsm_tester/obj/enb.py b/src/osmo_gsm_tester/obj/enb.py
index f0047e7..2b91ece 100644
--- a/src/osmo_gsm_tester/obj/enb.py
+++ b/src/osmo_gsm_tester/obj/enb.py
@@ -82,6 +82,7 @@
         self._num_prb = 0
         self._num_cells = None
         self._epc = None
+        self._type = None
 
     def configure(self, config_specifics_li):
         values = dict(enb=config.get_defaults('enb'))
@@ -103,6 +104,8 @@
         config.overlay(values, dict(enb={ 'gtp_bind_addr': self._gtp_bind_addr }))
         self._num_cells = int(values['enb'].get('num_cells', None))
         assert self._num_cells
+        self._type = values['enb'].get('type')
+        assert self._type
 
         # adjust cell_list to num_cells length:
         len_cell_list = len(values['enb']['cell_list'])
@@ -220,29 +223,4 @@
     def addr(self):
         return self._addr
 
-    def ue_max_rate(self, downlink=True):
-        # The max rate for a single UE per PRB configuration in TM1 with MCS 28 QAM64
-        max_phy_rate_tm1_dl = { 6 : 3.5e6,
-                               15 : 11e6,
-                               25 : 18e6,
-                               50 : 36e6,
-                               75 : 55e6,
-                               100 : 75e6 }
-        max_phy_rate_tm1_ul = { 6 : 0.9e6,
-                               15 : 4.7e6,
-                               25 : 10e6,
-                               50 : 23e6,
-                               75 : 34e6,
-                               100 : 51e6 }
-        if downlink:
-            max_rate = max_phy_rate_tm1_dl[self.num_prb()]
-        else:
-            max_rate = max_phy_rate_tm1_ul[self.num_prb()]
-
-        #TODO: calculate for non-standard prb numbers.
-        if downlink and self._txmode > 2:
-            max_rate *= 2
-
-        return max_rate
-
 # vim: expandtab tabstop=4 shiftwidth=4
diff --git a/src/osmo_gsm_tester/obj/enb_amarisoft.py b/src/osmo_gsm_tester/obj/enb_amarisoft.py
index fa79cbf..4fec6e2 100644
--- a/src/osmo_gsm_tester/obj/enb_amarisoft.py
+++ b/src/osmo_gsm_tester/obj/enb_amarisoft.py
@@ -238,4 +238,29 @@
         rfemu_obj = rfemu.get_instance_by_type(rfemu_cfg['type'], rfemu_cfg)
         return rfemu_obj
 
+    def ue_max_rate(self, downlink=True):
+        # The max rate for a single UE per PRB configuration in TM1 with MCS 28 QAM64
+        max_phy_rate_tm1_dl = { 6 : 3.2e6,
+                               15 : 9.2e6,
+                               25 : 18e6,
+                               50 : 36e6,
+                               75 : 55e6,
+                               100 : 75e6 }
+        max_phy_rate_tm1_ul = { 6 : 2.0e6,
+                               15 : 5.1e6,
+                               25 : 10e6,
+                               50 : 21e6,
+                               75 : 32e6,
+                               100 : 51e6 }
+        if downlink:
+            max_rate = max_phy_rate_tm1_dl[self.num_prb()]
+        else:
+            max_rate = max_phy_rate_tm1_ul[self.num_prb()]
+
+        # MIMO only supported for Downlink
+        if downlink and self._txmode > 2:
+            max_rate *= 2
+
+        return max_rate
+
 # vim: expandtab tabstop=4 shiftwidth=4
diff --git a/src/osmo_gsm_tester/obj/enb_srs.py b/src/osmo_gsm_tester/obj/enb_srs.py
index 47b373e..5cd379c 100644
--- a/src/osmo_gsm_tester/obj/enb_srs.py
+++ b/src/osmo_gsm_tester/obj/enb_srs.py
@@ -236,4 +236,29 @@
         rfemu_obj = rfemu.get_instance_by_type(rfemu_cfg['type'], rfemu_cfg)
         return rfemu_obj
 
+    def ue_max_rate(self, downlink=True):
+        # The max rate for a single UE per PRB configuration in TM1 with MCS 28 QAM64
+        max_phy_rate_tm1_dl = { 6 : 3.5e6,
+                               15 : 11e6,
+                               25 : 18e6,
+                               50 : 36e6,
+                               75 : 55e6,
+                               100 : 75e6 }
+        max_phy_rate_tm1_ul = { 6 : 1.7e6,
+                               15 : 4.7e6,
+                               25 : 10e6,
+                               50 : 23e6,
+                               75 : 34e6,
+                               100 : 51e6 }
+        if downlink:
+            max_rate = max_phy_rate_tm1_dl[self.num_prb()]
+        else:
+            max_rate = max_phy_rate_tm1_ul[self.num_prb()]
+
+        # MIMO only supported for Downlink
+        if downlink and self._txmode > 2:
+            max_rate *= 2
+
+        return max_rate
+
 # vim: expandtab tabstop=4 shiftwidth=4

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/18534
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: I30fa7006906d101c53ba586fb06bced3945aa960
Gerrit-Change-Number: 18534
Gerrit-PatchSet: 1
Gerrit-Owner: srs_andre <andre at softwareradiosystems.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200527/dd7bc234/attachment.htm>


More information about the gerrit-log mailing list