文章详情

ID: 241
实例类型: faq
分类: Entry
相关: Mixed Language
产品系列: All Devices

搜索答案数据库

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 <= '0'
WHEN (myenable = '1')
ELSE 'Z';