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

Subversion Repositories verilog_fixed_point_math_library

[/] [verilog_fixed_point_math_library/] [trunk/] [Test_mult.v] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 tomburkeii
`timescale 1ns / 1ps
2
 
3
////////////////////////////////////////////////////////////////////////////////
4
// Company: 
5
// Engineer:
6
//
7
// Create Date:   13:36:55 06/27/2013
8
// Design Name:   qmult
9
// Module Name:   I:/Projects/xilinx/FPInterface/Tester/Tran3005/Test_mult.v
10
// Project Name:  Trancendental
11
// Target Device:  
12
// Tool versions:  
13
// Description: 
14
//
15
// Verilog Test Fixture created by ISE for module: qmult
16
//
17
// Dependencies:
18
// 
19
// Revision:
20
// Revision 0.01 - File Created
21
// Additional Comments:
22
// 
23
////////////////////////////////////////////////////////////////////////////////
24
module Test_mult;
25
 
26
        // Inputs
27
        reg [31:0] i_multiplicand;
28
        reg [31:0] i_multiplier;
29
 
30
        // Outputs
31
        wire [31:0] o_result;
32
        wire                    ovr;
33
 
34
        // Instantiate the Unit Under Test (UUT)
35
        qmult #(19,32) uut (
36
                .i_multiplicand(i_multiplicand),
37
                .i_multiplier(i_multiplier),
38
                .o_result(o_result),
39
                .ovr(ovr)
40
        );
41
 
42
        initial begin
43
                $monitor ("%b,%b,%b,%b", i_multiplicand, i_multiplier, o_result, ovr);          //      Monitor the stuff we care about
44
 
45
                // Initialize Inputs
46
                i_multiplicand = 32'b00000000000110010010000111111011;  //pi = 3.141592
47
                i_multiplicand[31] = 0;                                                                                          //      i_multiplicand sign
48
                i_multiplier[31] = 0;                                                                                            //      i_multiplier sign
49
                i_multiplier[30:0] = 0;
50
 
51
                // Wait 100 ns for global reset to finish
52
                #100;
53
                #100 i_multiplier[0] = 1;                //      1.91E-6
54
        end
55
 
56
        // Add stimulus here
57
        always begin
58
                #10 i_multiplier[30:0] = (i_multiplier[30:0] << 1) + 1;           //      Why not??
59
        end
60
 
61
endmodule
62
 

powered by: WebSVN 2.1.0

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