AR# 13518

|

XST - "ERROR:HDLParsers:817 Choice -xxx is not a locally static expression"

Description

General Description:

When I attempt to use a constant (- xxx) in a case statement, XST reports the following error:

"ERROR:HDLParsers:817 Choice -xxx is not a locally static expression."

Solution

This problem occurs for the following reasons:

- The select expression in a case statement is something other than a signal.

- The select expression consists of a certain function.

- The select expression is indexing into a constant array.

IEEE specifications require that the select expression in a case statement is defined by a signal, and that the signal is defined before the case statement starts.

For example:

:

type select_expressions is (s0, s1, s2);

signal Select : select_expression;

:

:

case Select is

when s0 => q <= "01";

when s1 => q <= "10";

when s2 => q <= "11";

when others => q <= "00";

end case;

:

:

NOTE: The way in which the "Select" signal is assigned is determined by your design.

AR# 13518
Date 12/15/2012
Status Active
Type General Article
People Also Viewed