Generic Rules¶
generic_001¶
This rule checks for blank lines above the generic keyword.
Violation
entity FIFO is
generic (
Fix
entity FIFO is
generic (
generic_002¶
This rule checks the indent of the generic keyword.
Violation
entity FIFO is
generic (
entity FIFO is
generic (
Fix
entity FIFO is
generic (
entity FIFO is
generic (
generic_003¶
This rule checks for a single space between the generic keyword and the (.
Violation
generic (
generic(
Fix
generic (
generic (
generic_004¶
This rule checks the indent of generic declarations.
Violation
generic (
WIDTH : integer := 32;
DEPTH : integer := 512
)
Fix
generic (
WIDTH : integer := 32;
DEPTH : integer := 512
)
generic_005¶
This rule checks for a single space after the colon in a generic declaration.
Violation
WIDTH :integer := 32;
Fix
WIDTH : integer := 32;
generic_006¶
This rule checks for a single space after the default assignment.
Violation
WIDTH : integer :=32;
DEPTH : integer := 512;
Fix
WIDTH : integer := 32;
DEPTH : integer := 512;
generic_007¶
This rule checks the generic names have proper case.
Note
The default is uppercase.
Violation
width : integer := 32;
Fix
WIDTH : integer := 32;
generic_008¶
This rule checks the indent of the closing parenthesis.
Violation
DEPTH : integer := 512
);
Fix
DEPTH : integer := 512
);
generic_009¶
This rule checks the generic keyword has proper case.
Note
The default is lowercase.
Refer to the section Configuring Uppercase and Lowercase Rules for information on changing the default case.
Violation
GENERIC (
Fix
generic (
generic_010¶
This rule checks the closing parenthesis is on a line by itself.
Violation
DEPTH : integer := 512);
Fix
DEPTH : integer := 512
);
generic_012¶
This rule checks the alignment of :’s for every generic.
Violation
ADDRESS_WIDTH : integer := 10;
DATA_WIDTH : integer := 32;
DEPTH : integer := 512;
Fix
ADDRESS_WIDTH : integer := 10;
DATA_WIDTH : integer := 32;
DEPTH : integer := 512;
generic_013¶
This rule checks for the generic keyword on the same line as a generic declaration.
Violation
generic (DEPTH : integer := 512;
Fix
generic (
DEPTH : integer := 512;
generic_014¶
This rule checks for at least a single space before the :.
Violation
ADDRESS_WIDTH: integer := 10;
DATA_WIDTH : integer := 32;
DEPTH: integer := 512;
Fix
ADDRESS_WIDTH : integer := 10;
DATA_WIDTH : integer := 32;
DEPTH : integer := 512;
generic_015¶
This rule checks the alignment of the := operator in generic declarations.
Violation
ADDRESS_WIDTH : integer := 10;
DATA_WIDTH : integer := 32;
DEPTH : integer := 512;
Fix
ADDRESS_WIDTH : integer := 10;
DATA_WIDTH : integer := 32;
DEPTH : integer := 512;
generic_016¶
This rule checks for multiple generics defined on a single line.
Violation
generic (
WIDTH : std_logic := '0';DEPTH : std_logic := '1'
);
Fix
generic (
WIDTH : std_logic := '0';
DEPTH : std_logic := '1'
);
generic_017¶
This rule checks the generic type has proper case if it is a VHDL keyword.
Note
The default is lowercase.
Violation
generic (
WIDTH : STD_LOGIC := '0';
DEPTH : Std_logic := '1'
);
Fix
generic (
WIDTH : std_logic := '0';
DEPTH : std_logic := '1'
);
generic_018¶
This rule checks the generic keyword is on the same line as the (.
Violation
generic
(
Fix
generic (
generic_019¶
This rule checks for blank lines before the ); of the generic declaration.
Violation
generic (
WIDTH : std_logic := '0';
DEPTH : Std_logic := '1'
);
Fix
generic (
WIDTH : std_logic := '0';
DEPTH : Std_logic := '1'
);
generic_020¶
This rule checks for valid prefixes on generic identifiers.
Note
The default generic prefix is “G_”.
Refer to the section Configuring Prefix and Suffix Rules for information on changing the allowed prefixes.
Violation
generic(MY_GEN : integer);
Fix
generic(G_MY_GEN : integer);