Docsity

EECS 373 Midterm Exam Fall 2005, Exams of Electrical and Electronics Engineering

Toggle sidebar
bg1
EECS 373 Midterm Exam
Fall 2005
Name: ____________________________________ unique name: _______________
Sign the honor code:
I have neither given nor received aid on this exam nor observed anyone else doing so.
___________________________________
Scores:
# Points
Section 1
/40
Section 2
1 /16
2 /9
Section 3
/35
Total /100
NOTES:
• Open White book and EABI only. There are also 2 pages of slides we are
providing as reference.
• There are 9 pages including this one.
• Calculators are allowed, but no PDAs, Portables, Cell phones, etc.
• Don’t spend too much time on any one problem.
• You have about 80 minutes for the exam.
• Be sure to show work and explain what you’ve done when asked to do so.
Getting partial credit without showing work will be rare.
• You may need to rip pages out of the exam. If so, we will have a stapler to
help you reassemble it.
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download EECS 373 Midterm Exam Fall 2005 and more Exams Electrical and Electronics Engineering in PDF only on Docsity!

EECS 373 Midterm Exam

Fall 2005

Name: ____________________________________ unique name: _______________

Sign the honor code:

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

___________________________________

Scores:

# Points

Section 1 /

Section 2

Section 3 /

Total /

NOTES:

  • Open White book and EABI only. There are also 2 pages of slides we are providing as reference.
  • There are 9 pages including this one.
  • Calculators are allowed, but no PDAs, Portables, Cell phones, etc.
  • Don’t spend too much time on any one problem.
  • You have about 80 minutes for the exam.
  • Be sure to show work and explain what you’ve done when asked to do so. Getting partial credit without showing work will be rare.
  • You may need to rip pages out of the exam. If so, we will have a stapler to help you reassemble it.

Part I – Short answer/multiple choice – 40 points

  1. What is the smallest value (most negative) that can fit into a 16-bit signed immediate? What is the largest value? [4]

smallest value: __________

largest value: __________

  1. Write the hexadecimal value that would be used to encode the following instruction: [6] addi r3, r4, -
  2. What is the principle advantage of NRZI encoding over NRZ encoding? Explain your answer in a sentence or two. [6]

(2^15)-

-(2^15)

 0x3864FFFF

NRZI encoding will require less bit-stuffing as bit-stuffing is only required if N bits in a row are 1 as opposed to N bits in a row being constant 1 or constant 0.

Part II—Longer answer—25 points

  1. Consider the PowerPC823 bus running at 10MHz. Say we are doing a load of the word located at memory location 0x00001002. Assuming everything happens as fast as possible , fill in the table below. Start from when #TS is first low, and finish when #TA is last low. If a signal is undefined write a dash in that space. Use hex for the address and data buses. If part of a signal on a bus is undefined write a dash for that part (so an ADS bus with --77--88 has the binary value of ---- ---- 0111 0111 ---- ---- 1000 1000). [16]

Memory is as follows Address 0x1000 0x1001 0x1002 0x1003 0x1004 0x1005 0x1006 0x DATA 0x11^ 0x22^ 0x33^ 0x44^ 0x55^ 0x66^ 0x77^ 0x

(There maybe more cycles listed than you will need. Leave the extra blank.)

Cycle # #TS #TA TSIZE ADS DATA

1 0 1 10 0x00001002 -- -- -- --

2 1 0 10 0x00001002 -- -- 33 44

3 0 1 10 0x00001004 -- -- -- --

4 1 0 10 0x00001004 55 66 -- --

  1. Write PowerPC assembly code for the prologue of an ABI compliant function. The function writes to R31, R8, and R7. [9]

mflr r stwu r1,-16(r1) stw r0, 20(r1) stw r31, 12(r1)

DATA_READ

The DATA_READ register holds the next data byte to be read. After being read, the RDR field of STATUS will change to a zero until the DATA_READ register contains the next byte of the packet (when the RDR field will change to a one.) The RPF field of STATUS is used to delimit packets. bit 7 6 5 4 3 2 1 0 field DATA R/W R Reset 0

  • DATA o The DATA field holds the next byte of the packet that was sent to the NIC. The data will be valid as long as the RDR field of STATUS is a one. If RDR is zero, this should never be read from.

DATA_WRITE The DATA_WRITE register is where data to be sent from the NIC is placed. Each time it is written the data written to the register is added to the current packet. The WBR bit of the STATUS register is used to indicate the DATA_WRITE is ready to receive its next packet. The EDP field of CMD is used to indicate that the previous byte written to DATA_WRITE was the last byte of the packet. bit^7 6 5 4 3 2 1 field DATA R/W R Reset^0

  • DATA o The DATA field is where data to be sent from the NIC is placed. Each time it is written the data written to the register is added to the current packet.

a. On the following page, draw the circuitry needed to make it so the registers described above are at locations 0x00 (for STATUS), 0x01 (for CMD), 0x (for DATA_ READ) and 0x03 (for DATA_WRITE). There should be no shadow locations. You may use gates, MUXes, and a “delay” box (as in the slides). [15]

(On the page thereafter, you will be asked to write the PowerPC assembly code needed to read a packet from the NIC and send the packet back but with each bit inverted.)

ADS[7:0]

CMD

ACK#

REQ#

Data[7:0]

EN

VALUE[7:0]

STATUS

CLK

VALUE[7:0]

CMD

DATA_READ

CLK

VALUE[7:0]

DATA_WRITE

For STATUS and DATA_READ, if the EN input is 1 the register’s value is driven out on VALUE[7:0], otherwise the output is HiZ (high impedance)

For CMD and DATA_WRITE the data on VALUE[7:0] will be written to their register value on the rising edge of CLK.

You may only use gates, MUXes and a “DELAY” box (as in the slides). You may either draw wires or simply label wires so that any two wires with the same name (outside of the registers) are assumed to be connected.

EN

VALUE[7:0]

ADS ADS ADS ADS ADS ADS REQ#

SEL

SEL ADS ADS CMD

SEL ADS ADS CMD

SEL ADS ADS CMD

SEL ADS ADS CMD

Data[7:0]

Data[7:0]

Data[7:0]

Data[7:0]