Type Rules

type_001

phase_4 error indent

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

phase_6 error case case_keyword

This rule checks the type keyword has proper case.

Refer to the section Configuring Uppercase and Lowercase Rules for information on changing the default case.

Violation

TYPE state_machine is (idle, write, read, done);

Fix

type state_machine is (idle, write, read, done);

type_003

This rule was depricated and replaced with rules:

type_004

phase_6 error case case_name

This rule checks the type identifier has proper case.

Refer to the section Configuring Uppercase and Lowercase Rules for information on changing the default case.

Violation

type STATE_MACHINE is (idle, write, read, done);

Fix

type state_machine is (idle, write, read, done);

type_005

phase_4 error indent

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

phase_2 error whitespace

This rule checks for a single space before the is keyword.

Violation

type state_machine    is (idle, write, read, done);

Fix

type state_machine is (idle, write, read, done);

type_007

phase_2 error whitespace

This rule checks for a single space after the is keyword.

Violation

type state_machine is     (idle, write, read, done);

Fix

type state_machine is (idle, write, read, done);

type_008

phase_1 error structure

This rule checks the closing parenthesis of multiline enumerated types is on it’s own line.

Violation

type state_machine is (
  idle,
  write,
  read,
  done);

Fix

type state_machine is (
  idle,
  write,
  read,
  done
);

type_009

phase_1 error structure

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

phase_3 error blank_line

This rule checks for blank lines or comments above the type declaration.

Refer to Configuring Previous Line Rules for options.

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

phase_3 error blank_line

This rule checks for a blank line below the type declaration.

Refer to the section Configuring Blank Lines for options regarding comments.

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

phase_4 error indent

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

phase_6 error case case_keyword

This rule checks the is keyword in type definitions has proper case.

Refer to the section Configuring Uppercase and Lowercase Rules for information on changing the default case.

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

phase_6 error case

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

phase_7 disabled error naming

This rule checks for valid prefixes in user defined type identifiers. The default new type prefix is t_.

Refer to the section Configuring Prefix and Suffix Rules for information on changing the allowed prefixes.

Violation

type my_type is range -5 to 5 ;

Fix

type t_my_type is range -5 to 5 ;

type_016

phase_4 error indent

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_400

phase_5 error alignment

This rule checks the colons are in the same column for all elements in the block declarative part.

Refer to the section 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_600

phase_7 disabled error naming

This rule checks for valid suffixes in user defined type identifiers. The default new type suffix is _t.

Refer to the section Configuring Prefix and Suffix Rules for information on changing the allowed suffixes.

Violation

type my_type is range -5 to 5 ;

Fix

type my_type_t is range -5 to 5 ;