Keyword: PROCEDURE
A procedure is a group of sequential statements that are to be executed when the procedure is called.
A procedure does not have a return value, but instead can return any number of values (or no values) via its parameter list. Parameters of a procedure must have a mode associated with them (eg. in, out, inout). Values are returned by using mode out or mode inout.
A procedure specification includes—in this order—the reserved word "procedure", the procedure name, and a list of the procedure’s parameters (which may be constants, signals, or variables, each of whose modes may be in, out, or inout).
Example
procedure dff (signal Clk,Rst,D; in std_ulogic;
signal Q: out std_ulogic) is
begin
if Rst <= ‘1’ then
Q <= ‘0’;
elsif rising_edge(Clk) then
Q <= D;
end if;
end procedure;
LRM
2.1, 9.3
See also