signal AsynInput: std_logic;
signal InputReg: std_logic;
signal Delay: std_logic;
signal SynInput: std_logic;
process(SynInput, AsynInput)
begin
if SynInput=‘1’ then --此置位为寄存器信号,为同步设计,可行
InputReg <= ‘0’;
if rising_edge(AsynInput) then
InputReg <= ‘1’;
end if;
end process;
process(Clk)
begin
if rising_edge(Clk) then
Delay <= InputReg;
SynInput <= Delay;
end if;
大家看看,上面的对异步信号处理的代码,其最后综合结果会是怎样的?
做FPGA,一定要做到,看代码,就如看到电路
|