【发布时间】:2018-01-18 08:01:44
【问题描述】:
在 Xilinx 中合成此代码时出现错误。这个错误是: "信号 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;
为什么?请
【问题讨论】:
-
同一个问题不要问两次。
标签: vhdl active-hdl