ha_tb.vhd 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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 (a => q, b => w, o => e, c => r);
  19. --ha_instance : ha port map (q, w, e, r);
  20. process is
  21. begin
  22. q <= 'X';
  23. w <= 'X';
  24. wait for 5 ns;
  25. q <= '0';
  26. w <= '0';
  27. wait for 5 ns;
  28. q <= '0';
  29. w <= '1';
  30. wait for 5 ns;
  31. q <= '1';
  32. w <= '0';
  33. wait for 5 ns;
  34. q <= '1';
  35. w <= '1';
  36. wait for 5 ns;
  37. assert false report "end of simulation";
  38. wait;
  39. end process;
  40. process is
  41. begin
  42. report "Shit!";
  43. wait until r = '1';
  44. report "It happened!";
  45. for i in 3 to 6 loop
  46. report "Currently at " & integer'image(i);
  47. wait for 1 ns;
  48. end loop;
  49. report "At end of test process!";
  50. wait;
  51. end process;
  52. -- Invalid report in concurrent statement
  53. --report "when is this?";
  54. end architecture;