OLD | NEW |
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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 return; | 181 return; |
182 } | 182 } |
183 | 183 |
184 void | 184 void |
185 FdTbfqFfMacScheduler::DoCschedUeConfigReq (const struct FfMacCschedSapProvider::
CschedUeConfigReqParameters& params) | 185 FdTbfqFfMacScheduler::DoCschedUeConfigReq (const struct FfMacCschedSapProvider::
CschedUeConfigReqParameters& params) |
186 { | 186 { |
187 NS_LOG_FUNCTION (this << " RNTI " << params.m_rnti << " txMode " << (uint16_t)
params.m_transmissionMode); | 187 NS_LOG_FUNCTION (this << " RNTI " << params.m_rnti << " txMode " << (uint16_t)
params.m_transmissionMode); |
188 std::map <uint16_t,uint8_t>::iterator it = m_uesTxMode.find (params.m_rnti); | 188 std::map <uint16_t,uint8_t>::iterator it = m_uesTxMode.find (params.m_rnti); |
189 if (it == m_uesTxMode.end ()) | 189 if (it == m_uesTxMode.end ()) |
190 { | 190 { |
191 m_uesTxMode.insert (std::pair <uint16_t, double> (params.m_rnti, params.m_
transmissionMode)); | 191 m_uesTxMode.insert (std::pair <uint16_t, uint8_t> (params.m_rnti, params.m
_transmissionMode)); |
192 // generate HARQ buffers | 192 // generate HARQ buffers |
193 m_dlHarqCurrentProcessId.insert (std::pair <uint16_t,uint8_t > (params.m_r
nti, 0)); | 193 m_dlHarqCurrentProcessId.insert (std::pair <uint16_t,uint8_t > (params.m_r
nti, 0)); |
194 DlHarqProcessesStatus_t dlHarqPrcStatus; | 194 DlHarqProcessesStatus_t dlHarqPrcStatus; |
195 dlHarqPrcStatus.resize (8,0); | 195 dlHarqPrcStatus.resize (8,0); |
196 m_dlHarqProcessesStatus.insert (std::pair <uint16_t, DlHarqProcessesStatus
_t> (params.m_rnti, dlHarqPrcStatus)); | 196 m_dlHarqProcessesStatus.insert (std::pair <uint16_t, DlHarqProcessesStatus
_t> (params.m_rnti, dlHarqPrcStatus)); |
197 DlHarqProcessesTimer_t dlHarqProcessesTimer; | 197 DlHarqProcessesTimer_t dlHarqProcessesTimer; |
198 dlHarqProcessesTimer.resize (8,0); | 198 dlHarqProcessesTimer.resize (8,0); |
199 m_dlHarqProcessesTimer.insert (std::pair <uint16_t, DlHarqProcessesTimer_t
> (params.m_rnti, dlHarqProcessesTimer)); | 199 m_dlHarqProcessesTimer.insert (std::pair <uint16_t, DlHarqProcessesTimer_t
> (params.m_rnti, dlHarqProcessesTimer)); |
200 DlHarqProcessesDciBuffer_t dlHarqdci; | 200 DlHarqProcessesDciBuffer_t dlHarqdci; |
201 dlHarqdci.resize (8); | 201 dlHarqdci.resize (8); |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 } | 360 } |
361 | 361 |
362 return; | 362 return; |
363 } | 363 } |
364 | 364 |
365 void | 365 void |
366 FdTbfqFfMacScheduler::DoSchedDlPagingBufferReq (const struct FfMacSchedSapProvid
er::SchedDlPagingBufferReqParameters& params) | 366 FdTbfqFfMacScheduler::DoSchedDlPagingBufferReq (const struct FfMacSchedSapProvid
er::SchedDlPagingBufferReqParameters& params) |
367 { | 367 { |
368 NS_LOG_FUNCTION (this); | 368 NS_LOG_FUNCTION (this); |
369 NS_FATAL_ERROR ("method not implemented"); | 369 NS_FATAL_ERROR ("method not implemented"); |
| 370 NS_UNUSED(params); |
370 return; | 371 return; |
371 } | 372 } |
372 | 373 |
373 void | 374 void |
374 FdTbfqFfMacScheduler::DoSchedDlMacBufferReq (const struct FfMacSchedSapProvider:
:SchedDlMacBufferReqParameters& params) | 375 FdTbfqFfMacScheduler::DoSchedDlMacBufferReq (const struct FfMacSchedSapProvider:
:SchedDlMacBufferReqParameters& params) |
375 { | 376 { |
376 NS_LOG_FUNCTION (this); | 377 NS_LOG_FUNCTION (this); |
377 NS_FATAL_ERROR ("method not implemented"); | 378 NS_FATAL_ERROR ("method not implemented"); |
| 379 NS_UNUSED(params); |
378 return; | 380 return; |
379 } | 381 } |
380 | 382 |
381 int | 383 int |
382 FdTbfqFfMacScheduler::GetRbgSize (int dlbandwidth) | 384 FdTbfqFfMacScheduler::GetRbgSize (int dlbandwidth) |
383 { | 385 { |
384 for (int i = 0; i < 4; i++) | 386 for (int i = 0; i < 4; i++) |
385 { | 387 { |
386 if (dlbandwidth < FdTbfqType0AllocationRbg[i]) | 388 if (dlbandwidth < FdTbfqType0AllocationRbg[i]) |
387 { | 389 { |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 NS_LOG_FUNCTION (this << " Frame no. " << (params.m_sfnSf >> 4) << " subframe
no. " << (0xF & params.m_sfnSf)); | 531 NS_LOG_FUNCTION (this << " Frame no. " << (params.m_sfnSf >> 4) << " subframe
no. " << (0xF & params.m_sfnSf)); |
530 // API generated by RLC for triggering the scheduling of a DL subframe | 532 // API generated by RLC for triggering the scheduling of a DL subframe |
531 | 533 |
532 | 534 |
533 // evaluate the relative channel quality indicator for each UE per each RBG | 535 // evaluate the relative channel quality indicator for each UE per each RBG |
534 // (since we are using allocation type 0 the small unit of allocation is RBG) | 536 // (since we are using allocation type 0 the small unit of allocation is RBG) |
535 // Resource allocation type 0 (see sec 7.1.6.1 of 36.213) | 537 // Resource allocation type 0 (see sec 7.1.6.1 of 36.213) |
536 | 538 |
537 RefreshDlCqiMaps (); | 539 RefreshDlCqiMaps (); |
538 | 540 |
539 int rbgSize = GetRbgSize (m_cschedCellConfig.m_dlBandwidth); | 541 uint16_t rbgSize = static_cast<uint16_t>(GetRbgSize (m_cschedCellConfig.m_dlBa
ndwidth)); |
540 int rbgNum = m_cschedCellConfig.m_dlBandwidth / rbgSize; | 542 uint16_t rbgNum = m_cschedCellConfig.m_dlBandwidth / rbgSize; |
541 std::map <uint16_t, std::vector <uint16_t> > allocationMap; // RBs map per RNT
I | 543 std::map <uint16_t, std::vector <uint16_t> > allocationMap; // RBs map per RNT
I |
542 std::vector <bool> rbgMap; // global RBGs map | 544 std::vector <bool> rbgMap; // global RBGs map |
543 uint16_t rbgAllocatedNum = 0; | 545 uint16_t rbgAllocatedNum = 0; |
544 std::set <uint16_t> rntiAllocated; | 546 std::set <uint16_t> rntiAllocated; |
545 rbgMap.resize (m_cschedCellConfig.m_dlBandwidth / rbgSize, false); | 547 rbgMap.resize (m_cschedCellConfig.m_dlBandwidth / rbgSize, false); |
546 | 548 |
547 rbgMap = m_ffrSapProvider->GetAvailableDlRbg (); | 549 rbgMap = m_ffrSapProvider->GetAvailableDlRbg (); |
548 for (std::vector<bool>::iterator it = rbgMap.begin (); it != rbgMap.end (); it
++) | 550 for (std::vector<bool>::iterator it = rbgMap.begin (); it != rbgMap.end (); it
++) |
549 { | 551 { |
550 if ((*it) == true ) | 552 if ((*it) == true ) |
551 { | 553 { |
552 rbgAllocatedNum++; | 554 rbgAllocatedNum++; |
553 } | 555 } |
554 } | 556 } |
555 | 557 |
556 FfMacSchedSapUser::SchedDlConfigIndParameters ret; | 558 FfMacSchedSapUser::SchedDlConfigIndParameters ret; |
557 | 559 |
558 // update UL HARQ proc id | 560 // update UL HARQ proc id |
559 std::map <uint16_t, uint8_t>::iterator itProcId; | 561 for (std::map <uint16_t, uint8_t>::iterator itProcId = m_ulHarqCurrentProcessI
d.begin (); itProcId != m_ulHarqCurrentProcessId.end (); itProcId++) |
560 for (itProcId = m_ulHarqCurrentProcessId.begin (); itProcId != m_ulHarqCurrent
ProcessId.end (); itProcId++) | |
561 { | 562 { |
562 (*itProcId).second = ((*itProcId).second + 1) % HARQ_PROC_NUM; | 563 (*itProcId).second = ((*itProcId).second + 1) % HARQ_PROC_NUM; |
563 } | 564 } |
564 | 565 |
565 // RACH Allocation | 566 // RACH Allocation |
566 uint16_t rbAllocatedNum = 0; | 567 uint16_t rbAllocatedNum = 0; |
567 std::vector <bool> ulRbMap; | 568 std::vector <bool> ulRbMap; |
568 ulRbMap.resize (m_cschedCellConfig.m_ulBandwidth, false); | 569 ulRbMap.resize (m_cschedCellConfig.m_ulBandwidth, false); |
569 ulRbMap = m_ffrSapProvider->GetAvailableUlRbg (); | 570 ulRbMap = m_ffrSapProvider->GetAvailableUlRbg (); |
570 uint8_t maxContinuousUlBandwidth = 0; | 571 uint8_t maxContinuousUlBandwidth = 0; |
571 uint8_t tmpMinBandwidth = 0; | 572 uint8_t tmpMinBandwidth = 0; |
572 uint16_t ffrRbStartOffset = 0; | 573 uint8_t ffrRbStartOffset = 0; |
573 uint16_t tmpFfrRbStartOffset = 0; | 574 uint8_t tmpFfrRbStartOffset = 0; |
574 uint16_t index = 0; | 575 uint8_t index = 0; |
575 | 576 |
576 for (std::vector<bool>::iterator it = ulRbMap.begin (); it != ulRbMap.end ();
it++) | 577 for (std::vector<bool>::iterator it = ulRbMap.begin (); it != ulRbMap.end ();
it++) |
577 { | 578 { |
578 if ((*it) == true ) | 579 if ((*it) == true ) |
579 { | 580 { |
580 rbAllocatedNum++; | 581 rbAllocatedNum++; |
581 if (tmpMinBandwidth > maxContinuousUlBandwidth) | 582 if (tmpMinBandwidth > maxContinuousUlBandwidth) |
582 { | 583 { |
583 maxContinuousUlBandwidth = tmpMinBandwidth; | 584 maxContinuousUlBandwidth = tmpMinBandwidth; |
584 ffrRbStartOffset = tmpFfrRbStartOffset; | 585 ffrRbStartOffset = tmpFfrRbStartOffset; |
(...skipping 11 matching lines...) Expand all Loading... |
596 index++; | 597 index++; |
597 } | 598 } |
598 | 599 |
599 if (tmpMinBandwidth > maxContinuousUlBandwidth) | 600 if (tmpMinBandwidth > maxContinuousUlBandwidth) |
600 { | 601 { |
601 maxContinuousUlBandwidth = tmpMinBandwidth; | 602 maxContinuousUlBandwidth = tmpMinBandwidth; |
602 ffrRbStartOffset = tmpFfrRbStartOffset; | 603 ffrRbStartOffset = tmpFfrRbStartOffset; |
603 } | 604 } |
604 | 605 |
605 m_rachAllocationMap.resize (m_cschedCellConfig.m_ulBandwidth, 0); | 606 m_rachAllocationMap.resize (m_cschedCellConfig.m_ulBandwidth, 0); |
606 uint16_t rbStart = 0; | 607 uint8_t rbStart = 0; |
607 rbStart = ffrRbStartOffset; | 608 rbStart = ffrRbStartOffset; |
608 std::vector <struct RachListElement_s>::iterator itRach; | 609 std::vector <struct RachListElement_s>::iterator itRach; |
609 for (itRach = m_rachList.begin (); itRach != m_rachList.end (); itRach++) | 610 for (itRach = m_rachList.begin (); itRach != m_rachList.end (); itRach++) |
610 { | 611 { |
611 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"); | 612 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"); |
612 BuildRarListElement_s newRar; | 613 BuildRarListElement_s newRar; |
613 newRar.m_rnti = (*itRach).m_rnti; | 614 newRar.m_rnti = (*itRach).m_rnti; |
614 // DL-RACH Allocation | 615 // DL-RACH Allocation |
615 // Ideal: no needs of configuring m_dci | 616 // Ideal: no needs of configuring m_dci |
616 // UL-RACH Allocation | 617 // UL-RACH Allocation |
617 newRar.m_grant.m_rnti = newRar.m_rnti; | 618 newRar.m_grant.m_rnti = newRar.m_rnti; |
618 newRar.m_grant.m_mcs = m_ulGrantMcs; | 619 newRar.m_grant.m_mcs = m_ulGrantMcs; |
619 uint16_t rbLen = 1; | 620 uint8_t rbLen = 1; |
620 uint16_t tbSizeBits = 0; | 621 uint16_t tbSizeBits = 0; |
621 // find lowest TB size that fits UL grant estimated size | 622 // find lowest TB size that fits UL grant estimated size |
622 while ((tbSizeBits < (*itRach).m_estimatedSize) && (rbStart + rbLen < (ffr
RbStartOffset + maxContinuousUlBandwidth))) | 623 while ((tbSizeBits < (*itRach).m_estimatedSize) && (rbStart + rbLen < (ffr
RbStartOffset + maxContinuousUlBandwidth))) |
623 { | 624 { |
624 rbLen++; | 625 rbLen++; |
625 tbSizeBits = m_amc->GetUlTbSizeFromMcs (m_ulGrantMcs, rbLen); | 626 tbSizeBits = m_amc->GetUlTbSizeFromMcs (m_ulGrantMcs, rbLen); |
626 } | 627 } |
627 if (tbSizeBits < (*itRach).m_estimatedSize) | 628 if (tbSizeBits < (*itRach).m_estimatedSize) |
628 { | 629 { |
629 // no more allocation space: finish allocation | 630 // no more allocation space: finish allocation |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
711 } | 712 } |
712 std::vector <struct DlInfoListElement_s> dlInfoListUntxed; | 713 std::vector <struct DlInfoListElement_s> dlInfoListUntxed; |
713 for (uint16_t i = 0; i < m_dlInfoListBuffered.size (); i++) | 714 for (uint16_t i = 0; i < m_dlInfoListBuffered.size (); i++) |
714 { | 715 { |
715 std::set <uint16_t>::iterator itRnti = rntiAllocated.find (m_dlInfoListBuf
fered.at (i).m_rnti); | 716 std::set <uint16_t>::iterator itRnti = rntiAllocated.find (m_dlInfoListBuf
fered.at (i).m_rnti); |
716 if (itRnti != rntiAllocated.end ()) | 717 if (itRnti != rntiAllocated.end ()) |
717 { | 718 { |
718 // RNTI already allocated for retx | 719 // RNTI already allocated for retx |
719 continue; | 720 continue; |
720 } | 721 } |
721 uint8_t nLayers = m_dlInfoListBuffered.at (i).m_harqStatus.size (); | 722 uint8_t nLayers = static_cast<uint8_t>(m_dlInfoListBuffered.at (i).m_harqS
tatus.size ()); |
722 std::vector <bool> retx; | 723 std::vector <bool> retx; |
723 NS_LOG_INFO (this << " Processing DLHARQ feedback"); | 724 NS_LOG_INFO (this << " Processing DLHARQ feedback"); |
724 if (nLayers == 1) | 725 if (nLayers == 1) |
725 { | 726 { |
726 retx.push_back (m_dlInfoListBuffered.at (i).m_harqStatus.at (0) == DlI
nfoListElement_s::NACK); | 727 retx.push_back (m_dlInfoListBuffered.at (i).m_harqStatus.at (0) == DlI
nfoListElement_s::NACK); |
727 retx.push_back (false); | 728 retx.push_back (false); |
728 } | 729 } |
729 else | 730 else |
730 { | 731 { |
731 retx.push_back (m_dlInfoListBuffered.at (i).m_harqStatus.at (0) == DlI
nfoListElement_s::NACK); | 732 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... |
808 NS_LOG_INFO ("RBG " << dciRbg.at (j) << " assigned"); | 809 NS_LOG_INFO ("RBG " << dciRbg.at (j) << " assigned"); |
809 rbgAllocatedNum++; | 810 rbgAllocatedNum++; |
810 } | 811 } |
811 | 812 |
812 NS_LOG_INFO (this << " Send retx in the same RBGs"); | 813 NS_LOG_INFO (this << " Send retx in the same RBGs"); |
813 } | 814 } |
814 else | 815 else |
815 { | 816 { |
816 // find RBGs for sending HARQ retx | 817 // find RBGs for sending HARQ retx |
817 uint8_t j = 0; | 818 uint8_t j = 0; |
818 uint8_t rbgId = (dciRbg.at (dciRbg.size () - 1) + 1) % rbgNum; | 819 uint8_t rbgId = static_cast<uint8_t>((dciRbg.at (dciRbg.size () -
1) + 1) % rbgNum); |
819 uint8_t startRbg = dciRbg.at (dciRbg.size () - 1); | 820 uint8_t startRbg = static_cast<uint8_t>(dciRbg.at (dciRbg.size ()
- 1)); |
820 std::vector <bool> rbgMapCopy = rbgMap; | 821 std::vector <bool> rbgMapCopy = rbgMap; |
821 while ((j < dciRbg.size ())&&(startRbg != rbgId)) | 822 while ((j < dciRbg.size ())&&(startRbg != rbgId)) |
822 { | 823 { |
823 if (rbgMapCopy.at (rbgId) == false) | 824 if (rbgMapCopy.at (rbgId) == false) |
824 { | 825 { |
825 rbgMapCopy.at (rbgId) = true; | 826 rbgMapCopy.at (rbgId) = true; |
826 dciRbg.at (j) = rbgId; | 827 dciRbg.at (j) = rbgId; |
827 j++; | 828 j++; |
828 } | 829 } |
829 rbgId = (rbgId + 1) % rbgNum; | 830 rbgId = (rbgId + 1) % rbgNum; |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
960 } | 961 } |
961 return; | 962 return; |
962 } | 963 } |
963 | 964 |
964 // update token pool, counter and bank size | 965 // update token pool, counter and bank size |
965 std::map <uint16_t, fdtbfqsFlowPerf_t>::iterator itStats; | 966 std::map <uint16_t, fdtbfqsFlowPerf_t>::iterator itStats; |
966 for (itStats = m_flowStatsDl.begin (); itStats != m_flowStatsDl.end (); itStat
s++) | 967 for (itStats = m_flowStatsDl.begin (); itStats != m_flowStatsDl.end (); itStat
s++) |
967 { | 968 { |
968 if ( (*itStats).second.tokenGenerationRate / 1000 + (*itStats).second.tok
enPoolSize > (*itStats).second.maxTokenPoolSize )····· | 969 if ( (*itStats).second.tokenGenerationRate / 1000 + (*itStats).second.tok
enPoolSize > (*itStats).second.maxTokenPoolSize )····· |
969 { | 970 { |
970 (*itStats).second.counter += (*itStats).second.tokenGenerationRate /
1000 - ( (*itStats).second.maxTokenPoolSize - (*itStats).second.tokenPoolSize )
; | 971 (*itStats).second.counter += static_cast<int>((*itStats).second.tokenG
enerationRate / 1000 - ( (*itStats).second.maxTokenPoolSize - (*itStats).second
.tokenPoolSize )); |
971 (*itStats).second.tokenPoolSize = (*itStats).second.maxTokenPoolSize; | 972 (*itStats).second.tokenPoolSize = (*itStats).second.maxTokenPoolSize; |
972 bankSize += (*itStats).second.tokenGenerationRate / 1000 - ( (*itStats
).second.maxTokenPoolSize - (*itStats).second.tokenPoolSize ); | 973 bankSize += (*itStats).second.tokenGenerationRate / 1000 - ( (*itStats
).second.maxTokenPoolSize - (*itStats).second.tokenPoolSize ); |
973 } | 974 } |
974 else | 975 else |
975 { | 976 { |
976 (*itStats).second.tokenPoolSize += (*itStats).second.tokenGenerationRa
te / 1000; | 977 (*itStats).second.tokenPoolSize += static_cast<uint32_t>((*itStats).se
cond.tokenGenerationRate / 1000); |
977 } | 978 } |
978 } | 979 } |
979 | 980 |
980 std::set <uint16_t> allocatedRnti; // store UEs which are already assigned R
BGs | 981 std::set <uint16_t> allocatedRnti; // store UEs which are already assigned R
BGs |
981 std::set <uint8_t> allocatedRbg; // store RBGs which are already allocated to
UE | 982 std::set <uint8_t> allocatedRbg; // store RBGs which are already allocated to
UE |
982 | 983 |
983 int totalRbg = 0; | 984 int totalRbg = 0; |
984 while (totalRbg < rbgNum) | 985 while (totalRbg < rbgNum) |
985 { | 986 { |
986 // select UE with largest metric | 987 // select UE with largest metric |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1075 allocatedRnti.insert((*itMax).first); | 1076 allocatedRnti.insert((*itMax).first); |
1076 | 1077 |
1077 // calculate the maximum number of byte that the scheduler can assigned to
this UE | 1078 // calculate the maximum number of byte that the scheduler can assigned to
this UE |
1078 uint32_t budget = 0; | 1079 uint32_t budget = 0; |
1079 if ( bankSize > 0 ) | 1080 if ( bankSize > 0 ) |
1080 { | 1081 { |
1081 budget = (*itMax).second.counter - (*itMax).second.debtLimit; | 1082 budget = (*itMax).second.counter - (*itMax).second.debtLimit; |
1082 if ( budget > (*itMax).second.burstCredit ) | 1083 if ( budget > (*itMax).second.burstCredit ) |
1083 budget = (*itMax).second.burstCredit; | 1084 budget = (*itMax).second.burstCredit; |
1084 if ( budget > bankSize ) | 1085 if ( budget > bankSize ) |
1085 budget = bankSize; | 1086 budget = static_cast<uint32_t>(bankSize); |
1086 } | 1087 } |
1087 budget = budget + (*itMax).second.tokenPoolSize; | 1088 budget = budget + (*itMax).second.tokenPoolSize; |
1088 | 1089 |
1089 // calcualte how much bytes this UE actally need | 1090 // calcualte how much bytes this UE actally need |
1090 if (budget == 0) | 1091 if (budget == 0) |
1091 { | 1092 { |
1092 // there are no tokens for this UE | 1093 // there are no tokens for this UE |
1093 continue; | 1094 continue; |
1094 } | 1095 } |
1095 else· | 1096 else· |
(...skipping 11 matching lines...) Expand all Loading... |
1107 itRlcBuf = m_rlcBufferReq.find (flow); | 1108 itRlcBuf = m_rlcBufferReq.find (flow); |
1108 if (itRlcBuf!=m_rlcBufferReq.end ()) | 1109 if (itRlcBuf!=m_rlcBufferReq.end ()) |
1109 rlcBufSize = (*itRlcBuf).second.m_rlcTransmissionQueueSize + (*itRlc
Buf).second.m_rlcRetransmissionQueueSize + (*itRlcBuf).second.m_rlcStatusPduSize
; | 1110 rlcBufSize = (*itRlcBuf).second.m_rlcTransmissionQueueSize + (*itRlc
Buf).second.m_rlcRetransmissionQueueSize + (*itRlcBuf).second.m_rlcStatusPduSize
; |
1110 if ( budget > rlcBufSize ) | 1111 if ( budget > rlcBufSize ) |
1111 budget = rlcBufSize; | 1112 budget = rlcBufSize; |
1112 } | 1113 } |
1113 | 1114 |
1114 // assign RBGs to this UE· | 1115 // assign RBGs to this UE· |
1115 uint32_t bytesTxed = 0; | 1116 uint32_t bytesTxed = 0; |
1116 uint32_t bytesTxedTmp = 0; | 1117 uint32_t bytesTxedTmp = 0; |
1117 int rbgIndex = 0; | 1118 uint16_t rbgIndex = 0; |
1118 while ( bytesTxed <= budget ) | 1119 while ( bytesTxed <= budget ) |
1119 { | 1120 { |
1120 totalRbg++; | 1121 totalRbg++; |
1121 | 1122 |
1122 std::map <uint16_t,SbMeasResult_s>::iterator itCqi; | 1123 std::map <uint16_t,SbMeasResult_s>::iterator itCqi; |
1123 itCqi = m_a30CqiRxed.find ((*itMax).first); | 1124 itCqi = m_a30CqiRxed.find ((*itMax).first); |
1124 std::map <uint16_t,uint8_t>::iterator itTxMode; | 1125 std::map <uint16_t,uint8_t>::iterator itTxMode; |
1125 itTxMode = m_uesTxMode.find ((*itMax).first); | 1126 itTxMode = m_uesTxMode.find ((*itMax).first); |
1126 if (itTxMode == m_uesTxMode.end ()) | 1127 if (itTxMode == m_uesTxMode.end ()) |
1127 { | 1128 { |
1128 NS_FATAL_ERROR ("No Transmission Mode info on user " << (*it).firs
t); | 1129 NS_FATAL_ERROR ("No Transmission Mode info on user " << (*it).firs
t); |
1129 } | 1130 } |
1130 int nLayer = TransmissionModesLayers::TxMode2LayerNum ((*itTxMode).sec
ond); | 1131 int nLayer = TransmissionModesLayers::TxMode2LayerNum ((*itTxMode).sec
ond); |
1131 | 1132 |
1132 // find RBG with largest achievableRate | 1133 // find RBG with largest achievableRate |
1133 double achievableRateMax = 0.0; | 1134 double achievableRateMax = 0.0; |
1134 rbgIndex = rbgNum; | 1135 rbgIndex = rbgNum; |
1135 for (int k = 0; k < rbgNum; k++) | 1136 for (uint8_t k = 0; k < rbgNum; k++) |
1136 { | 1137 { |
1137 std::set <uint8_t>::iterator rbg; | 1138 std::set <uint8_t>::iterator rbg; |
1138 rbg = allocatedRbg.find (k); | 1139 rbg = allocatedRbg.find (k); |
1139 if (rbg != allocatedRbg.end ()) // RBGs are already allocated to
this UE | 1140 if (rbg != allocatedRbg.end ()) // RBGs are already allocated to
this UE |
1140 continue; | 1141 continue; |
1141 | 1142 |
1142 if ( rbgMap.at (k) == true) // this RBG is allocated in RACH proce
dure | 1143 if ( rbgMap.at (k) == true) // this RBG is allocated in RACH proce
dure |
1143 continue; | 1144 continue; |
1144 | 1145 |
1145 if ((m_ffrSapProvider->IsDlRbgAvailableForUe (k, (*itMax).first))
== false) | 1146 if ((m_ffrSapProvider->IsDlRbgAvailableForUe (k, (*itMax).first))
== false) |
1146 continue; | 1147 continue; |
1147 | 1148 |
1148 std::vector <uint8_t> sbCqi; | 1149 std::vector <uint8_t> sbCqi; |
1149 if (itCqi == m_a30CqiRxed.end ()) | 1150 if (itCqi == m_a30CqiRxed.end ()) |
1150 { | 1151 { |
1151 for (uint8_t k = 0; k < nLayer; k++) | 1152 for (uint8_t l = 0; l < nLayer; l++) |
1152 { | 1153 { |
1153 sbCqi.push_back (1); // start with lowest value | 1154 sbCqi.push_back (1); // start with lowest value |
1154 } | 1155 } |
1155 } | 1156 } |
1156 else | 1157 else |
1157 { | 1158 { |
1158 sbCqi = (*itCqi).second.m_higherLayerSelected.at (k).m_sbCqi; | 1159 sbCqi = (*itCqi).second.m_higherLayerSelected.at (k).m_sbCqi; |
1159 } | 1160 } |
1160 uint8_t cqi1 = sbCqi.at (0); | 1161 uint8_t cqi1 = sbCqi.at (0); |
1161 uint8_t cqi2 = 0; | 1162 uint8_t cqi2 = 0; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1196 | 1197 |
1197 if ( rbgIndex == rbgNum) // impossible | 1198 if ( rbgIndex == rbgNum) // impossible |
1198 { | 1199 { |
1199 // all RBGs are already assigned | 1200 // all RBGs are already assigned |
1200 totalRbg = rbgNum; | 1201 totalRbg = rbgNum; |
1201 break; | 1202 break; |
1202 } | 1203 } |
1203 else | 1204 else |
1204 { | 1205 { |
1205 // mark this UE as "allocated" | 1206 // mark this UE as "allocated" |
1206 allocatedRbg.insert (rbgIndex); | 1207 allocatedRbg.insert (static_cast<uint8_t>(rbgIndex)); |
1207 } | 1208 } |
1208 | 1209 |
1209 // assign this RBG to UE | 1210 // assign this RBG to UE |
1210 std::map <uint16_t, std::vector <uint16_t> >::iterator itMap; | 1211 std::map <uint16_t, std::vector <uint16_t> >::iterator itMap; |
1211 itMap = allocationMap.find ((*itMax).first); | 1212 itMap = allocationMap.find ((*itMax).first); |
1212 uint16_t RbgPerRnti; | 1213 uint16_t RbgPerRnti; |
1213 if (itMap == allocationMap.end ()) | 1214 if (itMap == allocationMap.end ()) |
1214 { | 1215 { |
1215 // insert new element | 1216 // insert new element |
1216 std::vector <uint16_t> tempMap; | 1217 std::vector <uint16_t> tempMap; |
1217 tempMap.push_back (rbgIndex); | 1218 tempMap.push_back (rbgIndex); |
1218 allocationMap.insert (std::pair <uint16_t, std::vector <uint16_t>
> ((*itMax).first, tempMap)); | 1219 allocationMap.insert (std::pair <uint16_t, std::vector <uint16_t>
> ((*itMax).first, tempMap)); |
1219 itMap = allocationMap.find ((*itMax).first); // point itMap to th
e first RBGs assigned to this UE | 1220 itMap = allocationMap.find ((*itMax).first); // point itMap to th
e first RBGs assigned to this UE |
1220 } | 1221 } |
1221 else | 1222 else |
1222 { | 1223 { |
1223 (*itMap).second.push_back (rbgIndex); | 1224 (*itMap).second.push_back (rbgIndex); |
1224 } | 1225 } |
1225 rbgMap.at (rbgIndex) = true; // Mark this RBG as allocated | 1226 rbgMap.at (rbgIndex) = true; // Mark this RBG as allocated |
1226 · | 1227 · |
1227 RbgPerRnti = (*itMap).second.size(); | 1228 RbgPerRnti = static_cast<uint16_t>((*itMap).second.size()); |
1228 | 1229 |
1229 // calculate tb size | 1230 // calculate tb size |
1230 std::vector <uint8_t> worstCqi (2, 15); | 1231 std::vector <uint8_t> worstCqi (2, 15); |
1231 if (itCqi != m_a30CqiRxed.end ()) | 1232 if (itCqi != m_a30CqiRxed.end ()) |
1232 { | 1233 { |
1233 for (uint16_t k = 0; k < (*itMap).second.size (); k++) | 1234 for (uint16_t k = 0; k < (*itMap).second.size (); k++) |
1234 { | 1235 { |
1235 if ((*itCqi).second.m_higherLayerSelected.size () > (*itMap).s
econd.at (k)) | 1236 if ((*itCqi).second.m_higherLayerSelected.size () > (*itMap).s
econd.at (k)) |
1236 { | 1237 { |
1237 for (uint8_t j = 0; j < nLayer; j++)· | 1238 for (uint8_t j = 0; j < nLayer; j++)· |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1276 } | 1277 } |
1277 | 1278 |
1278 } // end of while() | 1279 } // end of while() |
1279 | 1280 |
1280 // remove and unmark last RBG assigned to UE | 1281 // remove and unmark last RBG assigned to UE |
1281 if ( bytesTxed > budget ) | 1282 if ( bytesTxed > budget ) |
1282 { | 1283 { |
1283 std::map <uint16_t, std::vector <uint16_t> >::iterator itMap; | 1284 std::map <uint16_t, std::vector <uint16_t> >::iterator itMap; |
1284 itMap = allocationMap.find ((*itMax).first); | 1285 itMap = allocationMap.find ((*itMax).first); |
1285 (*itMap).second.pop_back (); | 1286 (*itMap).second.pop_back (); |
1286 allocatedRbg.erase (rbgIndex); | 1287 allocatedRbg.erase (static_cast<uint8_t>(rbgIndex)); |
1287 bytesTxed = bytesTxedTmp; // recovery bytesTxed | 1288 bytesTxed = bytesTxedTmp; // recovery bytesTxed |
1288 totalRbg--; | 1289 totalRbg--; |
1289 rbgMap.at (rbgIndex) = false; // unmark this RBG | 1290 rbgMap.at (rbgIndex) = false; // unmark this RBG |
1290 } | 1291 } |
1291 | 1292 |
1292 // update UE stats | 1293 // update UE stats |
1293 if ( bytesTxed <= (*itMax).second.tokenPoolSize ) | 1294 if ( bytesTxed <= (*itMax).second.tokenPoolSize ) |
1294 { | 1295 { |
1295 (*itMax).second.tokenPoolSize -= bytesTxed; | 1296 (*itMax).second.tokenPoolSize -= bytesTxed; |
1296 } | 1297 } |
(...skipping 14 matching lines...) Expand all Loading... |
1311 while (itMap != allocationMap.end ()) | 1312 while (itMap != allocationMap.end ()) |
1312 { | 1313 { |
1313 // create new BuildDataListElement_s for this LC | 1314 // create new BuildDataListElement_s for this LC |
1314 BuildDataListElement_s newEl; | 1315 BuildDataListElement_s newEl; |
1315 newEl.m_rnti = (*itMap).first; | 1316 newEl.m_rnti = (*itMap).first; |
1316 // create the DlDciListElement_s | 1317 // create the DlDciListElement_s |
1317 DlDciListElement_s newDci; | 1318 DlDciListElement_s newDci; |
1318 newDci.m_rnti = (*itMap).first; | 1319 newDci.m_rnti = (*itMap).first; |
1319 newDci.m_harqProcess = UpdateHarqProcessId ((*itMap).first); | 1320 newDci.m_harqProcess = UpdateHarqProcessId ((*itMap).first); |
1320 | 1321 |
1321 uint16_t lcActives = LcActivePerFlow ((*itMap).first); | 1322 uint16_t lcActives = static_cast<uint16_t>(LcActivePerFlow ((*itMap).first
)); |
1322 NS_LOG_INFO (this << "Allocate user " << newEl.m_rnti << " rbg " << lcActi
ves); | 1323 NS_LOG_INFO (this << "Allocate user " << newEl.m_rnti << " rbg " << lcActi
ves); |
1323 if (lcActives == 0) | 1324 if (lcActives == 0) |
1324 { | 1325 { |
1325 // Set to max value, to avoid divide by 0 below | 1326 // Set to max value, to avoid divide by 0 below |
1326 lcActives = (uint16_t)65535; // UINT16_MAX; | 1327 lcActives = (uint16_t)65535; // UINT16_MAX; |
1327 } | 1328 } |
1328 uint16_t RgbPerRnti = (*itMap).second.size (); | 1329 uint16_t RgbPerRnti = static_cast<uint16_t>((*itMap).second.size ()); |
1329 std::map <uint16_t,SbMeasResult_s>::iterator itCqi; | 1330 std::map <uint16_t,SbMeasResult_s>::iterator itCqi; |
1330 itCqi = m_a30CqiRxed.find ((*itMap).first); | 1331 itCqi = m_a30CqiRxed.find ((*itMap).first); |
1331 std::map <uint16_t,uint8_t>::iterator itTxMode; | 1332 std::map <uint16_t,uint8_t>::iterator itTxMode; |
1332 itTxMode = m_uesTxMode.find ((*itMap).first); | 1333 itTxMode = m_uesTxMode.find ((*itMap).first); |
1333 if (itTxMode == m_uesTxMode.end ()) | 1334 if (itTxMode == m_uesTxMode.end ()) |
1334 { | 1335 { |
1335 NS_FATAL_ERROR ("No Transmission Mode info on user " << (*itMap).first
); | 1336 NS_FATAL_ERROR ("No Transmission Mode info on user " << (*itMap).first
); |
1336 } | 1337 } |
1337 int nLayer = TransmissionModesLayers::TxMode2LayerNum ((*itTxMode).second)
; | 1338 int nLayer = TransmissionModesLayers::TxMode2LayerNum ((*itTxMode).second)
; |
1338 std::vector <uint8_t> worstCqi (2, 15); | 1339 std::vector <uint8_t> worstCqi (2, 15); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1377 } | 1378 } |
1378 for (uint8_t j = 0; j < nLayer; j++) | 1379 for (uint8_t j = 0; j < nLayer; j++) |
1379 { | 1380 { |
1380 NS_LOG_INFO (this << " Layer " << (uint16_t)j << " CQI selected " << (
uint16_t)worstCqi.at (j)); | 1381 NS_LOG_INFO (this << " Layer " << (uint16_t)j << " CQI selected " << (
uint16_t)worstCqi.at (j)); |
1381 } | 1382 } |
1382 uint32_t bytesTxed = 0; | 1383 uint32_t bytesTxed = 0; |
1383 for (uint8_t j = 0; j < nLayer; j++) | 1384 for (uint8_t j = 0; j < nLayer; j++) |
1384 { | 1385 { |
1385 newDci.m_mcs.push_back (m_amc->GetMcsFromCqi (worstCqi.at (j))); | 1386 newDci.m_mcs.push_back (m_amc->GetMcsFromCqi (worstCqi.at (j))); |
1386 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) | 1387 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) |
1387 newDci.m_tbsSize.push_back (tbSize); | 1388 newDci.m_tbsSize.push_back (static_cast<uint16_t>(tbSize)); |
1388 NS_LOG_INFO (this << " Layer " << (uint16_t)j << " MCS selected" << m_
amc->GetMcsFromCqi (worstCqi.at (j))); | 1389 NS_LOG_INFO (this << " Layer " << (uint16_t)j << " MCS selected" << m_
amc->GetMcsFromCqi (worstCqi.at (j))); |
1389 bytesTxed += tbSize; | 1390 bytesTxed += tbSize; |
1390 } | 1391 } |
1391 | 1392 |
1392 newDci.m_resAlloc = 0; // only allocation type 0 at this stage | 1393 newDci.m_resAlloc = 0; // only allocation type 0 at this stage |
1393 newDci.m_rbBitmap = 0; // TBD (32 bit bitmap see 7.1.6 of 36.213) | 1394 newDci.m_rbBitmap = 0; // TBD (32 bit bitmap see 7.1.6 of 36.213) |
1394 uint32_t rbgMask = 0; | 1395 uint32_t rbgMask = 0; |
1395 for (uint16_t k = 0; k < (*itMap).second.size (); k++) | 1396 for (uint16_t k = 0; k < (*itMap).second.size (); k++) |
1396 { | 1397 { |
1397 rbgMask = rbgMask + (0x1 << (*itMap).second.at (k)); | 1398 rbgMask = rbgMask + (0x1 << (*itMap).second.at (k)); |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1606 | 1607 |
1607 for (std::vector<bool>::iterator it = rbMap.begin (); it != rbMap.end (); it++
) | 1608 for (std::vector<bool>::iterator it = rbMap.begin (); it != rbMap.end (); it++
) |
1608 { | 1609 { |
1609 if ((*it) == true ) | 1610 if ((*it) == true ) |
1610 { | 1611 { |
1611 rbAllocatedNum++; | 1612 rbAllocatedNum++; |
1612 } | 1613 } |
1613 } | 1614 } |
1614 | 1615 |
1615 uint8_t minContinuousUlBandwidth = m_ffrSapProvider->GetMinContinuousUlBandwid
th (); | 1616 uint8_t minContinuousUlBandwidth = m_ffrSapProvider->GetMinContinuousUlBandwid
th (); |
1616 uint8_t ffrUlBandwidth = m_cschedCellConfig.m_ulBandwidth - rbAllocatedNum; | 1617 uint8_t ffrUlBandwidth = static_cast<uint8_t>(m_cschedCellConfig.m_ulBandwidth
- rbAllocatedNum); |
1617 | 1618 |
1618 // remove RACH allocation | 1619 // remove RACH allocation |
1619 for (uint16_t i = 0; i < m_cschedCellConfig.m_ulBandwidth; i++) | 1620 for (uint16_t i = 0; i < m_cschedCellConfig.m_ulBandwidth; i++) |
1620 { | 1621 { |
1621 if (rbgAllocationMap.at (i) != 0) | 1622 if (rbgAllocationMap.at (i) != 0) |
1622 { | 1623 { |
1623 rbMap.at (i) = true; | 1624 rbMap.at (i) = true; |
1624 NS_LOG_DEBUG (this << " Allocated for RACH " << i); | 1625 NS_LOG_DEBUG (this << " Allocated for RACH " << i); |
1625 } | 1626 } |
1626 } | 1627 } |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1719 { | 1720 { |
1720 m_allocationMaps.insert (std::pair <uint16_t, std::vector <uint16_t> >
(params.m_sfnSf, rbgAllocationMap)); | 1721 m_allocationMaps.insert (std::pair <uint16_t, std::vector <uint16_t> >
(params.m_sfnSf, rbgAllocationMap)); |
1721 m_schedSapUser->SchedUlConfigInd (ret); | 1722 m_schedSapUser->SchedUlConfigInd (ret); |
1722 } | 1723 } |
1723 ········ | 1724 ········ |
1724 return; // no flows to be scheduled | 1725 return; // no flows to be scheduled |
1725 } | 1726 } |
1726 | 1727 |
1727 | 1728 |
1728 // Divide the remaining resources equally among the active users starting from
the subsequent one served last scheduling trigger | 1729 // Divide the remaining resources equally among the active users starting from
the subsequent one served last scheduling trigger |
1729 uint16_t tempRbPerFlow = (ffrUlBandwidth) / (nflows + rntiAllocated.size ()); | 1730 uint16_t tempRbPerFlow = static_cast<uint16_t>((ffrUlBandwidth) / (nflows + rn
tiAllocated.size ())); |
1730 uint16_t rbPerFlow = (minContinuousUlBandwidth < tempRbPerFlow) ? minContinuou
sUlBandwidth : tempRbPerFlow; | 1731 uint16_t rbPerFlow = (minContinuousUlBandwidth < tempRbPerFlow) ? minContinuou
sUlBandwidth : tempRbPerFlow; |
1731 | 1732 |
1732 if (rbPerFlow < 3) | 1733 if (rbPerFlow < 3) |
1733 { | 1734 { |
1734 rbPerFlow = 3; // at least 3 rbg per flow (till available resource) to en
sure TxOpportunity >= 7 bytes | 1735 rbPerFlow = 3; // at least 3 rbg per flow (till available resource) to en
sure TxOpportunity >= 7 bytes |
1735 } | 1736 } |
1736 int rbAllocated = 0; | 1737 uint16_t rbAllocated = 0; |
1737 | 1738 |
1738 std::map <uint16_t, fdtbfqsFlowPerf_t>::iterator itStats; | 1739 std::map <uint16_t, fdtbfqsFlowPerf_t>::iterator itStats; |
1739 if (m_nextRntiUl != 0) | 1740 if (m_nextRntiUl != 0) |
1740 { | 1741 { |
1741 for (it = m_ceBsrRxed.begin (); it != m_ceBsrRxed.end (); it++) | 1742 for (it = m_ceBsrRxed.begin (); it != m_ceBsrRxed.end (); it++) |
1742 { | 1743 { |
1743 if ((*it).first == m_nextRntiUl) | 1744 if ((*it).first == m_nextRntiUl) |
1744 { | 1745 { |
1745 break; | 1746 break; |
1746 } | 1747 } |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1778 if (rbPerFlow < 3) | 1779 if (rbPerFlow < 3) |
1779 { | 1780 { |
1780 // terminate allocation | 1781 // terminate allocation |
1781 rbPerFlow = 0;······ | 1782 rbPerFlow = 0;······ |
1782 } | 1783 } |
1783 } | 1784 } |
1784 | 1785 |
1785 rbAllocated = 0; | 1786 rbAllocated = 0; |
1786 UlDciListElement_s uldci; | 1787 UlDciListElement_s uldci; |
1787 uldci.m_rnti = (*it).first; | 1788 uldci.m_rnti = (*it).first; |
1788 uldci.m_rbLen = rbPerFlow; | 1789 uldci.m_rbLen = static_cast<uint8_t>(rbPerFlow); |
| 1790 uldci.m_rbStart = 0; |
1789 bool allocated = false; | 1791 bool allocated = false; |
1790 NS_LOG_INFO (this << " RB Allocated " << rbAllocated << " rbPerFlow " << r
bPerFlow << " flows " << nflows); | 1792 NS_LOG_INFO (this << " RB Allocated " << rbAllocated << " rbPerFlow " << r
bPerFlow << " flows " << nflows); |
1791 while ((!allocated)&&((rbAllocated + rbPerFlow - m_cschedCellConfig.m_ulBa
ndwidth) < 1) && (rbPerFlow != 0)) | 1793 while ((!allocated)&&((rbAllocated + rbPerFlow - m_cschedCellConfig.m_ulBa
ndwidth) < 1) && (rbPerFlow != 0)) |
1792 { | 1794 { |
1793 // check availability | 1795 // check availability |
1794 bool free = true; | 1796 bool free = true; |
1795 for (uint16_t j = rbAllocated; j < rbAllocated + rbPerFlow; j++) | 1797 for (uint16_t j = rbAllocated; j < rbAllocated + rbPerFlow; j++) |
1796 { | 1798 { |
1797 if (rbMap.at (j) == true) | 1799 if (rbMap.at (j) == true) |
1798 { | 1800 { |
1799 free = false; | 1801 free = false; |
1800 break; | 1802 break; |
1801 } | 1803 } |
1802 if ((m_ffrSapProvider->IsUlRbgAvailableForUe (j, (*it).first)) ==
false) | 1804 if ((m_ffrSapProvider->IsUlRbgAvailableForUe (j, (*it).first)) ==
false) |
1803 { | 1805 { |
1804 free = false; | 1806 free = false; |
1805 break; | 1807 break; |
1806 } | 1808 } |
1807 } | 1809 } |
1808 if (free) | 1810 if (free) |
1809 { | 1811 { |
1810 NS_LOG_INFO (this << "RNTI: "<< (*it).first<< " RB Allocated " <<
rbAllocated << " rbPerFlow " << rbPerFlow << " flows " << nflows); | 1812 NS_LOG_INFO (this << "RNTI: "<< (*it).first<< " RB Allocated " <<
rbAllocated << " rbPerFlow " << rbPerFlow << " flows " << nflows); |
1811 uldci.m_rbStart = rbAllocated; | 1813 uldci.m_rbStart = static_cast<uint8_t>(rbAllocated); |
1812 | 1814 |
1813 for (uint16_t j = rbAllocated; j < rbAllocated + rbPerFlow; j++) | 1815 for (uint16_t j = rbAllocated; j < rbAllocated + rbPerFlow; j++) |
1814 { | 1816 { |
1815 rbMap.at (j) = true; | 1817 rbMap.at (j) = true; |
1816 // store info on allocation for managing ul-cqi interpretation | 1818 // store info on allocation for managing ul-cqi interpretation |
1817 rbgAllocationMap.at (j) = (*it).first; | 1819 rbgAllocationMap.at (j) = (*it).first; |
1818 } | 1820 } |
1819 rbAllocated += rbPerFlow; | 1821 rbAllocated += rbPerFlow; |
1820 allocated = true; | 1822 allocated = true; |
1821 break; | 1823 break; |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1962 m_allocationMaps.insert (std::pair <uint16_t, std::vector <uint16_t> > (params
.m_sfnSf, rbgAllocationMap)); | 1964 m_allocationMaps.insert (std::pair <uint16_t, std::vector <uint16_t> > (params
.m_sfnSf, rbgAllocationMap)); |
1963 m_schedSapUser->SchedUlConfigInd (ret); | 1965 m_schedSapUser->SchedUlConfigInd (ret); |
1964 | 1966 |
1965 return; | 1967 return; |
1966 } | 1968 } |
1967 | 1969 |
1968 void | 1970 void |
1969 FdTbfqFfMacScheduler::DoSchedUlNoiseInterferenceReq (const struct FfMacSchedSapP
rovider::SchedUlNoiseInterferenceReqParameters& params) | 1971 FdTbfqFfMacScheduler::DoSchedUlNoiseInterferenceReq (const struct FfMacSchedSapP
rovider::SchedUlNoiseInterferenceReqParameters& params) |
1970 { | 1972 { |
1971 NS_LOG_FUNCTION (this); | 1973 NS_LOG_FUNCTION (this); |
| 1974 NS_UNUSED(params); |
1972 return; | 1975 return; |
1973 } | 1976 } |
1974 | 1977 |
1975 void | 1978 void |
1976 FdTbfqFfMacScheduler::DoSchedUlSrInfoReq (const struct FfMacSchedSapProvider::Sc
hedUlSrInfoReqParameters& params) | 1979 FdTbfqFfMacScheduler::DoSchedUlSrInfoReq (const struct FfMacSchedSapProvider::Sc
hedUlSrInfoReqParameters& params) |
1977 { | 1980 { |
1978 NS_LOG_FUNCTION (this); | 1981 NS_LOG_FUNCTION (this); |
| 1982 NS_UNUSED(params); |
1979 return; | 1983 return; |
1980 } | 1984 } |
1981 | 1985 |
1982 void | 1986 void |
1983 FdTbfqFfMacScheduler::DoSchedUlMacCtrlInfoReq (const struct FfMacSchedSapProvide
r::SchedUlMacCtrlInfoReqParameters& params) | 1987 FdTbfqFfMacScheduler::DoSchedUlMacCtrlInfoReq (const struct FfMacSchedSapProvide
r::SchedUlMacCtrlInfoReqParameters& params) |
1984 { | 1988 { |
1985 NS_LOG_FUNCTION (this); | 1989 NS_LOG_FUNCTION (this); |
1986 | 1990 |
1987 std::map <uint16_t,uint32_t>::iterator it; | 1991 std::map <uint16_t,uint32_t>::iterator it; |
1988 | 1992 |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2336 { | 2340 { |
2337 NS_LOG_FUNCTION (this << " RNTI " << rnti << " txMode " << (uint16_t)txMode); | 2341 NS_LOG_FUNCTION (this << " RNTI " << rnti << " txMode " << (uint16_t)txMode); |
2338 FfMacCschedSapUser::CschedUeConfigUpdateIndParameters params; | 2342 FfMacCschedSapUser::CschedUeConfigUpdateIndParameters params; |
2339 params.m_rnti = rnti; | 2343 params.m_rnti = rnti; |
2340 params.m_transmissionMode = txMode; | 2344 params.m_transmissionMode = txMode; |
2341 m_cschedSapUser->CschedUeConfigUpdateInd (params); | 2345 m_cschedSapUser->CschedUeConfigUpdateInd (params); |
2342 } | 2346 } |
2343 | 2347 |
2344 | 2348 |
2345 } | 2349 } |
OLD | NEW |