I need to clear up a problem with an external input to a CPLD by putting it through a tristate buffer. I know Quartus II has a tristate-buffer megafunction, but I am curious - if I simply tell it to output Z on the specific pin, will in automatically synthesize so the tristate buffer is enabled on that pin, or do I have to implement the function/write a buffer?
2 Answers
Chapter 10 – Recommended HDL coding style – in the Quartus manual will tell you everything you need to know: http://www.altera.com/literature/hb/qts/qts_qii51007.pdf
In summary, tri-state buffers will be inferred on output ports if you drive it with a ‘Z’.

- 878
- 1
- 7
- 12
You can do it either way. If you assign 'Z' to the pin (NOTE: it has to be an upper-case Z, lower-case confuses Quartus) a tri-state buffer will be inferred. Alternately, you can directly instantiate various low-level I/O primitives which have a tri-state enable pin (including various DDR I/O primitives).
I have generally allowed Quartus to infer the tri-state buffers on 'normal' I/O pins, and used the low-level primitives when timing is critical and I want to force use of the I/O ring flip-flops, use the DDR I/O features, etc.

- 3,335
- 18
- 12
-
Thank you - I need this primarily for a bus running between a USB chip and an SRAM chip, so I should probably take care with the timing. – shieldfoss May 16 '11 at 08:10