定义一个信号UT
process(clk)
variable cnt:integer range 0 to 7; ----三位二进制整数,可改为八位。
begin
if clk'event and clk='1' then
ut <= u;
if ut = u then
cnt:=0;
else
cnt:=cnt+1;
end if;
end if;
end process;
发表时间:2003年6月17日22:29:05