Keywords: XST, Spartan-6, Virtex-6, 11.2 , Parser, HDLCompiler:940
The following error occurs in XST when I target Virtex-6 or Spartan-6 devices, but I do not have any issues when I target older devices. Why?
ERROR:HDLCompiler:545 - "<file>.vhd" Line xx: Initial value for constant declaration is not constant
Example code:
library ieee;
use ieee.std_logic_1164.all;
entity ex_0009 is
port(clk,a : in std_logic;
res : out std_logic
);
end ex_0009;
architecture bhv of ex_0009 is
constant my_const: std_logic:='0';
signal tmp: std_logic;
begin
tmp <= my_const;
process (clk)
constant local_const: std_logic := tmp; -- Note: Error points here
begin
if clk'event and clk='1' then
res <= a or local_const;
end if;
end process;
end;