What should be the mode of signal a in the following function definition? [code]FUNCTION my_func (SIGNAL a : STD_LOGIC_VECTOR) RETURN INTEGER

What should be the mode of signal a in the following function definition?
Code:
FUNCTION my_func (SIGNAL a : STD_LOGIC_VECTOR) RETURN INTEGER IS
…..;
A. IN
B. OUT
C. INOUT
D. BUFFER
 
Answer: a
Explanation: The default and only signal mode which is applicable to a parameter of the function is the IN mode. There is no need to specify the mode at the time of definition. It is obvious that the mode is taken as IN mode. No other mode can be used in the parameter of a function.
 

Tìm kiếm

Back
Top