2nd Midterm Exam with Solution - Microprocessor System Design | ECE 3534, Exams of Microprocessors

Material Type: Exam; Professor: Abbott; Class: Microprocessor System Design; Subject: Electrical & Computer Engineer; University: Virginia Polytechnic Institute And State University; Term: Spring 2009;

Typology: Exams

Pre 2010

Uploaded on 05/08/2009

tostrstrudel
tostrstrudel 🇺🇸

14 documents

1 / 7

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Page 1
2nd MIDTERM EXAMINATION
ECE 2534: MICROPROCESSOR SYSTEM DESIGN
Spring 2009
NAME (print): ______________________________________________
STUDENT ID: ______________________________________________
Honor system pledge:
I have neither given nor received unauthorized aid on this exam.
SIGNATURE: ______________________________________________
Ground rules. Please read carefully.
Do not open the exam until the instructor says to begin.
All work on this exam must be your own. If you have questions during the exam, ask the
instructor. Do not communicate with another student.
This is a closed-book exam. No books or notes are allowed.
No electronic devices are permitted.
The exam is worth 100 points. Time limit: 50 minutes.
The exam consists of 12 problems on 7 pages. Be sure that all pages are present in your copy.
Additional reference material will be handed out separately. This includes Table 1-6 from the
Microblaze Processor Reference Guide, and a description of the 74138 decoder. You do not need
to return the reference material.
Solve every problem. Clearly show how you arrive at each answer, and clearly indicate your final
answers. Partial credit is possible on most problems. If you need additional space to work a
problem, continue on the back of the page. If a question seems ambiguous, give your reasons and
state your assumptions clearly.
Unless otherwise indicated, all references to the MicroBlaze processor specifically mean the
current version on this semester’s Spartan3E boards.
Check the front of the classroom occasionally for important corrections or announcements.
Print your name or initials on each page of this exam. This will help ensure that you receive
proper credit even if the pages become separated.
pf3
pf4
pf5

Partial preview of the text

Download 2nd Midterm Exam with Solution - Microprocessor System Design | ECE 3534 and more Exams Microprocessors in PDF only on Docsity!

2 nd^ MIDTERM EXAMINATION

ECE 2534: MICROPROCESSOR SYSTEM DESIGN

Spring 2009

NAME (print): ______________________________________________

STUDENT ID: ______________________________________________

Honor system pledge: I have neither given nor received unauthorized aid on this exam.

SIGNATURE: ______________________________________________

Ground rules. Please read carefully.

Do not open the exam until the instructor says to begin. All work on this exam must be your own. If you have questions during the exam, ask the instructor. Do not communicate with another student. This is a closed-book exam. No books or notes are allowed. No electronic devices are permitted. The exam is worth 100 points. Time limit: 50 minutes. The exam consists of 12 problems on 7 pages. Be sure that all pages are present in your copy. Additional reference material will be handed out separately. This includes Table 1-6 from the Microblaze Processor Reference Guide, and a description of the 74138 decoder. You do not need to return the reference material. Solve every problem. Clearly show how you arrive at each answer, and clearly indicate your final answers. Partial credit is possible on most problems. If you need additional space to work a problem, continue on the back of the page. If a question seems ambiguous, give your reasons and state your assumptions clearly. Unless otherwise indicated, all references to the MicroBlaze processor specifically mean the current version on this semester’s Spartan3E boards. Check the front of the classroom occasionally for important corrections or announcements. Print your name or initials on each page of this exam. This will help ensure that you receive proper credit even if the pages become separated.

  1. (4 points) In the space below, state 2 significant differences between ROM and flash memory. Please be brief and specific.

a)

b)

  1. (10 points) For each of the following statements, circle T for True or F for False:

T F The clock period for our MicroBlaze is 20 microseconds.

T F This is an example of a Type A instruction: rsubikc r5,r18,

T F The MicroBlaze processor has been designed with the capability of fetching instructions from memory at the same time that it is reading or writing data to/from memory.

T F The machine code for the assembly language instruction xori r31,r31,0x4000 occupies two 32-bit words in memory.

T F DRAM is typically faster than SRAM.

T F The SPI standard is for devices that perform serial data transfers.

T F The SPI standard is for synchronous data transfers.

T F The SPI standard is for full-duplex data transfers.

T F If 3 SPI devices are interfaced together, including the “master,” then 4 SPI signals will be used.

T F One reason for the popularity of the SPI standard is that serial data interconnections are typically less expensive than parallel data interconnections.

  1. (6 points) For this problem, give your answers in decimal form, if possible. (You may use powers of 2, if that is convenient.)

a) The number of bytes that can be stored in a 1K-by-8 RAM is ____________________.

b) The number of address inputs (signal paths) needed by a 2M-by-8 RAM is __________________.

  1. (9 points) Assume that you plan to use one of the Microblaze timers to measure an interval of 40 microseconds. A good initial value for the Timer Load Register would be ___________________. (Please provide your answer in decimal form.)
  2. (3 points) Continuing the previous problem, the timer should be operated in which mode? Select one of these choices:

a) Generate mode b) Capture mode c) PWM mode

  1. (12 points) Assume that you are using one of the Microblaze timers in interrupt-driven mode. Name 3 actions that should be performed by the interrupt handler that involve the timer subsystem and the interrupt controller. (Provide pseudocode or a brief English description.)
  1. (8 points) Consider a handshaking protocol to control data transfers between 2 devices, as shown below.

Briefly describe the role of each transition labeled 1, 2, 3, and 4 in the figure. (What is the purpose of the transition? What does the transition signify or represent?)

1)

  1. (10 points) Consider a 12-bit D/A converter with a span of 3.3 V and an offset of 0 V. (Give your answers in decimal form, using equations if needed to avoid time-consuming arithmetic.)

a) The resolution of this converter is _____________________________.

b) To generate an output of 1.0 V, your program should send the digital value _____________________ to the converter.

  1. (14 points). The following pixel representation scheme can be used to store 8 pixels in a single 32-bit word:

The bits labeled R, G, and B represent red, green, and blue color components. The bits without labels in this figure are normally 0.

Write a complete C/C++ function (subroutine) for the MicroBlaze that will accept two parameters: an integer w that contains 8 pixels as described in the figure, and an integer val. Assume that val is in the range 0 to 7 (decimal), and it therefore represents a valid pixel value. Your function should be called changepixel6. Your function should modify w by replacing pixel 6 with the value contained in val. (The other pixels in w should not be changed.) Your function should then return the modified version of w.