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 drive_high,
    output tri0 line
);

assign line = drive_high ? 1'b1: 1'bz; 
endmodule

/*
Open-drain → used in MOSFET circuits (like I²C)

What is Open-Drain (recap)
Can:
pull LOW (0)
or disconnect (Z)
Cannot drive HIGH
Needs pull-up resistor


🔹 Now: What is “Open-Source”?

Think of it as the dual/opposite behavior:

👉 Can:

drive HIGH (1)
or disconnect (Z)

👉 Cannot:

drive LOW
*/

 

Was this helpful?
Upvote
Downvote