Procedures (Cont.)
With parameter passing, it is possible to further simplify the architecture
ARCHITECTURE behavior OF adder IS
add_bits3(x, y, enable, result, carry);
(SIGNAL a, b, en : IN BIT;
SIGNAL temp_result, temp_carry : OUT BIT)
- The parameters must be compatible in terms of data flow and data type
Notes:
Parameter types and modes must be compatible with the signals in the parameter list during a procedure call.
Actually, procedure overloading is achieved by defining multiple procedures (or functions, for that matter) with different parameter types to distinguish among them in procedure (or function) calls.