Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
11 years ago

Tristate outputs - how to?

Hi,

I want to tristate a group of outputs based on the state of an input pin (MAX7000S).

I have found the TRI megafunction but it looks like this uses additional resources that shouldn't be necessary. I can see that the I/O control block has a tristate buffer for the I/O pin, so it would appear that I can use this for "free", i.e., without consuming additional resources. I think I need to configure the pins as BIDIR but I can't see how to access/set the global enable for the pins that I want to control.

Can someone tell me where to find this in Quartus please?

Where do I configure the output enables?

Can I set the global enables on a bdf, or do I need to use VHDL to code the control action?

regards

Dave

4 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I don't see any of the problems you are considering.

    You want use schematic entry, O.K. You'll either place alt_io_buf (for bidirectional pins) or alt_out_buf or tri symbols (tristate output only) and connect the tristate inputs to the respective enable signal.

    Did you observe any problems when doing so? If yes, what is it?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi FvM,

    thanks very much for the reply - when I went back to this, I saw that I had made an error, things work just as you describe !

    regards

    Dave
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    You want use schematic entry, O.K. You'll either place alt_io_buf (for bidirectional pins) or alt_out_buf or tri symbols (tristate output only) and connect the tristate inputs to the respective enable signal.

    --- Quote End ---

    OK, so far so good. But what does the output of the TRI symbol connect to? How do I get a pin name pin name/number assigned to the TRI output?

    Thanks.

    ak
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Answering my own question because Altera tech support does not exist. To create a tri-state output pin, connect the output of a TRI or TRI-BUF library part directly to the input of an output pin library part. The compiler will interpret this to mean you want a tri-state pin. The TRI control input is non-inverting - a high on the control enables the device output pin. A low on the control input puts the device pin in tri-state.

    ak