JINBO515 发表于 2013-4-22 18:59:57

有关VHDL

初学CPLD,请大家帮忙分析下面分频进程是什么意思?非常感谢
process(clk)
        variable cnt1 : integer range 0 to 200;
        variable cnt2 : integer range 0 to 250;
        begin
                if clk'event and clk='1' then
                if cnt1=200 then
                        cnt1:=0;
                        if cnt2=250 then
                                cnt2:=0;
                                clk_500<=not clk_500;
                        else
                                cnt2:=cnt2+1;
                        end if;
                else
                        cnt1:=cnt1+1;
                end if;
        end if;
end process;

zby199088 发表于 2013-4-24 17:37:53

200*250分频。。?
页: [1]
查看完整版本: 有关VHDL