RayLopez99 said:
The Wikipedia link is not as bad as you might think, and confirms that metastability is inherent in any design, especially if you are below a minimum clock, even in synchronous design. Check it out:
http://en.wikipedia.org/wiki/Metastability_in_electronics
RL
"Metastable states are avoidable in fully synchronous systems when
the input setup and hold time requirements on flip-flops are satisfied."
What that means is, if you design a state machine, in a chunk of silicon clocked
with one input clock, and you haven't overclocked the thing (meaning, it still
meets Tsu and Th), then it will run stably, forever. With zero probability of
failure to work correctly. This assumes (as is true in this day and age),
that you package the circuit properly, and feed it power properly.
As an example of a state machine, I could take three flip-flops and
make the circuit count 0-1-2-3-4-0-1-2-3-4... What I'd be doing in
that case, is detecting the value "4", and telling the circuit to
start at zero again. Three flip flops, unconstrained, would be
able to count from 0 to 7 and start over again. But in this
example, we use feedback to change the behavior. And that is a
state machine (we haven't decoded the states or anything, or attempted
to use the information).
The flip flips in that example, could all be clocked from the same
clock signal. Say, a 100MHz clock with a 50% duty cycle. Every
20 nanoseconds, the output of the three flip-flops would change,
and the bit pattern observed would be the counting sequence
0-1-2-3-4-0-1-2-3-4...
Now, I could leave that circuit running, on a benchtop, virtually
forever.
And I've actually done something like that here. I have an FPGA on
a PCI card, which I bought for a few hundred dollars. I used the
programming tool, to make a simple circuit. The initial design counted
up, and I modified the circuit (text file with Verilog in it) to
count down instead. I connected a PCI Express parallel port card
to a JTAG programmer cable, over to the PCI card, while it was
sitting on an adjacent table. I downloaded the FPGA bit pattern,
and the circuit kicked off. It sat there counting in the programmed
sequence. And it ran for six months, before I got tired of it
and switched it off one day. I wasn't really that concerned
about the stability - it was more a matter of not bothering
to turn it off. That board is a little demo board, with
LED displays so you can verify (for sufficiently slowly
updating designs), that it's still alive, and working
properly. And that was a purely synchronous, digital circuit.
(Picture of my FPGA board... Has a two digit, 7 segment display.
JTAG cable connects to the top. Power supply plugs into the lower
right hand corner. PCI connector is only useful, if you have the
intellectual property block that runs it.)
http://www.assistelie.fr/realisation/JPG/170_dec03_31.jpg
Paul