求高手解答,FPGA扫描外界高电平上升沿信号的机制为什么实现不了(VHDL程序)

2025-03-09 23:20:37
推荐回答(2个)
回答1:

没有clk引入,没有D触发器,怎么实现上升沿检测啊?

PROCESS(clkTemp)
BEGIN
if rising_edge(clkTemp) then
dsp_wrmTmp1<=dsp_wrmTmp;
dsp_wrmTmp2<=dsp_wrmTmp1;
endif;
END PROCESS;

PROCESS(clkTemp,rdint,dsp_wrmTmp,wr_fifo)
BEGIN
if rising_edge(clkTemp) then
if(dsp_wrmTmp='1' and dsp_wrmTmp2='0')then
TP<='1';
elsif(dsp_wrmTmp='0' and dsp_wrmTmp2='1')then
TP<='0';
end if;
endif;
END PROCESS;
个人认为你的clkTemp就是你时钟。

回答2:

把dsp_wrmTmp='1'改为dsp_wrmTmp=='1'
比较是双等号,你都是用赋值那条件肯定都为真了