Library of reusable VHDL components
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
701 B

  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3. use ieee.numeric_std.all;
  4. use work.StringP.all;
  5. use work.AssertP.all;
  6. entity StringT is
  7. end entity StringT;
  8. architecture sim of StringT is
  9. begin
  10. StringTestP : process is
  11. variable v_data : std_logic_vector(31 downto 0) := x"DEADBEEF";
  12. variable v_data_reverse : std_logic_vector(0 to 31) := x"DEADBEEF";
  13. begin
  14. assert_equal(to_string(v_data(0)), "1");
  15. assert_equal(to_string(v_data), "11011110101011011011111011101111");
  16. assert_equal(to_string(v_data_reverse), "11011110101011011011111011101111");
  17. report "INFO: StringP tests finished successfully";
  18. wait;
  19. end process StringTestP;
  20. end architecture sim;