if( clkin'event and clkin = '1' )then
count<=count+1;
if(count=10) then
count1<=count1+1;
count<=0;
if(count1=10)then
count2<=count2+1;
count1<=0;
if(count2=10)then
count3<=count3+1;
count2<=0;
if(count3=10)then
count4<=count4+1;
count3<=0;
if(count4=10)then
count5<=count5+1;
count4<=0;
if(count5=10)then
count5=0;
end if;
end if;
end if;
end if;
end if;
end if;
这个能实现要求吗 计数
end if; |