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

Subversion Repositories systemcmd5

[/] [systemcmd5/] [trunk/] [rtl/] [systemc/] [stimulus.cpp] - Blame information for rev 6

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 jcastillo
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  MD5 stimulus                                                ////
4
////                                                              ////
5
////  This file is part of the SystemC MD5                        ////
6
////                                                              ////
7
////  Description:                                                ////
8
////  MD5 stimulus file                                           ////
9
////                                                              ////
10
////  To Do:                                                      ////
11
////   - done                                                     ////
12
////                                                              ////
13
////  Author(s):                                                  ////
14
////      - Javier Castillo, jcastilo@opencores.org               ////
15
////                                                              ////
16
//////////////////////////////////////////////////////////////////////
17
////                                                              ////
18
//// Copyright (C) 2000 Authors and OPENCORES.ORG                 ////
19
////                                                              ////
20
//// This source file may be used and distributed without         ////
21
//// restriction provided that this copyright statement is not    ////
22
//// removed from the file and that any derivative work contains  ////
23
//// the original copyright notice and the associated disclaimer. ////
24
////                                                              ////
25
//// This source file is free software; you can redistribute it   ////
26
//// and/or modify it under the terms of the GNU Lesser General   ////
27
//// Public License as published by the Free Software Foundation; ////
28
//// either version 2.1 of the License, or (at your option) any   ////
29
//// later version.                                               ////
30
////                                                              ////
31
//// This source is distributed in the hope that it will be       ////
32
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
33
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
34
//// PURPOSE.  See the GNU Lesser General Public License for more ////
35
//// details.                                                     ////
36
////                                                              ////
37
//// You should have received a copy of the GNU Lesser General    ////
38
//// Public License along with this source; if not, download it   ////
39
//// from http://www.opencores.org/lgpl.shtml                     ////
40
////                                                              ////
41
//////////////////////////////////////////////////////////////////////
42
//
43
// CVS Revision History
44
//
45
// $Log: not supported by cvs2svn $
46 4 jcastillo
// Revision 1.1.1.1  2004/09/08 16:24:49  jcastillo
47
// Initial release
48
//
49 2 jcastillo
 
50
#include "stimulus.h"
51
 
52
void
53
test::tb ()
54
{
55
 
56
  transactor->resetea ();
57
 
58
  transactor->wait_cycles (5);
59 4 jcastillo
 
60
  //hash of ""
61
  transactor->new_text ();
62
  transactor->hash (0x00000080, 0x0, 0x0, 0x0);
63
  transactor->hash (0x0, 0x0, 0x0, 0x0);
64
  transactor->hash (0x0, 0x0, 0x0, 0x0);
65
  transactor->hash (0x0, 0x0, 0x0, 0x0);
66 2 jcastillo
 
67 4 jcastillo
  transactor->print_result ();
68
 
69 2 jcastillo
  //hash of "a"
70 4 jcastillo
  transactor->new_text ();
71 2 jcastillo
  transactor->hash (0x00008061, 0x0, 0x0, 0x0);
72
  transactor->hash (0x0, 0x0, 0x0, 0x0);
73
  transactor->hash (0x0, 0x0, 0x0, 0x0);
74
  transactor->hash (0x0, 0x0, 0x8, 0x0);
75
 
76
  transactor->print_result ();
77
 
78 4 jcastillo
  //hash of "abc"
79 2 jcastillo
  transactor->new_text ();
80 4 jcastillo
  transactor->hash (0x80636261, 0x0, 0x0, 0x0);
81
  transactor->hash (0x0, 0x0, 0x0, 0x0);
82
  transactor->hash (0x0, 0x0, 0x0, 0x0);
83
  transactor->hash (0x0, 0x0, 0x18, 0x0);
84 2 jcastillo
 
85
  transactor->print_result ();
86
 
87 4 jcastillo
  //hash of "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
88
  transactor->new_text ();
89
  transactor->hash (0x44434241, 0x48474645, 0x4C4B4A49, 0x504F4E4D);
90
  transactor->hash (0x54535251, 0x58575655, 0x62615A59, 0x66656463);
91
  transactor->hash (0x6A696867, 0x6E6D6C6B, 0x7271706F, 0x76757473);
92
  transactor->hash (0x7A797877, 0x33323130, 0x37363534, 0x00803938);
93 2 jcastillo
 
94 4 jcastillo
  transactor->wait_result ();
95 2 jcastillo
 
96 4 jcastillo
  transactor->hash (0x0, 0x0, 0x0, 0x0);
97
  transactor->hash (0x0, 0x0, 0x0, 0x0);
98
  transactor->hash (0x0, 0x0, 0x0, 0x0);
99
  transactor->hash (0x0, 0x0, 0x1f0, 0x0);
100
 
101
  transactor->print_result ();
102
 
103
  //hash of "1233456789012334567890123345678901233456789012334567890123345678901233456789012334567890"
104 2 jcastillo
  transactor->new_text ();
105 4 jcastillo
  transactor->hash (0x34333231, 0x38373635, 0x32313039, 0x36353433);
106
  transactor->hash (0x30393837, 0x34333231, 0x38373635, 0x32313039);
107
  transactor->hash (0x36353433, 0x30393837, 0x34333231, 0x38373635);
108
  transactor->hash (0x32313039, 0x36353433, 0x30393837, 0x34333231);
109 2 jcastillo
 
110 4 jcastillo
  transactor->wait_result();
111
 
112
  transactor->hash (0x38373635, 0x32313039, 0x36353433, 0x30393837);
113
  transactor->hash (0x80, 0x0, 0x0, 0x0);
114
  transactor->hash (0x0, 0x0, 0x0, 0x0);
115
  transactor->hash (0x0, 0x0, 0x280, 0x0);
116 2 jcastillo
 
117 4 jcastillo
  transactor->print_result ();
118
 
119
 
120
 
121 2 jcastillo
}

powered by: WebSVN 2.1.0

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