EECS 145M Spring 2004 Midterm #1 Solutions - Digital Circuit Design, Exams of Microcomputers

The solutions to midterm #1 of the eecs 145m spring 2004 course, focusing on digital circuit design. Topics such as edge-triggered d-type flip-flops, sample-and-hold amplifiers, and data latching. It also includes essential features for successful solutions and relevant design tips.

Typology: Exams

2012/2013

Uploaded on 03/22/2013

saryu
saryu 🇮🇳

4.3

(4)

42 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
March 3, 2004 page 1 S. Derenzo
Solutions for Midterm #1 - EECS 145M Spring 2004
1a The edge-triggered D-type flip-flop has a digital input D, a clock input C, and a digital
output Q. On a rising edge of C, Q is set equal to D. Otherwise, Q is held constant.
1b The sample-and-hold amplifier has an analog input, a control input, and an analog output.
The control line selects sample mode (output = input) or hold mode (output held constant)
2This problem had two challenges (1) how to latch data changing every 10 ns and (2) how to
read 32 bits of those data using a 16-bit input port. Latching the data required using the DA
pulse (to know when the data were stable) and the comparator (so that the data were latched
only once per cycle of f(t)). Reading 32 bits of data with a 16 bit input port required tristate
buffers that were controlled by the computer. Latching had to be done in hardware in
nanoseconds, but reading was limited by the speed of the computer (microseconds).
Relevant Design Tip slides were # 6, 10, 11, 16, and 23.
Essential features for a successful solution:
Comparator detects zero crossing
DA from counter AND comparator used to latch data on flip-flops
Counter data latched only once per comparator cycle (computer reads comparator and resets
S/R latch)
Tri-state buffers used to read 32 bits from flip-flops into 16 bit input port
Tri-state buffers enabled by computer output port
[4 points off for a design that merely counts comparator cycles in one second- this is not nearly
as accurate as timing the interval between comparator pulse edges with a 100 MHz clock]
2a
2b 1the program sets i = 1
2program resets the S/R latch
3program enables tri-state 5 to connect only the S/R latch to input bus*
16
Octal D-type
flip-flops 3,4
Octal D-type
flip-flops 1,2
16 Octal
tri-state
drivers 3,4
Octal
tri-state
drivers 1,2
octal
tri-state
driver
16 16
16
AND
Comparator
32-bit
100 MHz
counter
DA
16
Set
Reset
S/R
latch
C
C
Digital
output
port
Digital
input
port
Input
bus
V(t)
µComp
pf3
pf4

Partial preview of the text

Download EECS 145M Spring 2004 Midterm #1 Solutions - Digital Circuit Design and more Exams Microcomputers in PDF only on Docsity!

Solutions for Midterm #1 - EECS 145M Spring 2004

1a The edge-triggered D-type flip-flop has a digital input D, a clock input C, and a digital output Q. On a rising edge of C, Q is set equal to D. Otherwise, Q is held constant. 1b The sample-and-hold amplifier has an analog input, a control input, and an analog output. The control line selects sample mode (output = input) or hold mode (output held constant) 2 This problem had two challenges (1) how to latch data changing every 10 ns and (2) how to read 32 bits of those data using a 16-bit input port. Latching the data required using the DA pulse (to know when the data were stable) and the comparator (so that the data were latched only once per cycle of f(t)). Reading 32 bits of data with a 16 bit input port required tristate buffers that were controlled by the computer. Latching had to be done in hardware in nanoseconds, but reading was limited by the speed of the computer (microseconds). Relevant Design Tip slides were # 6, 10, 11, 16, and 23. Essential features for a successful solution:

  • Comparator detects zero crossing
  • DA from counter AND comparator used to latch data on flip-flops
  • Counter data latched only once per comparator cycle (computer reads comparator and resets S/R latch)
  • Tri-state buffers used to read 32 bits from flip-flops into 16 bit input port
  • Tri-state buffers enabled by computer output port [4 points off for a design that merely counts comparator cycles in one second- this is not nearly as accurate as timing the interval between comparator pulse edges with a 100 MHz clock] 2a 2b 1 the program sets i = 1 2 program resets the S/R latch 3 program enables tri-state 5 to connect only the S/R latch to input bus* 16 Octal D-type flip-flops 3, Octal D-type flip-flops 1, 16 O c t a l tri-state drivers 3, O c t a l tri-state drivers 1, o c t a l tri-state driver 16 16 16 AND Comparator 3 2 - b i t 100 MHz counter DA 16 Set Reset S/R latch C C Digital output port Digital input port Input bus V(t) μComp

4 on next positive zero crossing of V(t), comparator out goes high and S/R latch is set by the next rising edge of the DA pulse (within 10 ns) 5 S/R latch strobes all 32 bits of the counter onto the four octal D-type flip-flops (since DA is high, the data are stable) 6 meanwhile, the program has been reading the comparator output and detects the zero crossing of f(t) (may take 1-2 microseconds)* 7 the program enables tri-state 1 and 2 to connect only bits 1-16 stored on D-type flip flops 1 and 2 to the input port* 8 the program reads counter bits 1-16* 9 the program enables tri-state 3 and 4 to connect only bits 17-32 stored on D-type flip flops 3 and 4 to the input port* 10 the program reads counter bits 17-32* 11 the program packs the data into a 32 bit word and stores it at T(i) 12 the program increments index i 13 the program loops back to step 2 for one second (this need not be exact) 14 the program sets N = i – 1 15 the program computes the frequency as [100 MHz][N-1]/[T(N)-T(1)] and displays the result. [If T(N) is less than T(1) the counter has cycled through zero (happens every 40 s) so add 232 to T(N)]

  • 1 microsecond read or write (6 total) 2c V(t) Comparator output DA S/R latch Tri-state 5 control Tri-state 1, control Read flip- flops 1, Read flip- flops 3, Tri-state 3, control

EECS145M Midterm #1 class statistics: Problem max average rms 1 16 15.3 1. 2 46 22.9 10. 3 8 4.8 1. 4 30 21.9 4. total 100 64.9 13. Grade distribution: Range number approximate letter grade 40-44 0 45-49 4 C 50-54 1 C+ 55-59 1 B- 60-64 2 B 65-69 4 B+ 70-74 2 A- 75-79 2 A 80-84 0 85-89 2 A+ 90-94 0 95-99 0 100 0