登录站点

用户名

密码

FPGA中的同步复位与异步复位

已有 950 次阅读  2009-11-10 13:16   标签FPGA  异步  复位 
同步复位敏感的是时钟信号;异步复位敏感的是复位信号和时钟信号;其VHDL描述是:
--同步复位
library ieee;
use ieee.std_logic_1164.all;
 
entity  tst is
....
end entity tst;
architecture rtl of tst is
...
begin
    process(clk)
    begin
        if(clk'EVENT and clk='1') then
             if(reset='1') then
                  q<= '0';
             else
                   q<=d_in;
             .....
             end if;
           ................
         end if;
     end process;
     ......
end architecture rtl;
 
--异步复位
library ieee;
use ieee.std_logic_1164.all;
 
entity  tst is
....
end entity tst;
architecture rtl of tst is
...
begin
    process(reset,clk)
    begin
         if(reset='1') then
             q<='0';
         elsif(clk'EVENT and clk='1') then
             q <= d_in;
             .......
         end if;
     end process;
end architecture rtl;
 
 
 

上一篇: VHDL编写的比较器 下一篇: 同步计数器和异步计数器

分享 举报