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

Subversion Repositories present

[/] [present/] [trunk/] [Decode/] [bench/] [vhdl/] [PresentFullDecoderTB.vhd] - Diff between revs 4 and 10

Show entire file | Details | Blame | View Log

Rev 4 Rev 10
Line 108... Line 108...
 
 
   -- Stimulus process
   -- Stimulus process
   stim_proc: process
   stim_proc: process
   begin
   begin
 
 
 
---- Preparation for test case 1 -----------------
 
--   ciphertext <= x"5579c1387b228445";
 
--   key <= x"00000000000000000000";
 
--   expected_plaintext <= x"0000000000000000";
 
--------------------------------------------------
 
 
                reset <= '1';
                reset <= '1';
      start <= '0';
      start <= '0';
                ciphertext <= x"5579c1387b228445";
                ciphertext <= x"5579c1387b228445";
                key <= (others => '0');
                key <= (others => '0');
                wait for 100 ns;
                wait for 100 ns;
                reset <= '0';
                reset <= '0';
 
 
                ciphertext <= x"5579c1387b228445";
                ciphertext <= x"5579c1387b228445";
                key <= (others => '0');
                key <= (others => '0');
                start <= '1';
                start <= '1';
      wait for clk_period*80;
      wait until ready = '1';
 
 
 
      if plaintext /= x"0000000000000000" 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 -----------------
 
--   ciphertext <= x"e72c46c0f5945049";
 
--   key <= x"ffffffffffffffffffff";
 
--   expected_plaintext <= x"0000000000000000";
 
--------------------------------------------------
 
 
                start <= '0';
                start <= '0';
                wait for clk_period;
                wait for clk_period;
 
 
                ciphertext <= x"e72c46c0f5945049";
                ciphertext <= x"e72c46c0f5945049";
                key <= (others => '1');
                key <= (others => '1');
                start <= '1';
                start <= '1';
      wait for clk_period*80;
      wait until ready = '1';
 
 
 
      if plaintext /= x"0000000000000000" 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 -----------------
 
--   ciphertext <= x"a112ffc72f68417b";
 
--   key <= x"00000000000000000000";
 
--   expected_plaintext <= x"ffffffffffffffff";
 
--------------------------------------------------
 
 
                start <= '0';
                start <= '0';
                wait for clk_period;
                wait for clk_period;
 
 
                ciphertext <= x"a112ffc72f68417b";
                ciphertext <= x"a112ffc72f68417b";
                key <= (others => '0');
                key <= (others => '0');
                start <= '1';
                start <= '1';
      wait for clk_period*80;
      wait until ready = '1';
 
 
 
                if plaintext /= x"ffffffffffffffff" 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 -----------------
 
--   ciphertext <= x"3333dcd3213210d2";
 
--   key <= x"ffffffffffffffffffff";
 
--   expected_plaintext <= x"ffffffffffffffff";
 
--------------------------------------------------
 
 
                start <= '0';
                start <= '0';
                wait for clk_period;
                wait for clk_period;
 
 
                ciphertext <= x"3333dcd3213210d2";
                ciphertext <= x"3333dcd3213210d2";
                key <= (others => '1');
                key <= (others => '1');
                start <= '1';
                start <= '1';
      wait for clk_period*80;
      wait until ready = '1';
 
 
                start <= '0';
                start <= '0';
                wait for clk_period;
                wait for clk_period;
 
 
 
                if plaintext /= x"ffffffffffffffff" 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;
 
 
END;
END;

powered by: WebSVN 2.1.0

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