This commit is contained in:
Nicola Baldo
2013-01-29 15:46:05 +01:00
9 changed files with 93 additions and 33 deletions

View File

@@ -346,7 +346,7 @@ LteAmc::CreateCqiFeedbacks (const SpectrumValue& sinr, uint8_t rbgSize)
{
uint8_t mcs = 0;
TbStats_t tbStats;
while (mcs < 28)
while (mcs <= 28)
{
HarqProcessInfoList_t harqInfoList;
tbStats = LteMiErrorModel::GetTbDecodificationStats (sinr, rbgMap, (uint16_t)GetTbSizeFromMcs (mcs, rbgSize) / 8, mcs, harqInfoList);
@@ -357,6 +357,10 @@ LteAmc::CreateCqiFeedbacks (const SpectrumValue& sinr, uint8_t rbgSize)
mcs++;
}
if (mcs > 0)
{
mcs--;
}
NS_LOG_DEBUG (this << "\t RBG " << rbId << " MCS " << (uint16_t)mcs << " TBLER " << tbStats.tbler);
int rbgCqi = 0;
if ((tbStats.tbler > 0.1)&&(mcs==0))
@@ -376,7 +380,7 @@ LteAmc::CreateCqiFeedbacks (const SpectrumValue& sinr, uint8_t rbgSize)
++rbgCqi;
}
}
NS_LOG_DEBUG (this << "\t CQI " << rbgCqi);
NS_LOG_DEBUG (this << "\t MCS " << (uint16_t)mcs << "-> CQI " << rbgCqi);
// fill the cqi vector (per RB basis)
for (uint8_t j = 0; j < rbgSize; j++)
{

View File

@@ -647,6 +647,7 @@ LteEnbMac::ReceiveDlCqiLteControlMessage (Ptr<DlCqiLteControlMessage> msg)
CqiListElement_s dlcqi = msg->GetDlCqi ();
NS_LOG_LOGIC (this << "Enb Received DL-CQI rnti" << dlcqi.m_rnti);
NS_ASSERT (dlcqi.m_rnti != 0);
m_dlCqiReceived.push_back (dlcqi);
}

View File

@@ -200,13 +200,13 @@ LteEnbPhy::GetTypeId (void)
"The downlink LteSpectrumPhy associated to this LtePhy",
TypeId::ATTR_GET,
PointerValue (),
MakePointerAccessor (&LteEnbPhy::m_downlinkSpectrumPhy),
MakePointerAccessor (&LteEnbPhy::GetDlSpectrumPhy),
MakePointerChecker <LteSpectrumPhy> ())
.AddAttribute ("UlSpectrumPhy",
"The uplink LteSpectrumPhy associated to this LtePhy",
TypeId::ATTR_GET,
PointerValue (),
MakePointerAccessor (&LteEnbPhy::m_uplinkSpectrumPhy),
MakePointerAccessor (&LteEnbPhy::GetUlSpectrumPhy),
MakePointerChecker <LteSpectrumPhy> ())
;
return tid;
@@ -319,7 +319,17 @@ LteEnbPhy::GetMacChDelay (void) const
return (m_macChTtiDelay);
}
Ptr<LteSpectrumPhy>
LteEnbPhy::GetDlSpectrumPhy () const
{
return m_downlinkSpectrumPhy;
}
Ptr<LteSpectrumPhy>
LteEnbPhy::GetUlSpectrumPhy () const
{
return m_uplinkSpectrumPhy;
}
bool
LteEnbPhy::AddUePhy (uint16_t rnti)

View File

@@ -125,6 +125,17 @@ public:
*/
uint8_t GetMacChDelay (void) const;
/**
* \return a pointer to the LteSpectrumPhy instance relative to the downlink
*/
Ptr<LteSpectrumPhy> GetDlSpectrumPhy () const;
/**
* \return a pointer to the LteSpectrumPhy instance relative to the uplink
*/
Ptr<LteSpectrumPhy> GetUlSpectrumPhy () const;
/**
* \brief set the resource blocks (a.k.a. sub channels) to be used in the downlink for transmission
*

View File

@@ -227,13 +227,13 @@ LteUePhy::GetTypeId (void)
"The downlink LteSpectrumPhy associated to this LtePhy",
TypeId::ATTR_GET,
PointerValue (),
MakePointerAccessor (&LteUePhy::m_downlinkSpectrumPhy),
MakePointerAccessor (&LteUePhy::GetDlSpectrumPhy),
MakePointerChecker <LteSpectrumPhy> ())
.AddAttribute ("UlSpectrumPhy",
"The uplink LteSpectrumPhy associated to this LtePhy",
TypeId::ATTR_GET,
PointerValue (),
MakePointerAccessor (&LteUePhy::m_uplinkSpectrumPhy),
MakePointerAccessor (&LteUePhy::GetUlSpectrumPhy),
MakePointerChecker <LteSpectrumPhy> ())
;
return tid;
@@ -310,6 +310,18 @@ LteUePhy::GetMacChDelay (void) const
return (m_macChTtiDelay);
}
Ptr<LteSpectrumPhy>
LteUePhy::GetDlSpectrumPhy () const
{
return m_downlinkSpectrumPhy;
}
Ptr<LteSpectrumPhy>
LteUePhy::GetUlSpectrumPhy () const
{
return m_uplinkSpectrumPhy;
}
void
LteUePhy::DoSendMacPdu (Ptr<Packet> p)
{
@@ -386,7 +398,10 @@ LteUePhy::GenerateCtrlCqiReport (const SpectrumValue& sinr)
{
Ptr<LteUeNetDevice> thisDevice = GetDevice ()->GetObject<LteUeNetDevice> ();
Ptr<DlCqiLteControlMessage> msg = CreateDlCqiFeedbackMessage (sinr);
DoSendLteControlMessage (msg);
if (msg)
{
DoSendLteControlMessage (msg);
}
m_p10CqiLast = Simulator::Now ();
}
// check aperiodic high-layer configured subband CQI
@@ -394,7 +409,10 @@ LteUePhy::GenerateCtrlCqiReport (const SpectrumValue& sinr)
{
Ptr<LteUeNetDevice> thisDevice = GetDevice ()->GetObject<LteUeNetDevice> ();
Ptr<DlCqiLteControlMessage> msg = CreateDlCqiFeedbackMessage (sinr);
DoSendLteControlMessage (msg);
if (msg)
{
DoSendLteControlMessage (msg);
}
m_a30CqiLast = Simulator::Now ();
}
}
@@ -425,6 +443,12 @@ Ptr<DlCqiLteControlMessage>
LteUePhy::CreateDlCqiFeedbackMessage (const SpectrumValue& sinr)
{
NS_LOG_FUNCTION (this);
if (m_rnti == 0)
{
// abort method, the UE is still not registered
return (0);
}
// apply transmission mode gain
NS_ASSERT (m_transmissionMode < m_txModeGain.size ());

View File

@@ -120,6 +120,16 @@ public:
*/
uint8_t GetMacChDelay (void) const;
/**
* \return a pointer to the LteSpectrumPhy instance relative to the downlink
*/
Ptr<LteSpectrumPhy> GetDlSpectrumPhy () const;
/**
* \return a pointer to the LteSpectrumPhy instance relative to the uplink
*/
Ptr<LteSpectrumPhy> GetUlSpectrumPhy () const;
/**
* \brief Create the PSD for the TX

View File

@@ -103,12 +103,12 @@ LenaTestPfFfMacSchedulerSuite::LenaTestPfFfMacSchedulerSuite ()
AddTestCase (new LenaPfFfMacSchedulerTestCase1 (12,0,4800,75250,62000,errorModel));
AddTestCase (new LenaPfFfMacSchedulerTestCase1 (15,0,4800,60200,49600,errorModel));
// DOWNLINK - DISTANCE 6000 -> MCS 16 -> Itbs 15 (from table 7.1.7.2.1-1 of 36.213)
// 1 user -> 24 PRB at Itbs 15 -> 903 -> 903000 bytes/sec
// 3 users -> 903000 among 3 users -> 301000 bytes/sec
// 6 users -> 903000 among 6 users -> 150500 bytes/sec
// 12 users -> 903000 among 12 users -> 75250 bytes/sec
// 15 users -> 903000 among 15 users -> 60200 bytes/sec
// DOWNLINK - DISTANCE 6000 -> MCS 14 -> Itbs 13 (from table 7.1.7.2.1-1 of 36.213)
// 1 user -> 24 PRB at Itbs 15 -> 775 -> 775000 bytes/sec
// 3 users -> 775000 among 3 users -> 258000 bytes/sec
// 6 users -> 775000 among 6 users -> 129200 bytes/sec
// 12 users -> 775000 among 12 users -> 64590 bytes/sec
// 15 users -> 775000 among 15 users -> 51700 bytes/sec
// UPLINK - DISTANCE 6000 -> MCS 12 -> Itbs 11 (from table 7.1.7.2.1-1 of 36.213)
// 1 user -> 25 PRB at Itbs 11 -> 621 -> 621000 bytes/sec
// 3 users -> 8 PRB at Itbs 11 -> 201 -> 201000 bytes/sec
@@ -116,11 +116,11 @@ LenaTestPfFfMacSchedulerSuite::LenaTestPfFfMacSchedulerSuite ()
// after the patch enforcing min 3 PRBs per UE:
// 12 users -> 3 PRB at Itbs 11 -> 73 bytes * 8/12 UE/TTI -> 48667 bytes/sec
// 15 users -> 3 PRB at Itbs 11 -> 73 bytes * 8/15 UE/TTI -> 38993 bytes/sec
AddTestCase (new LenaPfFfMacSchedulerTestCase1 (1,0,6000,903000,621000,errorModel));
AddTestCase (new LenaPfFfMacSchedulerTestCase1 (3,0,6000,301000,201000,errorModel));
AddTestCase (new LenaPfFfMacSchedulerTestCase1 (6,0,6000,150500,97000,errorModel));
AddTestCase (new LenaPfFfMacSchedulerTestCase1 (12,0,6000,75250,48667,errorModel));
AddTestCase (new LenaPfFfMacSchedulerTestCase1 (15,0,6000,60200,38993,errorModel));
AddTestCase (new LenaPfFfMacSchedulerTestCase1 (1,0,6000,775000,621000,errorModel));
AddTestCase (new LenaPfFfMacSchedulerTestCase1 (3,0,6000,258000,201000,errorModel));
AddTestCase (new LenaPfFfMacSchedulerTestCase1 (6,0,6000,129200,97000,errorModel));
AddTestCase (new LenaPfFfMacSchedulerTestCase1 (12,0,6000,64590,48667,errorModel));
AddTestCase (new LenaPfFfMacSchedulerTestCase1 (15,0,6000,51700,38993,errorModel));
// DOWNLINK - DISTANCE 10000 -> MCS 8 -> Itbs 8 (from table 7.1.7.2.1-1 of 36.213)
// 1 user -> 24 PRB at Itbs 8 -> 421 -> 421000 bytes/sec

View File

@@ -105,13 +105,13 @@ LenaTestRrFfMacSchedulerSuite::LenaTestRrFfMacSchedulerSuite ()
AddTestCase (new LenaRrFfMacSchedulerTestCase (12,0,4800,113000,62000,errorModel));
AddTestCase (new LenaRrFfMacSchedulerTestCase (15,0,4800,90400,49600,errorModel));
// DOWNLINK - DISTANCE 6000 -> MCS 16 -> Itbs 15 (from table 7.1.7.2.1-1 of 36.213)
// 1 user -> 24 PRB at Itbs 15 -> 903 -> 903000 bytes/sec
// 3 users -> 8 PRB at Itbs 15 -> 309 -> 309000 bytes/sec
// 6 users -> 4 PRB at Itbs 15 -> 153 -> 153000 bytes/sec
// 9 user -> 2 PRB at Itbs 15 -> 75 -> 75000 bytes/sec
// 12 users -> 2 PRB at Itbs 15 -> 75 -> 75000 bytes/sec
// 15 users -> 2 PRB at Itbs 15 * 0.8 -> 60 -> 60000 bytes/sec
// DOWNLINK - DISTANCE 6000 -> MCS 14 -> Itbs 13 (from table 7.1.7.2.1-1 of 36.213)
// 1 user -> 24 PRB at Itbs 15 -> 775 -> 775000 bytes/sec
// 3 users -> 8 PRB at Itbs 15 -> 253 -> 253000 bytes/sec
// 6 users -> 4 PRB at Itbs 15 -> 125 -> 125000 bytes/sec
// 9 user -> 2 PRB at Itbs 15 -> 61 -> 61000 bytes/sec
// 12 users -> 2 PRB at Itbs 15 -> 61 -> 61000 bytes/sec
// 15 users -> 2 PRB at Itbs 15 * 0.8 -> 48.8 -> 48800 bytes/sec
// UPLINK - DISTANCE 6000 -> MCS 12 -> Itbs 11 (from table 7.1.7.2.1-1 of 36.213)
// 1 user -> 25 PRB at Itbs 11 -> 621 -> 621000 bytes/sec
// 3 users -> 8 PRB at Itbs 11 -> 201 -> 201000 bytes/sec
@@ -119,12 +119,12 @@ LenaTestRrFfMacSchedulerSuite::LenaTestRrFfMacSchedulerSuite ()
// 9 users -> 3 PRB at Itbs 11 -> 73 bytes * 8/9 UE/TTI -> 64889 bytes/sec
// 12 users -> 3 PRB at Itbs 11 -> 73 bytes * 8/12 UE/TTI -> 48667 bytes/sec
// 15 users -> 3 PRB at Itbs 11 -> 73 bytes * 8/15 UE/TTI -> 38993 bytes/sec
AddTestCase (new LenaRrFfMacSchedulerTestCase (1,0,6000,903000,621000,errorModel));
AddTestCase (new LenaRrFfMacSchedulerTestCase (3,0,6000,309000,201000,errorModel));
AddTestCase (new LenaRrFfMacSchedulerTestCase (6,0,6000,153000,97000,errorModel));
AddTestCase (new LenaRrFfMacSchedulerTestCase (9,0,6000,75000,64889,errorModel));
AddTestCase (new LenaRrFfMacSchedulerTestCase (12,0,6000,75000,48667,errorModel));
AddTestCase (new LenaRrFfMacSchedulerTestCase (15,0,6000,60000,38993,errorModel));
AddTestCase (new LenaRrFfMacSchedulerTestCase (1,0,6000,775000,621000,errorModel));
AddTestCase (new LenaRrFfMacSchedulerTestCase (3,0,6000,253000,201000,errorModel));
AddTestCase (new LenaRrFfMacSchedulerTestCase (6,0,6000,125000,97000,errorModel));
AddTestCase (new LenaRrFfMacSchedulerTestCase (9,0,6000,61000,64889,errorModel));
AddTestCase (new LenaRrFfMacSchedulerTestCase (12,0,6000,61000,48667,errorModel));
AddTestCase (new LenaRrFfMacSchedulerTestCase (15,0,6000,48800,38993,errorModel));
// DOWNLINK - DISTANCE 10000 -> MCS 8 -> Itbs 8 (from table 7.1.7.2.1-1 of 36.213)
// 1 user -> 24 PRB at Itbs 8 -> 437 -> 437000 bytes/sec

View File

@@ -258,7 +258,7 @@ RrcConnectionRequestTestCase::DoRun (void)
NS_LOG_DEBUG ("============= RrcConnectionRequestTestCase ===========");
LteRrcSap::RrcConnectionRequest msg;
msg.ueIdentity = 0x83fecafeca;
msg.ueIdentity = 0x83fecafecaULL;
RrcConnectionRequestHeader source;
source.SetMessage (msg);