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

Subversion Repositories mips32r1

[/] [mips32r1/] [trunk/] [Hardware/] [XUPV5-LX110T_SoC/] [MIPS32-Pipelined-Hw/] [src/] [Simulation/] [Top_Tester.v] - Blame information for rev 2

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

Line No. Rev Author Line
1 2 ayersg
`timescale 1ns / 1ps
2
 
3
////////////////////////////////////////////////////////////////////////////////
4
// Company: 
5
// Engineer:
6
//
7
// Create Date:   12:38:44 09/10/2012
8
// Design Name:   Top
9
// Module Name:   C:/root/Work/Gauss/Final/Hardware/XUM_Singlecore/MIPS32-Pipelined-Hw/src/Simulation/Top_Tester.v
10
// Project Name:  MIPS32-Pipelined-Hw
11
// Target Device:  
12
// Tool versions:  
13
// Description: 
14
//
15
// Verilog Test Fixture created by ISE for module: Top
16
//
17
// Dependencies:
18
// 
19
// Revision:
20
// Revision 0.01 - File Created
21
// Additional Comments:
22
// 
23
////////////////////////////////////////////////////////////////////////////////
24
 
25
module Top_Tester;
26
 
27
        // Inputs
28
        reg clock_100MHz;
29
        reg reset_n;
30
        reg [7:0] Switch;
31
        reg UART_Rx;
32
 
33
        // Outputs
34
        wire [14:0] LED;
35
        wire [6:0] LCD;
36
        wire UART_Tx;
37
        wire Piezo;
38
 
39
        // Bidirs
40
        wire i2c_scl;
41
        wire i2c_sda;
42
 
43
        // Instantiate the Unit Under Test (UUT)
44
        Top uut (
45
                .clock_100MHz(clock_100MHz),
46
                .reset_n(reset_n),
47
                .Switch(Switch),
48
                .LED(LED),
49
                .LCD(LCD),
50
                .UART_Rx(UART_Rx),
51
                .UART_Tx(UART_Tx),
52
                .i2c_scl(i2c_scl),
53
                .i2c_sda(i2c_sda),
54
                .Piezo(Piezo)
55
        );
56
    integer i;
57
 
58
        initial begin
59
                // Initialize Inputs
60
                clock_100MHz = 0;
61
                reset_n = 0;
62
                Switch = 0;
63
                UART_Rx = 0;
64
 
65
                // Wait 100 ns for global reset to finish
66
                #100;
67
 
68
                // Add stimulus here
69
        for (i=0; i<900000; i=i+1) begin
70
            reset_n = (i < 28) ? 0 : 1;
71
            clock_100MHz = ~clock_100MHz;
72
            if (i > 4000) Switch <= 8'h00;
73
            if (i > 100000) i = i - 1;
74
            #5;
75
        end
76
        end
77
 
78
endmodule
79
 

powered by: WebSVN 2.1.0

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