else tmp<='1';STATES<="0000";
end if ;
end if;
end process p1;
p2:process(CLK1,EN1,KAISHI,cnt)
begin
if KAISHI='1' then
cnt<="000000";ringf<='0';
elsif CLK1'event and CLK1='1' then
if EN1='0' and sinor='1' then
if two='0' then
if cnt<="111111" then
ringf<=not ringf;cnt<=cnt+1;
else ringf<='0';
end if;
end if;
end if;
end if;
end process p2;
RING<=ringf;
------------------------------------------------------------------- PROCESS(RST1,ADD,CHOS)IS --------JFQ VARIABLE POINTS_A2,POINTS_A1,POINTS_A0: STD_LOGIC_VECTOR(3 DOWNTO 0);
VARIABLE POINTS_B2,POINTS_B1,POINTS_B0: STD_LOGIC_VECTOR(3 DOWNTO 0);
VARIABLE POINTS_C2,POINTS_C1,POINTS_C0: STD_LOGIC_VECTOR(3 DOWNTO 0);
VARIABLE POINTS_D2,POINTS_D1,POINTS_D0: STD_LOGIC_VECTOR(3 DOWNTO 0);
BEGIN
IF (ADD'EVENT AND ADD='1') THEN
IF RST1='1' THEN
POINTS_A2:="0000"; POINTS_A1:="0000"; POINTS_A0:="0000";
POINTS_B2:="0000"; POINTS_B1:="0000"; POINTS_B0:="0000";
POINTS_C2:="0000"; POINTS_C1:="0000"; POINTS_C0:="0000";
POINTS_D2:="0000"; POINTS_D1:="0000"; POINTS_D0:="0000";
ELSIF CHOS="0001" THEN
IF POINTS_A0="1001" THEN
POINTS_A0:="0000";
IF POINTS_A1="1001" THEN
POINTS_A1:="0000";
IF POINTS_A2="1001" THEN
POINTS_A2:="0000";
ELSE
POINTS_A2:=POINTS_A2+'1';
END IF;