Generate Rules¶
generate_001¶
This rule checks the indent of the generate declaration.
Violation
architecture rtl of fifo is
begin
ram_array : for i in 0 to 7 generate
ram_array : for i in 0 to 7 generate
Fix
architecture rtl of fifo is
begin
ram_array : for i in 0 to 7 generate
ram_array : for i in 0 to 7 generate
generate_002¶
This rule checks for a single space between the label and the colon.
Refer to Configuring Whitespace Rules for options on changing the number of whitespaces..
Violation
ram_array: for i in 0 to 7 generate
Fix
ram_array : for i in 0 to 7 generate
generate_003¶
This rule checks for a blank line below the end generate keywords.
Refer to Configuring Blank Lines for more information.
Violation
end generate ram_array;
wr_en <= '1';
Fix
end generate ram_array;
wr_en <= '1';
generate_004¶
This rule checks for blank lines or comments before the generate label.
Refer to Configuring Previous Line Rules for more information.
Violation
wr_en <= '1';
ram_array : for i in 0 to 7 generate
Fix
wr_en <= '1';
ram_array : for i in 0 to 7 generate
generate_005¶
This rule checks the generate label has proper case.
Refer to Configuring Uppercase and Lowercase Rules for more information.
Violation
RAM_ARRAY: for i in 0 to 7 generate
Fix
ram_array: for i in 0 to 7 generate
generate_006¶
This rule checks the indent of the begin keyword.
Violation
ram_array : for i in 0 to 7 generate
begin
Fix
ram_array : for i in 0 to 7 generate
begin
generate_007¶
This rule checks the indent of the end generate keyword.
Violation
ram_array : for i in 0 to 7 generate
begin
end generate ram_array;
Fix
ram_array : for i in 0 to 7 generate
begin
end generate ram_array;
generate_008¶
This rule checks for a single space after the end keyword.
Refer to Configuring Whitespace Rules for options on changing the number of whitespaces..
Violation
end generate ram_array;
Fix
end generate ram_array;
generate_009¶
This rule checks the end keyword has proper case.
Refer to Configuring Uppercase and Lowercase Rules for more information.
Violation
END generate ram_array;
Fix
end generate ram_array;
generate_010¶
This rule checks the generate keyword has the proper case in the end generate line.
Refer to Configuring Uppercase and Lowercase Rules for more information.
Violation
end GENERATE ram_array;
Fix
end generate ram_array;
generate_011¶
This rule checks the end generate line has a label on for generate statements.
Violation
ram_array : for i in 0 to 127 generate
end generate;
Fix
ram_array : for i in 0 to 127 generate
end generate ram_array;
generate_012¶
This rule checks the end generate label has proper case.
Refer to Configuring Uppercase and Lowercase Rules for more information.
Violation
end generate RAM_ARRAY;
Fix
end generate ram_array;
generate_013¶
This rule checks for a single space after the generate keyword and the label in the end generate keywords.
Refer to Configuring Whitespace Rules for options on changing the number of whitespaces..
Violation
end generate ram_array;
Fix
end generate ram_array;
generate_014¶
This rule checks for a single space between the colon and the for keyword.
Refer to Configuring Whitespace Rules for options on changing the number of whitespaces..
Violation
ram_array :for i in 0 to 7 generate
ram_array : for i in 0 to 7 generate
Fix
ram_array : for i in 0 to 7 generate
ram_array : for i in 0 to 7 generate
generate_015¶
This rule checks the generate label and the generate keyword are on the same line. Keeping the label and generate on the same line reduces excessive indenting.
Violation
ram_array :
for i in 0 to 7 generate
Fix
ram_array : for i in 0 to 7 generate
generate_016¶
This rule checks the indent of the when keyword in generate case statements.
Violation
GEN_LABEL : case condition generate
when 0 =>
when 1 =>
when 2 =>
Fix
GEN_LABEL : case condition generate
when 0 =>
when 1 =>
when 2 =>
generate_017¶
This rule checks for valid prefixes on generate statement labels. The default prefix is gen_.
Refer to Configuring Prefix and Suffix Rules for more information.
Violation
label : case condition generate
Fix
gen_label : case condition generate
generate_018¶
This rule checks the indent of the end keyword in the generate statement body.
Violation
ram_array : for i in 0 to 7 generate
begin
end;
end generate;
Fix
ram_array : for i in 0 to 7 generate
begin
end;
end generate;
generate_019¶
This rule checks the end keyword is on its own line.
Violation
ram_array : for i in 0 to 7 generate
a <= b; end generate;
Fix
ram_array : for i in 0 to 7 generate
a <= b;
end generate;
generate_400¶
This rule checks the identifiers for all declarations are aligned in the generate declarative part in for generate statements.
Refer to Configuring Identifier Alignment Rules for more information.
Violation
variable var1 : natural;
constant c_period : time;
Fix
variable var1 : natural;
constant c_period : time;
generate_401¶
This rule checks the colons are in the same column for all declarations in the generate declarative part in for generate statements.
Refer to Configuring Keyword Alignment Rules for information on changing the configurations.
Violation
signal sig1: natural;
variable var2 : natural;
constant c_period : time;
file my_test_input : my_file_type;
Fix
signal sig1 : natural;
variable var2 : natural;
constant c_period : time;
file my_test_input : my_file_type;
generate_402¶
This rule checks the identifiers for all declarations are aligned in the generate declarative part in if generate statements.
Refer to Configuring Identifier Alignment Rules for more information.
Violation
variable var1 : natural;
constant c_period : time;
Fix
variable var1 : natural;
constant c_period : time;
generate_403¶
This rule checks the colons are in the same column for all declarations in the generate declarative part in if generate statements.
Refer to Configuring Keyword Alignment Rules for information on changing the configurations.
Violation
signal sig1: natural;
variable var2 : natural;
constant c_period : time;
file my_test_input : my_file_type;
Fix
signal sig1 : natural;
variable var2 : natural;
constant c_period : time;
file my_test_input : my_file_type;
generate_404¶
This rule checks the identifiers for all declarations are aligned in the generate declarative part in case generate statements.
Refer to Configuring Identifier Alignment Rules for more information.
Violation
variable var1 : natural;
constant c_period : time;
Fix
variable var1 : natural;
constant c_period : time;
generate_405¶
This rule checks the colons are in the same column for all declarations in the generate declarative part in case generate statements.
Refer to Configuring Keyword Alignment Rules for information on changing the configurations.
Violation
signal sig1: natural;
variable var2 : natural;
constant c_period : time;
file my_test_input : my_file_type;
Fix
signal sig1 : natural;
variable var2 : natural;
constant c_period : time;
file my_test_input : my_file_type;
generate_500¶
This rule checks the begin keyword has the proper case.
Refer to Configuring Uppercase and Lowercase Rules for more information.
Violation
for condition generate
BEGIN
Fix
for condition generate
begin
generate_501¶
This rule checks the end keyword has the proper case.
Refer to Configuring Uppercase and Lowercase Rules for more information.
Violation
for condition generate
begin
END
end generate;
Fix
for condition generate
begin
end
end generate;
generate_600¶
This rule checks for valid suffixes on generate statement labels. The default suffix is _gen.
Refer to Configuring Prefix and Suffix Rules for more information.
Violation
label : case condition generate
Fix
label_gen : case condition generate