Trying to verify Verilog/VHDL designs with formal methods and tools
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.

35 lines
572 B

  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3. use ieee.numeric_std.all;
  4. entity counter is
  5. port (
  6. Reset_n_i : in std_logic;
  7. Clk_i : in std_logic;
  8. Data_o : out std_logic_vector(31 downto 0)
  9. );
  10. end entity counter;
  11. architecture rtl of counter is
  12. begin
  13. process (Reset_n_i, Clk_i) is
  14. begin
  15. if (Reset_n_i = '0') then
  16. Data_o <= 32x"8";
  17. elsif (rising_edge(Clk_i)) then
  18. if (unsigned(Data_o) <= 64) then
  19. Data_o <= std_logic_vector(unsigned(Data_o) + 1);
  20. end if;
  21. end if;
  22. end process;
  23. end architecture rtl;