ha_tb.vhd 768 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3. entity ha_tb is
  4. end entity;
  5. architecture beh of ha_tb is
  6. component ha
  7. port
  8. (
  9. a : in std_logic;
  10. b : in std_logic;
  11. o : out std_logic;
  12. c : out std_logic
  13. );
  14. end component;
  15. signal q, w, e, r : std_logic;
  16. begin
  17. --ha_instance : ha port map (q => a, w => b, e => o, r => c);
  18. ha_instance : ha port map (q, w, e, r);
  19. process is
  20. begin
  21. q <= 'X';
  22. w <= 'X';
  23. wait for 5 ns;
  24. q <= '0';
  25. w <= '0';
  26. wait for 5 ns;
  27. q <= '0';
  28. w <= '1';
  29. wait for 5 ns;
  30. q <= '1';
  31. w <= '0';
  32. wait for 5 ns;
  33. q <= '1';
  34. w <= '1';
  35. wait for 5 ns;
  36. assert false report "end of simulation";
  37. wait;
  38. end process;
  39. end architecture;