Knowledge Base Article

VHDL error at <design>.vhd(): value cannot be assigned to constant "<constant name>"

Description

This error may occur when you assign values to specific bits of a generic. For example, this error can occur if you have the following declaration and then assign specific bits within a generic construct, as shown below.

generic(
   reset_value    : std_logic_vector(15 downto 0) ...
generic map(
   reset_value(2)   => '1',
   reset_value(7)   => '1',
   reset_value(9)   => '1', ...

The Quartus II software does not allow specific bits of a generic construct to be assigned. Instead, you must assign the entire generic construct, as shown in the following change to the generic map from the example above:

reset_value    => "0000001010000100",

This problem is fixed beginning with the Quartus II software version 8.0.

Updated 3 months ago
Version 2.0
No CommentsBe the first to comment