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

Subversion Repositories pairing

[/] [pairing/] [trunk/] [testbench/] [test_duursma_lee_algo.v] - Blame information for rev 4

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 homer.xing
`timescale 1ns / 1ps
2
`include "../verilog/inc.v"
3
 
4
module test_duursma_lee_algo;
5
 
6
        // Inputs
7
        reg clk;
8
        reg reset;
9
        reg [`WIDTH:0] xp,yp,xr,yr;
10
 
11
        // Outputs
12
        wire done;
13
    wire [`W6:0] out;
14
    wire [`WIDTH:0] o0,o1,o2,o3,o4,o5;
15
 
16
        // Instantiate the Unit Under Test (UUT)
17
        duursma_lee_algo uut (
18
                .clk(clk),
19
                .reset(reset),
20
                .xp(xp),
21
                .yp(yp),
22
                .xr(xr),
23
                .yr(yr),
24
                .done(done),
25
                .out(out)
26
        );
27
 
28
    assign {o5,o4,o3,o2,o1,o0} = out;
29
 
30
        initial begin
31
                // Initialize Inputs
32
                clk = 0;
33
                reset = 0;
34
                xp = 0;
35
                yp = 0;
36
                xr = 0;
37
                yr = 0;
38
 
39
                // Wait 100 ns for global reset to finish
40
                #100;
41
 
42
                // Add stimulus here
43
        xp = 194'haa5a8129a02a0544a4409a500045458901280969815aa820;
44
        yp = 194'h1414a205a21a4428968985650895464402249258428049204;
45
        xr = 194'h614011499522506668a01a20988812468a5aa8641aa24595;
46
        yr = 194'haa01145590659058124a0261410682860225909182a92189;
47
        @ (negedge clk); reset = 1;
48
        @ (negedge clk); reset = 0;
49
        @ (posedge done);
50
        if (out !== {{194'h289898988a561125505a60640642444905248262004845aa6,194'ha6a208a8402504225588a080a124292404061158a96a6a44},{194'h2266261625a9894a45640906a242a99295816525895a98a25,194'h21868921614220506a96a9285119405a15550801829589214},{194'h26a4200680102269189946046919aa804602128246999685a,194'h1a558028a5a964224120a9212a9089a0966a0918a41612219}})
51
          begin
52
            $display("E");
53
            $display("o0=%h",o0);
54
            $display("o1=%h",o1);
55
            $display("o2=%h",o2);
56
            $display("o3=%h",o3);
57
            $display("o4=%h",o4);
58
            $display("o5=%h",o5);
59
          end
60
        #100;
61
        $finish;
62
        end
63
 
64
    always #5 clk = ~clk;
65
endmodule
66
 

powered by: WebSVN 2.1.0

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