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

Subversion Repositories pairing

[/] [pairing/] [trunk/] [testbench/] [test_f33m_mult.v] - Blame information for rev 21

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

Line No. Rev Author Line
1 6 homer.xing
`timescale 1ns / 1ns
2 7 homer.xing
`include "../rtl/inc.v"
3 6 homer.xing
 
4
module test_f33m_mult;
5
 
6
        // Inputs
7
        reg clk;
8
        reg reset;
9
        reg [`W3:0] a,b,wish;
10
 
11
        // Outputs
12
        wire done;
13
    wire [`W3:0] c;
14
 
15
        // Instantiate the Unit Under Test (UUT)
16
        f33m_mult uut (
17
                .clk(clk),
18
                .reset(reset),
19
                .a(a),
20
                .b(b),
21
                .c(c),
22
                .done(done)
23
        );
24
 
25
    always #5 clk = ~clk;
26
 
27
        initial begin
28
                // Initialize Inputs
29
                clk = 0;
30
                reset = 0;
31
                a = 0;
32
                b = 0;
33
 
34
                // Wait 100 ns for global reset to finish
35
                #100;
36
 
37
                // Add stimulus here
38
        a = {194'ha05199566491a29190482a612a86561469a2a21a0598425a,194'h29a016819944661925585684aa051456a52a02442a9080568,194'h15219624104641521626a965848208a09a02a9a084499006a};
39
        b = {194'h16458a4488a64426429a46989868049a5a94a291668056411,194'h4229659440a9689291461604a9a01a20000a191a00142951,194'h504004aaa024886a56504a8a4a58806919aa1a4549a56688};
40
        wish = {194'ha65a56829a691285518450025a0190642544a08628a965a5,194'h22889984564568942218aa986112026a095a629a68890a859,194'h14a11844416485509289802509a000421864454612559588};
41
        @ (negedge clk); reset = 1;
42
        @ (negedge clk); reset = 0;
43
        @ (posedge done);
44
        @ (posedge clk);
45
        if (c !== wish)
46
            $display("E");
47
        $finish;
48
        end
49
endmodule
50
 

powered by: WebSVN 2.1.0

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