Prev Problem
Next Problem

49. Brake Light Control

Back To All Submissions
Previous Submission
Next Submission

Solving Approach

How do you plan to solve it?

 

 

Code

module brake_light (
    input  brake_pedal,
    output reg brake_light
);
    always @(*) begin
        // Write solution here using if statement
        if(brake_pedal)begin
            brake_light<=1'b1;
        end
        else begin
            brake_light<=1'b0;
        end
    end
endmodule

 

Was this helpful?
Upvote
Downvote