0% found this document useful (0 votes)
24 views11 pages

Final Report College

The document summarizes key aspects of LTE (Long Term Evolution) technology including: 1) It discusses the evolution of cellular communication standards from 1G to 4G/LTE and key technologies used in each generation such as AMPS, GSM, UMTS, LTE. 2) It provides an overview of the LTE network architecture and key techniques used in LTE such as MIMO and OFDM. 3) It describes the LTE frame structure in both FDD and TDD modes and details of the frame such as subframes, slots, and cyclic prefixes.

Uploaded by

kumarbib9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views11 pages

Final Report College

The document summarizes key aspects of LTE (Long Term Evolution) technology including: 1) It discusses the evolution of cellular communication standards from 1G to 4G/LTE and key technologies used in each generation such as AMPS, GSM, UMTS, LTE. 2) It provides an overview of the LTE network architecture and key techniques used in LTE such as MIMO and OFDM. 3) It describes the LTE frame structure in both FDD and TDD modes and details of the frame such as subframes, slots, and cyclic prefixes.

Uploaded by

kumarbib9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Google Test Framework development for LTE

Physical Layer Validation in User Equipment(UE),


Optimization and Scheduling of Activities in Rx
Manish Singh(M210448EC)
Department of Electronics and Communication Engineering
National Institute of Technology, Calicut
manish [email protected]

Under the guidance of


Dr. V. Sakthivel
and
Pradeep Thanneeru (Senior Manager MediaTek Bangalore)

Abstract—LTE is a standard for wireless broadband com- B. 2G (Second Generation)


munication for mobile devices and data terminals, based on
the GSM/EDGE and UMTS/HSPA standards. It is combined 2G cellular technology was launched on the GSM (Global
with top-of-the-line radio techniques in order to gain better System for Mobile) standard. The technology used in it is
performance than CDMA approaches. LTE is a standard for completely different from that of 1G. In 2G we use digital
4G technology in cellular communication systems. In a commu- signal for voice transmission with a speed up to 64kbps. VMS
nication systems, the study is about understanding the receiver in
(Voice Mail Service), value-added service, Short Message
a physical layer. In this report we will cover Layer-1 (L1) receiver
side Understanding the downlink part, scheduling of the event, service (SMS), GPRS (General Packet Radio Service), EDGE
activities and driver functionality of physical layer-1. Also we and CDMA (Code division multiple access) in 2G.
will be covering physical layer channels in the downlink side.
Index Terms—LTE, Physical Layer, Frame Structure, MUT, C. 3G (Third Generation)
OFDM and Carrier Aggregration
Edge technique faced a drawback in packet transferring
which leads to lower the efficiency in the system. So, to
I. I NTRODUCTION
overcome it and to standardize a single global network pro-
LTE stands for Long Term Evolution and it was started as tocol instead of different other techniques 3G was made.
a project in 2004 by telecommunication body known as the A technique called Packet Switching is used to send the
Third Generation Partnership Project (3GPP). SAE (System Data. Along with Voice Communication services 3G provides
Architecture Evolution) is the corresponding evolution of the data services to Television, video and services like Global
GPRS/3G packet core network evolution. The term LTE is roaming works up to range of 2100MHZ with a band width
typically used to represent both LTE and SAE. Cellular com- of 15020MHZ. The major drawback of 3G was the battery,
munication has undergone technological advances from 1G in which used to drain fast.
later 80’s to 4G in 2010. At present the new technology 5G
has promised revolutionary changes in communication with its D. 4G (Fourth Generation)
advancement in technology to speed up the communication in This is the most recent redesign of innovation in versatile
lightning speed. correspondence field it is 10 times quicker than 3G. 4G
depends on an innovation called LTE (Long-Term Evolution)
A. 1G (First Generation) a complete IP based innovation for data transmission. LTE
The local area is divided into cells around limited distance which was created later to upgrade 3G network. LTE uses
each served as base station. This are small Analog system in the OFDM modulation technique which provides the spectral
which information is sent in Analog signals. The frequency efficiency to achieve high data rates but with an addition of
reuse concept can be used in nearby cell but not in adjacent multiple share a common channel. The concept of OFDM is
through which number of users supported in an area increased to divide the channel into many narrow sub-carriers spacing is
a lot. The name given for 1G in those days is cellular an orthogonal which helps to reduce interfere with each other
phone technology working in frequency band of 150KHZ. despite the lack of guard bands between them. OFDM uses
The Technology used in 1st Generation is AMPS (Advanced frequency and time to spread the data across providing high
Mobile Phone System). speed and good signal reliability.
II. B RIEF L ITERATURE S URVEY - LTE equally sized subframes. The duration of each subframe
A. LTE Architecture is 1 ms. Moreover, each subframe is further divided into
two equally sized time slots, that is, each slot is 0.5 ms.
The high-level network architecture of LTE is comprised of
• The number of samples in one frame (10 ms) is 307200
following three main components:
samples. This means that the number of samples per
1) The User Equipment (UE):
second is 307200 x 100 samples.
2) The Evolved UMTS Terrestrial Radio Access Network
• Number of subframe in one frame is 10.
(E-UTRAN):
3) The Evolved Packet Core (EPC): • Number of slots in one subframe is 2. This means that
we have 20 slots within one frame. Fig 3.
B. Techniques used in LTE
1) MIMO Technique: Multiple Input and Multiple Output
is a method for multiplying the capacity of a radio link
using multiple transmission and receiving antennas to exploit
multipath propagation. MIMO can be sub-divided into three
main categories: precoding, spatial multiplexing (SM), and
diversity coding. fig 1.

Fig. 3. LTE Frame Structure

Fig. 1. Basic Structure of a MIMO System 1) Cyclic Prefixes:


2) OFDM: Orthogonal frequency division multiplexing • One slot is made up of 7 small blocks called ’symbol’.

(OFDM) is a type of digital transmission and a method of • There are two different type of Cyclic Prefix. One is

encoding digital data on multiple carrier frequencies. OFDM normal Cyclic Prefix and the other is ’Extended Cyclic
has developed into a popular scheme for wideband digital com- Prefix’ which is longer than the Normal Cyclic Prefix.
munication, used in applications such as digital television and • The normal cyclic prefix, each symbol is preceded by a

audio broadcasting, DSL internet access, wireless networks, cyclic prefix that is usually 144 Ts (4.7 microsecond)
power line networks, and 4G/5G mobile communications. fig long. The first cyclic prefix has a longer duration of
2. 160 Ts (5.2 microsecond), to tidy up the unevenness that
results from fitting seven symbols into a slot. Fig 4.

Fig. 2. TFR Representation of OFDM Signal

Fig. 4. Cyclic Prefixes


C. LTE Frame Structure
LTE organizes its symbols and sub-carriers in the time and 2) TYPE 1: FDD Frame Structure :
frequency domains, First consider the time domain. The timing • LTE F DD is full duplex system, means both the down-
of the LTE transmissions is based on a time unit Ts, which is link and uplink transmission happens at the same time at
defined as follows: different frequencies. fig 5.
Ts = 1/ (2048 X 15000) seconds 3) TYPE 2: TDD Frame Structure :
• In T DD, the two transmissions share the same frequency
Radio frame duration, Tf = 307200 X Ts = 10 ms.
bands but are separated in time. Hence, they share the
• In LTE, DL and UL transmissions are organized into frames, means at one moment of time either downlink
radio frames of 10 ms each. Each frame is divided into ten subframe is transmitted or uplink. fig 6.
Fig. 5. FDD LTE Frame Structure

Fig. 8. LTE Air Interface Protocol Stack Architecture

E. 4G/LTE - Basic Procedures


1) UE is Off:
2) Power On UE:
Fig. 6. TDD LTE Frame Structure in all UDC Configurations
3) Frequency Search and Timing Sync:
4) Cell Search : MIB decoding and essential SIB decoding
etc.:
• Special subframes are used at the transitions from down- 5) Cell Selection:
link to uplink transmission. They contain three regions. 6) Initial RACH Process:
The special downlink region occupies 3 to 12 symbols 7) Registration/Authentication/Attach:
and is used in the same way as any other downlink region. 8) Now UE is in IDLE Mode:
The special uplink region occupies either one or two 9) (If the current cell become weak or UE moves to another
symbols and is only used by the random-access channel cell resign) Cell Reselection:
and the sounding reference signal. The two regions are 10) (When Paging message comes or User make a call)
separated by a guard period of 1 to 10 symbols. fig 7. RACH Process:
11) Setup Dedicated EPS Bearer:
12) Receive data:
13) Transmit data:
14) (If UE power is percieved too weak by the network)
Network send TPC command to increase UE Tx Power:
15) (If UE power is percieved too strong by the network)
Network send TPC command to decrease UE Tx Power:
16) (If UE moves to another cell region) Network and UE
Fig. 7. Special Sub frame in TDD perform Handover procedure:
17) User stop call and UE gets into IDLE mode:
D. LTE Protocol Stack F. Cell Search Procedure
• LTE protocol stack layers in LTE describes User plane • After being powered on, UE tunes the RF and attempts to
layer consists of NAS, PDCP, RLC, MAC, PHY and RF. measure the wideband received power (RSSI) for specific
LTE Control plane layer covers NAS, RRC, PHY and RF. frequencies (channels as commanded by higher layer)
Fig 8. over a set of supported frequency bands one after another
• Functionality of P hysicalLayer(L1): CRC attach- and ranks those cells based on signal strength.
ment, Coding block, scrambling, modulation, measure- • Then it uses downlink synchronization channels i.e. lo-
ment, Resource element mapping, HARQ and MIMO. cally stored P-SS and S-SS to correlate with received one.
Physical Layer carries all information from the MAC UE first finds the primary synchronization signal (PSS)
transport channels over the air interface. which is located in the last OFDM symbol of first time
slot of the first and 5th sub-frames This enables UE to a data transfer. The UEs also obtain uplink timing infor-
be synchronized on sub-frame level.Primary Synchroniza- mation from the initial handshake.
tion Signal helps for Slot Timing Detection and Physical • The main purpose of RACH can be described as follows.
Layer ID (0,1,2) detection. fig 9. (i) Achieve UP link synchronization between UE and
eNB. (ii) Obtain the resource for Message 3 (e.g, RRC
Connection Request).
• UE carry random access preambles used for initiation of
random access procedure.
• This helps eNodeB to calculate PUSCH resources needed
for UE uplink transfer. The UE now utilizing the re-
sources allocated in step where it receive confirmation
of Preamble send, sends RRC connection request on UL-
SCH. In the RRC messages the UE sends its identifier to
the eNB to make it aware of its identity. This identifier is
Fig. 9. PSS and SSS Position in FDD Frame Structure used to solve any contention resolution that can happen.
Fig 11 and Fig 12.
• Secondary synchronization symbols are also located in
the same sub-frame of P-SS but in the symbol before P-
SS. From secondary SS, UE is able to obtain physical
layer cell identity group number (0 to 167) It helps for
Radio Frame Timing detection, find Physical Layer Cell
ID, cyclic prefix length detection, FDD or TDD detection.
• Once UE knows the PCI for a given cell, it also knows
the location of cell Reference signals - which are used
for channel estimation, cell selection / reselection and
handover procedures. After channel estimation using
RS(reference signal), MMSE equalization is performed
to remove the effect of channel impairment from the
received symbols.
• UE achieve Time and Frequency Synchronization with a
cell.
• UE perform cell search on all frequencies before selecting
or re-selecting to a cell.
1) MIB Decoding:
• MIB is special signal that carries the following informa-
tion. You can get the System Bandwidth and SFN by
decoding MIB. (i) DL Bandwidth, Number of Transmit
Antenna, (ii) System Frame Number (SFN), (iii) PHICH Fig. 11. RACH Procedure
Configuration, (iv) Transmit every 40 ms and repeat every
10 ms. step 4 in fig 10. 1) Two types of RACH process : Contention-based and
Contention-free:
• The same PRACH preamble from multipe UE reaches the
NW at the same time.. this kind of PRACH collision is
called ”Contention” and the RACH process that allows
this type of ”Contention” is called ”Contention based”
RACH Process.
• In this kind of contention based RACH process, Net-
work would go through additional process at later step
to resolve these contention and this process is called
”Contention Resolution” step.
• There is some cases that these kind of contention is not
Fig. 10. Cell Search acceptable due to some reason (e.g, timing restriction)
and these contention can be prevented.
G. LTE RACH Procedure • In this case Network will allocate these preamble sig-
• Rach is the first message from eNodeB from UE. LTE nature so that it would not collide. This kind of RACH
random access procedure is used by the UEs to initiate process is called ”Contention Free” RACH procedure.
• To initiate the ”Contention Free” RACH process, UE
should be in Connected Mode before the RACH process
as in Handover case. fig 13.

Fig. 14. Mapping of different Channels

• It occupies 72 subcarriers belong to first 4 OFDMA


symbols of second slot of every 10ms radio frame. PBCH
transmission is spread over four 10 ms frames (over
Fig. 12. Initial Access process using Random Access
subframe 0) to span a 40 ms period. fig 15.

Fig. 13. Contention Based RACH Procedure Fig. 15. LTE-Physical Broadcast channel

H. Physical Downlink channels in LTE 2) PCFICH channel -Physical Control Format Indicator
Channel:
• These Channels carries information between different
• Physical Control Format Indicator Channel (PCFICH) is
protocol layers. Segregation of data allow data to trans-
used at the starting of each 1ms subframe. It provides
port across different transport layer.
information about number of symbols used for PDCCH
• They also provide interfaces to each layer in LTE stack,
transmission. The signalling values for PCFICH depends
thus providing an orderly flow of data in each layer. Fig
upon channel bandwidth.
14.
• LTE PCFICH channel occupies 16 REs(Resource Ele-
• Channels in both in UL and DL direction, (i) Logi- ments) in first OFDMA symbol of each 1ms subframe.
cal Channel: W hat type of information, (ii) Transport PCFICH uses QPSK modulation and hence 16 REs will
channel: How this information is transported and (iii) occupy 32 bits. The exact position of which in first
Physical layer: W here to send this information. OFDMA symbol depends on Channel BW and Physical
1) PBCH Channel-LTE Physical Broadcast Channel: layer cell identity.
• It is used to broadcast MIB using BCH as transport • CFI(Control format indicator): it tells how many OFDM
and BCCH as logical channel. PBCH is downlink only symbols are used for carrying control channels(eg. PD-
channel. The PBCH broadcasts a limited number of CCH and PHICH) at each subframe, (i) CFI = 1: one
parameters essential for initial access of the cell such as symbol is used for PDCCH allocation, (ii) CFI = 2: first
downlink system bandwidth, the Physical Hybrid ARQ two symbols are used for PDCCH allocation.
Indicator Channel structure, and the most significant
eight-bits of the System Frame Number.
3) PDCCH channel -Physical Control Format Indicator • Decode PHICH channel (PHICH is also at the first
Channel: symbol of the first slot.)
• Physical Control Format Indicator Channel (PCFICH) is • Based on this, UE will calculate CCE index for PDCCH.
used at the starting of each 1ms subframe. It provides • Decode PDCCH and find DCI (DCI1 or DCI1A) which
information about number of symbols used for PDCCH is destined to the UE.
transmission. The signalling values for PCFICH depends • From the DCI, figure out the locations for PDSCH which
upon channel bandwidth. is allocated for the UE.
• LTE PCFICH channel occupies 16 REs(Resource Ele- • Decode PDSCH. Fig 16.
ments) in first OFDMA symbol of each 1ms subframe. I. Advantages of LTE
PCFICH uses QPSK modulation and hence 16 REs will
occupy 32 bits. The exact position of which in first 1) High throughput: High data rates can be achieved in
OFDMA symbol depends on Channel BW and Physical both downlink as well as uplink. This causes high throughput.
layer cell identity. 2) Low latency: Time required to connect to the network
• CFI(Control format indicator): it tells how many OFDM
is in range of a few hundred milliseconds and power saving
symbols are used for carrying control channels(eg. PD- states can now be entered and exited very quickly.
CCH and PHICH) at each subframe, (i) CFI = 1: one 3) FDD and TDD in the same platform: Frequency Divi-
symbol is used for PDCCH allocation, (ii) CFI = 2: first sion Duplex (FDD) and Time Division Duplex (TDD), both
two symbols are used for PDCCH allocation. schemes can be used on same platform.
4) Seamless Connection: LTE will also support seamless
connection to existing networks such as GSM, CDMA and
WCDMA.
5) Plug and play: The user does not have to manually
install drivers for the device. Instead, system automatically
recognizes the device, loads new drivers for the hardware if
needed and begins to work with the newly connected device.
III. P ROBLEM D EFINITION AND F ORMULATION
A. Google C++ Testing Framework helps you write better
C++ tests. No matter whether you work on Linux, Windows,
or a Mac, if you write C++ code, Google Test can help you.
So what makes a good test, and how does Google C++ Testing
Framework fit in? We believe:
• Tests should be independent and repeatable. It’s a pain
Fig. 16. LTE-Physical Broadcast channel
to debug a test that succeeds or fails as a result of other
4) Decoding of PDCCH: tests. Google C++ Testing Framework isolates the tests
by running each of them on a different object. When a
• One PDCCH carries one DCI message with one of the
test fails, Google C++ Testing Framework allows you to
formats. run it in isolation for quick debugging.
• Each scheduling message is transmitted on a separate
• Tests should be well organized and reflect the structure of
PDCCH, and consequently there are typically multiple the tested code. Google C++ Testing Framework groups
simultaneous PDCCH transmissions within each cell. related tests into test cases that can share data and
• The UE is only informed of the number of OFDM
subroutines. This common pattern is easy to recognize
symbols within the control region of a subframe and is not and makes tests easy to maintain. Such consistency is
provided with the location of its corresponding PDCCH. especially helpful when people switch projects and start
The UE finds its PDCCH by monitoring a set of PDCCH to work on a new code base.
candidates in every subframe. • Tests should be portable and reusable. The open-source
• The UE de-mask each control candidate’s CRC using
community has a lot of code that is platform-neutral,
its Radio Network Temporary Identifier (RNTI). If no its tests should also be platform-neutral. Google C++
CRC error is detected, the UE considers it as a successful Testing Framework works on different OSes, with differ-
decoding attempt and reads the control information within ent compilers (gcc, MSVC, and others), with or without
the successful candidate. Fig 16. exceptions, so Google C++ Testing Framework tests can
5) Decoding of PDSCH: easily work with a variety of configurations.
• Process the first OFDM symbol of the first slot within a • When tests fail, they should provide as much information
subframe. about the problem as possible. Google C++ Testing
• Detect PCFICH channel and figure out howw many Framework doesn’t stop at the first test failure. Instead,
symbols are used for PDCCH. it only stops the current test and continues with the next.
You can also set up tests that report non-fatal failures after
which the current test continues. Thus, you can detect and
fix multiple bugs in a single run-edit-compile cycle.
• The testing framework should liberate test writers from
housekeeping chores and let them focus on the test
content. Google C++ Testing Framework automatically Fig. 17. Checking Two string equalisation
keeps track of all tests defined, and doesn’t require the
user to enumerate them in order to run them.
returns from the current function, while ASSERT * yields a
• Tests should be fast. With Google C++ Testing Frame-
nonfatal failure, allowing the function to continue running. In
work, you can reuse shared resources across tests and pay
either case, an assertion failure means its containing test fails.
for the set-up/tear-down only once, without making tests
Availability: Linux, Windows, Mac. Fig. 18.
depend on each other.

B. Basic Concepts
When using Google Test, you start by writing assertions,
which are statements that check whether a condition is true.
An assertion’s result can be success, nonfatal failure, or fatal
failure. If a fatal failure occurs, it aborts the current function; Fig. 18. Basic Assertions
otherwise the program continues normally. Tests use assertions
to verify the tested code’s behavior. If a test crashes or has a
E. Binary Comparison
failed assertion, then it fails; otherwise it succeeds. A test case
contains one or many tests. You should group your tests into This section describes assertions that compare two values.
test cases that reflect the structure of the tested code. When In the event of a failure, Google Test prints both val1 and val2.
multiple tests in a test case need to share common objects Value arguments must be comparable by the assertion‘s com-
and subroutines, you can put them into a test fixture class. A parison operator or you’ll get a compiler error. ASSERT EQ()
test program can contain multiple test cases. We’ll now explain does pointer equality on pointers. If used on two C strings, it
how to write a test program, starting at the individual assertion tests if they are in the same memory location, not if they have
level and building up to tests and test cases. Fig 21. the same value. Fig. 19.

C. Assertions
Google Test assertions are macros that resemble function
calls. You test a class or function by making assertions about
its behavior. When an assertion fails, Google Test prints the
assertion‘s source file and line number location, along with
a failure message. You may also supply a custom failure
message which will be appended to Google Test’s message.
The assertions come in pairs that test the same thing but have
different effects on the current function. ASSERT * versions
generate fatal failures when they fail, and abort the cur- Fig. 19. Binary Comparison
rent function. ASSERT * versions generate nonfatal failures,
which don‘t abort the current function. Usually ASSERT * are
F. String Comparison
preferred, as they allow more than one failures to be reported
in a test. However, you should use ASSERT * if it does not The assertions in this group compare two C strings. If
make sense to continue when the assertion in question fails. you want to compare two string objects, use EXPECT EQ,
Since a failed ASSERT * returns from the current function EXPECT NE, and etc instead. Fig. 20.
immediately, possibly skipping clean-up code that comes after
it, it may cause a space leak. Depending on the nature of the
leak, it may or may not be worth fixing - so keep this in mind
if you get a heap checker error in addition to assertion errors.
To provide a custom failure message, simply stream it into
the macro using the left shift operator, or a sequence of such Fig. 20. String Comparison
operators. Fig. 17.

D. Basic Assertions
These assertions do basic true/false condition testing. Re-
member, when they fail, ASSERT * yields a fatal failure and
WCDMA, LTE) there is a specific signal that perform the
same function.
• Analysis part: This issue will be observed in two per-
spectives. One is with scheduling request and the other
is in terms of RA RNTI.
• Scheduling Request process:
• (i). First step is to check whether C-RNTI is enabled or
not.
• (ii). Next Step is to check whether UL grant is received
from the network when C-RNTI is enabled. Fig 23.

Fig. 21. TEST Plan of MUT

IV. O BJECTIVE
• To verify and check MUT (Module/Modem Test Cases)
of a targeted main code written in C++ language under
Google Test framework.
• To handle the issues related to the performance, any
new updation or coding error on the basis of code and
specification study.

Fig. 22. Flow of Information


Fig. 23. RACH procedure summary

• A CASE:
• RA-RNTI process:
• Physical layer request for cell search to RRC layer so that
• First step is to check whether RA-RNTI is enabled or
it can camp on to a cell, RRC layer performs the follow-
not.
ing functions such as broadcast of system information,
• Next is to check whether RAR grant is received from the
paging, establishment/release of an RRC connection.
network when RA-RNTI is enabled.
• The setup request confirmation comes from higher layer
• Once after RAR grant is received, then have to check
comes to various modules in order to perform events like
whether T-CRNTI is enabled or not.
cell search, power scan and specific cell search etc.
• At last, when T-CRNTI is enabled, one must check for
• After cell camp on, Controller and driver will perform
the MSG4(RRC Connection setup).
various data calculations will configuration the DSP,
• After the UE sends the preamble, it monitors the physical
where data analysis is done at very lower level.
dedicated control channel (PDCCH) and waits for a
V. W ORK D ONE SO FAR AND R ESULTS random access response within a random access response
window.
A. Issue Analysis • If the UE receives a response containing an RA-preamble
1) Performance Related issues: identifier which is the same as the identifier contained
in the transmitted random access preamble, the response
• For performance related issues, some regions will be
is successful. The UE then transmits uplink scheduling
mentioned from the other teams where actually the issue
information.
is happening.
• If the UE does not receive a response within the random
• Once after we got to know about the regions, we must
access window or fails to verify the response, the re-
use Log tool for analysis through the log.
sponse fails. In this case, if the number of random access
• RACH Failure: This is the first message from UE to eNB
attempts is smaller than the upper limit, the UE retries
when you power it on. Even though they use a little bit
random access. Otherwise, random access fails. Fig 24.
different name, in all cellular technology (CDMA, GSM,
C. Simple Tests:
• Use the TEST() macro to define and name a test function,
These are ordinary C++ functions that don’t return a
value.
• In this function, along with any valid C++ statements you
want to include, use the various Google Test assertions
to check values.
• The test’s result is determined by the assertions; if any
assertion in the test fails (either fatally or non-fatally),
or if the test crashes, the entire test fails. Otherwise, it
Fig. 24. RACH Failure
succeeds. Fig 26.

• If anyone of the steps is not successful, then it leads to the


RACH failure performance issue. All this analysis used
to do by using LOG tool.
• For example, to find out whether C-RNTI is enabled or
not, one must check in very large region in LOG tool
which takes lot of time around 1 day and with the help
of LR Tool, to find out C-RNTI is enabled or not it takes Fig. 26. Simple Test Case
very less time. Fig 25, and it helps in analyzing the whole
issue in a very less time which will be around three or
D. Test Fixtures: Using the Same Data Configuration for
four hours.
Multiple Tests
• If you find yourself writing two or more tests that operate
on similar data, you can use a test fixture. It allows you
to reuse the same configuration of objects for several
different tests.
• Derive a class from ::testing::Test . Start its body with
protected: or public: as we’ll want to access fixture
members from sub-classes.
• Inside the class, declare any objects you plan to use.
• If necessary, write a default constructor or SetUp function
Fig. 25. C-RNTI Visualization
to prepare the objects for each test. A common mistake
is to spell SetUp as Setup() with a small u - don’t let that
happen to you.
B. Setting up a New Test Project: • If necessary, write a destructor or TearDown() function to
release any resources you allocated in SetUp(). To learn
To write a test program using Google Test, you need to when you should use the constructor/destructor and when
compile Google Test into a library and link your test with you should use SetUp()/TearDown(). If needed, define
it. We provide build files for some popular build systems: subroutines for your tests to share. Fig 27.
msvc/ for Visual Studio, xcode/ for Mac Xcode, make/ for
GNU make, ”code gear/ for Borland C++ Builder”, and the
autotools script (deprecated) and CMakeLists.txt for CMake
(recommended) in the Google Test root directory. If your
build system is not on this list, you can take a look at
make/Makefile to learn how Google Test should be compiled
(basically you want to compile src/gtest-all.cc with GTEST Fig. 27. Test Fixtures cases: Using the Same Data Configuration for Multiple
ROOT and GTEST ROOT/include in the header search path, Tests
where GTEST ROOT is the Google Test root directory)..
Once you are able to compile the Google Test library, you
should create a project or build target for your test program. E. For each test defined with TEST F(), Google Test will:
Make sure you have GTEST ROOT/include in the header • Create a fresh test fixture at runtime.
search path so that the compiler can find ”gtest/gtest.h” when • Immediately initialize it via SetUp().
compiling your test. Set up your test project to link with the • Run the test
Google Test library. • Clean up by calling TearDown()
• Delete the test fixture. Note that different tests in the same
test case have different test fixture objects, and Google
Test always deletes a test fixture before it creates the next
one. Google Test does not reuse the same test fixture for
multiple tests. Any changes one test makes to the fixture
do not affect other tests.
F. What Is Google C++ Mocking Framework?
When you write a prototype or test, often it’s not feasible or
wise to rely on real objects entirely. A mock object implements
the same interface as a real object (so it can be used as one),
but lets you specify at run time how it will be used and what
it should do,
• Fake objects have working implementations, but usually
take some shortcut (perhaps to make the operations less
expensive), which makes them not suitable for produc-
tion. An in-memory file system would be an example of
a fake. Fig. 28. Mock Test Syntax
• Mocks are objects pre-programmed with expectations,
which form a specification of the calls they are expected
to receive. • In Google Mock we use the EXPECT CALL() macro to
1) Using Google Mock involves three basic steps:: set an expectation on a mock method. The general syntax
• Use some simple macros to describe the interface you is:
want to mock, and they will expand to the implementation • Note: It is easy to confuse the term fake objects with
of your mock class. mock objects. Fakes and mocks actually mean very
• Create some mock objects and specify its expectations different things in the Test-Driven Development (TDD)
and behavior using an intuitive syntax; community:
• Exercise code that uses the mock objects. Google Mock
will catch any violation of the expectations as soon as it
arises.
2) Using Mocks in Tests:
• Import the Google Mock names from the testing names-
pace such that you can use them unqualified (You only
have to do it once per file. Remember that namespaces
are a good idea and good for your health.). Fig. 29. Setting Expectations
• Create some mock objects.
• Specify your expectations on them (How many times will
• Linux build and Trigger of some test cases. Fig 30, 31
a method be called? With what arguments? What should and 32.
it do? etc.).
• Exercise some code that uses the mocks; optionally, check
the result using Google Test assertions. If a mock method
is called more than expected or with wrong arguments,
you’ll get an error immediately.
• When a mock is destructed, Google Mock will automat-
ically check whether all expectations on it have been
satisfied. Fig 28.
3) Setting Expectations in MUT .cpp fake file:
• The key to using a mock object successfully is to set
the right expectations on it. If you set the expectations
too strict, your test will fail as the result of unrelated Fig. 30. Build Run
changes. If you set them too loose, bugs can slip through.
You want to do it just right such that your test can catch
exactly the kind of bugs you intend it to catch. Google
Mock provides the necessary means for you to do it “just
right.” Fig 29.
Fig. 31. Some Test cases failed

Fig. 34. TEST Cases coverage, Function and Line

R EFERENCES
Fig. 32. Final Results with all Test case pass [1] ”Physical Layer,” in LTE and the Evolution to 4G Wireless: De-
sign and Measurement Challenges , Wiley, 2013, pp.91-157, doi:
10.1002/9781118799475.ch3.
[2] E. Hajlaoui, A. Khlifi, A. Zaier, J. Ghodhbane, M. Ben Hamed and
• All Test Modules TEST cases Coverage, Function and L. Sbita, ”Performance Evaluation of LTE Physical Layer,” 2019
line Coverage. Fig 33 and 34. International Conference on Internet of Things, Embedded Systems
and Communications (IINTEC), 2019, pp. 106-111, doi: 10.1109/IIN-
TEC48298.2019.9112117.
[3] Sung-won Kim and Kun-yong Kim, ”Physical layer verification for
3GPP LTE (FDD),” 2009 11th International Conference on Advanced
Communication Technology, 2009, pp. 1095-1100.
[4] https://www.rfwireless-world.com/Tutorials/LTE-Physical-layer.html
[5] https://devopedia.org/mock-testing
[6] google/googletest/+/refs/tags/release-1.8.0/googlemock/docs/For Dum-
mies.md
[7] L. Bhaskar, R. B. Natak and R. Ranjith, ”Unit Testing for USB Module
Using Google Test Framework,” 2020 11th International Conference on
Computing, Communication and Networking Technologies (ICCCNT),
2020, pp. 1-3, doi: 10.1109/ICCCNT49239.2020.9225528.
[8] A. Arcuri, G. Fraser and R. Just, ”Private API Access and Functional
Mocking in Automated Unit Test Generation,” 2017 IEEE International
Conference on Software Testing, Verification and Validation (ICST),
2017, pp. 126-137, doi: 10.1109/ICST.2017.19.
Fig. 33. First Test Case Simulation [9] https://www.telecomhall.net/t/rach-failure-in-lte/7958/2
[10] https://www.researchgate.net/figure/OFDM-system-transceiver-block-
diagram
[11] https://www.sharetechnote.com/html/FrameStructure
[12] Mediatek related content idea by Manager.

You might also like