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

Subversion Repositories theia_gpu

[/] [theia_gpu/] [branches/] [new_alu/] [test_bench/] [testbench.v] - Blame information for rev 224

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

Line No. Rev Author Line
1 211 diegovalve
`timescale 1ns / 1ps
2
 
3
 
4
module testbench;
5
 
6
        // Inputs
7
        reg Clock;
8
        reg Reset;
9
        reg iEnable;
10
 
11
        // Instantiate the Unit Under Test (UUT)
12
        Unit_Execution uut (
13
                .Clock(Clock),
14
                .Reset(Reset),
15
                .iEnable(iEnable)
16
        );
17
 
18
 
19
 
20
Dumper DUMP();
21
//---------------------------------------------
22
 //generate the clock signal here
23
 always begin
24
  #10  Clock =  ! Clock;
25
 end
26
 //---------------------------------------------
27
 
28
reg [31:0] i;
29
 
30
        initial begin
31
                // Initialize Inputs
32
                Clock = 0;
33
                Reset = 0;
34
                iEnable = 0;
35
                //Load rams
36
                $readmemh("Code.mem", uut.IM.Ram);
37
                //$readmemh("Dummy.mem", uut.RF.Ram);
38
 
39
                for (i = 0; i < 128; i = i + 1)
40
                        uut.II.SB.Ram[i] = 0;
41
 
42
 
43
        /*      for (i = 0; i < 32; i = i + 1)
44
                        uut.RF.RF_X.Ram[i] = 0;
45
 
46
                for (i = 0; i < 32; i = i + 1)
47
                        uut.RF.RF_Y.Ram[i] = 0;
48
 
49
                for (i = 0; i < 32; i = i + 1)
50
                        uut.RF.RF_Z.Ram[i] = 0;                 */
51
 
52
                #110;
53
      Reset = 1;
54
                #40;
55
                Reset = 0;
56
                iEnable = 1;
57
 
58
        end
59
 
60
endmodule
61
 

powered by: WebSVN 2.1.0

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