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

Subversion Repositories md5_pipelined

[/] [md5_pipelined/] [trunk/] [Md5CoreTest.v] - Blame information for rev 6

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 JohnLeitch
/*
2
Copyright (C) 2014 John Leitch (johnleitch@outlook.com)
3
 
4
This program is free software: you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation, either version 3 of the License, or
7
(at your option) any later version.
8
 
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
GNU General Public License for more details.
13
 
14
You should have received a copy of the GNU General Public License
15
along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
*/
17 2 JohnLeitch
`timescale 1ns / 1ns
18
 
19 6 JohnLeitch
`include "Md5CoreTestMacros.v"
20
 
21 2 JohnLeitch
module Md5CoreTest;
22
 
23
reg clk, reset, test_all;
24
wire [31:0] a, b, c, d;
25
reg [31:0] count = 0;
26
reg [511:0] chunk;
27
 
28
Md5Core m (
29
  .clk(clk),
30
  .wb(chunk),
31
  .a0('h67452301),
32
  .b0('hefcdab89),
33
  .c0('h98badcfe),
34
  .d0('h10325476),
35
  .a64(a),
36
  .b64(b),
37
  .c64(c),
38
  .d64(d)
39
);
40
 
41
initial
42
  begin
43
    clk = 0;
44
    forever #10 clk = !clk;
45
  end
46
 
47
initial
48
  begin
49
    reset = 0;
50
    #5 reset = 1;
51
    #4 reset = 0;
52
  end
53 6 JohnLeitch
 
54
`include "Md5CoreTestCases.v"
55 2 JohnLeitch
 
56 6 JohnLeitch
always @(posedge clk) count <= count + 1;
57
always @(posedge clk) if (count == `DoneCount) test_all <= `TestAllExp;
58 2 JohnLeitch
 
59
endmodule
60
 
61
 
62
 

powered by: WebSVN 2.1.0

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