tachometer
- Mar 25, 2012
- 14
- Joined
- Mar 25, 2012
- Messages
- 14
When I was finally satisfied with my project i got into this huge error I've spent all day trying to debug but I just cant.
In model sim everything works just fine but when i try to synthesize it what happens is that i get this error :
ERROR:Xst:827 Signal PUSHBUTTON 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.
This is the code for the entity:
entity clkdiv is
port (
CLK: in std_logic;
CLKOUT: out std_logic;
PB : in std_logic
);
end clkdiv;
architecture Behavioral of clkdiv is
signal MAXCOUNT: std_logic_vector (22 downto 0):= "00000000001010101111100";
signal COUNT: std_logic_vector (22 downto 0):= (others =>'0');
begin
process(CLK, PB)
variable PUSHBUTTON: integer;
begin
if (PB='1')then
PUSHBUTTON:= 1;
end if;
if (PUSHBUTTON = 1) then
if(rising_edge (CLK)) then
if(COUNT < MAXCOUNT ) then
COUNT <= COUNT+1;
CLKOUT <= '1';
elsif (COUNT=MAXCOUNT) then
COUNT <= (others => '0');
CLKOUT <= '0';
PUSHBUTTON:=0;
end if;
end if;
elsif (PUSHBUTTON = 0) then
COUNT <= (others => '0');
CLKOUT <= '0';
end if;
end process;
end Behavioral;
In model sim everything works just fine but when i try to synthesize it what happens is that i get this error :
ERROR:Xst:827 Signal PUSHBUTTON 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.
This is the code for the entity:
entity clkdiv is
port (
CLK: in std_logic;
CLKOUT: out std_logic;
PB : in std_logic
);
end clkdiv;
architecture Behavioral of clkdiv is
signal MAXCOUNT: std_logic_vector (22 downto 0):= "00000000001010101111100";
signal COUNT: std_logic_vector (22 downto 0):= (others =>'0');
begin
process(CLK, PB)
variable PUSHBUTTON: integer;
begin
if (PB='1')then
PUSHBUTTON:= 1;
end if;
if (PUSHBUTTON = 1) then
if(rising_edge (CLK)) then
if(COUNT < MAXCOUNT ) then
COUNT <= COUNT+1;
CLKOUT <= '1';
elsif (COUNT=MAXCOUNT) then
COUNT <= (others => '0');
CLKOUT <= '0';
PUSHBUTTON:=0;
end if;
end if;
elsif (PUSHBUTTON = 0) then
COUNT <= (others => '0');
CLKOUT <= '0';
end if;
end process;
end Behavioral;