MPU - Digital Systems and Microprocessors - Exam, Exams of Microprocessors

Main points of this past exam are: Mpu, Instructions, Values, Three Lines, Sequence, Sufficient, Mistakes and Fix

Typology: Exams

2012/2013

Uploaded on 03/31/2013

parinita
parinita 🇮🇳

4.8

(6)

67 documents

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
1
Cork Institute of Technology
Bachelor of Engineering (Honours) in Electronic Engineering – Stage 2
(EELXE_8_Y2)
Summer 2008
Digital Systems and Microprocessors
(Time: 3 Hours)
Answer any FIVE questions
68000 Instruction Sets are available.
Blank Before & After Tables available
Examiners: Prof. G. Hurley
Dr. S. Foley
Dr. P O’Connor
Q1. Assume the values shown in Table.1-1 exist for the first instruction [(a)] only, then show
what happens when each of the instructions in Table.1-2 is executed. Brief comments and
the status of the flags are required. (Use the Before & After table provided).
Table.1-1
Values that exist at the start of each instruction.
D0 = $12345678 D1 = $456789AB D2 = D3 = $80008000
D4 = $00002000 D5 = D6 = D7 =
A0 = $00400500 A1 = $00400544 A2 = A3 =
A4 = A5 = A6 = A7 =
------------------------------------------------------------------------------------------------------------------------
Memory Contents CCR = 000000002
400500 1234 4321 AABB CCDD
400540 7531 1357 89BC DEF0
Instructions to be executed.
a) SUB.W D0, D3 b) MOVE.L 4(A0)+, (A1)+
c) MOVE.W D1, (A0)+ d) MOVE.W -(A1), D3
e) ROL.B #3, D0 f) LSL.L #3, D3
g) ASR.W #5, D3 h) CMP.B #$7A, D1
i) MOVE.W (A0)+, $6(A0) j) MOVEA.W D3, A0
Table.1-2 [20 marks]
Q2. (a) Identify and briefly explain each item of information in the three lines of code below.
pf3
pf4
pf5
pf8

Partial preview of the text

Download MPU - Digital Systems and Microprocessors - Exam and more Exams Microprocessors in PDF only on Docsity!

Cork Institute of Technology

Bachelor of Engineering (Honours) in Electronic Engineering – Stage 2

(EELXE_8_Y2)

Summer 2008

Digital Systems and Microprocessors

(Time: 3 Hours)

Answer any FIVE questions 68000 Instruction Sets are available. Blank Before & After Tables available

Examiners: Prof. G. Hurley Dr. S. Foley Dr. P O’Connor

Q1. Assume the values shown in Table.1-1 exist for the first instruction [(a)] only , then show

what happens when each of the instructions in Table.1-2 is executed. Brief comments and the status of the flags are required. (Use the Before & After table provided).

Table.1-

Values that exist at the start of each instruction.

D0 = $12345678 D1 = $456789AB D2 = D3 = $ D4 = $00002000 D5 = D6 = D7 =

A0 = $00400500 A1 = $00400544 A2 = A3 = A4 = A5 = A6 = A7 =


Memory Contents CCR = 00000000 (^2)

400500 1234 4321 AABB CCDD 400540 7531 1357 89BC DEF

Instructions to be executed.

a) SUB.W D0, D3 b) MOVE.L 4(A0)+, (A1)+ c) MOVE.W D1, (A0)+ d) MOVE.W -(A1), D e) ROL.B #3, D0 f) LSL.L #3, D g) ASR.W #5, D3 h) CMP.B #$7A, D i) MOVE.W (A0)+, $6(A0) j) MOVEA.W D3, A

Table.1-2 [20 marks] Q2. (a) Identify and briefly explain each item of information in the three lines of code below.

Then describe the sequence of steps involved when the MC68000 MPU executes the three instructions (Table 2(a)).

00400400 : 303C6372 MOVE.W #$6372,D

00400404 : 33C000400430 MOVE.W D0 ,$ 0040040A 0C79FB8900400430 CMP.W #$FB89, $

Table.2(a) [6 marks] (b) The following program has a number of errors, logical and syntax. Identify the errors, explain why they are mistakes and fix them. Then outline what you think the program is attempting to do. (Note: It is not sufficient merely to give a correct version). LOOP MOVE.L #$400430, (A0) MOVE.B #50, D CLR.W A0+ SUB.B #1, D BPL LOOP END TRAP # DATA 0,0 [4 marks]

(c) A data word is hidden in a 16-word block of memory beginning at address $400500. Each word in the memory block contains 1-bit of this hidden, secret word. This special bit is the 2^5 –bit in each case. The first word at address $400500 holds the 2 0 –bit of the hidden word. Write a M68000 based assembly language program to collect the 16 bits and reassemble the hidden word. A detailed flowchart and comments should accompany your code. [10 marks]

Q3. (a) Address line A 0 is missing from the address bus of the M68000 MPU. Explain in detail how the microprocessor system overcomes this apparent restriction and what effect, if any, it has on the system configuration. [5 marks]

(b) A 68K-microcomputer system requires 512KBytes of RAM, with a base address $500000. RAM chips of capacity 128KB are available, each with a single active-low CS input.

(i) Devise a complete memory map, which shows the addresses occupied by each 128KB chip.

8421 BCD Gray Code A B C D Y 3 Y 2 Y 1 Y (^0) 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 1 1 0 0 1 1 0 0 1 0 0 1 0 0 0 1 1 0 0 1 0 1 0 1 1 1 0 1 1 0 0 1 0 1 0 1 1 1 0 1 0 0 1 0 0 0 1 1 0 0 1 0 0 1 1 1 0 1 1 0 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 0 0 1 0 1 0 1 1 0 1 1 0 1 1 1 1 1 0 1 0 0 1 1 1 1 1 1 0 0 0

Table.6-1 : 8421 BCD to Gray Code [6 marks]

(b) Design a digital circuit with one input (X) and three outputs (Z 1 , Z 2 , Z 3 ) such that

(i) Z 1 = 1 indicates a single ‘1’ on the input (ii) Z 2 = 1 indicates exactly 2 consecutive ‘1’ on the input

(iii) Z 3 = 1 indicates 3 or more consecutive ‘1’ on the input.

Outline any assumptions you make and explain your choice of circuits. [14 marks]

Before After

Data Instruction Data Flags Comments

X N Z V C

Before and After Table – Q

1 * Program-Q4(a) 2 3 * A7 = $400400 = SP initially 4