su07 final solution

# su07 final solution - ECE 152A – Summer 2007 Final Exam...

This preview shows pages 1–5. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ECE 152A – Summer 2007 8/29/2007 Final Exam Solution – Page 1 of 19 University of California, Santa Barbara Department of Electrical and Computer Engineering ECE 152A – Digital Design Principles Final Exam – Solution August 29, 2007 Name _____________________________________ Perm # ____________________________________ Lab Section _______________________________ Problem #1 (25 points) ____________ Problem #2 (25 points) ____________ Problem #3 (25 points) ____________ Problem #4 (25 points) ____________ Total (100 points) ____________ • This is a 75 minute exam; closed book, closed notes, no calculators. • Answer all questions on the exam. ECE 152A – Summer 2007 8/29/2007 Final Exam Solution – Page 2 of 19 Problem #1. Complete the functional (zero delay) timing diagram below for the circuit realized by the following Verilog code: module final (clock,x,z1,z2); input clock,x; output z1,z2; wire z1; reg z2; reg [1:0]state; assign z1 = x & state[1] | ~x & ~state[1] & ~state[0]; always @ (posedge clock) begin if(x) state <= state + 1; else state <= state - 1; z2 <= x & state[1] | ~x & ~state[1] & ~state[0]; end endmodule ECE 152A – Summer 2007 8/29/2007 Final Exam Solution – Page 3 of 19 Simulation output 7 points for state 9 points for z1 output 9 points for z2 output ECE 152A – Summer 2007 8/29/2007 Final Exam Solution – Page 4 of 19 Problem #2. In this problem, you are to design a portion of the controller for a high definition, hard disk, digital video recorder. The controller receives four inputs from the remote control: Play/Pause (PP), • When playing (1X), causes video to be frozen • Otherwise, causes playing to resume Fast Forward (FF) • Causes video to fast forward at 2X speed • When fast forwarding, causes video to fast forward at 4X speed Rewind (RW) • Causes video to rewind at 2X speed • When rewinding, causes video to rewind at 4X speed Live (LV) • Sets video source to live television You can assume that only one button can be pressed at any time. You can also assume that if the hard disk is rewound to the beginning, it will automatically begin playing from that point and if the hard disk is fast forwarded to the end, it will revert to playing live television. will revert to playing live television....
View Full Document

{[ snackBarMessage ]}

### Page1 / 19

su07 final solution - ECE 152A – Summer 2007 Final Exam...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online