Functions (cont. 1)


ARCHITECTURE behavior OF adder IS
BEGIN
    PROCESS (enable, x, y)
    BEGIN
    IF (enable = '1') THEN
      result <= add_bits (x, y);
      carry <= x AND y;
    ELSE 
      carry, result <= '0';
    END PROCESS;
END behavior;
FUNCTION add_bits

(a, b : IN BIT)