enb: incorporate number of carriers into ue_max_rate() API
this allows the enb to calculate the max rate in a single spot rather than each test individually Change-Id: Id225a986e0b271cf9c057c74c9aefd6c7f3d39d6
This commit is contained in:
parent
2159cfe01f
commit
7d3b83ee93
|
@ -213,7 +213,7 @@ class eNodeB(log.Origin, metaclass=ABCMeta):
|
|||
pass
|
||||
|
||||
@abstractmethod
|
||||
def ue_max_rate(self, downlink=True):
|
||||
def ue_max_rate(self, downlink=True, num_carriers=1):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
|
|
|
@ -251,7 +251,7 @@ class AmarisoftENB(enb.eNodeB):
|
|||
rfemu_obj = rfemu.get_instance_by_type(rfemu_cfg['type'], rfemu_cfg)
|
||||
return rfemu_obj
|
||||
|
||||
def ue_max_rate(self, downlink=True):
|
||||
def ue_max_rate(self, downlink=True, num_carriers=1):
|
||||
# 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,
|
||||
|
@ -278,6 +278,9 @@ class AmarisoftENB(enb.eNodeB):
|
|||
if self._txmode >= 2 and self.num_prb() <= 25:
|
||||
max_rate *= 0.85
|
||||
|
||||
# Assume we schedule all carriers
|
||||
max_rate *= num_carriers
|
||||
|
||||
return max_rate
|
||||
|
||||
# vim: expandtab tabstop=4 shiftwidth=4
|
||||
|
|
|
@ -249,10 +249,11 @@ class srsENB(enb.eNodeB, srslte_common):
|
|||
rfemu_cfg = cell_list[cell].get('dl_rfemu', None)
|
||||
if rfemu_cfg is None:
|
||||
raise log.Error('rfemu attribute not found in cell_list item!')
|
||||
|
||||
rfemu_obj = rfemu.get_instance_by_type(rfemu_cfg['type'], rfemu_cfg)
|
||||
return rfemu_obj
|
||||
|
||||
def ue_max_rate(self, downlink=True):
|
||||
def ue_max_rate(self, downlink=True, num_carriers=1):
|
||||
# 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,
|
||||
|
@ -280,6 +281,9 @@ class srsENB(enb.eNodeB, srslte_common):
|
|||
if self._txmode >= 2 and self.num_prb() == 6:
|
||||
max_rate *= 0.85
|
||||
|
||||
# Assume we schedule all carriers
|
||||
max_rate *= num_carriers
|
||||
|
||||
return max_rate
|
||||
|
||||
# vim: expandtab tabstop=4 shiftwidth=4
|
||||
|
|
|
@ -20,8 +20,7 @@ print('ENB is connected to EPC')
|
|||
|
||||
ue.connect(enb)
|
||||
|
||||
max_rate = enb.ue_max_rate(downlink=True)
|
||||
max_rate *= ue.num_carriers
|
||||
max_rate = enb.ue_max_rate(downlink=True, num_carriers=ue.num_carriers)
|
||||
|
||||
iperf3srv.start()
|
||||
proc = iperf3cli.prepare_test_proc(iperf3cli.DIR_DL, ue.netns(), bitrate=max_rate)
|
||||
|
|
|
@ -20,8 +20,7 @@ print('ENB is connected to EPC')
|
|||
|
||||
ue.connect(enb)
|
||||
|
||||
max_rate = enb.ue_max_rate(downlink=False)
|
||||
max_rate *= ue.num_carriers
|
||||
max_rate = enb.ue_max_rate(downlink=False, num_carriers=ue.num_carriers)
|
||||
|
||||
iperf3srv.start()
|
||||
proc = iperf3cli.prepare_test_proc(iperf3cli.DIR_UL, ue.netns(), bitrate=max_rate)
|
||||
|
|
Loading…
Reference in New Issue