merge ns-3-lena-dev and ns-3-lena-epc
authorNicola Baldo <nbaldo@cttc.es>
Fri, 25 Nov 2011 17:07:42 +0100
changeset 8411 5794513367a1
parent 8410 42b10f57fb87 (current diff)
parent 8342 ae80a024c11e (diff)
child 8412 018034c10dec
child 8420 87a8a13f0cbb
merge ns-3-lena-dev and ns-3-lena-epc
src/lte/doc/Makefile
--- a/src/lte/doc/Makefile	Fri Nov 25 15:39:48 2011 +0100
+++ b/src/lte/doc/Makefile	Fri Nov 25 17:07:42 2011 +0100
@@ -46,17 +46,18 @@
 $(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 $@
--- a/src/lte/doc/source/lte-profiling.rst	Fri Nov 25 15:39:48 2011 +0100
+++ b/src/lte/doc/source/lte-profiling.rst	Fri Nov 25 17:07:42 2011 +0100
@@ -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 @@
 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 @@
 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 @@
 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:
 
--- a/src/lte/model/lte-enb-mac.cc	Fri Nov 25 15:39:48 2011 +0100
+++ b/src/lte/model/lte-enb-mac.cc	Fri Nov 25 17:07:42 2011 +0100
@@ -694,12 +694,12 @@
               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
--- a/src/lte/model/rr-ff-mac-scheduler.cc	Fri Nov 25 15:39:48 2011 +0100
+++ b/src/lte/model/rr-ff-mac-scheduler.cc	Fri Nov 25 17:07:42 2011 +0100
@@ -394,10 +394,12 @@
   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++)
     {
+//       NS_LOG_INFO (this << " User " << (*it).m_rnti << " LC " << (uint16_t)(*it).m_logicalChannelIdentity);
       // remove old entries of this UE-LC
       if ( ((*it).m_rlcTransmissionQueueSize > 0)
            || ((*it).m_rlcRetransmissionQueueSize > 0)
@@ -425,12 +427,13 @@
               else
                 {
                   lcActivesPerRnti.insert (std::pair<uint16_t, uint8_t > ((*it).m_rnti, 1));
+                  nTbs++;
                 }
         
             }
         }
     }
-
+    
   if (nflows == 0)
     {
       return;
@@ -439,10 +442,10 @@
   // 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;
 
@@ -504,15 +507,16 @@
         }
       // 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++)
         {
           RlcPduListElement_s newRlcEl;
           newRlcEl.m_logicalChannelIdentity = (*it).m_logicalChannelIdentity;
-          //NS_LOG_DEBUG (this << "LCID " << (uint32_t) newRlcEl.m_logicalChannelIdentity << " size " << rlcPduSize);
+          NS_LOG_DEBUG (this << "LCID " << (uint32_t) newRlcEl.m_logicalChannelIdentity << " size " << rlcPduSize << " ID " << (*it).m_rnti);
           newRlcEl.m_size = rlcPduSize;
           newRlcPduLe.push_back (newRlcEl);
           it++;
@@ -523,7 +527,7 @@
             }
         }
       uint32_t rbgMask = 0;
-      for (int i = 0; i < totRbg; i++)
+      for (int i = 0; i < rbgPerTb; i++)
         {
           rbgMask = rbgMask + (0x1 << rbgAllocated);
           rbgAllocated++;
@@ -730,7 +734,7 @@
         }
         
       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;