ha_tb.vhd 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. for i in 3 to 6 loop
  45. report "Currently at " & integer'image(i);
  46. wait for 1 ns;
  47. end loop;
  48. report "At end of test process!";
  49. wait;
  50. end process;
  51. -- Invalid report in concurrent statement
  52. --report "when is this?";
  53. end architecture;