Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - Avoiding metastability on asynchronous inputs

 
Thread Tools Search this Thread
Old 11-07-2008, 12:05 PM   #1
Default Avoiding metastability on asynchronous inputs


Hi,
I am currently working on maintaining an old design which has quite a few asynchronous inputs. In the code a component was defined and instantiated for each of the inputs. Below is the code:

process (clk, rst) is
begin -- process
if rst = '1' then -- asynchronous reset (active high)
sgnl1 <= '1';
output <= '1';
elsif rising_edge(clk) then
sgnl1 <= input; -- asynchronous input transferred to sgnl1
output <= sgnl1 or input;
end if;
end process;

Normally I register the asynchronous input twice as shown below:

process(clk)
begin
if rising_edge(clk) then
pre_signal1 <= m_signal1;
signal1 <= pre_signal1;
.
.
.
etc
.
.
pre_signal25 <= m_signal25;
signal25 <= pre_signal25;

end if;
end process;


Are there any advantages to doing it the first way. To me it seems as though it may be less secure as only 1 flip flop is used. But the OR statement compares the registered signal and the input one cycle apart (all signals are active low so either signal being a logic '1' will produce a logic '1'. What happens if I try to OR a metastable signal with a 1 or a 0?

Also is there anything else to worry about when reading in an asynchronous signal other than the small chance of metastability?


Thanks for any help.


Ardni
Ardni is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Asynchronous Web Page Programming in 70-528 Marc W MCTS 1 11-13-2008 09:39 PM
Upconverting, Many Inputs rob DVD Video 0 01-08-2006 09:15 AM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46