急求大神啊!!!!
我刚学FPGA,对下面程序有点不解,求大神指教啊process(clk,reset)
variable cnt:integer range 0 to 300:=0;
begin
if resetb='1' then cnt:=0;bclk<='0';
elsif rising_edge(clk) then
if cnt>=208 then
cnt:=0;
bclk<=1;
else
cnt:=cnt+1;
bclk<=0;
end if;
end if;
end process;
它要求得到16分频的时钟,那么cnt>=208是怎么意思,我不明白。 这个分频方法不对。而且看程序想208分频。
16分频是这么来的:
process(clk,reset)
variable cnt:integer range 0 to 300:=0;
begin
if reset='1' then cnt:=0;bclk<='0';
elsif rising_edge(clk) then
if cnt>=8 then
cnt:=0;
bclk<=not bclk;
else
cnt:=cnt+1;
end if;
end if;
end process; ytphrx 发表于 2013-10-28 19:23 static/image/common/back.gif
这个分频方法不对。而且看程序想208分频。
16分频是这么来的:
process(clk,reset)
我也看得云里雾里的,看了你的程序,清楚多了,thank you! Gggggggggg
页:
[1]