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

Subversion Repositories pairing

[/] [pairing/] [trunk/] [testbench/] [test_f3m_inv.v] - Blame information for rev 30

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

Line No. Rev Author Line
1 4 homer.xing
`timescale 1ns / 1ps
2
`define CLOCK_PERIOD 10
3
module test_f3m_inv;
4
 
5 22 homer.xing
    // Inputs
6
    reg [193:0] A;
7
    reg clk;
8
    reg reset;
9 4 homer.xing
 
10 22 homer.xing
    // Outputs
11
    wire [193:0] C;
12 7 homer.xing
    wire done;
13 4 homer.xing
 
14 22 homer.xing
    // Instantiate the Unit Under Test (UUT)
15
    f3m_inv uut (
16
        .A(A),
17
        .clk(clk),
18
        .reset(reset),
19
        .C(C),
20 7 homer.xing
        .done(done)
21 22 homer.xing
    );
22 4 homer.xing
 
23
    always #`CLOCK_PERIOD clk = ~clk;
24
 
25 22 homer.xing
    initial begin
26
        // Initialize Inputs
27
        A = 0;
28
        clk = 0;
29
        reset = 0;
30 4 homer.xing
 
31 22 homer.xing
        // Wait 100 ns for global reset to finish
32
        #100;
33 4 homer.xing
 
34 22 homer.xing
        // Add stimulus here
35 4 homer.xing
        A = 32'b10_01_01_10_01_00; // A = "x";
36
        @(negedge clk); reset = 1;
37
        @(negedge clk); reset = 0;
38
        #(200*2*`CLOCK_PERIOD);
39 7 homer.xing
        if (C != 192'h65450169824811252a919a8a02964184221a1562655252a9) $display("Error!");
40 4 homer.xing
        $display("Good!"); $finish;
41 22 homer.xing
    end
42 4 homer.xing
 
43
endmodule
44
 

powered by: WebSVN 2.1.0

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