1 用时钟信号上升沿采样
2 对insigal信号进行1周期延迟,与原信号异或后制造一个时钟周期的脉冲
3 时钟信号采样该脉冲信号获得其上升沿
process(Clk)
begin
if(Clk'event and Clk = '1') then
iBuf <= i;
iBuf2 <= iBuf;
end if;
end process;
process(Clk)
begin
if(Clk'event and Clk = '1') then
if (iBuf = '1' and iBuf2 = '0') then --判断i的上升沿
想要触发的活动;
end if;
end if;
end process;
process(i)
begin
if(i'event and i = '1') then
想要出发的活动;
end if;
end process;