Type Rules
type_001
This rule checks the indent of the type declaration.
Violation
architecture rtl of fifo is
type state_machine is (idle, write, read, done);
begin
Fix
architecture rtl of fifo is
type state_machine is (idle, write, read, done);
begin
type_002
This rule checks the type keyword has proper case.
Refer to Configuring Uppercase and Lowercase Rules for more information.
Violation
TYPE state_machine is (idle, write, read, done);
Fix
type state_machine is (idle, write, read, done);
type_003
This rule was deprecated and replaced with rules:
type_004
This rule checks the type identifier has proper case.
Refer to Configuring Uppercase and Lowercase Rules for more information.
Violation
type STATE_MACHINE is (idle, write, read, done);
Fix
type state_machine is (idle, write, read, done);
type_005
This rule checks the indent of multiline enumerated types.
Violation
type state_machine is (
idle,
write,
read,
done);
Fix
type state_machine is (
idle,
write,
read,
done);
type_006
This rule checks for a single space before the is keyword.
Refer to Configuring Whitespace Rules for options on changing the number of whitespaces..
Violation
type state_machine is (idle, write, read, done);
Fix
type state_machine is (idle, write, read, done);
type_007
This rule checks for a single space after the is keyword.
Refer to Configuring Whitespace Rules for options on changing the number of whitespaces..
Violation
type state_machine is (idle, write, read, done);
Fix
type state_machine is (idle, write, read, done);
type_008
This rule checks the closing parenthesis of multiline enumerated types is on its own line.
Violation
type state_machine is (
idle,
write,
read,
done);
Fix
type state_machine is (
idle,
write,
read,
done
);
type_009
This rule checks for an enumerate type after the open parenthesis on multiline enumerated types.
Violation
type state_machine is (idle,
write,
read,
done
);
Fix
type state_machine is (
idle,
write,
read,
done
);
type_010
This rule checks for blank lines or comments above the type declaration.
Refer to Configuring Previous Line Rules for more information.
Violation
signal wr_en : std_logic;
type state_machine is (idle, write, read, done);
Fix
signal wr_en : std_logic;
type state_machine is (idle, write, read, done);
type_011
This rule checks for a blank line below the type declaration.
Refer to Configuring Blank Lines for more information.
Violation
type state_machine is (idle, write, read, done);
signal sm : state_machine;
Fix
type state_machine is (idle, write, read, done);
signal sm : state_machine;
type_012
This rule checks the indent of record elements in record type declarations.
Violation
type interface is record
data : std_logic_vector(31 downto 0);
chip_select : std_logic;
wr_en : std_logic;
end record;
Fix
type interface is record
data : std_logic_vector(31 downto 0);
chip_select : std_logic;
wr_en : std_logic;
end record;
type_013
This rule checks the is keyword in type definitions has proper case.
Refer to Configuring Uppercase and Lowercase Rules for more information.
Violation
type interface IS record
type interface Is record
type interface is record
Fix
type interface is record
type interface is record
type interface is record
type_014
This rule checks for consistent capitalization of type names.
Violation
type state_machine is (idle, write, read, done);
signal sm : State_Machine;
Fix
type state_machine is (idle, write, read, done);
signal sm : state_machine;
type_015
This rule checks for valid prefixes in user defined type identifiers. The default new type prefix is t_.
Refer to Configuring Prefix and Suffix Rules for more information.
Violation
type my_type is range -5 to 5 ;
Fix
type t_my_type is range -5 to 5 ;
type_016
This rule checks the indent of the closing parenthesis on multiline types.
Violation
architecture rtl of fifo is
type state_machine is (
idle, write, read, done
);
begin
Fix
architecture rtl of fifo is
type state_machine is (
idle, write, read, done
);
begin
type_017
This rule checks the identifier is on the same line as the type keyword.
Violation
type
t_record is
Fix
type t_record
is
type_018
This rule checks the is keyword is on the same line as the identifier.
Violation
type t_record
is
Fix
type t_record is
type_100
This rule checks for a single space before the identifier.
Refer to Configuring Whitespace Rules for options on changing the number of whitespaces..
Violation
type t_my_type is range -5 to 5;
Fix
type t_my_type is range -5 to 5;
type_200
This rule checks for a blank line below a type declaration unless there is another type declaration.
Refer to Configuring Blank Lines for more information.
Violation
type state_machine_t is (idle, write, read, done);
type state_machine is (idle, write, read, done);
constant width : integer := 32;
Fix
type state_machine_t is (idle, write, read, done);
type state_machine is (idle, write, read, done);
constant width : integer := 32;
type_400
This rule checks the colons are in the same column for all elements in the block declarative part.
Refer to Configuring Keyword Alignment Rules for information on changing the configurations.
Violation
type t_some_record is record
element_1 : natural;
some_other_element : natural;
yet_another_element : natural;
end record;
Fix
type t_some_record is record
element_1 : natural;
some_other_element : natural;
yet_another_element : natural;
end record;
type_500
This rule checks enumerate types have proper case.
Refer to Configuring Uppercase and Lowercase Rules for more information.
Violation
type state_machine is (IDLE, WRITE, READ, DONE);
Fix
type state_machine is (idle, write, read, done);
type_501
This rule checks for consistent capitalization of enumerated types.
Violation
type state is (IDLE, WRITE, READ);
state <= Idle;
state <= write;
state <= ReAd;
Fix
type state is (IDLE, WRITE, READ);
state <= IDLE;
state <= WRITE;
state <= READ;
type_600
This rule checks for valid suffixes in user defined type identifiers. The default new type suffix is _t.
Refer to Configuring Prefix and Suffix Rules for more information.
Violation
type my_type is range -5 to 5 ;
Fix
type my_type_t is range -5 to 5 ;