Article Details

ID: 241
Case Type: faq
Category: Entry
Related To: Mixed Language
Family: All Devices

Search Answer Database

Search Text Image

How can I simulate open drain IO/s?

An open drain IO drives output high as a 'Z' and drives low as a '0'. These IOs are often used when multiple devices are connected to a bus. On devices which do not have a open drain option you can simulate an open drain circuit using an OE on the IO. Here is an example:


Verilog:


assign myoutput = (myenable) ? 1'b0 : 1'bz;


VHDL:

myoutput <= 'Z'
WHEN (myenable = '1')
ELSE 'Z';