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

Subversion Repositories des

[/] [des/] [trunk/] [bench/] [verilog/] [des_test_po.v] - Blame information for rev 9

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 5 rudi
/////////////////////////////////////////////////////////////////////
2
////                                                             ////
3
////  DES TEST BENCH                                             ////
4
////                                                             ////
5
////  Author: Rudolf Usselmann                                   ////
6
////          rudi@asics.ws                                      ////
7
////                                                             ////
8
/////////////////////////////////////////////////////////////////////
9
////                                                             ////
10
//// Copyright (C) 2001 Rudolf Usselmann                         ////
11
////                    rudi@asics.ws                            ////
12
////                                                             ////
13
//// This source file may be used and distributed without        ////
14
//// restriction provided that this copyright statement is not   ////
15
//// removed from the file and that any derivative work contains ////
16
//// the original copyright notice and the associated disclaimer.////
17
////                                                             ////
18
////     THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY     ////
19
//// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED   ////
20
//// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS   ////
21
//// FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR      ////
22
//// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,         ////
23
//// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES    ////
24
//// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE   ////
25
//// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR        ////
26
//// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF  ////
27
//// LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT  ////
28
//// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT  ////
29
//// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE         ////
30
//// POSSIBILITY OF SUCH DAMAGE.                                 ////
31
////                                                             ////
32
/////////////////////////////////////////////////////////////////////
33
 
34
module test;
35
 
36
reg             clk;
37 7 rudi
reg     [191:0]  x[512:0];
38 5 rudi
reg     [191:0]  tmp;
39
reg     [3:0]    cnt;
40
integer         select;
41
wire    [63:0]   desOut;
42
wire    [63:0]   des_in;
43
wire    [63:0]   exp_out_d;
44
wire    [55:0]   key;
45 7 rudi
integer         ZZZ;
46 5 rudi
reg     [63:0]   des_exp[0:17];
47
integer         decrypt;
48
 
49
integer i;
50
 
51
always @(posedge clk)
52
        des_exp[0] <= #1 exp_out_d;
53
 
54
always @(posedge clk)
55
        for(i=0;i<17;i=i+1)
56
                des_exp[i+1] <= #1 des_exp[i];
57
 
58
initial
59
   begin
60
        $display("\n\n");
61
        $display("*********************************************************");
62
        $display("* Performance Optimized DES core simulation started ... *");
63
        $display("*********************************************************");
64
        $display("\n");
65
 
66
`ifdef WAVES
67
        $shm_open("waves");
68
        $shm_probe("AS",test,"AS");
69
        $display("INFO: Signal dump enabled ...\n\n");
70
`endif
71
        clk=0;
72 7 rudi
        ZZZ=0;
73
 
74 5 rudi
        //           Key              Test data        Out data
75 7 rudi
        x[ZZZ]=192'h10316E028C8F3B4A_0000000000000000_82DCBAFBDEAB6602; ZZZ=ZZZ+1;
76
        x[ZZZ]=192'h0101010101010101_95F8A5E5DD31D900_8000000000000000; ZZZ=ZZZ+1;
77
        x[ZZZ]=192'h0101010101010101_DD7F121CA5015619_4000000000000000; ZZZ=ZZZ+1;
78
        x[ZZZ]=192'h0101010101010101_2E8653104F3834EA_2000000000000000; ZZZ=ZZZ+1;
79
        x[ZZZ]=192'h0101010101010101_4BD388FF6CD81D4F_1000000000000000; ZZZ=ZZZ+1;
80
        x[ZZZ]=192'h0101010101010101_20B9E767B2FB1456_0800000000000000; ZZZ=ZZZ+1;
81
        x[ZZZ]=192'h0101010101010101_55579380D77138EF_0400000000000000; ZZZ=ZZZ+1;
82
        x[ZZZ]=192'h0101010101010101_6CC5DEFAAF04512F_0200000000000000; ZZZ=ZZZ+1;
83
        x[ZZZ]=192'h0101010101010101_0D9F279BA5D87260_0100000000000000; ZZZ=ZZZ+1;
84
        x[ZZZ]=192'h0101010101010101_D9031B0271BD5A0A_0080000000000000; ZZZ=ZZZ+1;
85
        x[ZZZ]=192'h0101010101010101_424250B37C3DD951_0040000000000000; ZZZ=ZZZ+1;
86
        x[ZZZ]=192'h0101010101010101_B8061B7ECD9A21E5_0020000000000000; ZZZ=ZZZ+1;
87
        x[ZZZ]=192'h0101010101010101_F15D0F286B65BD28_0010000000000000; ZZZ=ZZZ+1;
88
        x[ZZZ]=192'h0101010101010101_ADD0CC8D6E5DEBA1_0008000000000000; ZZZ=ZZZ+1;
89
        x[ZZZ]=192'h0101010101010101_E6D5F82752AD63D1_0004000000000000; ZZZ=ZZZ+1;
90
        x[ZZZ]=192'h0101010101010101_ECBFE3BD3F591A5E_0002000000000000; ZZZ=ZZZ+1;
91
        x[ZZZ]=192'h0101010101010101_F356834379D165CD_0001000000000000; ZZZ=ZZZ+1;
92
        x[ZZZ]=192'h0101010101010101_2B9F982F20037FA9_0000800000000000; ZZZ=ZZZ+1;
93
        x[ZZZ]=192'h0101010101010101_889DE068A16F0BE6_0000400000000000; ZZZ=ZZZ+1;
94
        x[ZZZ]=192'h0101010101010101_E19E275D846A1298_0000200000000000; ZZZ=ZZZ+1;
95
        x[ZZZ]=192'h0101010101010101_329A8ED523D71AEC_0000100000000000; ZZZ=ZZZ+1;
96
        x[ZZZ]=192'h0101010101010101_E7FCE22557D23C97_0000080000000000; ZZZ=ZZZ+1;
97
        x[ZZZ]=192'h0101010101010101_12A9F5817FF2D65D_0000040000000000; ZZZ=ZZZ+1;
98
        x[ZZZ]=192'h0101010101010101_A484C3AD38DC9C19_0000020000000000; ZZZ=ZZZ+1;
99
        x[ZZZ]=192'h0101010101010101_FBE00A8A1EF8AD72_0000010000000000; ZZZ=ZZZ+1;
100
        x[ZZZ]=192'h0101010101010101_750D079407521363_0000008000000000; ZZZ=ZZZ+1;
101
        x[ZZZ]=192'h0101010101010101_64FEED9C724C2FAF_0000004000000000; ZZZ=ZZZ+1;
102
        x[ZZZ]=192'h0101010101010101_F02B263B328E2B60_0000002000000000; ZZZ=ZZZ+1;
103
        x[ZZZ]=192'h0101010101010101_9D64555A9A10B852_0000001000000000; ZZZ=ZZZ+1;
104
        x[ZZZ]=192'h0101010101010101_D106FF0BED5255D7_0000000800000000; ZZZ=ZZZ+1;
105
        x[ZZZ]=192'h0101010101010101_E1652C6B138C64A5_0000000400000000; ZZZ=ZZZ+1;
106
        x[ZZZ]=192'h0101010101010101_E428581186EC8F46_0000000200000000; ZZZ=ZZZ+1;
107
        x[ZZZ]=192'h0101010101010101_AEB5F5EDE22D1A36_0000000100000000; ZZZ=ZZZ+1;
108
        x[ZZZ]=192'h0101010101010101_E943D7568AEC0C5C_0000000080000000; ZZZ=ZZZ+1;
109
        x[ZZZ]=192'h0101010101010101_DF98C8276F54B04B_0000000040000000; ZZZ=ZZZ+1;
110
        x[ZZZ]=192'h0101010101010101_B160E4680F6C696F_0000000020000000; ZZZ=ZZZ+1;
111
        x[ZZZ]=192'h0101010101010101_FA0752B07D9C4AB8_0000000010000000; ZZZ=ZZZ+1;
112
        x[ZZZ]=192'h0101010101010101_CA3A2B036DBC8502_0000000008000000; ZZZ=ZZZ+1;
113
        x[ZZZ]=192'h0101010101010101_5E0905517BB59BCF_0000000004000000; ZZZ=ZZZ+1;
114
        x[ZZZ]=192'h0101010101010101_814EEB3B91D90726_0000000002000000; ZZZ=ZZZ+1;
115
        x[ZZZ]=192'h0101010101010101_4D49DB1532919C9F_0000000001000000; ZZZ=ZZZ+1;
116
        x[ZZZ]=192'h0101010101010101_25EB5FC3F8CF0621_0000000000800000; ZZZ=ZZZ+1;
117
        x[ZZZ]=192'h0101010101010101_AB6A20C0620D1C6F_0000000000400000; ZZZ=ZZZ+1;
118
        x[ZZZ]=192'h0101010101010101_79E90DBC98F92CCA_0000000000200000; ZZZ=ZZZ+1;
119
        x[ZZZ]=192'h0101010101010101_866ECEDD8072BB0E_0000000000100000; ZZZ=ZZZ+1;
120
        x[ZZZ]=192'h0101010101010101_8B54536F2F3E64A8_0000000000080000; ZZZ=ZZZ+1;
121
        x[ZZZ]=192'h0101010101010101_EA51D3975595B86B_0000000000040000; ZZZ=ZZZ+1;
122
        x[ZZZ]=192'h0101010101010101_CAFFC6AC4542DE31_0000000000020000; ZZZ=ZZZ+1;
123
        x[ZZZ]=192'h0101010101010101_8DD45A2DDF90796C_0000000000010000; ZZZ=ZZZ+1;
124
        x[ZZZ]=192'h0101010101010101_1029D55E880EC2D0_0000000000008000; ZZZ=ZZZ+1;
125
        x[ZZZ]=192'h0101010101010101_5D86CB23639DBEA9_0000000000004000; ZZZ=ZZZ+1;
126
        x[ZZZ]=192'h0101010101010101_1D1CA853AE7C0C5F_0000000000002000; ZZZ=ZZZ+1;
127
        x[ZZZ]=192'h0101010101010101_CE332329248F3228_0000000000001000; ZZZ=ZZZ+1;
128
        x[ZZZ]=192'h0101010101010101_8405D1ABE24FB942_0000000000000800; ZZZ=ZZZ+1;
129
        x[ZZZ]=192'h0101010101010101_E643D78090CA4207_0000000000000400; ZZZ=ZZZ+1;
130
        x[ZZZ]=192'h0101010101010101_48221B9937748A23_0000000000000200; ZZZ=ZZZ+1;
131
        x[ZZZ]=192'h0101010101010101_DD7C0BBD61FAFD54_0000000000000100; ZZZ=ZZZ+1;
132
        x[ZZZ]=192'h0101010101010101_2FBC291A570DB5C4_0000000000000080; ZZZ=ZZZ+1;
133
        x[ZZZ]=192'h0101010101010101_E07C30D7E4E26E12_0000000000000040; ZZZ=ZZZ+1;
134
        x[ZZZ]=192'h0101010101010101_0953E2258E8E90A1_0000000000000020; ZZZ=ZZZ+1;
135
        x[ZZZ]=192'h0101010101010101_5B711BC4CEEBF2EE_0000000000000010; ZZZ=ZZZ+1;
136
        x[ZZZ]=192'h0101010101010101_CC083F1E6D9E85F6_0000000000000008; ZZZ=ZZZ+1;
137
        x[ZZZ]=192'h0101010101010101_D2FD8867D50D2DFE_0000000000000004; ZZZ=ZZZ+1;
138
        x[ZZZ]=192'h0101010101010101_06E7EA22CE92708F_0000000000000002; ZZZ=ZZZ+1;
139
        x[ZZZ]=192'h0101010101010101_166B40B44ABA4BD6_0000000000000001; ZZZ=ZZZ+1;
140
 
141
        x[ZZZ]=192'h0101010101010101_8000000000000000_95F8A5E5DD31D900; ZZZ=ZZZ+1;
142
        x[ZZZ]=192'h0101010101010101_4000000000000000_DD7F121CA5015619; ZZZ=ZZZ+1;
143
        x[ZZZ]=192'h0101010101010101_2000000000000000_2E8653104F3834EA; ZZZ=ZZZ+1;
144
        x[ZZZ]=192'h0101010101010101_1000000000000000_4BD388FF6CD81D4F; ZZZ=ZZZ+1;
145
        x[ZZZ]=192'h0101010101010101_0800000000000000_20B9E767B2FB1456; ZZZ=ZZZ+1;
146
        x[ZZZ]=192'h0101010101010101_0400000000000000_55579380D77138EF; ZZZ=ZZZ+1;
147
        x[ZZZ]=192'h0101010101010101_0200000000000000_6CC5DEFAAF04512F; ZZZ=ZZZ+1;
148
        x[ZZZ]=192'h0101010101010101_0100000000000000_0D9F279BA5D87260; ZZZ=ZZZ+1;
149
        x[ZZZ]=192'h0101010101010101_0080000000000000_D9031B0271BD5A0A; ZZZ=ZZZ+1;
150
        x[ZZZ]=192'h0101010101010101_0040000000000000_424250B37C3DD951; ZZZ=ZZZ+1;
151
        x[ZZZ]=192'h0101010101010101_0020000000000000_B8061B7ECD9A21E5; ZZZ=ZZZ+1;
152
        x[ZZZ]=192'h0101010101010101_0010000000000000_F15D0F286B65BD28; ZZZ=ZZZ+1;
153
        x[ZZZ]=192'h0101010101010101_0008000000000000_ADD0CC8D6E5DEBA1; ZZZ=ZZZ+1;
154
        x[ZZZ]=192'h0101010101010101_0004000000000000_E6D5F82752AD63D1; ZZZ=ZZZ+1;
155
        x[ZZZ]=192'h0101010101010101_0002000000000000_ECBFE3BD3F591A5E; ZZZ=ZZZ+1;
156
        x[ZZZ]=192'h0101010101010101_0001000000000000_F356834379D165CD; ZZZ=ZZZ+1;
157
        x[ZZZ]=192'h0101010101010101_0000800000000000_2B9F982F20037FA9; ZZZ=ZZZ+1;
158
        x[ZZZ]=192'h0101010101010101_0000400000000000_889DE068A16F0BE6; ZZZ=ZZZ+1;
159
        x[ZZZ]=192'h0101010101010101_0000200000000000_E19E275D846A1298; ZZZ=ZZZ+1;
160
        x[ZZZ]=192'h0101010101010101_0000100000000000_329A8ED523D71AEC; ZZZ=ZZZ+1;
161
        x[ZZZ]=192'h0101010101010101_0000080000000000_E7FCE22557D23C97; ZZZ=ZZZ+1;
162
        x[ZZZ]=192'h0101010101010101_0000040000000000_12A9F5817FF2D65D; ZZZ=ZZZ+1;
163
        x[ZZZ]=192'h0101010101010101_0000020000000000_A484C3AD38DC9C19; ZZZ=ZZZ+1;
164
        x[ZZZ]=192'h0101010101010101_0000010000000000_FBE00A8A1EF8AD72; ZZZ=ZZZ+1;
165
        x[ZZZ]=192'h0101010101010101_0000008000000000_750D079407521363; ZZZ=ZZZ+1;
166
        x[ZZZ]=192'h0101010101010101_0000004000000000_64FEED9C724C2FAF; ZZZ=ZZZ+1;
167
        x[ZZZ]=192'h0101010101010101_0000002000000000_F02B263B328E2B60; ZZZ=ZZZ+1;
168
        x[ZZZ]=192'h0101010101010101_0000001000000000_9D64555A9A10B852; ZZZ=ZZZ+1;
169
        x[ZZZ]=192'h0101010101010101_0000000800000000_D106FF0BED5255D7; ZZZ=ZZZ+1;
170
        x[ZZZ]=192'h0101010101010101_0000000400000000_E1652C6B138C64A5; ZZZ=ZZZ+1;
171
        x[ZZZ]=192'h0101010101010101_0000000200000000_E428581186EC8F46; ZZZ=ZZZ+1;
172
        x[ZZZ]=192'h0101010101010101_0000000100000000_AEB5F5EDE22D1A36; ZZZ=ZZZ+1;
173
        x[ZZZ]=192'h0101010101010101_0000000080000000_E943D7568AEC0C5C; ZZZ=ZZZ+1;
174
        x[ZZZ]=192'h0101010101010101_0000000040000000_DF98C8276F54B04B; ZZZ=ZZZ+1;
175
        x[ZZZ]=192'h0101010101010101_0000000020000000_B160E4680F6C696F; ZZZ=ZZZ+1;
176
        x[ZZZ]=192'h0101010101010101_0000000010000000_FA0752B07D9C4AB8; ZZZ=ZZZ+1;
177
        x[ZZZ]=192'h0101010101010101_0000000008000000_CA3A2B036DBC8502; ZZZ=ZZZ+1;
178
        x[ZZZ]=192'h0101010101010101_0000000004000000_5E0905517BB59BCF; ZZZ=ZZZ+1;
179
        x[ZZZ]=192'h0101010101010101_0000000002000000_814EEB3B91D90726; ZZZ=ZZZ+1;
180
        x[ZZZ]=192'h0101010101010101_0000000001000000_4D49DB1532919C9F; ZZZ=ZZZ+1;
181
        x[ZZZ]=192'h0101010101010101_0000000000800000_25EB5FC3F8CF0621; ZZZ=ZZZ+1;
182
        x[ZZZ]=192'h0101010101010101_0000000000400000_AB6A20C0620D1C6F; ZZZ=ZZZ+1;
183
        x[ZZZ]=192'h0101010101010101_0000000000200000_79E90DBC98F92CCA; ZZZ=ZZZ+1;
184
        x[ZZZ]=192'h0101010101010101_0000000000100000_866ECEDD8072BB0E; ZZZ=ZZZ+1;
185
        x[ZZZ]=192'h0101010101010101_0000000000080000_8B54536F2F3E64A8; ZZZ=ZZZ+1;
186
        x[ZZZ]=192'h0101010101010101_0000000000040000_EA51D3975595B86B; ZZZ=ZZZ+1;
187
        x[ZZZ]=192'h0101010101010101_0000000000020000_CAFFC6AC4542DE31; ZZZ=ZZZ+1;
188
        x[ZZZ]=192'h0101010101010101_0000000000010000_8DD45A2DDF90796C; ZZZ=ZZZ+1;
189
        x[ZZZ]=192'h0101010101010101_0000000000008000_1029D55E880EC2D0; ZZZ=ZZZ+1;
190
        x[ZZZ]=192'h0101010101010101_0000000000004000_5D86CB23639DBEA9; ZZZ=ZZZ+1;
191
        x[ZZZ]=192'h0101010101010101_0000000000002000_1D1CA853AE7C0C5F; ZZZ=ZZZ+1;
192
        x[ZZZ]=192'h0101010101010101_0000000000001000_CE332329248F3228; ZZZ=ZZZ+1;
193
        x[ZZZ]=192'h0101010101010101_0000000000000800_8405D1ABE24FB942; ZZZ=ZZZ+1;
194
        x[ZZZ]=192'h0101010101010101_0000000000000400_E643D78090CA4207; ZZZ=ZZZ+1;
195
        x[ZZZ]=192'h0101010101010101_0000000000000200_48221B9937748A23; ZZZ=ZZZ+1;
196
        x[ZZZ]=192'h0101010101010101_0000000000000100_DD7C0BBD61FAFD54; ZZZ=ZZZ+1;
197
        x[ZZZ]=192'h0101010101010101_0000000000000080_2FBC291A570DB5C4; ZZZ=ZZZ+1;
198
        x[ZZZ]=192'h0101010101010101_0000000000000040_E07C30D7E4E26E12; ZZZ=ZZZ+1;
199
        x[ZZZ]=192'h0101010101010101_0000000000000020_0953E2258E8E90A1; ZZZ=ZZZ+1;
200
        x[ZZZ]=192'h0101010101010101_0000000000000010_5B711BC4CEEBF2EE; ZZZ=ZZZ+1;
201
        x[ZZZ]=192'h0101010101010101_0000000000000008_CC083F1E6D9E85F6; ZZZ=ZZZ+1;
202
        x[ZZZ]=192'h0101010101010101_0000000000000004_D2FD8867D50D2DFE; ZZZ=ZZZ+1;
203
        x[ZZZ]=192'h0101010101010101_0000000000000002_06E7EA22CE92708F; ZZZ=ZZZ+1;
204
        x[ZZZ]=192'h0101010101010101_0000000000000001_166B40B44ABA4BD6; ZZZ=ZZZ+1;
205
 
206
        x[ZZZ]=192'h8001010101010101_0000000000000000_95A8D72813DAA94D; ZZZ=ZZZ+1;
207
        x[ZZZ]=192'h4001010101010101_0000000000000000_0EEC1487DD8C26D5; ZZZ=ZZZ+1;
208
        x[ZZZ]=192'h2001010101010101_0000000000000000_7AD16FFB79C45926; ZZZ=ZZZ+1;
209
        x[ZZZ]=192'h1001010101010101_0000000000000000_D3746294CA6A6CF3; ZZZ=ZZZ+1;
210
        x[ZZZ]=192'h0801010101010101_0000000000000000_809F5F873C1FD761; ZZZ=ZZZ+1;
211
        x[ZZZ]=192'h0401010101010101_0000000000000000_C02FAFFEC989D1FC; ZZZ=ZZZ+1;
212
        x[ZZZ]=192'h0201010101010101_0000000000000000_4615AA1D33E72F10; ZZZ=ZZZ+1;
213
        x[ZZZ]=192'h0180010101010101_0000000000000000_2055123350C00858; ZZZ=ZZZ+1;
214
        x[ZZZ]=192'h0140010101010101_0000000000000000_DF3B99D6577397C8; ZZZ=ZZZ+1;
215
        x[ZZZ]=192'h0120010101010101_0000000000000000_31FE17369B5288C9; ZZZ=ZZZ+1;
216
        x[ZZZ]=192'h0110010101010101_0000000000000000_DFDD3CC64DAE1642; ZZZ=ZZZ+1;
217
        x[ZZZ]=192'h0108010101010101_0000000000000000_178C83CE2B399D94; ZZZ=ZZZ+1;
218
        x[ZZZ]=192'h0104010101010101_0000000000000000_50F636324A9B7F80; ZZZ=ZZZ+1;
219
        x[ZZZ]=192'h0102010101010101_0000000000000000_A8468EE3BC18F06D; ZZZ=ZZZ+1;
220
        x[ZZZ]=192'h0101800101010101_0000000000000000_A2DC9E92FD3CDE92; ZZZ=ZZZ+1;
221
        x[ZZZ]=192'h0101400101010101_0000000000000000_CAC09F797D031287; ZZZ=ZZZ+1;
222
        x[ZZZ]=192'h0101200101010101_0000000000000000_90BA680B22AEB525; ZZZ=ZZZ+1;
223
        x[ZZZ]=192'h0101100101010101_0000000000000000_CE7A24F350E280B6; ZZZ=ZZZ+1;
224
        x[ZZZ]=192'h0101080101010101_0000000000000000_882BFF0AA01A0B87; ZZZ=ZZZ+1;
225
        x[ZZZ]=192'h0101040101010101_0000000000000000_25610288924511C2; ZZZ=ZZZ+1;
226
        x[ZZZ]=192'h0101020101010101_0000000000000000_C71516C29C75D170; ZZZ=ZZZ+1;
227
        x[ZZZ]=192'h0101018001010101_0000000000000000_5199C29A52C9F059; ZZZ=ZZZ+1;
228
        x[ZZZ]=192'h0101014001010101_0000000000000000_C22F0A294A71F29F; ZZZ=ZZZ+1;
229
        x[ZZZ]=192'h0101012001010101_0000000000000000_EE371483714C02EA; ZZZ=ZZZ+1;
230
        x[ZZZ]=192'h0101011001010101_0000000000000000_A81FBD448F9E522F; ZZZ=ZZZ+1;
231
        x[ZZZ]=192'h0101010801010101_0000000000000000_4F644C92E192DFED; ZZZ=ZZZ+1;
232
        x[ZZZ]=192'h0101010401010101_0000000000000000_1AFA9A66A6DF92AE; ZZZ=ZZZ+1;
233
        x[ZZZ]=192'h0101010201010101_0000000000000000_B3C1CC715CB879D8; ZZZ=ZZZ+1;
234
        x[ZZZ]=192'h0101010180010101_0000000000000000_19D032E64AB0BD8B; ZZZ=ZZZ+1;
235
        x[ZZZ]=192'h0101010140010101_0000000000000000_3CFAA7A7DC8720DC; ZZZ=ZZZ+1;
236
        x[ZZZ]=192'h0101010120010101_0000000000000000_B7265F7F447AC6F3; ZZZ=ZZZ+1;
237
        x[ZZZ]=192'h0101010110010101_0000000000000000_9DB73B3C0D163F54; ZZZ=ZZZ+1;
238
        x[ZZZ]=192'h0101010108010101_0000000000000000_8181B65BABF4A975; ZZZ=ZZZ+1;
239
        x[ZZZ]=192'h0101010104010101_0000000000000000_93C9B64042EAA240; ZZZ=ZZZ+1;
240
        x[ZZZ]=192'h0101010102010101_0000000000000000_5570530829705592; ZZZ=ZZZ+1;
241
        x[ZZZ]=192'h0101010101800101_0000000000000000_8638809E878787A0; ZZZ=ZZZ+1;
242
        x[ZZZ]=192'h0101010101400101_0000000000000000_41B9A79AF79AC208; ZZZ=ZZZ+1;
243
        x[ZZZ]=192'h0101010101200101_0000000000000000_7A9BE42F2009A892; ZZZ=ZZZ+1;
244
        x[ZZZ]=192'h0101010101100101_0000000000000000_29038D56BA6D2745; ZZZ=ZZZ+1;
245
        x[ZZZ]=192'h0101010101080101_0000000000000000_5495C6ABF1E5DF51; ZZZ=ZZZ+1;
246
        x[ZZZ]=192'h0101010101040101_0000000000000000_AE13DBD561488933; ZZZ=ZZZ+1;
247
        x[ZZZ]=192'h0101010101020101_0000000000000000_024D1FFA8904E389; ZZZ=ZZZ+1;
248
        x[ZZZ]=192'h0101010101018001_0000000000000000_D1399712F99BF02E; ZZZ=ZZZ+1;
249
        x[ZZZ]=192'h0101010101014001_0000000000000000_14C1D7C1CFFEC79E; ZZZ=ZZZ+1;
250
        x[ZZZ]=192'h0101010101012001_0000000000000000_1DE5279DAE3BED6F; ZZZ=ZZZ+1;
251
        x[ZZZ]=192'h0101010101011001_0000000000000000_E941A33F85501303; ZZZ=ZZZ+1;
252
        x[ZZZ]=192'h0101010101010801_0000000000000000_DA99DBBC9A03F379; ZZZ=ZZZ+1;
253
        x[ZZZ]=192'h0101010101010401_0000000000000000_B7FC92F91D8E92E9; ZZZ=ZZZ+1;
254
        x[ZZZ]=192'h0101010101010201_0000000000000000_AE8E5CAA3CA04E85; ZZZ=ZZZ+1;
255
        x[ZZZ]=192'h0101010101010180_0000000000000000_9CC62DF43B6EED74; ZZZ=ZZZ+1;
256
        x[ZZZ]=192'h0101010101010140_0000000000000000_D863DBB5C59A91A0; ZZZ=ZZZ+1;
257
        x[ZZZ]=192'h0101010101010120_0000000000000000_A1AB2190545B91D7; ZZZ=ZZZ+1;
258
        x[ZZZ]=192'h0101010101010110_0000000000000000_0875041E64C570F7; ZZZ=ZZZ+1;
259
        x[ZZZ]=192'h0101010101010108_0000000000000000_5A594528BEBEF1CC; ZZZ=ZZZ+1;
260
        x[ZZZ]=192'h0101010101010104_0000000000000000_FCDB3291DE21F0C0; ZZZ=ZZZ+1;
261
        x[ZZZ]=192'h0101010101010102_0000000000000000_869EFD7F9F265A09; ZZZ=ZZZ+1;
262
 
263
        x[ZZZ]=192'h1046913489980131_0000000000000000_88D55E54F54C97B4; ZZZ=ZZZ+1;
264
        x[ZZZ]=192'h1007103489988020_0000000000000000_0C0CC00C83EA48FD; ZZZ=ZZZ+1;
265
        x[ZZZ]=192'h10071034C8980120_0000000000000000_83BC8EF3A6570183; ZZZ=ZZZ+1;
266
        x[ZZZ]=192'h1046103489988020_0000000000000000_DF725DCAD94EA2E9; ZZZ=ZZZ+1;
267
        x[ZZZ]=192'h1086911519190101_0000000000000000_E652B53B550BE8B0; ZZZ=ZZZ+1;
268
        x[ZZZ]=192'h1086911519580101_0000000000000000_AF527120C485CBB0; ZZZ=ZZZ+1;
269
        x[ZZZ]=192'h5107B01519580101_0000000000000000_0F04CE393DB926D5; ZZZ=ZZZ+1;
270
        x[ZZZ]=192'h1007B01519190101_0000000000000000_C9F00FFC74079067; ZZZ=ZZZ+1;
271
        x[ZZZ]=192'h3107915498080101_0000000000000000_7CFD82A593252B4E; ZZZ=ZZZ+1;
272
        x[ZZZ]=192'h3107919498080101_0000000000000000_CB49A2F9E91363E3; ZZZ=ZZZ+1;
273
        x[ZZZ]=192'h10079115B9080140_0000000000000000_00B588BE70D23F56; ZZZ=ZZZ+1;
274
        x[ZZZ]=192'h3107911598080140_0000000000000000_406A9A6AB43399AE; ZZZ=ZZZ+1;
275
        x[ZZZ]=192'h1007D01589980101_0000000000000000_6CB773611DCA9ADA; ZZZ=ZZZ+1;
276
        x[ZZZ]=192'h9107911589980101_0000000000000000_67FD21C17DBB5D70; ZZZ=ZZZ+1;
277
        x[ZZZ]=192'h9107D01589190101_0000000000000000_9592CB4110430787; ZZZ=ZZZ+1;
278
        x[ZZZ]=192'h1007D01598980120_0000000000000000_A6B7FF68A318DDD3; ZZZ=ZZZ+1;
279
        x[ZZZ]=192'h1007940498190101_0000000000000000_4D102196C914CA16; ZZZ=ZZZ+1;
280
        x[ZZZ]=192'h0107910491190401_0000000000000000_2DFA9F4573594965; ZZZ=ZZZ+1;
281
        x[ZZZ]=192'h0107910491190101_0000000000000000_B46604816C0E0774; ZZZ=ZZZ+1;
282
        x[ZZZ]=192'h0107940491190401_0000000000000000_6E7E6221A4F34E87; ZZZ=ZZZ+1;
283
        x[ZZZ]=192'h19079210981A0101_0000000000000000_AA85E74643233199; ZZZ=ZZZ+1;
284
        x[ZZZ]=192'h1007911998190801_0000000000000000_2E5A19DB4D1962D6; ZZZ=ZZZ+1;
285
        x[ZZZ]=192'h10079119981A0801_0000000000000000_23A866A809D30894; ZZZ=ZZZ+1;
286
        x[ZZZ]=192'h1007921098190101_0000000000000000_D812D961F017D320; ZZZ=ZZZ+1;
287
        x[ZZZ]=192'h100791159819010B_0000000000000000_055605816E58608F; ZZZ=ZZZ+1;
288
        x[ZZZ]=192'h1004801598190101_0000000000000000_ABD88E8B1B7716F1; ZZZ=ZZZ+1;
289
        x[ZZZ]=192'h1004801598190102_0000000000000000_537AC95BE69DA1E1; ZZZ=ZZZ+1;
290
        x[ZZZ]=192'h1004801598190108_0000000000000000_AED0F6AE3C25CDD8; ZZZ=ZZZ+1;
291
        x[ZZZ]=192'h1002911498100104_0000000000000000_B3E35A5EE53E7B8D; ZZZ=ZZZ+1;
292
        x[ZZZ]=192'h1002911598190104_0000000000000000_61C79C71921A2EF8; ZZZ=ZZZ+1;
293
        x[ZZZ]=192'h1002911598100201_0000000000000000_E2F5728F0995013C; ZZZ=ZZZ+1;
294
        x[ZZZ]=192'h1002911698100101_0000000000000000_1AEAC39A61F0A464; ZZZ=ZZZ+1;
295
 
296
        x[ZZZ]=192'h7CA110454A1A6E57_01A1D6D039776742_690F5B0D9A26939B; ZZZ=ZZZ+1;
297
        x[ZZZ]=192'h0131D9619DC1376E_5CD54CA83DEF57DA_7A389D10354BD271; ZZZ=ZZZ+1;
298
        x[ZZZ]=192'h07A1133E4A0B2686_0248D43806F67172_868EBB51CAB4599A; ZZZ=ZZZ+1;
299
        x[ZZZ]=192'h3849674C2602319E_51454B582DDF440A_7178876E01F19B2A; ZZZ=ZZZ+1;
300
        x[ZZZ]=192'h04B915BA43FEB5B6_42FD443059577FA2_AF37FB421F8C4095; ZZZ=ZZZ+1;
301
        x[ZZZ]=192'h0113B970FD34F2CE_059B5E0851CF143A_86A560F10EC6D85B; ZZZ=ZZZ+1;
302
        x[ZZZ]=192'h0170F175468FB5E6_0756D8E0774761D2_0CD3DA020021DC09; ZZZ=ZZZ+1;
303
        x[ZZZ]=192'h43297FAD38E373FE_762514B829BF486A_EA676B2CB7DB2B7A; ZZZ=ZZZ+1;
304
        x[ZZZ]=192'h07A7137045DA2A16_3BDD119049372802_DFD64A815CAF1A0F; ZZZ=ZZZ+1;
305
        x[ZZZ]=192'h04689104C2FD3B2F_26955F6835AF609A_5C513C9C4886C088; ZZZ=ZZZ+1;
306
        x[ZZZ]=192'h37D06BB516CB7546_164D5E404F275232_0A2AEEAE3FF4AB77; ZZZ=ZZZ+1;
307
        x[ZZZ]=192'h1F08260D1AC2465E_6B056E18759F5CCA_EF1BF03E5DFA575A; ZZZ=ZZZ+1;
308
        x[ZZZ]=192'h584023641ABA6176_004BD6EF09176062_88BF0DB6D70DEE56; ZZZ=ZZZ+1;
309
        x[ZZZ]=192'h025816164629B007_480D39006EE762F2_A1F9915541020B56; ZZZ=ZZZ+1;
310
        x[ZZZ]=192'h49793EBC79B3258F_437540C8698F3CFA_6FBF1CAFCFFD0556; ZZZ=ZZZ+1;
311
        x[ZZZ]=192'h4FB05E1515AB73A7_072D43A077075292_2F22E49BAB7CA1AC; ZZZ=ZZZ+1;
312
        x[ZZZ]=192'h49E95D6D4CA229BF_02FE55778117F12A_5A6B612CC26CCE4A; ZZZ=ZZZ+1;
313
        x[ZZZ]=192'h018310DC409B26D6_1D9D5C5018F728C2_5F4C038ED12B2E41; ZZZ=ZZZ+1;
314
        x[ZZZ]=192'h1C587F1C13924FEF_305532286D6F295A_63FAC0D034D9F793; ZZZ=ZZZ+1;
315
 
316
        x[ZZZ]=192'h0000000000000000_0000000000000000_8CA64DE9C1B123A7; ZZZ=ZZZ+1;
317
        x[ZZZ]=192'hFFFFFFFFFFFFFFFF_FFFFFFFFFFFFFFFF_7359B2163E4EDC58; ZZZ=ZZZ+1;
318
        x[ZZZ]=192'h3000000000000000_1000000000000001_958E6E627A05557B; ZZZ=ZZZ+1;
319
        x[ZZZ]=192'h1111111111111111_1111111111111111_F40379AB9E0EC533; ZZZ=ZZZ+1;
320
        x[ZZZ]=192'h0123456789ABCDEF_1111111111111111_17668DFC7292532D; ZZZ=ZZZ+1;
321
        x[ZZZ]=192'h1111111111111111_0123456789ABCDEF_8A5AE1F81AB8F2DD; ZZZ=ZZZ+1;
322
        x[ZZZ]=192'h0000000000000000_0000000000000000_8CA64DE9C1B123A7; ZZZ=ZZZ+1;
323
        x[ZZZ]=192'hFEDCBA9876543210_0123456789ABCDEF_ED39D950FA74BCC4; ZZZ=ZZZ+1;
324
        x[ZZZ]=192'h7CA110454A1A6E57_01A1D6D039776742_690F5B0D9A26939B; ZZZ=ZZZ+1;
325
        x[ZZZ]=192'h0131D9619DC1376E_5CD54CA83DEF57DA_7A389D10354BD271; ZZZ=ZZZ+1;
326
        x[ZZZ]=192'h07A1133E4A0B2686_0248D43806F67172_868EBB51CAB4599A; ZZZ=ZZZ+1;
327
        x[ZZZ]=192'h3849674C2602319E_51454B582DDF440A_7178876E01F19B2A; ZZZ=ZZZ+1;
328
        x[ZZZ]=192'h04B915BA43FEB5B6_42FD443059577FA2_AF37FB421F8C4095; ZZZ=ZZZ+1;
329
        x[ZZZ]=192'h0113B970FD34F2CE_059B5E0851CF143A_86A560F10EC6D85B; ZZZ=ZZZ+1;
330
        x[ZZZ]=192'h0170F175468FB5E6_0756D8E0774761D2_0CD3DA020021DC09; ZZZ=ZZZ+1;
331
        x[ZZZ]=192'h43297FAD38E373FE_762514B829BF486A_EA676B2CB7DB2B7A; ZZZ=ZZZ+1;
332
        x[ZZZ]=192'h07A7137045DA2A16_3BDD119049372802_DFD64A815CAF1A0F; ZZZ=ZZZ+1;
333
        x[ZZZ]=192'h04689104C2FD3B2F_26955F6835AF609A_5C513C9C4886C088; ZZZ=ZZZ+1;
334
        x[ZZZ]=192'h37D06BB516CB7546_164D5E404F275232_0A2AEEAE3FF4AB77; ZZZ=ZZZ+1;
335
        x[ZZZ]=192'h1F08260D1AC2465E_6B056E18759F5CCA_EF1BF03E5DFA575A; ZZZ=ZZZ+1;
336
        x[ZZZ]=192'h584023641ABA6176_004BD6EF09176062_88BF0DB6D70DEE56; ZZZ=ZZZ+1;
337
        x[ZZZ]=192'h025816164629B007_480D39006EE762F2_A1F9915541020B56; ZZZ=ZZZ+1;
338
        x[ZZZ]=192'h49793EBC79B3258F_437540C8698F3CFA_6FBF1CAFCFFD0556; ZZZ=ZZZ+1;
339
        x[ZZZ]=192'h4FB05E1515AB73A7_072D43A077075292_2F22E49BAB7CA1AC; ZZZ=ZZZ+1;
340
        x[ZZZ]=192'h49E95D6D4CA229BF_02FE55778117F12A_5A6B612CC26CCE4A; ZZZ=ZZZ+1;
341
        x[ZZZ]=192'h018310DC409B26D6_1D9D5C5018F728C2_5F4C038ED12B2E41; ZZZ=ZZZ+1;
342
        x[ZZZ]=192'h1C587F1C13924FEF_305532286D6F295A_63FAC0D034D9F793; ZZZ=ZZZ+1;
343
        x[ZZZ]=192'h0101010101010101_0123456789ABCDEF_617B3A0CE8F07100; ZZZ=ZZZ+1;
344
        x[ZZZ]=192'h1F1F1F1F0E0E0E0E_0123456789ABCDEF_DB958605F8C8C606; ZZZ=ZZZ+1;
345
        x[ZZZ]=192'hE0FEE0FEF1FEF1FE_0123456789ABCDEF_EDBFD1C66C29CCC7; ZZZ=ZZZ+1;
346
        x[ZZZ]=192'h0000000000000000_FFFFFFFFFFFFFFFF_355550B2150E2451; ZZZ=ZZZ+1;
347
        x[ZZZ]=192'hFFFFFFFFFFFFFFFF_0000000000000000_CAAAAF4DEAF1DBAE; ZZZ=ZZZ+1;
348
        x[ZZZ]=192'h0123456789ABCDEF_0000000000000000_D5D44FF720683D0D; ZZZ=ZZZ+1;
349
        x[ZZZ]=192'hFEDCBA9876543210_FFFFFFFFFFFFFFFF_2A2BB008DF97C2F2; ZZZ=ZZZ+1;
350
 
351
        //decrypt
352
 
353
        x[ZZZ]=192'h8001010101010101_95A8D72813DAA94D_0000000000000000; ZZZ=ZZZ+1;
354
        x[ZZZ]=192'h4001010101010101_0EEC1487DD8C26D5_0000000000000000; ZZZ=ZZZ+1;
355
        x[ZZZ]=192'h2001010101010101_7AD16FFB79C45926_0000000000000000; ZZZ=ZZZ+1;
356
        x[ZZZ]=192'h1001010101010101_D3746294CA6A6CF3_0000000000000000; ZZZ=ZZZ+1;
357
        x[ZZZ]=192'h0801010101010101_809F5F873C1FD761_0000000000000000; ZZZ=ZZZ+1;
358
        x[ZZZ]=192'h0401010101010101_C02FAFFEC989D1FC_0000000000000000; ZZZ=ZZZ+1;
359
        x[ZZZ]=192'h0201010101010101_4615AA1D33E72F10_0000000000000000; ZZZ=ZZZ+1;
360
        x[ZZZ]=192'h0180010101010101_2055123350C00858_0000000000000000; ZZZ=ZZZ+1;
361
        x[ZZZ]=192'h0140010101010101_DF3B99D6577397C8_0000000000000000; ZZZ=ZZZ+1;
362
        x[ZZZ]=192'h0120010101010101_31FE17369B5288C9_0000000000000000; ZZZ=ZZZ+1;
363
        x[ZZZ]=192'h0110010101010101_DFDD3CC64DAE1642_0000000000000000; ZZZ=ZZZ+1;
364
        x[ZZZ]=192'h0108010101010101_178C83CE2B399D94_0000000000000000; ZZZ=ZZZ+1;
365
        x[ZZZ]=192'h0104010101010101_50F636324A9B7F80_0000000000000000; ZZZ=ZZZ+1;
366
        x[ZZZ]=192'h0102010101010101_A8468EE3BC18F06D_0000000000000000; ZZZ=ZZZ+1;
367
        x[ZZZ]=192'h0101800101010101_A2DC9E92FD3CDE92_0000000000000000; ZZZ=ZZZ+1;
368
        x[ZZZ]=192'h0101400101010101_CAC09F797D031287_0000000000000000; ZZZ=ZZZ+1;
369
        x[ZZZ]=192'h0101200101010101_90BA680B22AEB525_0000000000000000; ZZZ=ZZZ+1;
370
        x[ZZZ]=192'h0101100101010101_CE7A24F350E280B6_0000000000000000; ZZZ=ZZZ+1;
371
        x[ZZZ]=192'h0101080101010101_882BFF0AA01A0B87_0000000000000000; ZZZ=ZZZ+1;
372
        x[ZZZ]=192'h0101040101010101_25610288924511C2_0000000000000000; ZZZ=ZZZ+1;
373
        x[ZZZ]=192'h0101020101010101_C71516C29C75D170_0000000000000000; ZZZ=ZZZ+1;
374
        x[ZZZ]=192'h0101018001010101_5199C29A52C9F059_0000000000000000; ZZZ=ZZZ+1;
375
        x[ZZZ]=192'h0101014001010101_C22F0A294A71F29F_0000000000000000; ZZZ=ZZZ+1;
376
        x[ZZZ]=192'h0101012001010101_EE371483714C02EA_0000000000000000; ZZZ=ZZZ+1;
377
        x[ZZZ]=192'h0101011001010101_A81FBD448F9E522F_0000000000000000; ZZZ=ZZZ+1;
378
        x[ZZZ]=192'h0101010801010101_4F644C92E192DFED_0000000000000000; ZZZ=ZZZ+1;
379
        x[ZZZ]=192'h0101010401010101_1AFA9A66A6DF92AE_0000000000000000; ZZZ=ZZZ+1;
380
        x[ZZZ]=192'h0101010201010101_B3C1CC715CB879D8_0000000000000000; ZZZ=ZZZ+1;
381
        x[ZZZ]=192'h0101010180010101_19D032E64AB0BD8B_0000000000000000; ZZZ=ZZZ+1;
382
        x[ZZZ]=192'h0101010140010101_3CFAA7A7DC8720DC_0000000000000000; ZZZ=ZZZ+1;
383
        x[ZZZ]=192'h0101010120010101_B7265F7F447AC6F3_0000000000000000; ZZZ=ZZZ+1;
384
        x[ZZZ]=192'h0101010110010101_9DB73B3C0D163F54_0000000000000000; ZZZ=ZZZ+1;
385
        x[ZZZ]=192'h0101010108010101_8181B65BABF4A975_0000000000000000; ZZZ=ZZZ+1;
386
        x[ZZZ]=192'h0101010104010101_93C9B64042EAA240_0000000000000000; ZZZ=ZZZ+1;
387
        x[ZZZ]=192'h0101010102010101_5570530829705592_0000000000000000; ZZZ=ZZZ+1;
388
        x[ZZZ]=192'h0101010101800101_8638809E878787A0_0000000000000000; ZZZ=ZZZ+1;
389
        x[ZZZ]=192'h0101010101400101_41B9A79AF79AC208_0000000000000000; ZZZ=ZZZ+1;
390
        x[ZZZ]=192'h0101010101200101_7A9BE42F2009A892_0000000000000000; ZZZ=ZZZ+1;
391
        x[ZZZ]=192'h0101010101100101_29038D56BA6D2745_0000000000000000; ZZZ=ZZZ+1;
392
        x[ZZZ]=192'h0101010101080101_5495C6ABF1E5DF51_0000000000000000; ZZZ=ZZZ+1;
393
        x[ZZZ]=192'h0101010101040101_AE13DBD561488933_0000000000000000; ZZZ=ZZZ+1;
394
        x[ZZZ]=192'h0101010101020101_024D1FFA8904E389_0000000000000000; ZZZ=ZZZ+1;
395
        x[ZZZ]=192'h0101010101018001_D1399712F99BF02E_0000000000000000; ZZZ=ZZZ+1;
396
        x[ZZZ]=192'h0101010101014001_14C1D7C1CFFEC79E_0000000000000000; ZZZ=ZZZ+1;
397
        x[ZZZ]=192'h0101010101012001_1DE5279DAE3BED6F_0000000000000000; ZZZ=ZZZ+1;
398
        x[ZZZ]=192'h0101010101011001_E941A33F85501303_0000000000000000; ZZZ=ZZZ+1;
399
        x[ZZZ]=192'h0101010101010801_DA99DBBC9A03F379_0000000000000000; ZZZ=ZZZ+1;
400
        x[ZZZ]=192'h0101010101010401_B7FC92F91D8E92E9_0000000000000000; ZZZ=ZZZ+1;
401
        x[ZZZ]=192'h0101010101010201_AE8E5CAA3CA04E85_0000000000000000; ZZZ=ZZZ+1;
402
        x[ZZZ]=192'h0101010101010180_9CC62DF43B6EED74_0000000000000000; ZZZ=ZZZ+1;
403
        x[ZZZ]=192'h0101010101010140_D863DBB5C59A91A0_0000000000000000; ZZZ=ZZZ+1;
404
        x[ZZZ]=192'h0101010101010120_A1AB2190545B91D7_0000000000000000; ZZZ=ZZZ+1;
405
        x[ZZZ]=192'h0101010101010110_0875041E64C570F7_0000000000000000; ZZZ=ZZZ+1;
406
        x[ZZZ]=192'h0101010101010108_5A594528BEBEF1CC_0000000000000000; ZZZ=ZZZ+1;
407
        x[ZZZ]=192'h0101010101010104_FCDB3291DE21F0C0_0000000000000000; ZZZ=ZZZ+1;
408
        x[ZZZ]=192'h0101010101010102_869EFD7F9F265A09_0000000000000000; ZZZ=ZZZ+1;
409
 
410 5 rudi
        // Wait for clock edge
411
        decrypt = 0;
412
        @(posedge clk);
413
 
414
        $display("");
415
        $display("**************************************");
416
        $display("* Starting DES Test ...              *");
417
        $display("**************************************");
418
        $display("");
419
 
420
        for(decrypt=0;decrypt<2;decrypt=decrypt+1)
421
        begin
422
        if(decrypt)     $display("Running Encrypt test ...\n");
423
        else            $display("Running Decrypt test ...\n");
424
        // Begin for loop       
425 7 rudi
        for(select=0;select<(326+16);select=select+1)
426 5 rudi
           begin
427
                tmp=x[select];
428
                @(posedge clk);
429
                if(select>16)
430
                   if((des_exp[16] !== desOut) | (^des_exp[16]===1'bx) | (^desOut===1'bx))
431
                        $display("ERROR: (%0d) Expected %x Got %x", select-17, des_exp[16], desOut);
432
                   //else
433
                   //   $display("PASS : (%0d) Expected %x Got %x", select-17, des_exp[16], desOut);
434
           end
435
        end
436
 
437
        $display("");
438
        $display("**************************************");
439
        $display("* DES Test done ...                  *");
440
        $display("**************************************");
441
        $display("");
442
 
443
 
444
        $finish;
445
   end // end of initial
446
 
447
// DES Clock
448
always #50 clk=~clk;
449 7 rudi
wire    reverse = select > 269;
450 5 rudi
 
451
// Create the key w/o the parity bits
452
assign #1 key = {tmp[191:185],tmp[183:177],tmp[175:169],tmp[167:161],
453
                        tmp[159:153],tmp[151:145],tmp[143:137],tmp[135:129]};
454 7 rudi
assign #1 des_in = (decrypt[0]^reverse) ? tmp[63:0]   : tmp[127:64];
455
assign exp_out_d = (decrypt[0]^reverse) ? tmp[127:64] : tmp[63:0];
456 5 rudi
 
457
// The DES instance
458
des u0( .clk(           clk             ),
459
        .desOut(        desOut          ),
460
        .desIn(         des_in          ),
461
        .key(           key             ),
462
        .decrypt(       decrypt[0]       )
463
        );
464
 
465
endmodule

powered by: WebSVN 2.1.0

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