Error (10822): HDL error at triangular_carrier.vhd(21): couldn't implement registers for assignments on this clock edge
THERE have some error of my code
but i don't know how to slove this problem
can anyone help me to correct my code
thank you so much !
this is the errror message i had:
Error (10822): HDL error at triangular_carrier.vhd(21): couldn't implement registers for assignments on this clock edge
this is my code:
entity triangular_carrier is
architecture Behavioral of triangular_carrier is
signal x,y:INTEGER:=0;
begin
process(clk,Ts)
begin
case x is
when 0 =>if (clk'event and clk='1') then <---- there is my error occured
if y/=(Ts/2)then carrier <=y+1; y<=y+1;
else x<=1;carrier<=y-1;y<=y-1;
end if;
end if;
when 1 =>if (clk'event and clk='1') then
if y/=0then carrier <=y-1; y<=y-1;
else x<=0;carrier <=y+1; y<=y+1;
end if ;
end if;
when others=>null;
end case;
end process;
end Behavioral;