Procedure Rules
There are three forms a procedure: with parameters, without parameters, and a package declaration:
with parameters
procedure average_samples (
constant a : in integer;
signal b : in std_logic;
variable c : in std_logic_vector(3 downto 0);
signal d : out std_logic) is
begin
end procedure average_samples;
without parameters
procedure average_samples is
begin
end procedure average_samples;
package declaration
procedure average_samples;
procedure average_samples (
constant a : in integer;
signal b : in std_logic;
variable c : in std_logic_vector(3 downto 0);
signal d : out std_logic);
procedure_001
This rule checks the indent of the procedure keyword.
Violation
procedure average_samples (
constant a : in integer;
signal b : in std_logic;
variable c : in std_logic_vector(3 downto 0);
signal d : out std_logic ) is
begin
end procedure average_samples;
Fix
procedure average_samples (
constant a : in integer;
signal b : in std_logic;
variable c : in std_logic_vector(3 downto 0);
signal d : out std_logic ) is
begin
end procedure average_samples;
procedure_002
This rule checks the indent of the begin keyword.
Violation
procedure average_samples (
constant a : in integer;
signal b : in std_logic;
variable c : in std_logic_vector(3 downto 0);
signal d : out std_logic ) is
begin
end procedure average_samples;
Fix
procedure average_samples (
constant a : in integer;
signal b : in std_logic;
variable c : in std_logic_vector(3 downto 0);
signal d : out std_logic ) is
begin
end procedure average_samples;
procedure_003
This rule checks the indent of the end keyword.
Violation
procedure average_samples (
constant a : in integer;
signal b : in std_logic;
variable c : in std_logic_vector(3 downto 0);
signal d : out std_logic ) is
begin
end procedure average_samples;
Fix
procedure average_samples (
constant a : in integer;
signal b : in std_logic;
variable c : in std_logic_vector(3 downto 0);
signal d : out std_logic ) is
begin
end procedure average_samples;
procedure_004
This rule checks the indent of parameters.
Violation
procedure average_samples (
constant a : in integer;
signal b : in std_logic;
variable c : in std_logic_vector(3 downto 0);
signal d : out std_logic ) is
begin
end procedure average_samples;
Fix
procedure average_samples (
constant a : in integer;
signal b : in std_logic;
variable c : in std_logic_vector(3 downto 0);
signal d : out std_logic ) is
begin
end procedure average_samples;
procedure_005
This rule checks the indent of lines between the is and begin keywords
Violation
procedure average_samples (
constant a : in integer;
signal d : out std_logic ) is
variable var_1 : integer;
variable var_1 : integer;
begin
end procedure average_samples;
Fix
procedure average_samples (
constant a : in integer;
signal b : in std_logic;
variable c : in std_logic_vector(3 downto 0);
signal d : out std_logic ) is
variable var_1 : integer;
variable var_1 : integer;
begin
end procedure average_samples;
procedure_006
This rule checks the indent of the closing parenthesis if it is on its own line.
Violation
procedure average_samples (
constant a : in integer;
signal d : out std_logic
) is
Fix
procedure average_samples (
constant a : in integer;
signal d : out std_logic
) is
procedure_007
This rule has been moved to rule procedure_507.
procedure_008
This rule checks the end keyword has proper case.
Refer to Configuring Uppercase and Lowercase Rules for more information.
Violation
END;
End procedure proc;
Fix
end;
end procedure proc;
procedure_009
This rule checks the procedure keyword in the end procedure has proper case.
Refer to Configuring Uppercase and Lowercase Rules for more information.
Violation
end PROCEDURE;
end Procedure proc;
Fix
end procedure;
end procedure proc;
procedure_010
This rule checks the identifiers for all declarations are aligned in the procedure declarative part.
Refer to Configuring Identifier Alignment Rules for more information.
Violation
variable var1 : natural;
signal sig1 : natural;
constant c_period : time;
Fix
variable var1 : natural;
signal sig1 : natural;
constant c_period : time;
procedure_011
The function of this rule has been superseded and is handled by rule procedure_013.
procedure_012
This rule checks the procedure keyword exist in the closing of the procedure specification.
Refer to Configuring Optional Items for more information.
Violation
procedure proc is
end proc;
Fix
procedure proc is
end procedure proc;
procedure_013
This rule checks the structure of procedure specifications.
Refer to Configuring Subprogram Specification Statement Rules for more configuration options.
Violation
procedure average_samples (num_samples : in integer; sample : out std_logic);
Fix
procedure average_samples (
num_samples : in integer;
sample : out std_logic
);
procedure_100
This rule checks for a single space between the following procedure elements: procedure keyword, procedure designator, open parenthesis, close parenthesis, and is keywords.
Refer to Configuring Whitespace Rules for options on changing the number of whitespaces..
Violation
procedure average_samples (
constant a : in integer;
signal d : out std_logic
) is
procedure average_samples is
Fix
procedure average_samples (
constant a : in integer;
signal d : out std_logic
) is
procedure average_samples is
procedure_101
This rule checks for a single space between the end and procedure keywords and procedure designator.
Refer to Configuring Whitespace Rules for options on changing the number of whitespaces..
Violation
end procedure average_samples;
end procedure;
end average_samples;
Fix
end procedure average_samples;
end procedure;
end average_samples;
procedure_200
This rule checks for blank lines or comments above the procedure keyword.
Refer to Configuring Previous Line Rules for more information.
Violation
architecture RTL of FIFO is
procedure proc1 is
Fix
architecture RTL of FIFO is
procedure proc1 is
procedure_201
This rule has been moved to rule subprogram_body_201.
procedure_202
This rule has been moved to rule subprogram_body_202.
procedure_203
This rule has been moved to rule subprogram_body_203.
procedure_204
This rule has been moved to rule subprogram_body_204.
procedure_205
This rule has been moved to rule subprogram_body_205.
procedure_401
This rule checks the colons are in the same column for all declarations in the procedure declarative part.
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;
procedure_410
This rule checks the alignment of the colon for each parameter in the procedure declaration.
Refer to Configuring Keyword Alignment Rules for information on changing the configurations.
Violation
procedure average_samples (
constant a : in integer;
signal d : out std_logic
);
Fix
procedure average_samples (
constant a : in integer;
signal d : out std_logic
);
procedure_411
This rule checks the alignment of := operator for each parameter in the procedure declaration.
Refer to Configuring Keyword Alignment Rules for information on changing the configurations.
Violation
procedure average_samples (
constant a : in integer := 0;
signal d : out std_logic := 'X';
);
Fix
procedure average_samples (
constant a : in integer := 0;
signal d : out std_logic := 'X';
);
procedure_412
This rule has been superseded by rule architecture_027.
procedure_500
This rule checks the procedure keyword has proper case.
Refer to Configuring Uppercase and Lowercase Rules for more information.
Violation
PROCEDURE average_samples is
Fix
procedure average_samples is
procedure_501
This rule checks the procedure designator has proper case.
Refer to Configuring Uppercase and Lowercase Rules for more information.
Violation
procedure AVERAGE_SAMPLES is
Fix
procedure average_samples is
procedure_502
This rule checks the is keyword has proper case.
Refer to Configuring Uppercase and Lowercase Rules for more information.
Violation
procedure average_samples IS
Fix
procedure average_samples is
procedure_503
This rule checks the begin keyword has proper case.
Refer to Configuring Uppercase and Lowercase Rules for more information.
Violation
procedure average_samples is
BEGIN
Fix
procedure average_samples is
begin
procedure_504
This rule checks the end keyword has proper case.
Refer to Configuring Uppercase and Lowercase Rules for more information.
Violation
END procedure average_samples;
Fix
end procedure average_samples;
procedure_505
This rule checks the procedure keyword in the end procedure has proper case.
Refer to Configuring Uppercase and Lowercase Rules for more information.
Violation
end PROCEDURE average_samples;
Fix
end procedure average_samples;
procedure_506
This rule checks the procedure designator has proper case on the end procedure declaration.
Refer to Configuring Uppercase and Lowercase Rules for more information.
Violation
end procedure AVERAGE_SAMPLES;
Fix
end procedure average_samples;
procedure_507
This rule checks for consistent capitalization of procedure names.
Violation
architecture rtl of fifo is
procedure average_samples is
begin
end procedure average_samples
begin
Average_samples;
PROC1 : process () is
begin
AVERAGE_SAMPLES;
end process;
end architecture rtl;
Fix
architecture rtl of fifo is
procedure average_samples is
begin
end procedure average_samples
begin
average_samples;
PROC1 : process () is
begin
average_samples;
end process;
end architecture rtl;