View | Details | Raw Unified | Return to bug 2543
Collapse All | Expand All

(-)a/src/lte/model/cqa-ff-mac-scheduler.cc (-2 / +2 lines)
 Lines 1985-1993    Link Here 
1985
                {
1985
                {
1986
                  sinr = EstimateUlSinr ((*it).first, i);
1986
                  sinr = EstimateUlSinr ((*it).first, i);
1987
                }
1987
                }
1988
              if ((*itCqi).second.at (i) < minSinr)
1988
              if (sinr < minSinr)
1989
                {
1989
                {
1990
                  minSinr = (*itCqi).second.at (i);
1990
                  minSinr = sinr;
1991
                }
1991
                }
1992
            }
1992
            }
1993
1993
(-)a/src/lte/model/fdbet-ff-mac-scheduler.cc (-2 / +2 lines)
 Lines 1526-1534    Link Here 
1526
                {
1526
                {
1527
                  sinr = EstimateUlSinr ((*it).first, i);
1527
                  sinr = EstimateUlSinr ((*it).first, i);
1528
                }
1528
                }
1529
              if ((*itCqi).second.at (i) < minSinr)
1529
              if (sinr < minSinr)
1530
                {
1530
                {
1531
                  minSinr = (*itCqi).second.at (i);
1531
                  minSinr = sinr;
1532
                }
1532
                }
1533
            }
1533
            }
1534
1534
(-)a/src/lte/model/fdmt-ff-mac-scheduler.cc (-2 / +2 lines)
 Lines 1504-1512    Link Here 
1504
                {
1504
                {
1505
                  sinr = EstimateUlSinr ((*it).first, i);
1505
                  sinr = EstimateUlSinr ((*it).first, i);
1506
                }
1506
                }
1507
              if ((*itCqi).second.at (i) < minSinr)
1507
              if (sinr < minSinr)
1508
                {
1508
                {
1509
                  minSinr = (*itCqi).second.at (i);
1509
                  minSinr = sinr;
1510
                }
1510
                }
1511
            }
1511
            }
1512
1512
(-)a/src/lte/model/fdtbfq-ff-mac-scheduler.cc (-2 / +2 lines)
 Lines 1837-1845    Link Here 
1837
                {
1837
                {
1838
                  sinr = EstimateUlSinr ((*it).first, i);
1838
                  sinr = EstimateUlSinr ((*it).first, i);
1839
                }
1839
                }
1840
              if ((*itCqi).second.at (i) < minSinr)
1840
              if (sinr < minSinr)
1841
                {
1841
                {
1842
                  minSinr = (*itCqi).second.at (i);
1842
                  minSinr = sinr;
1843
                }
1843
                }
1844
            }
1844
            }
1845
1845
(-)a/src/lte/model/pf-ff-mac-scheduler.cc (-2 / +2 lines)
 Lines 1633-1641    Link Here 
1633
                {
1633
                {
1634
                  sinr = EstimateUlSinr ((*it).first, i);
1634
                  sinr = EstimateUlSinr ((*it).first, i);
1635
                }
1635
                }
1636
              if ((*itCqi).second.at (i) < minSinr)
1636
              if (sinr < minSinr)
1637
                {
1637
                {
1638
                  minSinr = (*itCqi).second.at (i);
1638
                  minSinr = sinr;
1639
                }
1639
                }
1640
            }
1640
            }
1641
1641
(-)a/src/lte/model/pss-ff-mac-scheduler.cc (-2 / +2 lines)
 Lines 1938-1946    Link Here 
1938
                {
1938
                {
1939
                  sinr = EstimateUlSinr ((*it).first, i);
1939
                  sinr = EstimateUlSinr ((*it).first, i);
1940
                }
1940
                }
1941
              if ((*itCqi).second.at (i) < minSinr)
1941
              if (sinr < minSinr)
1942
                {
1942
                {
1943
                  minSinr = (*itCqi).second.at (i);
1943
                  minSinr = sinr;
1944
                }
1944
                }
1945
            }
1945
            }
1946
1946
(-)a/src/lte/model/rr-ff-mac-scheduler.cc (-2 / +42 lines)
 Lines 332-337    Link Here 
332
  return (-1);
332
  return (-1);
333
}
333
}
334
334
335
double
336
RrFfMacScheduler::EstimateUlSinr (uint16_t rnti, uint16_t rb)
337
{
338
  std::map <uint16_t, std::vector <double> >::iterator itCqi = m_ueCqi.find (rnti);
339
  if (itCqi == m_ueCqi.end ())
340
    {
341
      // no cqi info about this UE
342
      return (NO_SINR);
343
344
    }
345
  else
346
    {
347
      // take the average SINR value among the available
348
      double sinrSum = 0;
349
      unsigned int sinrNum = 0;
350
      for (uint32_t i = 0; i < m_cschedCellConfig.m_ulBandwidth; i++)
351
        {
352
          double sinr = (*itCqi).second.at (i);
353
          if (sinr != NO_SINR)
354
            {
355
              sinrSum += sinr;
356
              sinrNum++;
357
            }
358
        }
359
      double estimatedSinr = (sinrNum > 0) ? (sinrSum / sinrNum) : DBL_MAX;
360
      // store the value
361
      (*itCqi).second.at (rb) = estimatedSinr;
362
      return (estimatedSinr);
363
    }
364
}
365
335
bool
366
bool
336
RrFfMacScheduler::SortRlcBufferReq (FfMacSchedSapProvider::SchedDlRlcBufferReqParameters i,FfMacSchedSapProvider::SchedDlRlcBufferReqParameters j)
367
RrFfMacScheduler::SortRlcBufferReq (FfMacSchedSapProvider::SchedDlRlcBufferReqParameters i,FfMacSchedSapProvider::SchedDlRlcBufferReqParameters j)
337
{
368
{
 Lines 1384-1394    Link Here 
1384
        {
1415
        {
1385
          // take the lowest CQI value (worst RB)
1416
          // take the lowest CQI value (worst RB)
1386
          double minSinr = (*itCqi).second.at (uldci.m_rbStart);
1417
          double minSinr = (*itCqi).second.at (uldci.m_rbStart);
1418
          if (minSinr == NO_SINR)
1419
            {
1420
              minSinr = EstimateUlSinr ((*it).first, uldci.m_rbStart);
1421
            }
1387
          for (uint16_t i = uldci.m_rbStart; i < uldci.m_rbStart + uldci.m_rbLen; i++)
1422
          for (uint16_t i = uldci.m_rbStart; i < uldci.m_rbStart + uldci.m_rbLen; i++)
1388
            {
1423
            {
1389
              if ((*itCqi).second.at (i) < minSinr)
1424
              double sinr = (*itCqi).second.at (i);
1425
              if (sinr == NO_SINR)
1390
                {
1426
                {
1391
                  minSinr = (*itCqi).second.at (i);
1427
                  sinr = EstimateUlSinr ((*it).first, i);
1428
                }
1429
              if (sinr < minSinr)
1430
                {
1431
                  minSinr = sinr;
1392
                }
1432
                }
1393
            }
1433
            }
1394
          // translate SINR -> cqi: WILD ACK: same as DL
1434
          // translate SINR -> cqi: WILD ACK: same as DL
(-)a/src/lte/model/rr-ff-mac-scheduler.h (+6 lines)
 Lines 31-36    Link Here 
31
#include <ns3/lte-amc.h>
31
#include <ns3/lte-amc.h>
32
#include <ns3/lte-ffr-sap.h>
32
#include <ns3/lte-ffr-sap.h>
33
33
34
// value for SINR outside the range defined by FF-API, used to indicate that there
35
// is no CQI for this element
36
#define NO_SINR -5000
37
34
#define HARQ_PROC_NUM 8
38
#define HARQ_PROC_NUM 8
35
#define HARQ_DL_TIMEOUT 11
39
#define HARQ_DL_TIMEOUT 11
36
40
 Lines 135-140    Link Here 
135
139
136
140
137
  int GetRbgSize (int dlbandwidth);
141
  int GetRbgSize (int dlbandwidth);
142
  
143
  double EstimateUlSinr (uint16_t rnti, uint16_t rb);
138
144
139
  static bool SortRlcBufferReq (FfMacSchedSapProvider::SchedDlRlcBufferReqParameters i,FfMacSchedSapProvider::SchedDlRlcBufferReqParameters j);
145
  static bool SortRlcBufferReq (FfMacSchedSapProvider::SchedDlRlcBufferReqParameters i,FfMacSchedSapProvider::SchedDlRlcBufferReqParameters j);
140
146
(-)a/src/lte/model/tdbet-ff-mac-scheduler.cc (-2 / +2 lines)
 Lines 1448-1456    Link Here 
1448
                {
1448
                {
1449
                  sinr = EstimateUlSinr ((*it).first, i);
1449
                  sinr = EstimateUlSinr ((*it).first, i);
1450
                }
1450
                }
1451
              if ((*itCqi).second.at (i) < minSinr)
1451
              if (sinr < minSinr)
1452
                {
1452
                {
1453
                  minSinr = (*itCqi).second.at (i);
1453
                  minSinr = sinr;
1454
                }
1454
                }
1455
            }
1455
            }
1456
1456
(-)a/src/lte/model/tdmt-ff-mac-scheduler.cc (-2 / +2 lines)
 Lines 1444-1452    Link Here 
1444
                {
1444
                {
1445
                  sinr = EstimateUlSinr ((*it).first, i);
1445
                  sinr = EstimateUlSinr ((*it).first, i);
1446
                }
1446
                }
1447
              if ((*itCqi).second.at (i) < minSinr)
1447
              if (sinr < minSinr)
1448
                {
1448
                {
1449
                  minSinr = (*itCqi).second.at (i);
1449
                  minSinr = sinr;
1450
                }
1450
                }
1451
            }
1451
            }
1452
1452
(-)a/src/lte/model/tdtbfq-ff-mac-scheduler.cc (-2 / +2 lines)
 Lines 1624-1632    Link Here 
1624
                {
1624
                {
1625
                  sinr = EstimateUlSinr ((*it).first, i);
1625
                  sinr = EstimateUlSinr ((*it).first, i);
1626
                }
1626
                }
1627
              if ((*itCqi).second.at (i) < minSinr)
1627
              if (sinr < minSinr)
1628
                {
1628
                {
1629
                  minSinr = (*itCqi).second.at (i);
1629
                  minSinr = sinr;
1630
                }
1630
                }
1631
            }
1631
            }
1632
1632
(-)a/src/lte/model/tta-ff-mac-scheduler.cc (-2 / +2 lines)
 Lines 1523-1531    Link Here 
1523
                {
1523
                {
1524
                  sinr = EstimateUlSinr ((*it).first, i);
1524
                  sinr = EstimateUlSinr ((*it).first, i);
1525
                }
1525
                }
1526
              if ((*itCqi).second.at (i) < minSinr)
1526
              if (sinr < minSinr)
1527
                {
1527
                {
1528
                  minSinr = (*itCqi).second.at (i);
1528
                  minSinr = sinr;
1529
                }
1529
                }
1530
            }
1530
            }
1531
1531

Return to bug 2543