Subtype Rules

subtype_001

phase_4 error indent

This rule checks for indentation of the subtype keyword.

Violation

architecture rtl of fifo is

     subtype read_size is range 0 to 9;
subtype write_size is range 0 to 9;

begin

Fix

architecture rtl of fifo is

  subtype read_size is range 0 to 9;
  subtype write_size is range 0 to 9;

begin

subtype_002

phase_6 error case

This rule checks for consistent capitalization of subtype names.

Violation

subtype read_size is range 0 to 9;
subtype write_size is range 0 to 9;

signal read  : READ_SIZE;
signal write : write_size;

constant read_sz  : read_size := 8;
constant write_sz : WRITE_size := 1;

Fix

subtype read_size is range 0 to 9;
subtype write_size is range 0 to 9;

signal read  : read_size;
signal write : write_size;

constant read_sz  : read_size := 8;
constant write_sz : write_size := 1;

subtype_003

This rule was deprecated and replaced with rules:

subtype_004

phase_7 disabled error naming

This rule checks for valid prefixes in subtype identifiers. The default new subtype prefix is st_.

Refer to Configuring Prefix and Suffix Rules for more information.

Violation

subtype my_subtype is range 0 to 9;

Fix

subtype st_my_subtype is range 0 to 9;

subtype_600

phase_7 disabled error naming

This rule checks for valid suffixes in subtype identifiers. The default new subtype suffix is _st.

Refer to Configuring Prefix and Suffix Rules for more information.

Violation

subtype my_subtype is range 0 to 9;

Fix

subtype my_subtype_st is range 0 to 9;