EC8791 Important Questions
EC8791 Important Questions
QUESTION BANK
Complex systems and microprocessors– Embedded system design process –Design example: Model
train controller- Design methodologies- Design flows - Requirement Analysis – Specifications-System
analysis and architecture design – Quality Assurance techniques - Designing with computing
platforms – consumer electronics architecture – platform-level performance analysis.
PART-A
PART-B
1. (i) What are the factors to be considered while designing an Embedded System Process? (7)
Refer page no. 10-19 in Marilyn Wolf Book 3rd Edition
(ii) State the importance of Structural and Behavioral description in detail. (6)
Refer page no. 21-28 in Marilyn Wolf Book 3rd Edition
(ii) Analyze in detail about the challenges in embedded computing system design. (7)
Refer page no. 8-9 in Marilyn Wolf Book 3rd Edition
3. (i) Mention the requirements for designing a GPS moving map in embedded system design
process.
Refer page no. 12-16 in Marilyn Wolf Book 3rd Edition (8)
(ii) Write down the major operations and data flows of a GPS moving map and draw its
Architecture. (5)
Refer page no. 17-19 in Marilyn Wolf Book 3rd Edition
5. Define acronym of CRC. Make the use of a CRC card Layout to explain the system analysis
and architecture design. (13)
Refer page no. 396-400 in Marilyn Wolf Book 3rd Edition
6. Explain the platform level performance analysis of Embedded System Design. (13)
Refer page no. 188-191 in Marilyn Wolf Book 3rd Edition
7. Analyze the hierarchical design flow for an embedded system with suitable diagrams. (13)
Refer page no. 383, 386-387 in Marilyn Wolf Book 3rd Edition
8. Construct system design methods using water fall, spiral and rain fall method and also give
the differences. (13)
Refer page no. 383-385 in Marilyn Wolf Book 3rd Edition
10. Develop a model that would change system design using hardware/software design system
method.
Refer page no. 383, 385-386 in Marilyn Wolf Book 3rd Edition (13)
11. (i) Design in detail a Model Train Controller with suitable diagrams. (8)
Refer page no. 28-32 in Marilyn Wolf Book 3rd Edition
(iii) Formulate design steps of Model Train Controller in detail. (5)
13. Write short note on the following in terms of consumer electronicssystem architecture.
(i) Use Cases and Requirements (5)
Refer page no. 185-186 in Marilyn Wolf Book 3rd Edition
(ii) Platforms and Operating Systems (5)
Refer page no. 187 in Marilyn Wolf Book 3rd Edition
(iii) Flash File Systems (3)
Refer page no. 188 in Marilyn Wolf Book 3rd Edition
PART-C
1. Develop the requirement, specification and state diagram of a model train controller with
necessary illustrations. (15)
Refer page no. 28-42 in Marilyn Wolf Book 3rd Edition
2. Elaborate following in detail as per system level design analysis.
(i) Consumer electronics architecture (5)
Refer page no. 185-186 in Marilyn Wolf Book 3rd Edition
(ii) Quality Assurance techniques (5)
Refer page no. 402-403 in Marilyn Wolf Book 3rd Edition
(iii) Architecture design (5)
Refer page no. 396-397 in Marilyn Wolf Book 3rd Edition
3. Evaluate the different factors involved in embedded system design process. (15)
Refer page no. 10-19 in Marilyn Wolf Book 3rd Edition
4. Justify poor specifications lead to poor quality code - do aspects of a poorly constructed
specification necessarily lead to bad software? (15)
Refer page no. 402-404 in Marilyn Wolf Book 3rd Edition
UNIT II - ARM PROCESSOR AND PERIPHERALS
ARM Architecture Versions – ARM Architecture – Instruction Set – Stacks and Subroutines –
Features of the LPC 214X Family – Peripherals – The Timer Unit – Pulse Width Modulation Unit –
UART – Block Diagram of ARM9 and ARM Cortex M3 MCU.
PART-A
17. Summarize any five peripherals in the LPC 2148 MCU. (U)
Timer: Timer is a specific type of clock which is used to measure the time intervals. It
provides/measures the time interval by counting the input clocks.
UART: UART (Universal Asynchronous Receiver/Transmitter) is a serial communication protocol
in which data is transferred serially bit by bit at a time. In Asynchronous serial communication, a
byte of data is transferred at a time. UART serial communication protocol uses a defined frame
structure for their data bytes.
PWM: Pulse Width Modulation (PWM) is a technique by which width of a pulse is varied while
keeping the frequency constant. A period of a pulse consists of an ON cycle (HIGH) and
an OFF cycle (LOW). The fraction for which the signal is ON over a period is known as duty cycle.
Watchdog timer: The purpose of the watchdog is to reset the microcontroller within a reasonable
amount of time if it enters an erroneous state. When enabled, the watchdog will generate a system
reset if the user program fails to „feed‟ (or reload) the watchdog within a predetermined amount of
time.
10 bit ADC: The LPC2141/42 contains one and the LPC2144/46/48 contains two analog to digital
converters. These converters are single 10-bit successive approximation analog to digital converters.
While ADC0 has six channels, ADC1 has eight channels. Therefore, total number of available ADC
inputs for LPC2141/42 is 6 and for LPC2144/46/48 are 14.
18. Compare PCLK and CCLK. (AZ)
The APB divider determines the relationship between the processor clock (CCLK) and the
clock used by peripheral devices (PCLK). The APB divider serves two purposes. The first is to
provide peripherals with the desired PCLK via APB bus so that they can operate at the speed chosen
for the ARM processor.
19. For a GPIO pin to be made to act as an ON/OFF switch, which are the registers to be used.
(AZ)
PORT1 pins are configured as GPIO using PINSEL register and then their direction is set as
Output using the IODIR register. LEDs are turned ON by sending a high pulse using IOSET register.
20. How does the prescalar in a timer unit function? (C)
A 32-bit timer/counter has a programmable 32-bit prescalar. This is used to specify the
prescalar value for incrementing the TC (Timer Counter).
21. Distinguish between single and double edged PWM. (AZ)
Single Edge Controlled PWM: All the rising (positive going) edges of the output waveform are
positioned/fixed at the beginning of the PWM period. Only falling (negative going) edge position can
be controlled to vary the pulse width of PWM.
Double Edge Controlled PWM: All the rising (positive going) and falling (negative going) edge
positions can be controlled to vary the pulse width of PWM. Both the rising as well as the falling
edges can be positioned anywhere in the PWM period.
PART-B
PART-C
1. Write a program to find the sum of 3X + 4Y + 9Z, where X = 2, Y = 3 and Z = 4 using ARM
Processor instruction set. (15)
2. Generate the program using ARM instruction to calculate 3X2 + 5Y2, where X = 8 and
Y = 5. (15)
3. Discuss on the procedure to generate the square wave from Timer unit in LPC214x chip with
an example code. (15)
4. Evaluate the values to be entered in the PWMPCR register for the following situations? (15)
(i) Single edge control for PWM3
(ii) Double edge control for PWM3
(iii)Single edge control for PWM1, 2 and 3
UNIT III - EMBEDDED PROGRAMMING
Components for embedded programs- Models of programs- Assembly, linking and loading –
compilation techniques- Program level performance analysis – Software performance optimization –
Program level energy and power analysis and optimization – Analysis and optimization of program
size- Program validation and testing.
PART – A
A circular buffer stores a subset of the data stream. At each point in time, the algorithm needs a
subset of the data stream that forms a window into the stream. The window slides with time as we
throw out old values no longer needed and add new values.
3. Compare enqueueing and dequeueing. (AZ)
Enqueueing: The code for adding an element to the tail of the queue is known as enqueueing.
void enqueue(int val)
{
if (((tail+1) % Q_SIZE) == head) error("enqueue onto full queue",tail);
q[tail] = val;
if (tail == Q_MAX) tail = 0;
else tail++;
}
Dequeueing: The code for removing an element from the head of the queue is known as
dequeueing.
int dequeue()
{
int returnval;
if (head == tail) error("dequeue from empty queue",head);
returnval = q[head];
if (head == Q_MAX) head = 0;
else head++;
return returnval;
}
4. Describe about state machine. (C)
When inputs appear intermittently rather than as periodic samples, it is often convenient to
think of the system as reacting to those inputs. The reaction of most systems can be characterized
in terms of the input received and the current state of the system. This leads naturally to a finite-
state machine style of describing the reactive system‟s behavior.
5. Draw the signal flow graph of 3 stage FIR filter and write its code in C. (U)
The Figure shows a bit of C code with control constructs and the CDFG constructed from it.
As shown in the figure, the name of each symbol and its address is stored in a symbol table that
is built during the first pass. The symbol table is built by scanning from the first instruction to the
last.
17. Discuss about the elements of program performance. (U)
Program execution time can be seen as, Execution time = Program path + Instruction timing.
The path is the sequence of instructions executed by the program. The instruction timing is
determined based on the sequence of instructions traced by the program path, which takes into
account data dependencies, pipeline behavior, and caching.
18. State the difference between program location counter and program counter. (R)
The symbol table is built by scanning from the first instruction to the last. During scanning, the
current location in memory is kept in a program location counter (PLC). Despite the similarity in
name to a program counter, the PLC is not used to execute the program, only to assign memory
locations to labels.
PART – B
1. Analyze the components of embedded program and discuss in detail about each component.
(13)
Refer page no. 214 – 223 in Marilyn Wolf Book 3rd Edition
2. Describe about stream-oriented programming and circular buffer with example. (13)
Refer page no. 216 – 221 in Marilyn Wolf Book 3rd Edition
3. (i) List the different models of Program. (3)
Refer page no. 223 in Marilyn Wolf Book 3rd Edition
(ii)Briefly explain with neat diagrams on various models of program. (10)
Refer page no. 224 - 228 in Marilyn Wolf Book 3rd Edition
4. Examine the Data flow graph with the help of an example. (13)
Refer page no. 224 in Marilyn Wolf Book 3rd Edition
5. Illustrate the Code/Data flow graph for a While loop with necessary diagrams. (13)
Refer page no. 226 – 228 in Marilyn Wolf Book 3rd Edition
6. In compilation process, Elaborate the role of:
(i) Assembly (7)
Refer page no. 229 – 233 in Marilyn Wolf Book 3rd Edition
(ii) Linking and Loading (6)
Refer page no. 233 – 235 in Marilyn Wolf Book 3rd Edition
7. With the help of a flow chart describe the basic compilation process. (13)
Refer page no. 236 – 245 in Marilyn Wolf Book 3rd Edition
8. For the given conditional code snippet, generate the code (13)
if (a + b > 0)
x = 5;
else
x = 7;
Refer page no. 240 – 242 in Marilyn Wolf Book 3rd Edition
9. Discuss about the Procedure and Data structure with respect to compilers. (13)
Refer page no. 242 – 245 in Marilyn Wolf Book 3rd Edition
10. Demonstrate the dead code elimination to optimize the program with a code snippet. (13)
Refer page no. 246 – 247 in Marilyn Wolf Book 3rd Edition
11. Investigate the Loop transformation techniques for optimization of code. (13)
Refer page no. 262 – 263 in Marilyn Wolf Book 3rd Edition
12. Outline the Program level energy and power analysis and optimization. (13)
Refer page no. 266 – 269 in Marilyn Wolf Book 3rd Edition
13. Write about
(i) Black Box Testing (7)
Refer page no. 278 – 279 in Marilyn Wolf Book 3rd Edition
(ii) White Box/Clear Box Testing (6)
Refer page no. 271 – 278 in Marilyn Wolf Book 3rd Edition
14. (i) Illustrate with necessary diagrams about the program level performance analysis. (7)
Refer page no. 254 – 260 in Marilyn Wolf Book 3rd Edition
(ii)Frame the key features of clear box testing. (6)
Refer page no. 271 – 278 in Marilyn Wolf Book 3rd Edition
PART – C
1. Create a symbol table for the following code snippet (15)
ORG 100
label1: ADR r4, c
LDR r0, [r4]
label2: ADR r4, d
LDR r1, [r4]
label3: SUB r0, r0, r1
Refer page no. 231 – 232 in Marilyn Wolf Book 3rd Edition
2. Generate the statement translation into ARM instruction for the expression a*b + 5*(c-d).
(15)
Refer page no. 238 – 239 in Marilyn Wolf Book 3rd Edition
3. Explain the steps for Program generation from compilation through loading. (15)
Refer page no. 228 – 236 in Marilyn Wolf Book 3rd Edition
4. Evaluate the different techniques used in software performance optimization. (15)
Refer page no. 262 – 266 in Marilyn Wolf Book 3rd Edition
UNIT IV - REAL TIME SYSTEMS
Structure of a Real Time System –– Estimating program run times – Task Assignment and Scheduling
– Fault Tolerance Techniques – Reliability, Evaluation – Clock Synchronisation.
PART – A
1. List out the two RM scheduling conditions. (R)
The rate-monotonic (RM) scheduling algorithm is a uniprocessor static-priority preemptive
scheme. The following assumptions are made in addition to assumptions A1 to A3
A4: All tasks in the task set are periodic.
A5: The relative deadline of a task is equal to its period.
2. Outline the uniprocessor scheduling algorithms. (R)
Uni-processor scheduling is part of the process of developing a multiprocessor schedule. Our
ability to obtain a feasible multiprocessor schedule is therefore linked to obtain feasible
uniprocessor schedules.
3. Define Performance measures for real time systems. (R)
A good performance measure must:
• Represent an efficient encoding of relevant information.
• Provide an objective basis for the ranking of candidate controller for a given application.
• Provide objective optimization criteria for design.
• Represent verifiable facts.
4. What is mean by hardware and software fault? (R)
A hardware fault is some physical defect that can cause a component to malfunction. A broken
wire or the output of a logic gate that is perpetually stuck at some logic value (0 or 1) are hardware
faults.
A software fault is a "bug" that can cause the program to fail for a given set of inputs.
5. Show the limitation of RM algorithm. (R)
Processes involved should not share the resources with other processes. Deadlines must be
similar to the time periods. Deadlines are deterministic. Process running with highest priority that
needs to run, will preempt all the other processes.
6. Discuss the performance degradation of a fault tolerant system. (U)
As the extent of the failures increases, performance starts to degrade. The system runs out of
slack capacity, and the operating system must begin shedding computational load. The less critical
tasks are shed, and the system is still able to carry out the critical core of tasks that are vital to the
survival of the controlled process.
7. Explain the forward and backward error recovery. (U)
Error recovery is the process by which the system attempts to recover from the effects of an
error. There are two forms of error recovery: forward and backward.
In forward error recovery, the error is masked without any computations having to be
redone.
In backward error recovery, the system is rolled back to a moment in time before the error is
believed to have occurred and the computation is carried out again. Backward error recovery uses
time redundancy, since it consumes additional time to mask the effects of failure.
8. Classify the partitioning of the intervote interval. (U)
The intervote interval can be divided into a first segment of negligible duration during which
any reconfiguration is carried out, and a second segment of length, which is when the application
programs are run.
PART – B
PART – C
1. Estimate the Techniques for allocating and scheduling tasks on processors to ensure that
deadlines are met. (15)
2. Discuss the preemptive earliest deadline first algorithm. (15)
3. Evaluate utilization bound for the RM algorithm and explain it in detail. (15)
4. Construct the reliability models for hardware redundancy. (15)
UNIT V - PROCESSES AND OPERATING SYSTEMS
Introduction – Multiple tasks and multiple processes – Multirate systems- Preemptive real-time
operating systems- Priority based scheduling- Interprocess communication mechanisms – Evaluating
operating system performance- power optimization strategies for processes – Example Real time
operating systems-POSIXWindows CE. - Distributed embedded systems – MPSoCs and shared
memory multiprocessors. – Design Example - Audio player, Engine control unit – Video accelerator.
PART – A
11. Evaluate the communication among processes which runs at different rates. (E)
Interprocess communication mechanisms are provided by the operating system as part of the
process abstraction.
In general, a process can send a communication in one of two ways: blocking or
nonblocking. After sending a blocking communication, the process goes into the waiting
state until it receives a response. Nonblocking communication allows the process to
continue execution after sending the communication.
Both types of communication are useful.
There are two major styles of interprocess communication: shared memory and message
passing.
12. List the advantages and limitations of Priority based process scheduling. (R)
Priority Scheduling is a method of scheduling processes that is based on priority. In this
algorithm, the scheduler selects the tasks to work as per the priority. The processes with higher priority
should be carried out first, whereas jobs with equal priorities are carried out on a round-robin or FCFS
basis. Priority depends upon memory requirements, time requirements, etc.
Advantages:
Disadvantages:
If the system eventually crashes, all low priority processes get lost.
If high priority processes take lots of CPU time, then the lower priority processes may starve
and will be postponed for an indefinite time.
This scheduling algorithm may leave some low priority processes waiting indefinitely.
A process will be blocked when it is ready to run but has to wait for the CPU because some
other process is running currently.
If a new higher priority process keeps on coming in the ready queue, then the process which is
in the waiting state may need to wait for a long duration of time.
13. Analyze the multi-processing systems. (AZ)
A multiprocessor system consists of a multiple number of processors, including multi-core
processors, which share main memory and I/O devices. If, in addition to the shared memory, each
processor also has private local memory, it is called a Non-uniform Memory Access (NUMA)
system.
16. Identify the principle of multi rate embedded system by quoting three examples. (AP)
Multirate embedded computing systems are very common, including automobile engines,
printers, and cell phones. In all these systems, certain operations must be executed periodically, and
each operation is executed at its own rate.
Examples: Automotive Engine Control, Digital Camera, Cell phones.
17. Brief the blocking and Non-blocking inter process communication. (U)
A process can send a communication in one of two ways: blocking or nonblocking. After sending a
blocking communication, the process goes into the waiting state until it receives a response.
Nonblocking communication allows the process to continue execution after sending the
communication.
19. Frame the two different styles used for inter process communication. (AP)
There are two major styles of interprocess communication: shared memory and message passing.
Shared Memory Communication:
• Two components, such as CPU and an I/O device, communicate through a shared memory
location.
• The software on the CPU has been designed to know the address of the shared location; the shared
location has also been loaded into the proper register of the I/O device
• Message passing communication complements the shared memory model. In Figure, each
communicating entity has its own message send/receive unit.
• The message is not stored on the communications link, but rather at the senders/receivers at the
endpoints
PART – B
(6)
Refer page no. 330 - 331 in Marilyn Wolf Book 3rd Edition
14. (i) Develop an approach for cooperative multitasking in the
PIC16F with the help of aprogram. What would happen if we
put the tasks into Time Handler? (10)
Refer page no. 319 in Marilyn Wolf Book 3rd Edition
(ii) Manipulate about CPU usage metrics. (3)
Refer page no. 316 in Marilyn Wolf Book 3rd Edition
15. (i) Mention in detail about Shared Resources. (7)
Refer page no. 330 - 332 in Marilyn Wolf Book
3rd Edition
(ii) Explain about Windows CE with a neat
diagram. (6)
Refer page no. 357 - 361 in Marilyn Wolf Book
3rd Edition
PART – C