Docsity

EECS 373 Exam 1 - Winter '04, Exams of Electrical and Electronics Engineering

Toggle sidebar
bg1
Page 1/8
EECS 373 Exam 1
Winter ‘04, Prof. Mark Brehob
Name: ____________________________________ uname: _____________
Sign the honor code:
I have neither given nor received aid on this exam nor observed anyone else doing so.
___________________________________
Scores:
Section Points
Short answer /60
Design question /40
Total /100
NOTES:
• Open notes. If you don’t have your white book with you please contact the proctor – you will
need it!
• Don’t spend too much time on any one problem.
• You have 80 minutes for the exam.
pf3
pf4
pf5
pf8

Partial preview of the text

Download EECS 373 Exam 1 - Winter '04 and more Exams Electrical and Electronics Engineering in PDF only on Docsity!

EECS 373 Exam 1

Winter ‘04, Prof. Mark Brehob

Name: ____________________________________ uname: _____________

Sign the honor code:

I have neither given nor received aid on this exam nor observed anyone else doing so.

___________________________________

Scores:

Section Points

Short answer /

Design question /

Total /

NOTES:

  • Open notes. If you don’t have your white book with you please contact the proctor – you will need it!
  • Don’t spend too much time on any one problem.
  • You have 80 minutes for the exam.
  1. If SIPEND=0x2C010000 and SIMASK=0x5F000000 what is the value in SIVEC? Provide your answer as a 16-bit hex number. [5]
  2. Say we were using code as found in the rightmost part of figure 12-3 on page 12-11 of the white book. If BASE=0x00340000, where would the code for the LVL3 interrupt be located? [5]
  3. Write PowerPC assembly that modifies the byte stored at memory location 0x00001000 so that bit 6 is negated (changed from a zero to a one or visa versa). No other bit in memory should be changed by your code. [10]
  1. For each of the load instructions below, indicate whether or not the instruction causes an unaligned access. Also, list the bus contents for each transaction and the final value held in the register that you’ve loaded. If there are bits that have undefined values for a given transaction, mark their values as ‘X’. Use hexadecimal notation. Assume the register and memory values listed below. [15]

Register Value r3 0x

Memory Location Value 0x03100000 0x 0x03100004 0x 0x03100008 0xDEADBEEF 0x0310000C 0x0BADBEAD 0x03100010 0x00FADDAD 0x03100014 0x 0x03100018 0x 0x0310001C 0x

Assembly command Aligned? Bus contents Value in r8 once assembly command is done lha r8, 7(r3)

lwz r8, 3(r3)

  1. The memory locations 0x1000 through 0x1006 have been initialized as shown in the table below and the registers have been initialized so that r1=1, r2=0x1000, and r3=0x01234567. The following code segment is then run.

stw r3, 0(r2) stbu r3, 2(r2) stwx r3, r2, r

After the code segment completes, what are the values in these memory locations? You may ignore any memory location that is written to but not shown in the table. [10]

Address 0x1000 0x1001 0x1002 0x1003 0x1004 0x1005 0x

Previous

value (hex)

A0 B0 C0 D0 E0 F0 A

New value

(hex)

2). You are given two macros that decode A31-A30 and TSIZ[0:1] according to the tables found below (First column is inputs, rest are outputs)

ADS_MACRO

A30, A31 AD0^ AD1^ AD2^ AD

0,0^1 0 0

0,1^0 1 0

TSIZE_MACRO

TSIZ[0:1] byte^ 1/2word^ word 0,0^0 0 0,1^1 0 1,0 0 1 0

Design a macro to provide the control logic for byte, ½ word and word read and write access for the proceeding module. The macro should have the following hierarchical connections. Use the space provided below. [20]

WORD

1/2WORD

AD

AD

AD

RD/WR*

BYTE

AD

E

E

E

B

B

B

E

B

  1. Now complete the design by connecting the macros. You may need to add logic. You do NOT need to worry about: [10]
    • The generation of TA
    • The decoding of the address
    • The inputs into the H1 macro. (Just leave them unconnected)
    • The CLKIN wire in the H2 macro (Just leave it unconnected)

PDIN[0:31]

PDOUT[0:31]

PDADR[0:31]