On Aug 12, 6:07*am, "Symon" <symon_bre...@hotmail.com> wrote:
> "KJ" <kkjenni...@sbcglobal.net> wrote in message
>
> news:bwmnk.32987$[email protected]..
>
>
>
> > I'll strongly second Mike's advice and I'd go further and state that
> > latches are never safe unless
> > - The device actually has a hardware latch as a resource (unlikely
> > now-a-daze)
> > - The synthesized code ends up mapping the source code to the above
> > mentioned latch
> > - The latch enable signal is sourced from a flip flop.
>
> > KJ
>
> Hi Kevin,
>
> All the Xilinx FPGAs I use have latches built in.
Then that meets the first requirement. Making sure that your code
gets mapped to those elements to meet #2 is still a manual
verification task. As long as one doesn't get too creative in
applying logic to generating the latch enable/gate signal then it
should all work out.
> Also, I
> think your third requirement is awry if by 'latch enable' you mean what I
> would call the 'gate'. Normally my latched designs have the gate fed froma
> clock.
>
Right, I should've said something more along the lines of that the
latch enable/gate signal must have absolutely no glitches, (i.e. like
a clock)...the point being that the output of any logic function
should not be used...amazingly enough, that simple point was the cause
for several failures that I investigated. The other common failure
being when the device didn't have hard latches so they got cobbled
together out of the existing logic but didn't cover the logic hazard
(or race condition if you prefer) either explicitly or because it got
optimized away since it's redundant...all of that was a long while ago
though.
KJ