Test2soln-2730-F08

# Test2soln-2730-F08 - 2 (b) Using D flip-flops: Y 1 = w y 1...

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

EE 2730 — Test 2 solutions 1 EE 2730 — Test 2 solutions Fall 2008 1. (20 pts) Given the state table below, fully reduce the number of states and construct the reduced state table. Make it clear which states have been combined. next state output, z present state w = 0 w = 1 w = 0 w = 1 A B E 0 0 B C B 0 0 C B G 0 0 D B D 0 0 E F E 0 0 F C B 0 0 G F D 0 1 Partition = (ADE)(BF)(C)(G) Reduced state table: next state output, z present state w = 0 w = 1 w = 0 w = 1 A B A 0 0 B C B 0 0 C B G 0 0 G B A 0 1 2. (30 pts) Design a 2-bit counter that counts in the following sequence: 00, 01, 11, 10, and then back to 00, 01, etc. (This is a Gray code counter.) Include an enable input. (a) Construct a state diagram and state table. (b) Implement the counter using D flip-flops or T flip-flops. (a) next state w = 0 w = 1 present state y 1 y 0 Y 1 Y 0 Y 1 Y 0 output z 1 z 0 00 00 01 00 01 01 11 01 10 10 00 10 11 11 10 11

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

View Full Document
EE 2730 — Test 2 solutions
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 2 (b) Using D flip-flops: Y 1 = w y 1 + wy Y = w y + wy 1 z 1 = y 1 z = y 3. (30 pts) Write Verilog code to specify the finite-state machine shown below, with one input w and one output z . module T2P4 (Clock, Resetn, w, z); input Clock, Resetn, w; output z; reg [2:1] y, Y; parameter [2:1] A = 2b00, B = 2b01, C = 2b10, D = 2b11; // Define the next state combinational circuits always @(w, y) case (y) A: if (w) Y = C; else Y = B; B: Y = C; C: if (w) Y = D; else Y = A; D: if (w) Y = C; else Y = D; default : Y = 2bxx; // optional endcase // Define the sequential block always @( negedge Resetn, posedge Clock) if (Resetn == 0) y <= A; else y <= Y; // Define the output circuit assign z = ((y = = C) | (y = = D)); endmodule EE 2730 Test 2 solutions 3 4. (20 pts) Represent the finite-state machine from Problem 3 in the form of an ASM chart....
View Full Document

## This note was uploaded on 06/20/2011 for the course EE 2730 taught by Professor Desouza during the Spring '08 term at LSU.

### Page1 / 3

Test2soln-2730-F08 - 2 (b) Using D flip-flops: Y 1 = w y 1...

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

View Full Document
Ask a homework question - tutors are online