Loop Statement Rules
loop_statement_001
This rule checks for code after the loop keyword.
Violation
loop a <= b;
Fix
loop
a <= b;
loop_statement_002
This rule checks the end keyword is on its own line.
Violation
loop
a <= b; end loop;
Fix
loop
a <= b;
end loop;
loop_statement_003
This rule checks the end keyword is on the same line as the end loop keyword.
Violation
end
loop;
Fix
end loop;
loop_statement_004
This rule checks the semicolon is on the same line as the end loop keyword.
Violation
end loop
;
end loop LOOP_LABEL
;
Fix
end loop;
end loop LOOP_LABEL;
loop_statement_005
This rule checks the loop label and the while, for or loop keywords are on the same line.
Violation
LOOP_LABEL:
loop
LOOP_LABEL:
while condition loop
LOOP_LABEL:
for x in range(15 downto 0) loop
Fix
LOOP_LABEL: loop
LOOP_LABEL: while condition loop
LOOP_LABEL: for x in range(15 downto 0) loop
loop_statement_006
This rule checks that loop statements have a label.
Violation
loop
while (condition) loop
for x in range (31 downto 0) loop
Fix
LOOP_LABEL : loop
LOOP_LABEL : while (condition) loop
LOOP_LABEL : for x in range (31 downto 0) loop
loop_statement_007
This rule checks the end loop_statement line has a label. The closing label will be added if the opening loop_statement label exists.
Refer to Configuring Optional Items for more information.
Violation
end loop;
Fix
end loop LOOP_LABEL;
loop_statement_100
This rule checks that a single space exists between the end and loop keywords
Refer to Configuring Whitespace Rules for options on changing the number of whitespaces..
Violation
end loop;
end loop;
Fix
end loop;
end loop;
loop_statement_101
This rule checks for a single space before the ending loop label if it exists.
Refer to Configuring Whitespace Rules for options on changing the number of whitespaces..
Violation
end loop END_LOOP_LABEL;
Fix
end loop END_LOOP_LABEL;
loop_statement_102
This rule checks for a single space before the loop keyword.
Refer to Configuring Whitespace Rules for options on changing the number of whitespaces..
Violation
for x in (0 to 30)loop
for x in (0 to 30) loop
Fix
for x in (0 to 30) loop
for x in (0 to 30) loop
loop_statement_103
This rule checks if a label exists that a single space exists between the label and the colon.
Refer to Configuring Whitespace Rules for options on changing the number of whitespaces..
Violation
label: for index in 4 to 23 loop
label : for index in 0 to 100 loop
Fix
label : for index in 4 to 23 loop
label : for index in 0 to 100 loop
loop_statement_104
This rule checks if a label exists that a single space exists after the colon.
Refer to Configuring Whitespace Rules for options on changing the number of whitespaces..
Violation
label : for index in 4 to 23 loop
label : for index in 0 to 100 loop
Fix
label : for index in 4 to 23 loop
label : for index in 0 to 100 loop
loop_statement_200
This rule checks for blank lines or comments above loop statements.
Refer to Configuring Previous Line Rules for more information.
The default style is no_code
.
Violation
-- Comment
LOOP_LABEL : loop
wr_en <= wr_en;
LOOP_LABEL : loop
Fix
-- Comment
LOOP_LABEL : loop
wr_en <= wr_en;
LOOP_LABEL : loop
loop_statement_201
This rule checks for blank lines below the loop keyword.
Refer to Configuring Blank Lines for more information.
Violation
loop
a <= b;
Fix
loop
a <= b;
loop_statement_202
This rule checks for blank lines or comments above the end keyword.
Refer to Configuring Previous Line Rules for more information.
Violation
loop
a <= b;
end loop;
Fix
loop
a <= b;
end loop;
loop_statement_203
This rule checks for blank lines below the end loop keywords.
Refer to Configuring Blank Lines for more information.
Violation
end loop;
a <= b;
Fix
end loop;
a <= b;
loop_statement_300
This rule checks the indentation of the loop keyword.
Violation
fifo_proc : process () is
begin
loop
end loop;
end process;
Fix
fifo_proc : process () is
begin
loop
end loop;
end process;
loop_statement_301
This rule checks the indentation of the loop label if it exists.
Violation
fifo_proc : process () is
begin
LOOP_LABEL : loop
end loop;
end process;
Fix
fifo_proc : process () is
begin
LOOP_LABEL : loop
end loop;
end process;
loop_statement_302
This rule checks the indentation of the end keyword.
Violation
fifo_proc : process () is
begin
for index in 4 to 23 loop
end loop;
end process;
Fix
fifo_proc : process () is
begin
for index in 4 to 23 loop
end loop;
end process;
loop_statement_500
This rule checks the loop keyword has proper case.
Refer to Configuring Uppercase and Lowercase Rules for more information.
Violation
while (condition) LOOP
Fix
while (condition) loop
loop_statement_501
This rule checks the end keyword has proper case.
Refer to Configuring Uppercase and Lowercase Rules for more information.
Violation
while (condition) loop
END loop;
Fix
while (condition) loop
end loop;
loop_statement_502
This rule checks the loop keyword has proper case.
Refer to Configuring Uppercase and Lowercase Rules for more information.
Violation
while (condition) loop
end LOOP;
Fix
while (condition) loop
end loop;
loop_statement_503
This rule checks the proper case of the label on a loop statement.
Refer to Configuring Uppercase and Lowercase Rules for more information.
Violation
LABEL : for index in 4 to 23 loop
Label : for index in 0 to 100 loop
Fix
label : for index in 4 to 23 loop
label : for index in 0 to 100 loop
loop_statement_504
This rule checks the proper case of the end label on a loop statement.
Refer to Configuring Uppercase and Lowercase Rules for more information.
Violation
end loop LABEL;
end loop Label;
Fix
end loop label;
end loop label;
loop_statement_600
This rule checks for valid prefixes on loop labels. The default prefix is loop_.
Refer to Configuring Prefix and Suffix Rules for more information.
Violation
label : for index in 4 to 23 loop
Fix
loop_label : for index in 4 to 23 loop
loop_statement_601
This rule checks for valid suffixes on loop labels. The default prefix is _loop.
Refer to Configuring Prefix and Suffix Rules for more information.
Violation
label : for index in 4 to 23 loop
Fix
label_loop : for index in 4 to 23 loop
loop_statement_602
This rule checks for valid prefixes on loop parameter identifiers. The default loop prefix is lv_.
Refer to Configuring Prefix and Suffix Rules for more information.
Violation
for index in t_range loop
Fix
for lv_index in t_range loop
loop_statement_603
This rule checks for valid suffixes on loop parameter identifiers. The default loop suffix is _lv.
Refer to Configuring Prefix and Suffix Rules for more information.
Violation
for index in t_range loop
Fix
for index_lv in t_range loop