【发布时间】:2018-01-18 13:45:08
【问题描述】:
在 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;
为什么?
【问题讨论】:
-
阅读合成工具的编码风格指南。
-
您需要规范化您的 if 语句!
-
在引号中标记平台错误
标签: vhdl