Hello there, when trying to synthesize that code i get the following
error from ise
ERROR:Xst:827 - line 18: 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.
do you have any idea why that happens ?
here is the code
1 | library ieee;
|
2 | use ieee.std_logic_1164.all;
|
3 | use ieee.numeric_std.all;
|
4 |
|
5 | entity alt_clock is
|
6 | generic (time1 : integer:=3);
|
7 | port(clk,rst: in std_logic;
|
8 |
|
9 |
|
10 | done: out std_logic);
|
11 | end alt_clock;
|
12 |
|
13 | architecture aarch of alt_clock is
|
14 |
|
15 |
|
16 |
|
17 | begin
|
18 | P0:process(clk) -- this is the line 18
|
19 | variable count :integer range time1 downto 0;
|
20 | begin
|
21 | if clk'event and clk='1' and rst='1' then
|
22 | count:=0;
|
23 | done<='0';
|
24 | elsif clk'event and clk='1' and rst='0' then
|
25 | if count<time1 then
|
26 | count:=count+1;
|
27 | done<='0';
|
28 | elsif count=time1 then
|
29 | done<='1';
|
30 | count:=0;
|
31 | else null;
|
32 | end if;
|
33 |
|
34 | end if;
|
35 |
|
36 |
|
37 |
|
38 |
|
39 | end process;
|
40 |
|
41 |
|
42 | end aarch;
|