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

Subversion Repositories pairing

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

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

powered by: WebSVN 2.1.0

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