IF EnPulse = '0' THEN
CntINPulse <= 0;
EnOutput <= '0';
PulseCNTStart <= '0';
ELSIF (PulseIN 'EVENT AND PulseIN = '1') THEN
if CntINPulse = 1 then
PulseCNTStart <= '1';
elsif CntINPulse = 11 then
CntINPulse<= 0;
PulseCNTStart <= '0';
else
CntINPulse<=CntINPulse+1;
end if;
end if;
为啥加上 if CntINPulse = 1就不好使?这样就好使了,就出现了在第11个脉冲处出现CntINPulse拉低,在起始处CntINPulse 变高:为何加上if CntINPulse = 1后CntINPulse就变成全高了?
IF EnPulse = '0' THEN
CntINPulse <= 0;
EnOutput <= '0';
PulseCNTStart <= '0';
ELSIF (PulseIN 'EVENT AND PulseIN = '1') THEN
PulseCNTStart <= '1';
if CntINPulse = 11 then
CntINPulse<= 0;
PulseCNTStart <= '0';
else
CntINPulse<=CntINPulse+1;
end if;
|