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

Subversion Repositories present_encryptor

[/] [present_encryptor/] [trunk/] [tb/] [testbench.v] - Blame information for rev 22

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 22 rameli
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@//
2
// Design Name: Test Bench for Present Encryptor Core             //
3
// Module Name: present_encryptor_top_tb                          //
4
// Language:    Verilog                                           //
5
// Date Created: 1/23/2011                                        //
6
// Author: Reza Ameli                                             //
7
//         Digital Systems Lab                                    //
8
//         Ferdowsi University of Mashhad, Iran                   //
9
//         http://commeng.um.ac.ir/dslab                          //
10
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@//
11
//                                                                //
12
// This source file may be used and distributed without           //
13
// restriction provided that this copyright statement is not      //
14
// removed from the file and that any derivative work contains    //
15
// the original copyright notice and the associated disclaimer.   //
16
//                                                                //
17
// This source file is free software; you can redistribute it     //
18
// and/or modify it under the terms of the GNU Lesser General     //
19
// Public License as published by the Free Software Foundation;   //
20
// either version 2.1 of the License, or (at your option) any     //
21
// later version.                                                 //
22
//                                                                //
23
// This source is distributed in the hope that it will be         //
24
// useful, but WITHOUT ANY WARRANTY; without even the implied     //
25
// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR        //
26
// PURPOSE. See the GNU Lesser General Public License for more    //
27
// details.                                                       //
28
//                                                                //
29
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@//
30
`timescale 1ps / 1ps
31
 
32
//- Test Bench ----------------------------------------------------------------
33
module present_encryptor_top_tb;
34
//- Variables, Registers and Parameters ---------------------------------------
35
wire [63:0] data_o;
36
reg  [79:0] data_i;
37
reg  data_load;
38
reg  key_load;
39
reg  clk_i;
40
//- Instantiations ------------------------------------------------------------
41
present_encryptor_top UUT (.data_o(data_o),.data_i(data_i),.data_load(data_load),.key_load(key_load),.clk_i(clk_i));
42
//- Behavioral Statements -----------------------------------------------------
43
initial
44
begin
45
    $monitor($realtime,,"ps %h %h %h %h %h ",data_o,data_i,data_load,key_load,clk_i);
46
    #0   data_i = 80'h00000000_00000000_0000 ; key_load = 1; // Key
47
    #10  data_i = 64'h00000000_00000000      ; key_load = 0; data_load = 1; // Plaintext
48
    #10  data_load = 0;
49
    #330 data_i = 80'hFFFFFFFF_FFFFFFFF_FFFF ; key_load = 1; // Key
50
    #10  data_i = 64'h00000000_00000000      ; key_load = 0; data_load = 1; // Plaintext
51
    #10  data_load = 0;
52
    #330 data_i = 80'h00000000_00000000_0000 ; key_load = 1; // Key
53
    #10  data_i = 64'hFFFFFFFF_FFFFFFFF      ; key_load = 0; data_load = 1; // Plaintext
54
    #10  data_load = 0;
55
    #330 data_i = 80'hFFFFFFFF_FFFFFFFF_FFFF ; key_load = 1; // Key
56
    #10  data_i = 64'hFFFFFFFF_FFFFFFFF      ; key_load = 0; data_load = 1; // Plaintext
57
    #10  data_load = 0;
58
    #330 $finish;
59
end
60
initial
61
begin
62
    clk_i = 1'b0;
63
    forever #5 clk_i = ~clk_i;
64
end
65
//-----------------------------------------------------------------------------
66
endmodule

powered by: WebSVN 2.1.0

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