-- VHDL code position: p275_ex9_17_sequence_statement_return2
-- Note : This is code for explaing sequence_statement of VHDL
-- See Also: example 9_16, 9_17.
-- Debug : no debug
---------------------------------------------------------------------------------
FUNCTION opt ( a, b, opr : STD_LOGIC
) RETURN STD_LOGIC IS
BEGIN
IF ( opr = '1' ) THEN
RETURN ( a AND b );
ELSE
RETURN ( a OR b );
END IF;
END FUNCTION opt;