代码:
library ieee;
use ieee.std_logic_1164.all;
entity half_add is
port (a : in std_logic;
b : in std_logic;
result : out std_logic;
c : out std_logic );
end entity;
architecture rtl of half_add is
begin
result <= a xor b;
c <= a and b;
end rtl;
出现毛刺的仿真时序图: