On 1/13/2013 6:34 PM, rickman wrote:
> On 1/11/2013 5:27 PM, Brian Drummond wrote:
>> On Fri, 11 Jan 2013 18:37:36 +0100, Paul Uiterlinden wrote:
>>
>>> Guy Gibson wrote:
>>>
>>>> I am looking at some old code and found that the designer set a port as
>>>> an out but then in the bodey of the code included a statement to set
>>>> the pin hi-z. Is this acceptable. I have not seen this done before nor
>>>> have I seen it mentioned in any VHDL text books / reference manuals.
>>>>
>>>> RAM_RD_L : out std_logic; -- RAM Read, low true
>>>>
>>>> RAM_RD_L<= Fpga_RD_L when Bus_Control_H = '1' else 'Z';
>>>
>>> Acceptable for what? For simulation? Sure! For synthesis? I guess not
>>> (but I have no experience with that).
>>
>> It d*mn well ought to synthesize.
>>
>> Easy to check, there ought to be a tristate enable connected to the
>> inferred IOB, and that ought to be visible in the RTL viewer.
>>
>> It certainly works with Xilinx ISE from about ISE 7 onwards, possibly
>> earlier.
>>
>> I also needed to add attributes Keep, Equivalent_Register_Removal and IOB
>> to certain signals, or XST would "optimise" duplicated registers on the
>> tristate control signals, using one for a bus instead of the ones
>> embedded in each IOB. That gave horrible timings, as you can imagine!
>>
>> - Brian
>
> Heck, go back far enough and tri-state drivers work internally in the
> 3000 and 4000 series. I think it was in the Spartan and Virtex parts
> that they got rid of the internal tri-states.
Xilinx parts had internal tristates through Virtex, Virtex E,
Spartan 2 and Spartan 2e. They went away with Virtex II and
Spartan 3. I often used internal tristate buffers as muxes
in those older parts when I was running low on LUT's. We're
getting a bit off topic here, though...
> The a tristate output does not need any special declaration. It is only
> when the pin has to be an input as well that you need to declare it as
> an inout type. Is that what the concern is about?
>
> Rick
-- Gabor
|