Re: How to Tristate!!! when not reading

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

dataOut <= dataForRead when (doAread = '1') else
             (others => 'Z');

Muhammad Khan wrote:
 > HI Fellows,
 > The process given below is to read and write to Vertex device ( only
 > vhdl part is shown here not C ). I want to tristate SR_DATA_IO_int
 > when not driven as read.
 > First of all the code below for write and read is correct or not!!!!
 > SR_DATA_IO_int pins ( which are 32 , I am using upper 7 bits only )
 > will be acting as bi directional pins. While writing these will take
 > bits from PCI interface to device and while reading they will exactly
 > opposite. But while writing I have to tristate SR_DATA_IO_int so as to
 > avoid short circuiting. Any help on tristate will be highly
 > appreciated.
 >
 >
process(CLK_2X,SR_ADDR_IO_int,SR_DATA_IO_int,SR_IRD_int,SR_IWR_int,SR_IVCS_V3_int)
 > begin
 > if RISING_EDGE(CLK_2X) then
 >  if SR_IVCS_V3_int = '0' then
 >   if SR_IWR_int = '0' then
 >      if SR_ADDR_IO_int = "001100" then
 >        RESULT <= SR_DATA_IO_int(6 downto 0);
 >      End if ;
 >   Elsif  SR_IRD_int = '0' then
 >     if SR_ADDR_IO_int = "001101" then
 >      SR_DATA_IO_int(6 downto 0)<=RESULT ;
 >     End if;
 >   End if;
 > End if;
 > End if;



Site Timeline