ARM - QB-Unit-3 & 4

You might also like

You are on page 1of 3

Siddaganga Institute of Technology, Tumakuru-3

Department of Computer Science and Engineering

Question Bank for Unit-3 and Unit-4


Course title ARM Microcontroller and Embedded Systems
Course type General
Course code 4RCS01 CIE Marks 50
Teaching Hours/Week (L:T:P) (3:1:0) SEE Marks 50
Credits 3.5 Exam Hours 03

Course Outcomes:
CO1: Discuss the ARM processor architecture and its family
CO2: Discuss the fundamentals concepts of Embedded System Components
CO3: Explain ARM microcontroller instruction set and develop assembly language programs to
perform specific tasks
CO4: Discuss Embedded C Programming concepts and develop ARM microcontrollerapplications
using Embedded C language
CO5: Design and developEmbedded C programs to interface external hardware with LPC214x
microcontroller

Q.No. UNIT - 3 Marks BL CO PO


1 Explain different Move instructions used in ARM 6 2 3 1,2,3
Microcontroller with an example for each.
2 Give the use of barrel shifter used in ARM Microcontroller 8 2 3 1,2,3
with a neat diagram. Explain its working with an example
instruction.
3 Explain different barrel shifter operations with an example for 6 2 3 1,2,3
each.
4 Briefly explain the following ARM instructions with an 8 2 3 1,2,3
example for each:
i) ADC ii) RSB iii) RSC iv) SBC
5 Give the output of the following instructions: 6 2 3 1,2,3
i) ORR r0,r1,r2
ii) BIC R0,R1,R2
iii) EOR R0,R1,R2
6 Briefly explain the different comparison instructions of ARM. 8 2 3 1,2,3
7 Explain the following instructions with an example for each: 8 1,2 3 1,2,3
i) SMLAL-signed multiply accumulate long
ii) SMULL signed multiply long
iii) UMLAL- unsigned multiply accumulate long
iv) UMULL – unsigned multiply long
8 Briefly explain the following ARM instructions: 8 2 3 1,2,3
i) STRH r0, [r1,#0x04]!
ii) LDRSB r0, [r1,#4]
iii) LDR r0,[r1],r2, LSR #0x4
iv) LDR r0,[r1,-r2,LSR #04]
9 Explain the different modes for addressing memory that is 6 1,2 3 1,2,3
provided by ARM instruction set.
10 Explain the following instructions: 6 2 3 1,2,3
i) STMIB r0! , {r1-r3}
ii) LDMA r0!,{r1-r3}
11 Develop an ALP routine that copies blocks of 32 bytes from a 6 2,3 3 1,2,3
source address location to a destination address location for
ARM Microcontroller using multiple register load and store
instructions.
12 Explain the following instructions with respect to stack: 8 2 3 1,2,3
i) STMFD sp!, {r1,r4}
ii) STMED sp!, {r1,r4}
13 Develop an assembly language program to find the factorial of 6 3 3 1,2,3
a number.
14 Develop an assembly language program to compute the sum 6 3 3 1,2,3
of first 10 natural numbers.

Q.No. UNIT - 4 Marks BL CO PO


1 Briefly explain new instructions provided by ARMv5E 8 1,2 4 1,2,3
extensions with an example for each.
2 Develop an assembly language program to compare the two 6 2 4 1,2,3
unsigned numbers stored in registers R1 and R2 and load the
value to the register R3 as follows using the conditional
execution on the MOV instruction.
R3=10H if R1<R2
R3=20H if R1>R2
R3=30H if R1==R2
3 Develop an assembly language program to compute the GCD 6 3 4 1,2,3
of two numbers using the conditional execution on the branch
instructions.
4 Avoid using char and short as local variable types, even if you 8 3 4 1,2,3
are manipulating an 8- or 16-bit value? The one exception is
when you want wrap-around to occur. If you require modulo
arithmetic of the form 255+1=0, then use the char type. Justify
the statement using the following example for checksum
generation.

int checksum_v1(int *data)


{
char i;
int sum = 0;
for (i = 0; i < 64; i++)
{
sum += data[i];
}
return sum;
}
5 Suppose Data packet contains 16-bit values and we need a 16- 8 3 4 1,2,3
bit checksum. Explain with embedded C code and assembly
output with casting and without casting.
6 Why LDRH is not efficient compared to LDR statement? 6 2 4 1,2,3
Explain with an example program.
7 Explain how the following embedded C program is compiled 6 2 4 1,2,3
by ARM Microcontroller. Give its assembly code.

8 Explain with an example how decrementing is better than 6 2 4 1,2,3


incrementing the loop variable.
9 Discuss about signed and unsigned loop counter used in ARM 6 2 4 1,2,3
microcontroller.
10 Explain with an example why do while is better compared to 8 2 4 1,2,3
for loop in case of loops with variable iterations.
11 With an example explain loop unrolling. Give its advantage. 8 2,3 4 1,2,3

12 What if the number of loop iterations is not a multiple of the 8 2,3 4 1,2,3
unroll amount? Explain with an example.
13 Give the use of spilled or swapped out variables. Briefly 6 2 4 1,2,3
explain the register allocation done by ARM Microcontroller.
14 Explain the four register rule used in ARM procedure call. 6 2 4 1,2,3

15 Develop an Embedded C program for ARM microcontroller to 6 3 4 1,2,3


insert N bytes from array data into a queue.
16 List the important points to note when calling functions 6 2 4 1,2,3
efficiently.
17 Explain the general rules to generate a structure with the 8 2 4 1,2,3
elements packed for maximum efficiency.
18 Define pointer aliasing.Explain with an example why not rely 8 2 4 1,2,3
on the compiler to eliminate common subexpressions involving
memory accesses.
19 Explain with an example how structure layout can have a 8 2 4 1,2,3
significant impact on its performance and code density.

*************

You might also like