URL
https://opencores.org/ocsvn/present/present/trunk
Subversion Repositories present
Compare Revisions
- This comparison shows the changes necessary to convert path
/present/trunk/Decode/bench/vhdl
- from Rev 10 to Rev 6
- ↔ Reverse comparison
Rev 10 → Rev 6
/sLayer_invTB.vhd
98,53 → 98,13
wait for 100ns; |
reset <= '0'; |
wait for clk_period; |
|
------------- Test case 1 ------------------------ |
-- input <= x"0"; |
-- expected_output <= x"5"; |
-------------------------------------------------- |
|
input <= x"0"; |
wait for clk_period; |
|
if output /= x"5" then |
report "RESULT MISMATCH! Test case 1 failed" severity ERROR; |
assert false severity failure; |
else |
report "Test case 1 successful" severity note; |
end if; |
|
------------- Test case 2 ------------------------ |
-- input <= x"A"; |
-- expected_output <= x"6"; |
-------------------------------------------------- |
|
input <= x"A"; |
wait for clk_period; |
|
if output /= x"6" then |
report "RESULT MISMATCH! Test case 2 failed" severity ERROR; |
assert false severity failure; |
else |
report "Test case 2 successful" severity note; |
end if; |
|
------------- Test case 3 ------------------------ |
-- input <= x"F"; |
-- expected_output <= x"A"; |
-------------------------------------------------- |
|
input <= x"F"; |
wait for clk_period; |
|
if output /= x"A" then |
report "RESULT MISMATCH! Test case 3 failed" severity ERROR; |
assert false severity failure; |
else |
report "Test case 3 successful" severity note; |
end if; |
|
-- insert stimulus here |
-- insert stimulus here |
assert false severity failure; |
end process; |
|
/PresentFullDecoderTB.vhd
110,12 → 110,6
stim_proc: process |
begin |
|
---- Preparation for test case 1 ----------------- |
-- ciphertext <= x"5579c1387b228445"; |
-- key <= x"00000000000000000000"; |
-- expected_plaintext <= x"0000000000000000"; |
-------------------------------------------------- |
|
reset <= '1'; |
start <= '0'; |
ciphertext <= x"5579c1387b228445"; |
126,21 → 120,7
ciphertext <= x"5579c1387b228445"; |
key <= (others => '0'); |
start <= '1'; |
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"; |
-------------------------------------------------- |
|
wait for clk_period*80; |
start <= '0'; |
wait for clk_period; |
|
147,21 → 127,7
ciphertext <= x"e72c46c0f5945049"; |
key <= (others => '1'); |
start <= '1'; |
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"; |
-------------------------------------------------- |
|
wait for clk_period*80; |
start <= '0'; |
wait for clk_period; |
|
168,21 → 134,7
ciphertext <= x"a112ffc72f68417b"; |
key <= (others => '0'); |
start <= '1'; |
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"; |
-------------------------------------------------- |
|
wait for clk_period*80; |
start <= '0'; |
wait for clk_period; |
|
189,18 → 141,10
ciphertext <= x"3333dcd3213210d2"; |
key <= (others => '1'); |
start <= '1'; |
wait until ready = '1'; |
|
wait for clk_period*80; |
start <= '0'; |
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; |
|
end process; |
/PresentDecTB.vhd
109,12 → 109,6
-- Stimulus process |
stim_proc: process |
begin |
|
---- Preparation for test case 1 ----------------- |
-- plaintext <= x"5579c1387b228445"; |
-- key <= x"6dab31744f41d7008759"; |
-- expected_ciphertext <= x"0000000000000000"; |
-------------------------------------------------- |
|
reset <= '1'; |
start <= '0'; |
126,21 → 120,7
plaintext <= x"5579c1387b228445"; |
key <= x"6dab31744f41d7008759"; |
start <= '1'; |
wait until ready = '1'; |
|
if ciphertext /= 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 ----------------- |
-- plaintext <= x"e72c46c0f5945049"; |
-- key <= x"fe7a548fb60eb167c511"; |
-- expected_ciphertext <= x"0000000000000000"; |
-------------------------------------------------- |
|
wait for clk_period*40; |
start <= '0'; |
wait for clk_period; |
|
147,21 → 127,7
plaintext <= x"e72c46c0f5945049"; |
key <= x"fe7a548fb60eb167c511"; |
start <= '1'; |
wait until ready = '1'; |
|
if ciphertext /= 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 ----------------- |
-- plaintext <= x"a112ffc72f68417b"; |
-- key <= x"6dab31744f41d7008759"; |
-- expected_ciphertext <= x"ffffffffffffffff"; |
-------------------------------------------------- |
|
wait for clk_period*40; |
start <= '0'; |
wait for clk_period; |
|
168,21 → 134,7
plaintext <= x"a112ffc72f68417b"; |
key <= x"6dab31744f41d7008759"; |
start <= '1'; |
wait until ready = '1'; |
|
if ciphertext /= 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 ----------------- |
-- plaintext <= x"3333dcd3213210d2"; |
-- key <= x"fe7a548fb60eb167c511"; |
-- expected_ciphertext <= x"ffffffffffffffff"; |
-------------------------------------------------- |
|
wait for clk_period*40; |
start <= '0'; |
wait for clk_period; |
|
189,15 → 141,10
plaintext <= x"3333dcd3213210d2"; |
key <= x"fe7a548fb60eb167c511"; |
start <= '1'; |
wait until ready = '1'; |
wait for clk_period*40; |
start <= '0'; |
wait for clk_period; |
|
if ciphertext /= 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; |
|
end process; |
/keyupd_invTB.vhd
106,71 → 106,18
wait for 100ns; |
reset <='0'; |
wait for clk_period; |
|
------------- Test case 1 ------------------------ |
-- key <= x"00000000000000000000"; |
-- expected_keyout <= x"c0000000000000008000"; |
-------------------------------------------------- |
|
key <= x"c0000000000000008000"; |
key <= "00000000000000000000000000000000000000000000000000000000000000000000000000000000"; |
num <= "00001"; |
wait for clk_period; |
|
if keyout /= x"00000000000000000000" then |
report "RESULT MISMATCH! Test case 1 failed" severity ERROR; |
assert false severity failure; |
else |
report "Test case 1 successful" severity note; |
end if; |
|
------------- Test case 2 ------------------------ |
-- key <= x"c0000000000000008000"; |
-- expected_keyout <= x"50001800000000010000"; |
-------------------------------------------------- |
|
key <= x"50001800000000010000"; |
key <= x"c0000000000000008000"; |
num <= "00010"; |
wait for clk_period; |
|
if keyout /= x"c0000000000000008000" then |
report "RESULT MISMATCH! Test case 2 failed" severity ERROR; |
assert false severity failure; |
else |
report "Test case 2 successful" severity note; |
end if; |
|
------------- Test case 3 ------------------------ |
-- key <= x"60000a00030000018000"; |
-- expected_keyout <= x"50001800000000010000"; |
-------------------------------------------------- |
|
key <= x"60000a00030000018000"; |
key <= x"50001800000000010000"; |
num <= "00011"; |
wait for clk_period; |
|
if keyout /= x"50001800000000010000" then |
report "RESULT MISMATCH! Test case 3 failed" severity ERROR; |
assert false severity failure; |
else |
report "Test case 3 successful" severity note; |
end if; |
|
------------- Test case 4 ------------------------ |
-- key <= x"8ba27a0eb8783ac96d59"; |
-- expected_keyout <= x"8ba27a0eb8783ac96d59"; |
-------------------------------------------------- |
|
key <= x"6dab31744f41d7008759"; |
key <= x"8ba27a0eb8783ac96d59"; |
num <= "11111"; |
wait for clk_period; |
|
if keyout /= x"8ba27a0eb8783ac96d59" 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; |
end process; |
END; |
/PresentKeyGenTB.vhd
105,11 → 105,6
stim_proc: process |
begin |
|
---- Preparation for test case 1 ----------------- |
-- key <= x"00000000000000000000"; |
-- expected_key_end <= x"6dab31744f41d7008759"; |
-------------------------------------------------- |
|
reset <= '1'; |
start <= '0'; |
wait for 100 ns; |
117,75 → 112,30
|
key <= (others => '0'); |
start <= '1'; |
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"; |
-------------------------------------------------- |
|
wait for clk_period*40; |
start <= '0'; |
wait for clk_period; |
|
key <= (others => '1'); |
start <= '1'; |
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 |
-------------------------------------------------- |
|
wait for clk_period*40; |
start <= '0'; |
wait for clk_period; |
|
|
key <= (others => '0'); |
start <= '1'; |
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"; |
-------------------------------------------------- |
|
wait for clk_period*40; |
start <= '0'; |
wait for clk_period; |
|
key <= (others => '1'); |
start <= '1'; |
wait until ready = '1'; |
|
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; |
wait for clk_period*40; |
start <= '0'; |
wait for clk_period; |
|
assert false severity failure; |
|
end process; |
|
END; |
END; |