ha_tb.vhd 883 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. process is
  40. begin
  41. report "Shit!";
  42. wait until r = '1';
  43. report "It happened!";
  44. wait;
  45. end process;
  46. end architecture;