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

Subversion Repositories pairing

[/] [pairing/] [trunk/] [testbench/] [test_tate_pairing.v] - Blame information for rev 12

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

Line No. Rev Author Line
1 8 homer.xing
`timescale 1ns / 1ps
2
`include "../rtl/inc.v"
3
 
4
module test_tate_pairing;
5
 
6
        // Inputs
7
        reg clk;
8
        reg reset;
9
        reg [`WIDTH:0] x1, y1, x2, y2;
10
 
11
        // Outputs
12
        wire done;
13 12 homer.xing
        wire [`W6:0] out;
14 8 homer.xing
 
15 12 homer.xing
    // Vars
16
    reg [`W6:0] wish;
17
 
18 8 homer.xing
        // Instantiate the Unit Under Test (UUT)
19
        tate_pairing uut (
20
                .clk(clk),
21
                .reset(reset),
22
                .x1(x1),
23
                .y1(y1),
24
                .x2(x2),
25
                .y2(y2),
26
                .done(done),
27
                .out(out)
28
        );
29
 
30
        initial begin
31
                // Initialize Inputs
32
                clk = 0;
33
                reset = 0;
34
                x1 = 0;
35
                y1 = 0;
36
                x2 = 0;
37
                y2 = 0;
38
 
39
                // Wait 100 ns for global reset to finish
40
                #100;
41
 
42
                // Add stimulus here
43
        x1 = 194'h6a18950064046a122a14118668466a262a91509688159890;
44
        y1 = 194'h69112569422aa0a25224aa010888066061124a8685566825;
45
        x2 = 194'h155945aa8924654812564110544995a28845901211454814;
46
        y2 = 194'h8481099460280628960a82559920000a99a2106955289a40;
47
        wish = {{194'h148a60225a14a81189aa09a22848104418aa6505801246205,194'h520094820010a12551069915258a58848501052005a85609},{194'ha484046591204499252009806480198a2549624a5181695,194'h21905848428558a806805a4518844049651812a88955a8868},{194'h5565059245921805891121a95a6949564201a2a068910558,194'ha6298884510610298462582969269a122260a05a8241055a}};
48
        @ (negedge clk); reset = 1;
49
        @ (negedge clk); reset = 0;
50
        @ (posedge done); @ (negedge clk);
51 12 homer.xing
        if (out !== wish) $display("E");
52 8 homer.xing
        $finish;
53
        end
54
 
55
    always #5 clk = ~clk;
56
endmodule
57
 

powered by: WebSVN 2.1.0

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