LEFT | RIGHT |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) | 3 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 } | 313 } |
314 | 314 |
315 return; | 315 return; |
316 } | 316 } |
317 | 317 |
318 void | 318 void |
319 TdBetFfMacScheduler::DoSchedDlPagingBufferReq (const struct FfMacSchedSapProvide
r::SchedDlPagingBufferReqParameters& params) | 319 TdBetFfMacScheduler::DoSchedDlPagingBufferReq (const struct FfMacSchedSapProvide
r::SchedDlPagingBufferReqParameters& params) |
320 { | 320 { |
321 NS_LOG_FUNCTION (this); | 321 NS_LOG_FUNCTION (this); |
322 NS_FATAL_ERROR ("method not implemented"); | 322 NS_FATAL_ERROR ("method not implemented"); |
323 NS_UNUSED(params); | 323 NS_UNUSED (params); |
324 return; | 324 return; |
325 } | 325 } |
326 | 326 |
327 void | 327 void |
328 TdBetFfMacScheduler::DoSchedDlMacBufferReq (const struct FfMacSchedSapProvider::
SchedDlMacBufferReqParameters& params) | 328 TdBetFfMacScheduler::DoSchedDlMacBufferReq (const struct FfMacSchedSapProvider::
SchedDlMacBufferReqParameters& params) |
329 { | 329 { |
330 NS_LOG_FUNCTION (this); | 330 NS_LOG_FUNCTION (this); |
331 NS_FATAL_ERROR ("method not implemented"); | 331 NS_FATAL_ERROR ("method not implemented"); |
332 NS_UNUSED(params); | 332 NS_UNUSED (params); |
333 return; | 333 return; |
334 } | 334 } |
335 | 335 |
336 int | 336 int |
337 TdBetFfMacScheduler::GetRbgSize (int dlbandwidth) | 337 TdBetFfMacScheduler::GetRbgSize (int dlbandwidth) |
338 { | 338 { |
339 for (int i = 0; i < 4; i++) | 339 for (int i = 0; i < 4; i++) |
340 { | 340 { |
341 if (dlbandwidth < TdBetType0AllocationRbg[i]) | 341 if (dlbandwidth < TdBetType0AllocationRbg[i]) |
342 { | 342 { |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 { | 505 { |
506 (*itProcId).second = ((*itProcId).second + 1) % HARQ_PROC_NUM; | 506 (*itProcId).second = ((*itProcId).second + 1) % HARQ_PROC_NUM; |
507 } | 507 } |
508 | 508 |
509 // RACH Allocation | 509 // RACH Allocation |
510 m_rachAllocationMap.resize (m_cschedCellConfig.m_ulBandwidth, 0); | 510 m_rachAllocationMap.resize (m_cschedCellConfig.m_ulBandwidth, 0); |
511 uint8_t rbStart = 0; | 511 uint8_t rbStart = 0; |
512 std::vector <struct RachListElement_s>::iterator itRach; | 512 std::vector <struct RachListElement_s>::iterator itRach; |
513 for (itRach = m_rachList.begin (); itRach != m_rachList.end (); itRach++) | 513 for (itRach = m_rachList.begin (); itRach != m_rachList.end (); itRach++) |
514 { | 514 { |
515 NS_ASSERT_MSG (m_amc->GetTbSizeFromMcs (m_ulGrantMcs, m_cschedCellConfig.m
_ulBandwidth) > (*itRach).m_estimatedSize, " Default UL Grant MCS does not allow
to send RACH messages"); | 515 NS_ASSERT_MSG (m_amc->GetUlTbSizeFromMcs (m_ulGrantMcs, m_cschedCellConfig
.m_ulBandwidth) > (*itRach).m_estimatedSize, " Default UL Grant MCS does not all
ow to send RACH messages"); |
516 BuildRarListElement_s newRar; | 516 BuildRarListElement_s newRar; |
517 newRar.m_rnti = (*itRach).m_rnti; | 517 newRar.m_rnti = (*itRach).m_rnti; |
518 // DL-RACH Allocation | 518 // DL-RACH Allocation |
519 // Ideal: no needs of configuring m_dci | 519 // Ideal: no needs of configuring m_dci |
520 // UL-RACH Allocation | 520 // UL-RACH Allocation |
521 newRar.m_grant.m_rnti = newRar.m_rnti; | 521 newRar.m_grant.m_rnti = newRar.m_rnti; |
522 newRar.m_grant.m_mcs = m_ulGrantMcs; | 522 newRar.m_grant.m_mcs = m_ulGrantMcs; |
523 uint8_t rbLen = 1; | 523 uint8_t rbLen = 1; |
524 uint16_t tbSizeBits = 0; | 524 uint16_t tbSizeBits = 0; |
525 // find lowest TB size that fits UL grant estimated size | 525 // find lowest TB size that fits UL grant estimated size |
526 while ((tbSizeBits < (*itRach).m_estimatedSize) && (rbStart + rbLen < m_cs
chedCellConfig.m_ulBandwidth)) | 526 while ((tbSizeBits < (*itRach).m_estimatedSize) && (rbStart + rbLen < m_cs
chedCellConfig.m_ulBandwidth)) |
527 { | 527 { |
528 rbLen++; | 528 rbLen++; |
529 tbSizeBits = m_amc->GetTbSizeFromMcs (m_ulGrantMcs, rbLen); | 529 tbSizeBits = m_amc->GetUlTbSizeFromMcs (m_ulGrantMcs, rbLen); |
530 } | 530 } |
531 if (tbSizeBits < (*itRach).m_estimatedSize) | 531 if (tbSizeBits < (*itRach).m_estimatedSize) |
532 { | 532 { |
533 // no more allocation space: finish allocation | 533 // no more allocation space: finish allocation |
534 break; | 534 break; |
535 } | 535 } |
536 newRar.m_grant.m_rbStart = rbStart; | 536 newRar.m_grant.m_rbStart = rbStart; |
537 newRar.m_grant.m_rbLen = rbLen; | 537 newRar.m_grant.m_rbLen = rbLen; |
538 newRar.m_grant.m_tbSize = tbSizeBits / 8; | 538 newRar.m_grant.m_tbSize = tbSizeBits / 8; |
539 newRar.m_grant.m_hopping = false; | 539 newRar.m_grant.m_hopping = false; |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
615 } | 615 } |
616 std::vector <struct DlInfoListElement_s> dlInfoListUntxed; | 616 std::vector <struct DlInfoListElement_s> dlInfoListUntxed; |
617 for (uint16_t i = 0; i < m_dlInfoListBuffered.size (); i++) | 617 for (uint16_t i = 0; i < m_dlInfoListBuffered.size (); i++) |
618 { | 618 { |
619 std::set <uint16_t>::iterator itRnti = rntiAllocated.find (m_dlInfoListBuf
fered.at (i).m_rnti); | 619 std::set <uint16_t>::iterator itRnti = rntiAllocated.find (m_dlInfoListBuf
fered.at (i).m_rnti); |
620 if (itRnti != rntiAllocated.end ()) | 620 if (itRnti != rntiAllocated.end ()) |
621 { | 621 { |
622 // RNTI already allocated for retx | 622 // RNTI already allocated for retx |
623 continue; | 623 continue; |
624 } | 624 } |
625 uint8_t nLayers = static_cast<uint8_t>(m_dlInfoListBuffered.at (i).m_harqS
tatus.size ()); | 625 uint8_t nLayers = static_cast<uint8_t> (m_dlInfoListBuffered.at (i).m_harq
Status.size ()); |
626 std::vector <bool> retx; | 626 std::vector <bool> retx; |
627 NS_LOG_INFO (this << " Processing DLHARQ feedback"); | 627 NS_LOG_INFO (this << " Processing DLHARQ feedback"); |
628 if (nLayers == 1) | 628 if (nLayers == 1) |
629 { | 629 { |
630 retx.push_back (m_dlInfoListBuffered.at (i).m_harqStatus.at (0) == DlI
nfoListElement_s::NACK); | 630 retx.push_back (m_dlInfoListBuffered.at (i).m_harqStatus.at (0) == DlI
nfoListElement_s::NACK); |
631 retx.push_back (false); | 631 retx.push_back (false); |
632 } | 632 } |
633 else | 633 else |
634 { | 634 { |
635 retx.push_back (m_dlInfoListBuffered.at (i).m_harqStatus.at (0) == DlI
nfoListElement_s::NACK); | 635 retx.push_back (m_dlInfoListBuffered.at (i).m_harqStatus.at (0) == DlI
nfoListElement_s::NACK); |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
712 NS_LOG_INFO ("RBG " << dciRbg.at (j) << " assigned"); | 712 NS_LOG_INFO ("RBG " << dciRbg.at (j) << " assigned"); |
713 rbgAllocatedNum++; | 713 rbgAllocatedNum++; |
714 } | 714 } |
715 | 715 |
716 NS_LOG_INFO (this << " Send retx in the same RBGs"); | 716 NS_LOG_INFO (this << " Send retx in the same RBGs"); |
717 } | 717 } |
718 else | 718 else |
719 { | 719 { |
720 // find RBGs for sending HARQ retx | 720 // find RBGs for sending HARQ retx |
721 uint8_t j = 0; | 721 uint8_t j = 0; |
722 uint8_t rbgId = static_cast<uint8_t>((dciRbg.at (dciRbg.size () -
1) + 1) % rbgNum); | 722 uint8_t rbgId = static_cast<uint8_t> ((dciRbg.at (dciRbg.size () -
1) + 1) % rbgNum); |
723 uint8_t startRbg = static_cast<uint8_t>(dciRbg.at (dciRbg.size ()
- 1)); | 723 uint8_t startRbg = static_cast<uint8_t> (dciRbg.at (dciRbg.size ()
- 1)); |
724 std::vector <bool> rbgMapCopy = rbgMap; | 724 std::vector <bool> rbgMapCopy = rbgMap; |
725 while ((j < dciRbg.size ())&&(startRbg != rbgId)) | 725 while ((j < dciRbg.size ())&&(startRbg != rbgId)) |
726 { | 726 { |
727 if (rbgMapCopy.at (rbgId) == false) | 727 if (rbgMapCopy.at (rbgId) == false) |
728 { | 728 { |
729 rbgMapCopy.at (rbgId) = true; | 729 rbgMapCopy.at (rbgId) = true; |
730 dciRbg.at (j) = rbgId; | 730 dciRbg.at (j) = rbgId; |
731 j++; | 731 j++; |
732 } | 732 } |
733 rbgId = (rbgId + 1) % rbgNum; | 733 rbgId = (rbgId + 1) % rbgNum; |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
929 { | 929 { |
930 // no UE available for downlink· | 930 // no UE available for downlink· |
931 return; | 931 return; |
932 } | 932 } |
933 else | 933 else |
934 { | 934 { |
935 // assign all RBGs to this UE | 935 // assign all RBGs to this UE |
936 std::vector <uint16_t> tempMap; | 936 std::vector <uint16_t> tempMap; |
937 for (int i = 0; i < rbgNum; i++) | 937 for (int i = 0; i < rbgNum; i++) |
938 { | 938 { |
939 tempMap.push_back (static_cast<uint16_t>(i)); | 939 tempMap.push_back (static_cast<uint16_t> (i)); |
940 } | 940 } |
941 allocationMap.insert (std::pair <uint16_t, std::vector <uint16_t> > ((*itM
ax).first, tempMap)); | 941 allocationMap.insert (std::pair <uint16_t, std::vector <uint16_t> > ((*itM
ax).first, tempMap)); |
942 } | 942 } |
943 | 943 |
944 | 944 |
945 // reset TTI stats of users | 945 // reset TTI stats of users |
946 std::map <uint16_t, tdbetsFlowPerf_t>::iterator itStats; | 946 std::map <uint16_t, tdbetsFlowPerf_t>::iterator itStats; |
947 for (itStats = m_flowStatsDl.begin (); itStats != m_flowStatsDl.end (); itStat
s++) | 947 for (itStats = m_flowStatsDl.begin (); itStats != m_flowStatsDl.end (); itStat
s++) |
948 { | 948 { |
949 (*itStats).second.lastTtiBytesTrasmitted = 0; | 949 (*itStats).second.lastTtiBytesTrasmitted = 0; |
950 } | 950 } |
951 | 951 |
952 // generate the transmission opportunities by grouping the RBGs of the same RN
TI and | 952 // generate the transmission opportunities by grouping the RBGs of the same RN
TI and |
953 // creating the correspondent DCIs | 953 // creating the correspondent DCIs |
954 std::map <uint16_t, std::vector <uint16_t> >::iterator itMap = allocationMap.b
egin (); | 954 std::map <uint16_t, std::vector <uint16_t> >::iterator itMap = allocationMap.b
egin (); |
955 while (itMap != allocationMap.end ()) | 955 while (itMap != allocationMap.end ()) |
956 { | 956 { |
957 // create new BuildDataListElement_s for this LC | 957 // create new BuildDataListElement_s for this LC |
958 BuildDataListElement_s newEl; | 958 BuildDataListElement_s newEl; |
959 newEl.m_rnti = (*itMap).first; | 959 newEl.m_rnti = (*itMap).first; |
960 // create the DlDciListElement_s | 960 // create the DlDciListElement_s |
961 DlDciListElement_s newDci; | 961 DlDciListElement_s newDci; |
962 newDci.m_rnti = (*itMap).first; | 962 newDci.m_rnti = (*itMap).first; |
963 newDci.m_harqProcess = UpdateHarqProcessId ((*itMap).first); | 963 newDci.m_harqProcess = UpdateHarqProcessId ((*itMap).first); |
964 | 964 |
965 uint16_t lcActives = static_cast<uint16_t>(LcActivePerFlow ((*itMap).first
)); | 965 uint16_t lcActives = static_cast<uint16_t> (LcActivePerFlow ((*itMap).firs
t)); |
966 NS_LOG_INFO (this << "Allocate user " << newEl.m_rnti << " rbg " << lcActi
ves); | 966 NS_LOG_INFO (this << "Allocate user " << newEl.m_rnti << " rbg " << lcActi
ves); |
967 if (lcActives == 0) | 967 if (lcActives == 0) |
968 { | 968 { |
969 // Set to max value, to avoid divide by 0 below | 969 // Set to max value, to avoid divide by 0 below |
970 lcActives = (uint16_t)65535; // UINT16_MAX; | 970 lcActives = (uint16_t)65535; // UINT16_MAX; |
971 } | 971 } |
972 uint16_t RgbPerRnti = static_cast<uint16_t>((*itMap).second.size ()); | 972 uint16_t RgbPerRnti = static_cast<uint16_t> ((*itMap).second.size ()); |
973 std::map <uint16_t,uint8_t>::iterator itCqi; | 973 std::map <uint16_t,uint8_t>::iterator itCqi; |
974 itCqi = m_p10CqiRxed.find ((*itMap).first); | 974 itCqi = m_p10CqiRxed.find ((*itMap).first); |
975 std::map <uint16_t,uint8_t>::iterator itTxMode; | 975 std::map <uint16_t,uint8_t>::iterator itTxMode; |
976 itTxMode = m_uesTxMode.find ((*itMap).first); | 976 itTxMode = m_uesTxMode.find ((*itMap).first); |
977 if (itTxMode == m_uesTxMode.end ()) | 977 if (itTxMode == m_uesTxMode.end ()) |
978 { | 978 { |
979 NS_FATAL_ERROR ("No Transmission Mode info on user " << (*itMap).first
); | 979 NS_FATAL_ERROR ("No Transmission Mode info on user " << (*itMap).first
); |
980 } | 980 } |
981 int nLayer = TransmissionModesLayers::TxMode2LayerNum ((*itTxMode).second)
; | 981 int nLayer = TransmissionModesLayers::TxMode2LayerNum ((*itTxMode).second)
; |
982 | 982 |
983 uint32_t bytesTxed = 0; | 983 uint32_t bytesTxed = 0; |
984 for (uint8_t j = 0; j < nLayer; j++) | 984 for (uint8_t j = 0; j < nLayer; j++) |
985 { | 985 { |
986 if (itCqi == m_p10CqiRxed.end ()) | 986 if (itCqi == m_p10CqiRxed.end ()) |
987 { | 987 { |
988 newDci.m_mcs.push_back (0); // no info on this user -> lowest MCS | 988 newDci.m_mcs.push_back (0); // no info on this user -> lowest MCS |
989 } | 989 } |
990 else | 990 else |
991 { | 991 { |
992 newDci.m_mcs.push_back ( m_amc->GetMcsFromCqi ((*itCqi).second) ); | 992 newDci.m_mcs.push_back ( m_amc->GetMcsFromCqi ((*itCqi).second) ); |
993 } | 993 } |
994 | 994 |
995 int tbSize = (m_amc->GetTbSizeFromMcs (newDci.m_mcs.at (j), RgbPerRnti
* rbgSize) / 8); // (size of TB in bytes according to table 7.1.7.2.1-1 of 36.2
13) | 995 int tbSize = (m_amc->GetDlTbSizeFromMcs (newDci.m_mcs.at (j), RgbPerRn
ti * rbgSize) / 8); // (size of TB in bytes according to table 7.1.7.2.1-1 of 36
.213) |
996 newDci.m_tbsSize.push_back (static_cast<uint16_t>(tbSize)); | 996 newDci.m_tbsSize.push_back (static_cast<uint16_t> (tbSize)); |
997 bytesTxed += tbSize; | 997 bytesTxed += tbSize; |
998 } | 998 } |
999 | 999 |
1000 newDci.m_resAlloc = 0; // only allocation type 0 at this stage | 1000 newDci.m_resAlloc = 0; // only allocation type 0 at this stage |
1001 newDci.m_rbBitmap = 0; // TBD (32 bit bitmap see 7.1.6 of 36.213) | 1001 newDci.m_rbBitmap = 0; // TBD (32 bit bitmap see 7.1.6 of 36.213) |
1002 uint32_t rbgMask = 0; | 1002 uint32_t rbgMask = 0; |
1003 for (uint16_t k = 0; k < (*itMap).second.size (); k++) | 1003 for (uint16_t k = 0; k < (*itMap).second.size (); k++) |
1004 { | 1004 { |
1005 rbgMask = rbgMask + (0x1 << (*itMap).second.at (k)); | 1005 rbgMask = rbgMask + (0x1 << (*itMap).second.at (k)); |
1006 NS_LOG_INFO (this << " Allocated RBG " << (*itMap).second.at (k)); | 1006 NS_LOG_INFO (this << " Allocated RBG " << (*itMap).second.at (k)); |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1338 { | 1338 { |
1339 m_allocationMaps.insert (std::pair <uint16_t, std::vector <uint16_t> >
(params.m_sfnSf, rbgAllocationMap)); | 1339 m_allocationMaps.insert (std::pair <uint16_t, std::vector <uint16_t> >
(params.m_sfnSf, rbgAllocationMap)); |
1340 m_schedSapUser->SchedUlConfigInd (ret); | 1340 m_schedSapUser->SchedUlConfigInd (ret); |
1341 } | 1341 } |
1342 ········ | 1342 ········ |
1343 return; // no flows to be scheduled | 1343 return; // no flows to be scheduled |
1344 } | 1344 } |
1345 | 1345 |
1346 | 1346 |
1347 // Divide the remaining resources equally among the active users starting from
the subsequent one served last scheduling trigger | 1347 // Divide the remaining resources equally among the active users starting from
the subsequent one served last scheduling trigger |
1348 uint16_t rbPerFlow = static_cast<uint16_t>((m_cschedCellConfig.m_ulBandwidth /
(nflows + rntiAllocated.size ()))); | 1348 uint16_t rbPerFlow = static_cast<uint16_t> ((m_cschedCellConfig.m_ulBandwidth
/ (nflows + rntiAllocated.size ()))); |
1349 if (rbPerFlow < 3) | 1349 if (rbPerFlow < 3) |
1350 { | 1350 { |
1351 rbPerFlow = 3; // at least 3 rbg per flow (till available resource) to en
sure TxOpportunity >= 7 bytes | 1351 rbPerFlow = 3; // at least 3 rbg per flow (till available resource) to en
sure TxOpportunity >= 7 bytes |
1352 } | 1352 } |
1353 uint16_t rbAllocated = 0; | 1353 uint16_t rbAllocated = 0; |
1354 | 1354 |
1355 std::map <uint16_t, tdbetsFlowPerf_t>::iterator itStats; | 1355 std::map <uint16_t, tdbetsFlowPerf_t>::iterator itStats; |
1356 if (m_nextRntiUl != 0) | 1356 if (m_nextRntiUl != 0) |
1357 { | 1357 { |
1358 for (it = m_ceBsrRxed.begin (); it != m_ceBsrRxed.end (); it++) | 1358 for (it = m_ceBsrRxed.begin (); it != m_ceBsrRxed.end (); it++) |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1394 // at least 3 rbg per flow to ensure TxOpportunity >= 7 bytes | 1394 // at least 3 rbg per flow to ensure TxOpportunity >= 7 bytes |
1395 if (rbPerFlow < 3) | 1395 if (rbPerFlow < 3) |
1396 { | 1396 { |
1397 // terminate allocation | 1397 // terminate allocation |
1398 rbPerFlow = 0;······ | 1398 rbPerFlow = 0;······ |
1399 } | 1399 } |
1400 } | 1400 } |
1401 | 1401 |
1402 UlDciListElement_s uldci; | 1402 UlDciListElement_s uldci; |
1403 uldci.m_rnti = (*it).first; | 1403 uldci.m_rnti = (*it).first; |
1404 uldci.m_rbLen = static_cast<uint8_t>(rbPerFlow); | 1404 uldci.m_rbLen = static_cast<uint8_t> (rbPerFlow); |
1405 uldci.m_rbStart = 0; | 1405 uldci.m_rbStart = 0; |
1406 bool allocated = false; | 1406 bool allocated = false; |
1407 NS_LOG_INFO (this << " RB Allocated " << rbAllocated << " rbPerFlow " << r
bPerFlow << " flows " << nflows); | 1407 NS_LOG_INFO (this << " RB Allocated " << rbAllocated << " rbPerFlow " << r
bPerFlow << " flows " << nflows); |
1408 while ((!allocated)&&((rbAllocated + rbPerFlow - m_cschedCellConfig.m_ulBa
ndwidth) < 1) && (rbPerFlow != 0)) | 1408 while ((!allocated)&&((rbAllocated + rbPerFlow - m_cschedCellConfig.m_ulBa
ndwidth) < 1) && (rbPerFlow != 0)) |
1409 { | 1409 { |
1410 // check availability | 1410 // check availability |
1411 bool free = true; | 1411 bool free = true; |
1412 for (uint16_t j = rbAllocated; j < rbAllocated + rbPerFlow; j++) | 1412 for (uint16_t j = rbAllocated; j < rbAllocated + rbPerFlow; j++) |
1413 { | 1413 { |
1414 if (rbMap.at (j) == true) | 1414 if (rbMap.at (j) == true) |
1415 { | 1415 { |
1416 free = false; | 1416 free = false; |
1417 break; | 1417 break; |
1418 } | 1418 } |
1419 } | 1419 } |
1420 if (free) | 1420 if (free) |
1421 { | 1421 { |
1422 uldci.m_rbStart = static_cast<uint8_t>(rbAllocated); | 1422 uldci.m_rbStart = static_cast<uint8_t> (rbAllocated); |
1423 | 1423 |
1424 for (uint16_t j = rbAllocated; j < rbAllocated + rbPerFlow; j++) | 1424 for (uint16_t j = rbAllocated; j < rbAllocated + rbPerFlow; j++) |
1425 { | 1425 { |
1426 rbMap.at (j) = true; | 1426 rbMap.at (j) = true; |
1427 // store info on allocation for managing ul-cqi interpretation | 1427 // store info on allocation for managing ul-cqi interpretation |
1428 rbgAllocationMap.at (j) = (*it).first; | 1428 rbgAllocationMap.at (j) = (*it).first; |
1429 } | 1429 } |
1430 rbAllocated += rbPerFlow; | 1430 rbAllocated += rbPerFlow; |
1431 allocated = true; | 1431 allocated = true; |
1432 break; | 1432 break; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1503 // remove UE from allocation map | 1503 // remove UE from allocation map |
1504 for (uint16_t i = uldci.m_rbStart; i < uldci.m_rbStart + uldci.m_r
bLen; i++) | 1504 for (uint16_t i = uldci.m_rbStart; i < uldci.m_rbStart + uldci.m_r
bLen; i++) |
1505 { | 1505 { |
1506 rbgAllocationMap.at (i) = 0; | 1506 rbgAllocationMap.at (i) = 0; |
1507 } | 1507 } |
1508 continue; // CQI == 0 means "out of range" (see table 7.2.3-1 of 3
6.213) | 1508 continue; // CQI == 0 means "out of range" (see table 7.2.3-1 of 3
6.213) |
1509 } | 1509 } |
1510 uldci.m_mcs = m_amc->GetMcsFromCqi (cqi); | 1510 uldci.m_mcs = m_amc->GetMcsFromCqi (cqi); |
1511 } | 1511 } |
1512 | 1512 |
1513 uldci.m_tbSize = m_amc->GetTbSizeFromMcs (uldci.m_mcs, rbPerFlow) / 8; | 1513 uldci.m_tbSize = (m_amc->GetUlTbSizeFromMcs (uldci.m_mcs, rbPerFlow) / 8); |
1514 UpdateUlRlcBufferInfo (uldci.m_rnti, uldci.m_tbSize); | 1514 UpdateUlRlcBufferInfo (uldci.m_rnti, uldci.m_tbSize); |
1515 uldci.m_ndi = 1; | 1515 uldci.m_ndi = 1; |
1516 uldci.m_cceIndex = 0; | 1516 uldci.m_cceIndex = 0; |
1517 uldci.m_aggrLevel = 1; | 1517 uldci.m_aggrLevel = 1; |
1518 uldci.m_ueTxAntennaSelection = 3; // antenna selection OFF | 1518 uldci.m_ueTxAntennaSelection = 3; // antenna selection OFF |
1519 uldci.m_hopping = false; | 1519 uldci.m_hopping = false; |
1520 uldci.m_n2Dmrs = 0; | 1520 uldci.m_n2Dmrs = 0; |
1521 uldci.m_tpc = 0; // no power control | 1521 uldci.m_tpc = 0; // no power control |
1522 uldci.m_cqiRequest = false; // only period CQI at this stage | 1522 uldci.m_cqiRequest = false; // only period CQI at this stage |
1523 uldci.m_ulIndex = 0; // TDD parameter | 1523 uldci.m_ulIndex = 0; // TDD parameter |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1595 m_allocationMaps.insert (std::pair <uint16_t, std::vector <uint16_t> > (params
.m_sfnSf, rbgAllocationMap)); | 1595 m_allocationMaps.insert (std::pair <uint16_t, std::vector <uint16_t> > (params
.m_sfnSf, rbgAllocationMap)); |
1596 m_schedSapUser->SchedUlConfigInd (ret); | 1596 m_schedSapUser->SchedUlConfigInd (ret); |
1597 | 1597 |
1598 return; | 1598 return; |
1599 } | 1599 } |
1600 | 1600 |
1601 void | 1601 void |
1602 TdBetFfMacScheduler::DoSchedUlNoiseInterferenceReq (const struct FfMacSchedSapPr
ovider::SchedUlNoiseInterferenceReqParameters& params) | 1602 TdBetFfMacScheduler::DoSchedUlNoiseInterferenceReq (const struct FfMacSchedSapPr
ovider::SchedUlNoiseInterferenceReqParameters& params) |
1603 { | 1603 { |
1604 NS_LOG_FUNCTION (this); | 1604 NS_LOG_FUNCTION (this); |
1605 NS_UNUSED(params); | 1605 NS_UNUSED (params); |
1606 return; | 1606 return; |
1607 } | 1607 } |
1608 | 1608 |
1609 void | 1609 void |
1610 TdBetFfMacScheduler::DoSchedUlSrInfoReq (const struct FfMacSchedSapProvider::Sch
edUlSrInfoReqParameters& params) | 1610 TdBetFfMacScheduler::DoSchedUlSrInfoReq (const struct FfMacSchedSapProvider::Sch
edUlSrInfoReqParameters& params) |
1611 { | 1611 { |
1612 NS_LOG_FUNCTION (this); | 1612 NS_LOG_FUNCTION (this); |
1613 NS_UNUSED(params); | 1613 NS_UNUSED (params); |
1614 return; | 1614 return; |
1615 } | 1615 } |
1616 | 1616 |
1617 void | 1617 void |
1618 TdBetFfMacScheduler::DoSchedUlMacCtrlInfoReq (const struct FfMacSchedSapProvider
::SchedUlMacCtrlInfoReqParameters& params) | 1618 TdBetFfMacScheduler::DoSchedUlMacCtrlInfoReq (const struct FfMacSchedSapProvider
::SchedUlMacCtrlInfoReqParameters& params) |
1619 { | 1619 { |
1620 NS_LOG_FUNCTION (this); | 1620 NS_LOG_FUNCTION (this); |
1621 | 1621 |
1622 std::map <uint16_t,uint32_t>::iterator it; | 1622 std::map <uint16_t,uint32_t>::iterator it; |
1623 | 1623 |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1971 { | 1971 { |
1972 NS_LOG_FUNCTION (this << " RNTI " << rnti << " txMode " << (uint16_t)txMode); | 1972 NS_LOG_FUNCTION (this << " RNTI " << rnti << " txMode " << (uint16_t)txMode); |
1973 FfMacCschedSapUser::CschedUeConfigUpdateIndParameters params; | 1973 FfMacCschedSapUser::CschedUeConfigUpdateIndParameters params; |
1974 params.m_rnti = rnti; | 1974 params.m_rnti = rnti; |
1975 params.m_transmissionMode = txMode; | 1975 params.m_transmissionMode = txMode; |
1976 m_cschedSapUser->CschedUeConfigUpdateInd (params); | 1976 m_cschedSapUser->CschedUeConfigUpdateInd (params); |
1977 } | 1977 } |
1978 | 1978 |
1979 | 1979 |
1980 } | 1980 } |
LEFT | RIGHT |