Prev Problem
Next Problem

24. Open-Source Line using tri0

Back To All Submissions
Previous Submission
Next Submission

Solving Approach

How do you plan to solve it?

 

 

Code

module open_source_line (
    input wire drive_high,
    output tri0 line
);
    assign line = drive_high ? 1'b1 : 1'bz; 
    //drive_high = 1 means driven (button pushed)
    //drive_high = 0 means undriven (button not pushed)
endmodule

 

Was this helpful?
Upvote
Downvote