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

Subversion Repositories pairing

[/] [pairing/] [trunk/] [testbench/] [test_f3_neg.v] - Blame information for rev 26

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_f3_neg;
4
 
5 22 homer.xing
    // Inputs
6
    reg [1:0] A;
7 4 homer.xing
 
8 22 homer.xing
    // Outputs
9
    wire [1:0] B;
10 4 homer.xing
 
11 22 homer.xing
    // Instantiate the Unit Under Test (UUT)
12
    f3_neg uut (
13
        .A(A),
14
        .B(B)
15
    );
16 4 homer.xing
 
17
   task check;
18 22 homer.xing
      begin
19 4 homer.xing
         #10;
20 22 homer.xing
            if ((A+B) % 3 != 0)
21
               begin
22
                   $display("Error"); $finish;
23
                end
24
      end
25
    endtask
26 4 homer.xing
 
27 22 homer.xing
    initial begin
28
        // Initialize Inputs
29
        A = 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
        A = 0; check;
36
        A = 1; check;
37
        A = 2; check;
38
        $finish;
39
    end
40 4 homer.xing
 
41
endmodule
42
 

powered by: WebSVN 2.1.0

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