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

Subversion Repositories cryptography

[/] [cryptography/] [trunk/] [decryption/] [decryptor_tb.vhd] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 marcus.erl
LIBRARY ieee  ;
2
USE ieee.std_logic_1164.all  ;
3
USE ieee.std_logic_arith.all  ;
4
USE ieee.std_logic_unsigned.all  ;
5
ENTITY decryptor_tb  IS
6
END ;
7
 
8
ARCHITECTURE decryptor_tb_arch OF decryptor_tb IS
9
  SIGNAL clock   :  std_logic :='0' ;
10
  SIGNAL ciphertext   :  std_logic_vector (15 downto 0)  ;
11
  SIGNAL ready_d   :  std_logic  ;
12
  SIGNAL plaintext_d   :  std_logic_vector (15 downto 0)  ;
13
  SIGNAL start_d   :  std_logic  ;
14
  SIGNAL round_keys_d   :  std_logic_vector (15 downto 0)  ;
15
  SIGNAL reset   :  std_logic  ;
16
  COMPONENT decryptor
17
    PORT (
18
      clock  : in std_logic ;
19
      ciphertext  : in std_logic_vector (15 downto 0) ;
20
      ready_d  : out std_logic ;
21
      plaintext_d  : out std_logic_vector (15 downto 0) ;
22
      start_d  : in std_logic ;
23
      round_keys_d  : in std_logic_vector (15 downto 0) ;
24
      reset  : in std_logic );
25
  END COMPONENT ;
26
BEGIN
27
  DUT  : decryptor
28
    PORT MAP (
29
      clock   => clock  ,
30
      ciphertext   => ciphertext  ,
31
      ready_d   => ready_d  ,
32
      plaintext_d   => plaintext_d  ,
33
      start_d   => start_d  ,
34
      round_keys_d   => round_keys_d  ,
35
      reset   => reset   ) ;
36
 
37
process
38
begin
39
reset<='1';
40
wait for 10 ns;
41
start_d<='1';
42
reset<='0';
43
 
44
wait for 3000 ns;
45
end process;
46
 
47
 
48
process(clock)
49
begin
50
clock<= not clock after 10 ns;
51
end process;
52
 
53
process
54
begin
55
  wait for 30 ns;
56
  ciphertext <="1111101011010000";
57
  wait for 20 ns;
58
  ciphertext <="1100011100001101";
59
  wait for 20 ns;
60
  ciphertext <="0110000001100010";
61
  wait for 20 ns;
62
  ciphertext <="1001000101010111";
63
  wait for 3000 ns;
64
end process;
65
 
66
process
67
begin
68
    wait for 10 ns;
69
    round_keys_d <="0000000000000000";
70
    wait for 3000 ns;
71
end process;
72
END ;
73
 

powered by: WebSVN 2.1.0

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