在赛灵思中合成此代码时出现错误。此错误为:“信号 Z_1 无法合成,同步描述错误”
entity uk3 is
port(
rst : in BIT;
C : in INTEGER;
clk : in BIT;
S : out INTEGER
);
end uk3;
--}} End of automatically maintained section
architecture uk3 of uk3 is
begin
process (C,clk,rst)
variable Z_1 : integer:=0;
begin
if rst='1' then Z_1:=0;
elsif rst='0'and clk'event and clk='1'and C=1
then
Z_1:=Z_1 + 1;
elsif rst='0'and clk'event and clk='1'and C=2
then
Z_1:=Z_1 + 2;
else
Z_1:=Z_1;
end if;
S<=Z_1;
end process;
-- enter your statements here --
end uk3;
为什么?请