vhdl rising_edge(clk) (clk'event and clk='1')的區別


http://vhdlguru.blogspot.com/2010/04/difference-between-risingedgeclk-and.html

 

rising_edge 是非常嚴格的上升沿,必須從0到1 ,    (clk'event and clk='1')可以從X到1

查看rising_edge原型

 

    FUNCTION rising_edge  (SIGNAL s : std_ulogic) RETURN BOOLEAN IS
    BEGIN
        RETURN (s'EVENT AND (To_X01(s) = '1') AND
                            (To_X01(s'LAST_VALUE) = '0'));
    END;

the statement (clk'event and clk='1') results TRUE when the present value is '1' and there is an edge transition in the clk.It doesnt see whether the previous value is '0' or not.


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM