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

Subversion Repositories pairing

[/] [pairing/] [trunk/] [testbench/] [test_f3m_mult3.v] - Blame information for rev 8

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

Line No. Rev Author Line
1 7 homer.xing
`timescale 1ns / 1ps
2
`include "../rtl/inc.v"
3
 
4
module test_f3m_mult3;
5
 
6
        // Inputs
7
        reg clk;
8
        reg reset;
9
        reg [`WIDTH:0] a0,b0,a1,b1,a2,b2,w0,w1,w2;
10
 
11
        // Outputs
12
    wire [`WIDTH:0] c0,c1,c2;
13
        wire done;
14
 
15
        // Instantiate the Unit Under Test (UUT)
16
        f3m_mult3 uut (
17
                .clk(clk),
18
                .reset(reset),
19
                .a0(a0),
20
                .b0(b0),
21
                .c0(c0),
22
                .a1(a1),
23
                .b1(b1),
24
                .c1(c1),
25
                .a2(a2),
26
                .b2(b2),
27
                .c2(c2),
28
                .done(done)
29
        );
30
 
31
        initial begin
32
                // Initialize Inputs
33
                clk = 0;
34
                reset = 0;
35
                a0 = 0;
36
                b0 = 0;
37
                a1 = 0;
38
                b1 = 0;
39
                a2 = 0;
40
                b2 = 0;
41
 
42
                // Wait 100 ns for global reset to finish
43
                #100;
44
 
45
                // Add stimulus here
46
        a0 = 194'h2581921511a6952a4244918a069446a520480660152916412;
47
        a1 = 194'haa59080a98122082111a110a400642169102154006590a28;
48
        a2 = 194'h90026a06416441992252a2820a2860269a094a0a06428285;
49
        b0 = 194'h158a5419212805158a941010a495a80966995599a660686a5;
50
        b1 = 194'h115a25602090915a9086a1165169041652888086051510024;
51
        b2 = 194'h191a5669201405a8589951644158119264522a6496809952;
52
        w0 = 194'h145a548a114016289482246816a449911942a088540160102;
53
        w1 = 194'h220652040980466020556941115a5085a5904a60118605858;
54
        w2 = 194'h280a8885992001a950615026585a5592096891a9954506155;
55
        @ (negedge clk); reset = 1;
56
        @ (negedge clk); reset = 0;
57
        @ (posedge done);
58 8 homer.xing
        #5;
59 7 homer.xing
        if (c0 !== w0) $display("E");
60
        if (c1 !== w1) $display("E");
61
        if (c2 !== w2) $display("E");
62
        $finish;
63
        end
64
 
65
    always #5 clk = ~clk;
66
endmodule
67
 

powered by: WebSVN 2.1.0

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