diff --git a/src/lte/model/lte-common.h b/src/lte/model/lte-common.h index de0751451..279fb8d50 100644 --- a/src/lte/model/lte-common.h +++ b/src/lte/model/lte-common.h @@ -24,6 +24,9 @@ #include "ns3/uinteger.h" #include +// see 36.213 section 8 +#define UL_PUSCH_TTIS_DELAY 4 + namespace ns3 { diff --git a/src/lte/model/lte-enb-mac.cc b/src/lte/model/lte-enb-mac.cc index 4a8ac9869..77e5cea54 100644 --- a/src/lte/model/lte-enb-mac.cc +++ b/src/lte/model/lte-enb-mac.cc @@ -381,7 +381,7 @@ LteEnbMac::GetLteEnbPhySapUser () void LteEnbMac::DoSubframeIndication (uint32_t frameNo, uint32_t subframeNo) { - NS_LOG_FUNCTION (this); + NS_LOG_FUNCTION (this << " EnbMac - frame " << frameNo << " subframe " << subframeNo); // Store current frame / subframe number m_frameNo = frameNo; @@ -407,8 +407,22 @@ LteEnbMac::DoSubframeIndication (uint32_t frameNo, uint32_t subframeNo) // Get downlink transmission opportunities +// uint32_t dlSchedFrameNo = (0x3FF & (m_frameNo >> 4)); +// uint32_t dlSchedSubframeNo = (0xF & m_subframeNo); + uint32_t dlSchedFrameNo = m_frameNo; + uint32_t dlSchedSubframeNo = m_subframeNo; + // NS_LOG_DEBUG (this << " sfn " << frameNo << " sbfn " << subframeNo); + if (dlSchedSubframeNo + m_macChTtiDelay > 10) + { + dlSchedFrameNo++; + dlSchedSubframeNo = (dlSchedSubframeNo + m_macChTtiDelay) % 10; + } + else + { + dlSchedSubframeNo = dlSchedSubframeNo + m_macChTtiDelay; + } FfMacSchedSapProvider::SchedDlTriggerReqParameters params; // to be filled - params.m_sfnSf = ((0x3FF & frameNo) << 4) | (0xF & subframeNo); + params.m_sfnSf = ((0x3FF & dlSchedFrameNo) << 4) | (0xF & dlSchedSubframeNo); m_schedSapProvider->SchedDlTriggerReq (params); @@ -417,7 +431,14 @@ LteEnbMac::DoSubframeIndication (uint32_t frameNo, uint32_t subframeNo) if (m_ulCqiReceived.size () > 0) { FfMacSchedSapProvider::SchedUlCqiInfoReqParameters ulcqiInfoReq; - ulcqiInfoReq.m_sfnSf = ((0x3FF & frameNo) << 4) | (0xF & subframeNo); + if (subframeNo>1) + { + ulcqiInfoReq.m_sfnSf = ((0x3FF & frameNo) << 4) | (0xF & subframeNo); + } + else + { + ulcqiInfoReq.m_sfnSf = ((0x3FF & (frameNo-1)) << 4) | (0xF & 10); + } int cqiNum = m_ulCqiReceived.size (); if (cqiNum >= 1) { @@ -446,8 +467,21 @@ LteEnbMac::DoSubframeIndication (uint32_t frameNo, uint32_t subframeNo) // Get uplink transmission opportunities + uint32_t ulSchedFrameNo = m_frameNo; + uint32_t ulSchedSubframeNo = m_subframeNo; + // NS_LOG_DEBUG (this << " sfn " << frameNo << " sbfn " << subframeNo); + if (ulSchedSubframeNo + (m_macChTtiDelay+UL_PUSCH_TTIS_DELAY) > 10) + { + ulSchedFrameNo++; + ulSchedSubframeNo = (ulSchedSubframeNo + (m_macChTtiDelay+UL_PUSCH_TTIS_DELAY)) % 10; + } + else + { +// ulSchedSubframeNo = (ulSchedSubframeNo + (2*m_macChTtiDelay)) % 11; + ulSchedSubframeNo = ulSchedSubframeNo + (m_macChTtiDelay+UL_PUSCH_TTIS_DELAY); + } FfMacSchedSapProvider::SchedUlTriggerReqParameters ulparams; - ulparams.m_sfnSf = ((0x3FF & frameNo) << 4) | (0xF & subframeNo); + ulparams.m_sfnSf = ((0x3FF & ulSchedFrameNo) << 4) | (0xF & ulSchedSubframeNo); std::map ::iterator it; for (it = m_ulInfoListElements.begin (); it != m_ulInfoListElements.end (); it++) @@ -592,6 +626,7 @@ LteEnbMac::DoConfigureMac (uint8_t ulBandwidth, uint8_t dlBandwidth) // Configure the subset of parameters used by FfMacScheduler params.m_ulBandwidth = ulBandwidth; params.m_dlBandwidth = dlBandwidth; + m_macChTtiDelay = m_enbPhySapProvider->GetMacChTtiDelay (); // ...more parameters can be configured m_cschedSapProvider->CschedCellConfigReq (params); } diff --git a/src/lte/model/lte-enb-mac.h b/src/lte/model/lte-enb-mac.h index 8d3a45ddb..a838225aa 100644 --- a/src/lte/model/lte-enb-mac.h +++ b/src/lte/model/lte-enb-mac.h @@ -227,6 +227,9 @@ private: * Frame number, Subframe number, RNTI, MCS of TB, size of TB */ TracedCallback m_ulScheduling; + + uint8_t m_macChTtiDelay; // delay of MAC, PHY and channel in terms of TTIs + }; diff --git a/src/lte/model/lte-enb-phy-sap.h b/src/lte/model/lte-enb-phy-sap.h index 72a6e87f7..d07714a3b 100644 --- a/src/lte/model/lte-enb-phy-sap.h +++ b/src/lte/model/lte-enb-phy-sap.h @@ -72,6 +72,12 @@ public: * \param msg the Ideal Control Message to send */ virtual void SendIdealControlMessage (Ptr msg) = 0; + + /** + * \brief Get the delay from MAC to Channel expressed in TTIs + * + */ + virtual uint8_t GetMacChTtiDelay () = 0; }; diff --git a/src/lte/model/lte-enb-phy.cc b/src/lte/model/lte-enb-phy.cc index d531373b5..5f19303d1 100644 --- a/src/lte/model/lte-enb-phy.cc +++ b/src/lte/model/lte-enb-phy.cc @@ -56,6 +56,7 @@ public: virtual void SetBandwidth (uint8_t ulBandwidth, uint8_t dlBandwidth); virtual void SetCellId (uint16_t cellId); virtual void SendIdealControlMessage (Ptr msg); + virtual uint8_t GetMacChTtiDelay (); virtual void SetTransmissionMode (uint16_t rnti, uint8_t txMode); @@ -93,6 +94,12 @@ EnbMemberLteEnbPhySapProvider::SendIdealControlMessage (Ptr m_phy->DoSendIdealControlMessage (msg); } +uint8_t +EnbMemberLteEnbPhySapProvider::GetMacChTtiDelay () +{ + return (m_phy->DoGetMacChTtiDelay ()); +} + void EnbMemberLteEnbPhySapProvider::SetTransmissionMode (uint16_t rnti, uint8_t txMode) { @@ -122,11 +129,6 @@ LteEnbPhy::LteEnbPhy (Ptr dlPhy, Ptr ulPhy) { m_enbPhySapProvider = new EnbMemberLteEnbPhySapProvider (this); Simulator::ScheduleNow (&LteEnbPhy::StartFrame, this); - for (int i = 0; i < m_macChTtiDelay; i++) - { - std::list l; - m_ulDciQueue.push_back (l); - } } TypeId @@ -231,7 +233,20 @@ void LteEnbPhy::SetMacChDelay (uint8_t delay) { m_macChTtiDelay = delay; - m_packetBurstQueue.resize (delay); + for (int i = 0; i < m_macChTtiDelay; i++) + { + Ptr pb = CreateObject (); + m_packetBurstQueue.push_back (pb); + std::list > l; + m_controlMessagesQueue.push_back (l); + std::list l1; + m_ulDciQueue.push_back (l1); + } + for (int i = 0; i < UL_PUSCH_TTIS_DELAY; i++) + { + std::list l1; + m_ulDciQueue.push_back (l1); + } } uint8_t @@ -283,6 +298,12 @@ LteEnbPhy::DoSendMacPdu (Ptr p) SetMacPdu (p); } +uint8_t +LteEnbPhy::DoGetMacChTtiDelay () +{ + return (m_macChTtiDelay); +} + void LteEnbPhy::PhyPduReceived (Ptr p) @@ -534,7 +555,7 @@ void LteEnbPhy::QueueUlDci (UlDciIdealControlMessage m) { NS_LOG_FUNCTION (this); - m_ulDciQueue.at (m_macChTtiDelay - 1).push_back (m); + m_ulDciQueue.at (UL_PUSCH_TTIS_DELAY - 1).push_back (m); } std::list diff --git a/src/lte/model/lte-enb-phy.h b/src/lte/model/lte-enb-phy.h index 0c65ea072..aa4875f28 100644 --- a/src/lte/model/lte-enb-phy.h +++ b/src/lte/model/lte-enb-phy.h @@ -111,6 +111,8 @@ public: * \param p the MAC PDU to sent */ virtual void DoSendMacPdu (Ptr p); + + virtual uint8_t DoGetMacChTtiDelay (); void DoSetDownlinkSubChannels (); diff --git a/src/lte/model/lte-phy.cc b/src/lte/model/lte-phy.cc index 9379a61eb..a0991cee5 100644 --- a/src/lte/model/lte-phy.cc +++ b/src/lte/model/lte-phy.cc @@ -48,19 +48,9 @@ LtePhy::LtePhy (Ptr dlPhy, Ptr ulPhy) m_ulBandwidth (0), m_dlBandwidth (0), m_rbgSize (0), - m_macChTtiDelay (2) // 1 TTI delay between MAC and CH + m_macChTtiDelay (0) { NS_LOG_FUNCTION (this); - for (int i = 0; i < m_macChTtiDelay; i++) - { - Ptr pb = CreateObject (); - m_packetBurstQueue.push_back (pb); - } - for (int i = 0; i < m_macChTtiDelay; i++) - { - std::list > l; - m_controlMessagesQueue.push_back (l); - } } diff --git a/src/lte/model/lte-ue-mac.cc b/src/lte/model/lte-ue-mac.cc index 73e748841..862b09878 100644 --- a/src/lte/model/lte-ue-mac.cc +++ b/src/lte/model/lte-ue-mac.cc @@ -388,8 +388,15 @@ LteUeMac::DoReceiveIdealControlMessage (Ptr msg) if (itBsr!=m_ulBsrReceived.end ()) { NS_LOG_FUNCTION (this << "\t" << dci.m_tbSize / m_macSapUserMap.size () << " bytes to LC " << (uint16_t)(*it).first << " queue " << (*itBsr).second); - (*it).second->NotifyTxOpportunity (dci.m_tbSize / activeLcs, 0); // UE works only in SISO mode - (*itBsr).second -= dci.m_tbSize / activeLcs; + (*it).second->NotifyTxOpportunity (dci.m_tbSize / activeLcs, 0); + if ((*itBsr).second >= dci.m_tbSize / activeLcs) + { + (*itBsr).second -= dci.m_tbSize / activeLcs; + } + else + { + (*itBsr).second = 0; + } } } diff --git a/src/lte/model/lte-ue-phy.cc b/src/lte/model/lte-ue-phy.cc index 2a0c2c7f4..582b730bf 100644 --- a/src/lte/model/lte-ue-phy.cc +++ b/src/lte/model/lte-ue-phy.cc @@ -35,6 +35,7 @@ #include "lte-ue-mac.h" #include "ff-mac-common.h" #include "lte-sinr-chunk-processor.h" +#include NS_LOG_COMPONENT_DEFINE ("LteUePhy"); @@ -118,8 +119,15 @@ LteUePhy::LteUePhy (Ptr dlPhy, Ptr ulPhy) { m_amc = CreateObject (); m_uePhySapProvider = new UeMemberLteUePhySapProvider (this); + m_macChTtiDelay = UL_PUSCH_TTIS_DELAY + 1; // +1 for avoiding UL/DL trigger synchronization remove 1 TTI of delay + for (int i = 0; i < m_macChTtiDelay; i++) + { + Ptr pb = CreateObject (); + m_packetBurstQueue.push_back (pb); + std::list > l; + m_controlMessagesQueue.push_back (l); + } std::vector ulRb; - SetMacChDelay (m_macChTtiDelay + 1); // +1 for avoiding UL/DL trigger synchronization remove 1 TTI of delay m_subChannelsForTransmissionQueue.resize (m_macChTtiDelay, ulRb); } @@ -253,13 +261,6 @@ LteUePhy::GetTxPower () const return m_txPower; } -void -LteUePhy::SetMacChDelay (uint8_t delay) -{ - m_macChTtiDelay = delay; - Ptr pb = CreateObject (); - m_packetBurstQueue.resize (delay, pb); -} uint8_t LteUePhy::GetMacChDelay (void) const @@ -527,6 +528,7 @@ LteUePhy::ReceiveIdealControlMessage (Ptr msg) else if (msg->GetMessageType () == IdealControlMessage::UL_DCI) { // set the uplink bandwidht according to the UL-CQI + NS_LOG_DEBUG (this << " UL DCI"); Ptr msg2 = DynamicCast (msg); UlDciListElement_s dci = msg2->GetDci (); std::vector ulRb; @@ -592,7 +594,7 @@ LteUePhy::SubframeIndication (uint32_t frameNo, uint32_t subframeNo) Ptr pb = GetPacketBurst (); if (pb) { - NS_LOG_LOGIC (this << " UE " << m_rnti << " start TX " << pb->GetNPackets()); + NS_LOG_LOGIC (this << " UE - start TX"); m_uplinkSpectrumPhy->StartTx (pb); } diff --git a/src/lte/model/lte-ue-phy.h b/src/lte/model/lte-ue-phy.h index 0666c4ddf..bc5df870d 100644 --- a/src/lte/model/lte-ue-phy.h +++ b/src/lte/model/lte-ue-phy.h @@ -101,11 +101,6 @@ public: */ double GetNoiseFigure () const; - /** - * \param delay the TTI delay between MAC and channel - */ - void SetMacChDelay (uint8_t delay); - /** * \returns the TTI delay between MAC and channel */ diff --git a/src/lte/model/pf-ff-mac-scheduler.cc b/src/lte/model/pf-ff-mac-scheduler.cc index 8c24431ed..8692a159e 100644 --- a/src/lte/model/pf-ff-mac-scheduler.cc +++ b/src/lte/model/pf-ff-mac-scheduler.cc @@ -211,8 +211,6 @@ PfFfMacScheduler::PfFfMacScheduler () : m_cschedSapUser (0), m_schedSapUser (0), m_timeWindow (99.0), - m_schedTtiDelay (4), - // WILD HACK: based on a m_macChTtiDelay = 2 m_nextRntiUl (0) { m_amc = CreateObject (); @@ -811,7 +809,7 @@ PfFfMacScheduler::EstimateUlSinr (uint16_t rnti, uint16_t rb) void PfFfMacScheduler::DoSchedUlTriggerReq (const struct FfMacSchedSapProvider::SchedUlTriggerReqParameters& params) { -// NS_LOG_FUNCTION (this << " Frame no. " << (params.m_sfnSf >> 4) << " subframe no. " << (0xF & params.m_sfnSf)); + NS_LOG_FUNCTION (this << " UL - Frame no. " << (params.m_sfnSf >> 4) << " subframe no. " << (0xF & params.m_sfnSf)); RefreshUlCqiMaps (); @@ -1047,26 +1045,11 @@ void PfFfMacScheduler::DoSchedUlCqiInfoReq (const struct FfMacSchedSapProvider::SchedUlCqiInfoReqParameters& params) { NS_LOG_FUNCTION (this); -// NS_LOG_DEBUG (this << " RX SFNID " << params.m_sfnSf << " delay " << (uint32_t)m_schedTtiDelay); - // correlate info on UL-CQIs with previous scheduling -> calculate m_sfnSf of transmission - uint32_t frameNo = (0x3FF & (params.m_sfnSf >> 4)); - uint32_t subframeNo = (0xF & params.m_sfnSf); -// NS_LOG_DEBUG (this << " sfn " << frameNo << " sbfn " << subframeNo); - if (subframeNo <= (uint32_t)(m_schedTtiDelay + 1)) - { - frameNo--; - subframeNo = (10 + subframeNo - (m_schedTtiDelay + 1)) % 11; - } - else - { - subframeNo = (subframeNo - (m_schedTtiDelay + 1)) % 11; - } - uint16_t sfnSf = ((0x3FF & frameNo) << 4) | (0xF & subframeNo); -// NS_LOG_DEBUG (this << " Actual sfn " << frameNo << " sbfn " << subframeNo << " sfnSf " << sfnSf); +// NS_LOG_DEBUG (this << " RX SFNID " << params.m_sfnSf); // retrieve the allocation for this subframe std::map >::iterator itMap; std::map >::iterator itCqi; - itMap = m_allocationMaps.find (sfnSf); + itMap = m_allocationMaps.find (params.m_sfnSf); if (itMap == m_allocationMaps.end ()) { NS_LOG_DEBUG (this << " Does not find info on allocation, size : " << m_allocationMaps.size ()); diff --git a/src/lte/model/pf-ff-mac-scheduler.h b/src/lte/model/pf-ff-mac-scheduler.h index da6902eae..a3e7d989d 100644 --- a/src/lte/model/pf-ff-mac-scheduler.h +++ b/src/lte/model/pf-ff-mac-scheduler.h @@ -212,7 +212,6 @@ private: double m_timeWindow; - uint8_t m_schedTtiDelay; // delay between scheduling and reception (based on m_macChTtiDelay) uint16_t m_nextRntiUl; // RNTI of the next user to be served next scheduling in UL diff --git a/src/lte/model/rr-ff-mac-scheduler.cc b/src/lte/model/rr-ff-mac-scheduler.cc index df6419662..23e3f9b62 100644 --- a/src/lte/model/rr-ff-mac-scheduler.cc +++ b/src/lte/model/rr-ff-mac-scheduler.cc @@ -212,8 +212,6 @@ RrSchedulerMemberSchedSapProvider::SchedUlCqiInfoReq (const struct SchedUlCqiInf RrFfMacScheduler::RrFfMacScheduler () : m_cschedSapUser (0), m_schedSapUser (0), - m_schedTtiDelay (4), - // WILD ACK: based on a m_macChTtiDelay = 1 m_nextRntiDl (0), m_nextRntiUl (0) { @@ -537,7 +535,7 @@ RrFfMacScheduler::DoSchedDlTriggerReq (const struct FfMacSchedSapProvider::Sched // int totRbg = lcNum * rbgPerFlow; // totRbg = rbgNum / nTbs; int tbSize = (m_amc->GetTbSizeFromMcs (newDci.m_mcs.at (0), rbgPerTb * rbgSize) / 8); -// NS_LOG_DEBUG (this << "Allocate user " << newEl.m_rnti << " LCs " << (uint16_t)(*itLcRnti).second << " bytes " << tbSize << " PRBs " << rbgAllocated * rbgSize << "..." << (rbgAllocated* rbgSize) + (rbgPerTb * rbgSize) - 1 << " mcs " << (uint16_t) newDci.m_mcs.at (0) << " layers " << nLayer); + NS_LOG_DEBUG (this << "Allocate user " << newEl.m_rnti << " LCs " << (uint16_t)(*itLcRnti).second << " bytes " << tbSize << " PRBs " << rbgAllocated * rbgSize << "..." << (rbgAllocated* rbgSize) + (rbgPerTb * rbgSize) - 1 << " mcs " << (uint16_t) newDci.m_mcs.at (0) << " layers " << nLayer); uint16_t rlcPduSize = tbSize / lcNum; for (int i = 0; i < lcNum ; i++) { @@ -650,7 +648,7 @@ RrFfMacScheduler::DoSchedDlCqiInfoReq (const struct FfMacSchedSapProvider::Sched void RrFfMacScheduler::DoSchedUlTriggerReq (const struct FfMacSchedSapProvider::SchedUlTriggerReqParameters& params) { -// NS_LOG_FUNCTION (this << " Frame no. " << (params.m_sfnSf >> 4) << " subframe no. " << (0xF & params.m_sfnSf)); + NS_LOG_FUNCTION (this << " Ul - Frame no. " << (params.m_sfnSf >> 4) << " subframe no. " << (0xF & params.m_sfnSf)); RefreshUlCqiMaps (); @@ -763,7 +761,7 @@ RrFfMacScheduler::DoSchedUlTriggerReq (const struct FfMacSchedSapProvider::Sched } uldci.m_tbSize = (m_amc->GetTbSizeFromMcs (uldci.m_mcs, rbPerFlow) / 8); // MCS 0 -> UL-AMC TBD -// NS_LOG_DEBUG (this << " UE " << (*it).first << " startPRB " << (uint32_t)uldci.m_rbStart << " nPRB " << (uint32_t)uldci.m_rbLen << " CQI " << cqi << " MCS " << (uint32_t)uldci.m_mcs << " TBsize " << uldci.m_tbSize); + NS_LOG_DEBUG (this << " UL - UE " << (*it).first << " startPRB " << (uint32_t)uldci.m_rbStart << " nPRB " << (uint32_t)uldci.m_rbLen << " CQI " << cqi << " MCS " << (uint32_t)uldci.m_mcs << " TBsize " << uldci.m_tbSize); UpdateUlRlcBufferInfo (uldci.m_rnti, uldci.m_tbSize); uldci.m_ndi = 1; uldci.m_cceIndex = 0; @@ -851,24 +849,11 @@ RrFfMacScheduler::DoSchedUlCqiInfoReq (const struct FfMacSchedSapProvider::Sched { NS_LOG_FUNCTION (this); NS_LOG_DEBUG (this << " RX SFNID " << params.m_sfnSf); - // correlate info on UL-CQIs with previous scheduling -> calculate m_sfnSf of transmission - uint32_t frameNo = (0x3FF & (params.m_sfnSf >> 4)); - uint32_t subframeNo = (0xF & params.m_sfnSf); - if (subframeNo <= (uint32_t)(m_schedTtiDelay + 1)) - { - frameNo--; - subframeNo = (10 + subframeNo - (m_schedTtiDelay + 1)) % 11; - } - else - { - subframeNo = (subframeNo - (m_schedTtiDelay + 1)) % 11; - } - uint16_t sfnSf = ((0x3FF & frameNo) << 4) | (0xF & subframeNo); // NS_LOG_DEBUG (this << " Actual sfn " << frameNo << " sbfn " << subframeNo << " sfnSf " << sfnSf); // retrieve the allocation for this subframe std::map >::iterator itMap; std::map >::iterator itCqi; - itMap = m_allocationMaps.find (sfnSf); + itMap = m_allocationMaps.find (params.m_sfnSf); if (itMap == m_allocationMaps.end ()) { NS_LOG_DEBUG (this << " Does not find info on allocation"); diff --git a/src/lte/model/rr-ff-mac-scheduler.h b/src/lte/model/rr-ff-mac-scheduler.h index 14e179bc3..612ce528a 100644 --- a/src/lte/model/rr-ff-mac-scheduler.h +++ b/src/lte/model/rr-ff-mac-scheduler.h @@ -178,8 +178,6 @@ private: // Internal parameters FfMacCschedSapProvider::CschedCellConfigReqParameters m_cschedCellConfig; - uint8_t m_schedTtiDelay; // delay between scheduling and reception (based on m_macChTtiDelay) - uint16_t m_nextRntiDl; // RNTI of the next user to be served next scheduling in DL uint16_t m_nextRntiUl; // RNTI of the next user to be served next scheduling in UL diff --git a/src/lte/test/lte-test-interference.cc b/src/lte/test/lte-test-interference.cc index aa7fd0adc..ee8e8ddb9 100644 --- a/src/lte/test/lte-test-interference.cc +++ b/src/lte/test/lte-test-interference.cc @@ -202,7 +202,7 @@ LteInterferenceTestCase::DoRun (void) MakeBoundCallback (&LteTestUlSchedulingCallback, this)); - Simulator::Stop (Seconds (0.010)); + Simulator::Stop (Seconds (0.020)); Simulator::Run (); @@ -232,7 +232,7 @@ LteInterferenceTestCase::DlScheduling (uint32_t frameNo, uint32_t subframeNo, ui * For first 4 subframeNo in the first frameNo, the MCS cannot be properly evaluated, * because CQI feedback is still not available at the eNB. */ - if ( (frameNo > 1) || (subframeNo > 8) ) + if ( (frameNo > 1) || (subframeNo > 9) ) { NS_TEST_ASSERT_MSG_EQ ((uint16_t)mcsTb1, m_dlMcs, "Wrong DL MCS "); } @@ -247,7 +247,7 @@ LteInterferenceTestCase::UlScheduling (uint32_t frameNo, uint32_t subframeNo, ui * For first 5 subframeNo in the first frameNo, the MCS cannot be properly evaluated, * because CQI feedback is still not available at the eNB. */ - if ( (frameNo > 1) || (subframeNo > 9) ) + if ( (frameNo > 1) && (subframeNo > 4) ) { NS_TEST_ASSERT_MSG_EQ ((uint16_t)mcs, m_ulMcs, "Wrong UL MCS"); } diff --git a/src/lte/test/lte-test-link-adaptation.cc b/src/lte/test/lte-test-link-adaptation.cc index 529985375..929855d6d 100644 --- a/src/lte/test/lte-test-link-adaptation.cc +++ b/src/lte/test/lte-test-link-adaptation.cc @@ -232,7 +232,7 @@ LteLinkAdaptationTestCase::DlScheduling (uint32_t frameNo, uint32_t subframeNo, * For first 4 subframeNo in the first frameNo, the MCS cannot be properly evaluated, * because CQI feedback is still not available at the eNB. */ - if ( (frameNo > 1) || (subframeNo > 6) ) + if ( (frameNo > 1) || (subframeNo > 8) ) { NS_LOG_INFO (m_snrDb << "\t" << m_mcsIndex << "\t" << (uint16_t)mcsTb1); diff --git a/src/lte/test/test-lte-antenna.cc b/src/lte/test/test-lte-antenna.cc index ce5dea514..c16d4415d 100644 --- a/src/lte/test/test-lte-antenna.cc +++ b/src/lte/test/test-lte-antenna.cc @@ -144,7 +144,7 @@ LteEnbAntennaTestCase::DoRun (void) enbphy->GetUplinkSpectrumPhy ()->AddSinrChunkProcessor (testUlSinr); - Simulator::Stop (Seconds (0.010)); + Simulator::Stop (Seconds (0.020)); Simulator::Run ();