You are on page 1of 2

Embedded Systems

Assignment No. 1

1. Consider a processor having a 32-bit address bus and a 16-bit data bus. Further assume that it has an on-chip ROM of 4 KB size mapped at address 0x0000 and an on-chip RAM of 16 KB size mapped at 0x8000. It also has an external memory of 2 MB size mapped at 0x100000. a) Draw the memory map for this processor. b) For each memory device, provide the following i. Number of address lines directly connected to the address lines of the device. Please explain by using the address range of each memory device. ii. How many of them would be used to for enabling the logic. Give the truth table for the decoder logic. 2. Consider a processor with 10-bit address space. It has a data size of 1 byte and eight registers each of which is 1 byte wide. Let the registers be R0, R1, ... R7. Assume that it can perform 6 operations as shown below: Operations ADD SUB MUL MOV LD ST Rd = Rs1 + Rs2 Rd = Rs1 Rs2 Rd = Rs1 * Rs2 Rd = #8-bit number (N) Rd = 10-bit address (A) Binary Code <000> <Rs1> <Rs2> <Rd> <001> <Rs1> <Rs2> <Rd> <010> <Rs1> <Rs2> <Rd> <011> <Rd> <N> <100> <Rd> <A>

A = Rs <101> <Rs> <A> We need to write a program to compute d = b*b 4 * a *c. Assume that the values of the variables a, b, c and d are stored at the locations 0x800, 0x801, 0x802, 0x803 respectively. Now do the following: a) Write an assembly language program using the above instructions to compute 'd'. b) Assuming that the program starts at zero address, what will be the content of the memory locations that contain the program opcodes. Use the following format to answer both the questions.

Address

Assembly Program

Binary Opcodes

Hexadecimal Opcodes.

3. Show the following numbers in the specified hexadecimal format. Leave the cells blank wherever it is not possible to represent the number. Decimal Number 0 Signed 8-bit Unsigned 8-bit Signed 16-bit Unsigned 16-bit

-5 -20 100 -130 150 -300 300 2000 -5000 -18000 30000 -40000 65000

You might also like