Ata-Va
Junior Member level 3
- Joined
- Jul 13, 2012
- Messages
- 27
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,505
Hello
I have the same problem. I'm new to VHDL. I tried to find what is wrong but I have no idea. while compiling whole project I get "Signal Count cannot be synthesized, bad synchronous description. The description style you are using to describe a synchronous element (register, memory, etc.) is not supported in the current software release." well I define Count as a variable not a signal but I dont see what's wrong.
and also if some one how can i measure speed of Quadrature_Encoders using 4X Encoding State Transition. the blow code is for 4X Encoding State Transition which Iam not sure even if it fixes will it function correctly or not.
thx everbody
architecture Behavioral of Quadrature_Encoders is
begin
process(A,B)
Variable Count : Integer Range -128 to 128:=0;
begin
if (A'event AND A = '1')then
if (B = '0') then
Count:=Count+1;
elsif (B='1') then
Count:=Count-1;
end if;
end if;
if (A'event And A='0') then
if (B = '0') then
Count:=Count-1;
elsif (B='1') then
Count:=Count+1;
end if;
end if;
if (B'event AND B = '1') then
if (A = '0') then
Count:=Count-1;
elsif (A='1') then
Count:=Count+1;
end if;
end if;
if (B'event AND B = '0') then
if (A = '0') then
Count:=Count+1;
elsif (A='1') then
Count:=Count-1;
end if;
end if;
end process;
end;
I have the same problem. I'm new to VHDL. I tried to find what is wrong but I have no idea. while compiling whole project I get "Signal Count cannot be synthesized, bad synchronous description. The description style you are using to describe a synchronous element (register, memory, etc.) is not supported in the current software release." well I define Count as a variable not a signal but I dont see what's wrong.
and also if some one how can i measure speed of Quadrature_Encoders using 4X Encoding State Transition. the blow code is for 4X Encoding State Transition which Iam not sure even if it fixes will it function correctly or not.
thx everbody
architecture Behavioral of Quadrature_Encoders is
begin
process(A,B)
Variable Count : Integer Range -128 to 128:=0;
begin
if (A'event AND A = '1')then
if (B = '0') then
Count:=Count+1;
elsif (B='1') then
Count:=Count-1;
end if;
end if;
if (A'event And A='0') then
if (B = '0') then
Count:=Count-1;
elsif (B='1') then
Count:=Count+1;
end if;
end if;
if (B'event AND B = '1') then
if (A = '0') then
Count:=Count-1;
elsif (A='1') then
Count:=Count+1;
end if;
end if;
if (B'event AND B = '0') then
if (A = '0') then
Count:=Count+1;
elsif (A='1') then
Count:=Count-1;
end if;
end if;
end process;
end;