This rule checks the indent of a constant declaration.
Violation
architecture RTL of FIFO is
constant size : integer := 1;
constant width : integer := 32;Fix
architecture RTL of FIFO is
constant size : integer := 1;
constant width : integer := 32;|phase_6| |error| |case| |case_keyword|
This rule checks the constant keyword has proper case.
|configuring_uppercase_and_lowercase_rules_link|
Violation
CONSTANT size : integer := 1;Fix
constant size : integer := 1;This rule was deprecated and replaced with rules: function_015, package_019, procedure_010, architecture_029 and process_037.
|phase_6| |error| |case| |case_name|
This rule checks the constant identifier has proper case.
|configuring_uppercase_and_lowercase_rules_link|
Violation
constant SIZE : integer := 1;Fix
constant size : integer := 1;|phase_2| |error| |whitespace|
This rule checks for a single space after the colon.
|configuring_whitespace_rules_link|
Violation
constant size :integer := 1;
constant width : integer := 32;Fix
constant size : integer := 1;
constant width : integer := 32;|phase_2| |error| |whitespace|
This rule checks for at least a single space before the colon.
|configuring_whitespace_rules_link|
Violation
constant size: integer := 1;
constant width : integer := 32;Fix
constant size : integer := 1;
constant width : integer := 32;This rule checks the := is on the same line as the constant keyword.
Violation
constant size : integer
:= 1;
constant width : integer
:= 32;Fix
constant size : integer :=
1;
constant width : integer :=
32;|phase_2| |error| |whitespace|
This rule checks for a single space before the := keyword in constant declarations. Having a space makes it clearer where the assignment occurs on the line.
|configuring_whitespace_rules_link|
Violation
constant size : integer:= 1;
constant width : integer := 10;Fix
constant size : integer := 1;
constant width : integer := 10;The function of this rule has been superseded by the following rules:
- type_mark_500
- subtype_002
- type_014
This rule checks the alignment of multiline constants that contain arrays.
|configuring_multiline_indent_rules_link|
Note
The structure of multiline array constants is handled by the rule constant_016.
Violation
constant rom : romq_type :=
(
0,
65535,
32768
);Fix
constant rom : romq_type :=
(
0,
65535,
32768
);This rule checks for consistent capitalization of constant names.
Violation
architecture RTL of ENTITY1 is
constant c_size : integer := 5;
constant c_ones : std_logic_vector(c_size - 1 downto 0) := (others => '1');
constant c_zeros : std_logic_vector(c_size - 1 downto 0) := (others => '0');
signal data : std_logic_vector(c_size - 1 downto 0);
begin
data <= C_ONES;
PROC_NAME : process () is
begin
data <= C_ones;
if (sig2 = '0') then
data <= c_Zeros;
end if;
end process PROC_NAME;
end architecture RTL;Fix
architecture RTL of ENTITY1 is
constant c_size : integer := 5;
constant c_ones : std_logic_vector(c_size - 1 downto 0) := (others => '1');
constant c_zeros : std_logic_vector(c_size - 1 downto 0) := (others => '0');
signal data : std_logic_vector(c_size - 1 downto 0);
begin
data <= c_ones;
PROC_NAME : process () is
begin
data <= c_ones;
if (sig2 = '0') then
data <= c_zeros;
end if;
end process PROC_NAME;
end architecture RTL;This rule checks the indent of multiline constants that do not contain arrays.
|configuring_multiline_indent_rules_link|
Violation
constant width : integer := a + b +
c + d;Fix
constant width : integer := a + b +
c + d;|phase_7| |disabled| |error| |unfixable| |naming|
This rule checks for valid prefixes on constant identifiers. The default constant prefix is c_.
|configuring_prefix_and_suffix_rules_link|
Violation
constant my_const : integer;Fix
constant c_my_const : integer;This rule checks the structure of multiline constants that contain arrays.
|configuring_array_multiline_structure_rules_link|
Note
The indenting of multiline array constants is handled by the rule constant_012.
Violation
constant rom : romq_type := (0, 65535, 32768);Fix
constant rom : romq_type :=
(
0,
65535,
32768
);This rule checks the structure of constant constraints.
|configuring_multiline_constraint_rules_link|
Violation
constant con_a : my_record(element1(7 downto 0), element2(3 downto 0));Fix
constant con_a : my_record(
element1(7 downto 0),
element2(3 downto 0)
);|phase_2| |error| |whitespace|
This rule checks for a single space after the := assignment in constant declarations. Having a space makes it clearer where the assignment occurs on the line.
|configuring_whitespace_rules_link|
Violation
constant size : integer :=1;
constant width : t_type :=(Fix
constant size : integer := 1;
constant width : t_type := (|phase_2| |disabled| |error| |whitespace|
This rule checks for a single space before the identifier.
|configuring_whitespace_rules_link|
Violation
constant size : integer := 1;
constant width : integer := 32;Fix
constant size : integer := 1;
constant width : integer := 32;|phase_3| |disabled| |error| |blank_line|
This rule checks for a blank line below a constant declaration unless there is another constant definition.
|configuring_blank_lines_link|
Violation
constant width : integer := 32;
signal height : integer := 4;
constant width : integer := 32;
constant height : integer := 4;Fix
constant width : integer := 32;
signal height : integer := 4;
constant width : integer := 32;
constant height : integer := 4;This rule checks the alignment of assignment keywords in constant declarations.
|configuring_keyword_alignment_rules_link|
Violation
constant c_default_values : t_address_en := (
c_address_control => false,
c_address_data => true,
others => false
);Fix
constant c_default_values : t_address_en := (
c_address_control => false,
c_address_data => true,
others => false
);|phase_7| |disabled| |error| |unfixable| |naming|
This rule checks for valid suffixes on constant identifiers. The default constant suffix is _c.
|configuring_prefix_and_suffix_rules_link|
Violation
constant my_const : integer;Fix
constant my_const_c : integer;