Answers Database


Foundation XVHDL, XC9500: How to set an output to high impedance (Hi-Z)


Record #3030

Product Family: Software

Product Line: Metamor

Product Part: Foundation XVHDL

Problem Title:
Foundation XVHDL, XC9500: How to set an output to high impedance (Hi-Z)


Problem Description:
Urgency: Standard

General Description:

Sometimes it is necessary to tie unused pins to
high impedance. This may be the case if changes
were made to the logic of a device but the pin is
on a bus externally. Tieing the pin to gnd or vcc
may have drastic effects on the bus.


Solution 1:

To tie an unused pin to High-Z in Foundation XVHDL, change the
pin to an output std_logic vector, and declare a signal as follows:
signal: bit :='0';

Outside of a process use the following equation:

outz <= 'Z' when controlz = '0' else '0';


Example:

library IEEE;
use IEEE.std_logic_1164.all;

entity hiz is
port(	 a:in bit;
	 b:in bit;
	 clk:in bit;
	 d:out bit;
	 oz:out std_logic
     );
end hiz;

architecture rewrite of hiz is
signal controlz:bit:='0';
begin

process(clk)
if clk'event and clk='1' then
    d<=a and b;
end if;
end process;

oz<='Z' when controlz='0' else '0';

--oz will always be 'Z' since controlz is tied to gnd
        --and never used.

end rewrite;

-------------------------------
This will implement the following equations as seen in the
fitting report

/oz = Vcc
   oz.TRST = Gnd





End of Record #3030 - Last Modified: 06/03/99 14:15

For the latest news, design tips, and patch information on the Xilinx design environment, check out the Technical Tips!