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 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

phase_6 error case case_name

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

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.

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

phase_2 error whitespace

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

phase_1 error structure

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

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 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

phase_3 error blank_line

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

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 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

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 unfixable naming

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

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_017

phase_1 error structure

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

phase_1 error structure

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

phase_2 disabled error whitespace

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

phase_3 disabled error blank_line

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

phase_5 error alignment

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

phase_6 error case case_name

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

phase_6 error case

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

phase_7 disabled error unfixable naming

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 ;