Question: a . The verilog code at right models a 3 - to - 8 decoder with enable and activehigh outputs. However, it has a functional

a. The verilog code at right models a 3-to-8 decoder with enable and activehigh outputs. However, it has a functional bug, which prevents it from behaving as intended. Explain what the bug is and provide the simplest possible code fix. (10 pts)
always @(*) begin
if (E) begin
Y[A]=1'b1;
end else begin
Y =8'b0000_0000;
end end
endmodule
b. The above dec3to8 module is used to control a traffic light consisting of three lights: R(ed),Y(ellow),G(reen). The truth tables for R, Y, and G are given at right. Draw the block diagram of this traffic light decoder consisting of a dec3to8 logic block and some gates. (5 pts)
\table[[A2A1A0,R,Y,G
a . The verilog code at right models a 3 - to - 8

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Electrical Engineering Questions!