I am trying to build a edge detector circuit. I did the following
Tag_1 <= Tag AND ( NOT ( Tag) ) ;
But its not working. I guess because of zero propagation delay of the
AND gate. I am using Spartan chip XC3S1000. Can anybody advice!
Yes, most certainly.... DON'T TRY TO DO IT LIKE THAT.
Reason 1:
~~~~~~~~~
Consider what would happen if you were to get such a piece
of hardware working in the way you imagine it. The output
pulse would be approximately the same width as the NOT
operator's propagation delay. This is similar to the
propagation delay of everything else in your circuit,
and also similar to the RC time constant of typical
gate-to-gate wiring. Your pulse will be so narrow that
it is highly likely to disappear as it moves around
the device, and in any case it will be too narrow to
trigger any other logic reliably.
Reason 2:
~~~~~~~~~
The expression (Tag AND NOT Tag) is a simple function of
one input that can trivially be shown to be zero. Synthesis
will rather reliably turn it into a constant '0'.
Reason 3:
~~~~~~~~~
Why do you want to detect asynchronous edges on Tag? In
safe synchronous design methodology, the ONLY thing you ever
do with an asynchronous edge is use it to clock a flip-flop.
Re-work your design to resynchronise Tag to your clock and
then detect 0->1 transitions on it synchronously.
--
Jonathan Bromley, Consultant
DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services
Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
(e-mail address removed)
http://www.MYCOMPANY.com
The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.