解决方案ID: rd06252007_878
最后修改: 2007 年8 月28 日
产品类别: 设计软件
产品领域: 设计输入/规划
产品子领域: 编码风格
软件: Quartus II PC
标题
How do I implement open drain outputs in the Quartus II software?
说明
You can implement an open drain output signal using standard VHDL or Verilog HDL statements, or by instantiating an Altera® open drain (OPNDRN) primitive.
Method 1. Use one of the following HDL statements to create an open drain output for a signal called top_out:
VHDL: top_out <= 'Z';
Verilog HDL: assign top_out = 1'bZ;
Method 2. Use the Altera OPNDRN primitive to create an open drain output. This primitive is defined in Quartus® II Help as described below.
VHDL:<instance_name>: opndrn PORT MAP (
a_in => <input_wire>,
a_out => <output_pin>
);
The VHDL component is declared in an Altera primitives library. Use the following commands to include the library:
LIBRARY altera;
USE altera.altera_primitives_components.all;
Verilog HDL:OPNDRN <instance_name> (.in(<input_wire>), .out(<output_pin>));
You can use the Quartus II language templates to help you instantiate the primitive. Right-click in the Quartus II text editor and choose Insert Template. In the Language templates list, expand the list for VHDL or Verilog HDL, then expand Altera Primitives, and then Buffers. Choose the OPNDRN primitive and click Insert. You can then customize the instantiation and continue design entry.
To confirm that the open drain output pin was implemented, check the Compilation Report. In the Fitter section of the report, expand the Resource Section and click Output Pins. The Open Drain column indicates yes for any open drain output pins.
反馈
Altera并不保证此解决方案能够达到客户的预期目的,并不承担所有的解决方案的使用和信赖的责任。
