merge with ns-3-lena-dev for including bug-fixing in LteEnbMac (DL CQI generation)

This commit is contained in:
Marco Miozzo
2011-11-24 12:33:36 +01:00
4 changed files with 28 additions and 25 deletions

View File

@@ -41,17 +41,18 @@ $(FIGURES)/lte-transmission.pdf_width = 3in
$(FIGURES)/auvmobility-classes.pdf_width = 10cm
$(FIGURES)/lte-interference-test-scenario.pdf_width = 4in
IMAGES_PNG = ${IMAGES_EPS:.eps=.png} \
$(FIGURES)/fading_pedestrian.png \
IMAGES_PNG = ${IMAGES_EPS:.eps=.png}
IMAGES_PDF = ${IMAGES_EPS:.eps=.pdf}
IMAGES_OTHER = $(FIGURES)/fading_pedestrian.png \
$(FIGURES)/fading_vehicular.png \
$(FIGURES)/fading_urban_3kmph.png
IMAGES_PDF = ${IMAGES_EPS:.eps=.pdf} \
$(FIGURES)/fading_urban_3kmph.png \
$(FIGURES)/fading_pedestrian.pdf \
$(FIGURES)/fading_vehicular.pdf \
$(FIGURES)/fading_urban_3kmph.pdf
IMAGES = $(IMAGES_EPS) $(IMAGES_PNG) $(IMAGES_PDF)
IMAGES = $(IMAGES_EPS) $(IMAGES_PNG) $(IMAGES_PDF) $(IMAGES_OTHER)
%.eps : %.dia; $(DIA) -t eps $< -e $@
%.png : %.dia; $(DIA) -t png $< -e $@

View File

@@ -9,7 +9,7 @@
Overview and objectives
***********************
The main profiling objective is to assess the simulator performance on a broad set of situations. This evaluation provides reference values for simulation running times and memory consumption figures. Also, it helps identifying potential performance improvements or bottlenecks and checking that no scalability problems arise while increasing the number of eNodeB and the number of UEs attached to each eNodeB.
The main profiling objective is to assess the simulator performance on a broad set of scenarios. This evaluation provides reference values for simulation running times and memory consumption figures. It also helps to identify potential performance improvements and to check for scalability problems when increasing the number of eNodeB and the number of UEs attached to each eNodeB.
In the following sections, a detailed description of the general profiling framework employed to perform this profiling study is introduced. It also introduces the details of the main tests performed and its results are evaluated.
@@ -19,12 +19,11 @@ Framework description
Simulation script
~~~~~~~~~~~~~~~~
The simulation script used for all the results gathered in this documentation is located at ``src/lte/examples/lena-runtime-profiler.cc``. This script generated a squared grid topology, placing a eNodeB at the centre of the square. UEs attached to this node are scattered randomly across the square (using a random uniform distribution along X and Y axis). If *BuildingPropagationModel* is used
The simulation script used for all the results gathered in this documentation is located at ``src/lte/examples/lena-runtime-profiler.cc``. This script generated a squared grid topology, placing a eNodeB at the centre of the square. UEs attached to this node are scattered randomly across the square (using a random uniform distribution along X and Y axis). If *BuildingPropagationModel* is used, the squares are replaced by rooms.
.. TODO: Insert figure picturing the geometry of the simulation.
RLC and MAC traces are enabled for all UEs and all eNodeBs and those traces are written to disk directly. The MAC scheduler used is *propotional fair*
RLC and MAC traces are enabled for all UEs and all eNodeBs and those traces are written to disk directly. The MAC scheduler used is *propotional fair*.
Simulation input parameters
---------------------------
@@ -39,12 +38,12 @@ The *lena-runtime-profiler* simulation script accepts the following input parame
Time measurement
~~~~~~~~~~~~~~~~
Running time is measured using default Linux shell command **time**. This command counts the user time invested in the execution of a program.
Running time is measured using default Linux shell command **time**. This command counts how much user time the execution of a program takes.
Perl script
~~~~~~~~~~~
To simplify the process of running the profiling script for a wide range of values and collecting its data, a simple Perl script to automate the whole process has been developed. It is placed in ``src/lte/test/lte-test-run-time.pl``. It simply runs a batch of simulations with a range of parameters and stores the timing results in a CSV file called *times.csv*.
To simplify the process of running the profiling script for a wide range of values and collecting its timing data, a simple Perl script to automate the complete process is provided. It is placed in ``src/lte/test/lte-test-run-time.pl``. It simply runs a batch of simulations with a range of parameters and stores the timing results in a CSV file called *times.csv*. The range of values each parameter takes can be easily modified editing the script.
Requirements
------------
@@ -72,7 +71,7 @@ The following results and figures had been obtained with LENA **changeset 1823cd
Running time
~~~~~~~~~~~~
This scenario, evaluates the running time in for a fixed simulation time (10s) increasing the number of UEs attached to each eNodeB and the number of planted eNodeBs in every scenario. Friis propagation model is used as a reference.
This scenario, evaluates the running time in for a fixed simulation time (10s) and Friis propagation mode increasing the number of UEs attached to each eNodeB and the number of planted eNodeBs in every scenario.
.. _fig-runTime:

View File

@@ -694,12 +694,12 @@ LteEnbMac::DoSchedDlConfigInd (FfMacSchedSapUser::SchedDlConfigIndParameters ind
it = m_rlcAttached.find (flow);
NS_ASSERT_MSG (it != m_rlcAttached.end (), "rnti=" << flow.m_rnti << " lcid=" << (uint32_t) flow.m_lcId);
(*it).second->NotifyTxOpportunity (ind.m_buildDataList.at (i).m_rlcPduList.at (j).at (k).m_size);
// send the relative DCI
Ptr<DlDciIdealControlMessage> msg = Create<DlDciIdealControlMessage> ();
msg->SetDci (ind.m_buildDataList.at (i).m_dci);
m_enbPhySapProvider->SendIdealControlMessage (msg);
}
}
// send the relative DCI
Ptr<DlDciIdealControlMessage> msg = Create<DlDciIdealControlMessage> ();
msg->SetDci (ind.m_buildDataList.at (i).m_dci);
m_enbPhySapProvider->SendIdealControlMessage (msg);
}
// Fire the trace with the DL information

View File

@@ -394,6 +394,7 @@ RrFfMacScheduler::DoSchedDlTriggerReq (const struct FfMacSchedSapProvider::Sched
std::list<FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it;
m_rlcBufferReq.sort (SortRlcBufferReq);
int nflows = 0;
int nTbs = 0;
std::map <uint16_t,uint8_t> lcActivesPerRnti;
std::map <uint16_t,uint8_t>::iterator itLcRnti;
for (it = m_rlcBufferReq.begin (); it != m_rlcBufferReq.end (); it++)
@@ -426,6 +427,7 @@ RrFfMacScheduler::DoSchedDlTriggerReq (const struct FfMacSchedSapProvider::Sched
else
{
lcActivesPerRnti.insert (std::pair<uint16_t, uint8_t > ((*it).m_rnti, 1));
nTbs++;
}
}
@@ -440,10 +442,10 @@ RrFfMacScheduler::DoSchedDlTriggerReq (const struct FfMacSchedSapProvider::Sched
// Resource allocation type 0 (see sec 7.1.6.1 of 36.213)
int rbgSize = GetRbgSize (m_cschedCellConfig.m_dlBandwidth);
int rbgNum = m_cschedCellConfig.m_dlBandwidth / rbgSize;
int rbgPerFlow = rbgNum / nflows;
if (rbgPerFlow == 0)
int rbgPerTb = rbgNum / nTbs;
if (rbgPerTb == 0)
{
rbgPerFlow = 1; // at least 1 rbg per flow (till available resource)
rbgPerTb = 1; // at least 1 rbg per TB (till available resource)
}
int rbgAllocated = 0;
@@ -505,9 +507,10 @@ RrFfMacScheduler::DoSchedDlTriggerReq (const struct FfMacSchedSapProvider::Sched
}
// group the LCs of this RNTI
std::vector <struct RlcPduListElement_s> newRlcPduLe;
int totRbg = lcNum * rbgPerFlow;
int tbSize = (LteAmc::GetTbSizeFromMcs (newDci.m_mcs.at (0), totRbg * rbgSize) / 8);
NS_LOG_DEBUG (this << "Allocate user " << newEl.m_rnti << " LCs " << (uint16_t)(*itLcRnti).second << " bytes " << tbSize << " PRBs " << totRbg * rbgSize << " mcs " << (uint16_t) newDci.m_mcs.at (0));
// int totRbg = lcNum * rbgPerFlow;
// totRbg = rbgNum / nTbs;
int tbSize = (LteAmc::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 " << rbgPerTb * rbgSize << " mcs " << (uint16_t) newDci.m_mcs.at (0));
uint16_t rlcPduSize = tbSize / lcNum;
for (int i = 0; i < lcNum ; i++)
{
@@ -524,7 +527,7 @@ RrFfMacScheduler::DoSchedDlTriggerReq (const struct FfMacSchedSapProvider::Sched
}
}
uint32_t rbgMask = 0;
for (int i = 0; i < totRbg; i++)
for (int i = 0; i < rbgPerTb; i++)
{
rbgMask = rbgMask + (0x1 << rbgAllocated);
rbgAllocated++;
@@ -731,7 +734,7 @@ RrFfMacScheduler::DoSchedUlTriggerReq (const struct FfMacSchedSapProvider::Sched
}
uldci.m_tbSize = (LteAmc::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 << " 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);
uldci.m_ndi = 1;
uldci.m_cceIndex = 0;
uldci.m_aggrLevel = 1;