process(clk,u)
variable cnt:integer range 0 to 7; ----三位二进制整数,可改为八位。
begin
if u'event then ----采用异步方式。
cnt:=0;
elsif clk'event and clk='1' then
cnt=cnt+1;
end if;
end process;
发表时间:2003年6月17日19:32:43