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

Subversion Repositories pairing

[/] [pairing/] [trunk/] [testbench/] [test_f32m_mult.v] - Blame information for rev 18

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

Line No. Rev Author Line
1 4 homer.xing
`timescale 1ns / 1ps
2
 
3
module test_f32m_mult;
4
 
5
        // Inputs
6
        reg reset;
7
        reg clk;
8
        reg [387:0] a,b;
9
 
10
        // Outputs
11
        wire [387:0] c;
12
        wire done;
13
 
14
        // Instantiate the Unit Under Test (UUT)
15
        f32m_mult uut (
16
                .reset(reset),
17
                .clk(clk),
18
                .a(a),
19
                .b(b),
20
                .c(c),
21
                .done(done)
22
        );
23
 
24
        initial begin
25
                // Initialize Inputs
26
                reset = 0;
27
                clk = 0;
28
                a = 0;
29
                b = 0;
30
 
31
                // Wait 100 ns for global reset to finish
32
                #100;
33
 
34
                // Add stimulus here
35
        a={194'h2a8aa25aa245066106a40806618aa88a2946881162a864652,194'h28258889288590a464559a0854a0a269820495a6069969aa2};
36
        b={194'h59a0a46891951042640592a2969888012108059214504048,194'h55812555968918122622106514a25488204895614889112};
37
        @ (negedge clk) reset = 1;
38
        @ (negedge clk) reset = 0;
39
        @ (posedge done);
40 7 homer.xing
        if (c!=={194'h9594010a580186621a840406105460622891085122060a45,194'h59a1595621295a89260802a045194a96050a6202164000a9}) $display("E1");
41 4 homer.xing
        #100;
42
 
43
        a={194'h8864990666a959a88500249a244495aaa26a2a0194082aa1,194'h2a9481526946468065456052045865262520a4a9520a5a665};
44
        b={194'h116698585aa229805611194a6520151245204aa9114a89200,194'h8855225a25520a048a912141800501862189941946906540};
45
        @ (negedge clk) reset = 1;
46
        @ (negedge clk) reset = 0;
47
        @ (posedge done);
48 7 homer.xing
        if (c!=={194'h215608121442a91950aaa59514a9486258684486825840894,194'h284845aa0664918068988811691a290658228028985249a48}) $display("E2");
49 4 homer.xing
        #100;
50
 
51
        $finish;
52
        end
53
 
54
    always #5 clk = ~clk;
55
endmodule
56
 

powered by: WebSVN 2.1.0

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