OpenCores
URL https://opencores.org/ocsvn/present/present/trunk

Subversion Repositories present

[/] [present/] [trunk/] [DecodeTesting/] [bench/] [vhdl/] [PresentKeyGenTB.vhd] - Diff between revs 4 and 11

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 4 Rev 11
Line 103... Line 103...
 
 
   -- Stimulus process
   -- Stimulus process
   stim_proc: process
   stim_proc: process
   begin
   begin
 
 
 
---- Preparation for test case 1 -----------------
 
--   key <= x"00000000000000000000";
 
--   expected_key_end <= x"6dab31744f41d7008759";
 
--------------------------------------------------
 
 
                reset <= '1';
                reset <= '1';
      start <= '0';
      start <= '0';
                wait for 100 ns;
                wait for 100 ns;
                reset <= '0';
                reset <= '0';
 
 
                key <= (others => '0');
                key <= (others => '0');
                start <= '1';
                start <= '1';
      wait for clk_period*40;
      wait until ready = '1';
 
 
 
                if key_end /= x"6dab31744f41d7008759" then
 
                        report "RESULT MISMATCH! Test case 1 failed" severity ERROR;
 
                        assert false severity failure;
 
                else
 
                        report "Test case 1 successful" severity note;
 
                end if;
 
 
 
---- Preparation for test case 2 -----------------
 
--   key <= x"ffffffffffffffffffff";
 
--   expected_key_end <= x"fe7a548fb60eb167c511";
 
--------------------------------------------------
 
 
                start <= '0';
                start <= '0';
                wait for clk_period;
                wait for clk_period;
 
 
                key <= (others => '1');
                key <= (others => '1');
                start <= '1';
                start <= '1';
      wait for clk_period*40;
      wait until ready = '1';
 
 
 
                if key_end /= x"fe7a548fb60eb167c511" then
 
                        report "RESULT MISMATCH! Test case 2 failed" severity ERROR;
 
                        assert false severity failure;
 
                else
 
                        report "Test case 2 successful" severity note;
 
                end if;
 
 
 
---- Preparation for test case 3 -----------------
 
--   key <= x"00000000000000000000";
 
--   expected_key_end <= x"6dab31744f41d7008759";
 
--   same as test case 1
 
--------------------------------------------------
 
 
                start <= '0';
                start <= '0';
                wait for clk_period;
                wait for clk_period;
 
 
                key <= (others => '0');
                key <= (others => '0');
                start <= '1';
                start <= '1';
      wait for clk_period*40;
      wait until ready = '1';
 
 
 
                if key_end /= x"6dab31744f41d7008759" then
 
                        report "RESULT MISMATCH! Test case 3 failed" severity ERROR;
 
                        assert false severity failure;
 
                else
 
                        report "Test case 3 successful" severity note;
 
                end if;
 
 
 
---- Preparation for test case 4 -----------------
 
--   key <= x"ffffffffffffffffffff";
 
--   expected_key_end <= x"fe7a548fb60eb167c511";
 
--------------------------------------------------
 
 
                start <= '0';
                start <= '0';
                wait for clk_period;
                wait for clk_period;
 
 
                key <= (others => '1');
                key <= (others => '1');
                start <= '1';
                start <= '1';
      wait for clk_period*40;
      wait until ready = '1';
                start <= '0';
 
                wait for clk_period;
                if key_end /= x"fe7a548fb60eb167c511" then
 
                        report "RESULT MISMATCH! Test case 4 failed" severity ERROR;
 
                        assert false severity failure;
 
                else
 
                        report "Test case 4 successful" severity note;
 
                end if;
 
 
                assert false severity failure;
                assert false severity failure;
 
 
   end process;
   end process;
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.