hw21_SLN - ECE 211 HW 21 SOLUTIONS p 1/4...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
ECE 211 HW 21 SOLUTIONS p 1/4 //home/vdimitrov/25330/f4ed2a36fb2691bf7c9933cc6e38891de519c817.doc HW Set 21 SOLUTIONS 1. The module below uses an always block, but the module describes a combinational circuit. Write a logic expression for f. (Note that the two variables in the p bus are denoted by p[1], [0].) module pick_one(p,a,b,c,d,f); input [1:0] p; input a,b,c,d; output f; reg f; always @(*) case (p) 2'b00: f <= a; 2'b01: f <= b; 2'b10: f <= c; 2'b11: f <= d; endcase endmodule Solution: f = | !p[1] & | | p[1] & p[0] & d ;
Background image of page 1

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

View Full DocumentRight Arrow Icon
ECE 211 HW 21 SOLUTIONS p 2/4 2. Rewrite the pick_one module using if, else procedures instead of the case procedure. A Solution: module pick_one_2(p,a,b,c,d,f); input [1:0] p; input a,b,c,d; output f; reg f; always @(*) if (p == 2'b00) f <= a; else if (p == 2'b01) f <= b; else if (p == 2'b10) f <= c; else if (p == 2'b11) f <= d; endmodule
Background image of page 2
ECE 211 HW 21 SOLUTIONS p 3/4 3. Each module below decsribes a D rising-edge triggered flip-flop with a reset input R. Describe in words
Background image of page 3

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

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This homework help was uploaded on 04/17/2008 for the course ECE 211 taught by Professor Nestor during the Fall '07 term at Lafayette.

Page1 / 4

hw21_SLN - ECE 211 HW 21 SOLUTIONS p 1/4...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online