We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 9965

3.1i XST - ERROR: (VHP__0817). filename.vhd Line xx. Choice xxx is not a locally static expression.


Keywords: XST, VHDL, state, machine, case

Urgency: Standard

General Description:
If a constant declaration name is used in VHDL case choices, XST generates the following errors:

ERROR: (VHP__0817). small.vhd Line 23. Choice ABC is not a locally static expression.
ERROR: (VHP__0817). small.vhd Line 25. Choice XYZ is not a locally static expression.

for this example:

library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;

entity cnt is
port (CLK : in std_logic;
check : in std_logic;
choice : in std_logic_vector (7 downto 0);
S : out std_logic
constant ABC : std_logic_vector (7 downto 0) := "00011011"; -- 1B
constant XYZ : std_logic_vector (7 downto 0) := "11111011"; -- 1B
architecture arch of cnt is
signal casttest: std_logic_vector (7 downto 0);
signal aux: std_logic;
process (check, CLK)
if (CLK'event and CLK='0') then
case casttest is
when ABC =>
S <= '1';
when XYZ =>
S <= check;
when others =>
end case;
end if;
end process;
casttest <= choice;


Replace constant names "ABC" and "XYZ" with their values.

NOTE: This type of syntax structure is supported with the 4.1i software release.
AR# 9965
Date Created 08/21/2000
Last Updated 08/20/2002
Status Archive
Type General Article