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

Subversion Repositories sap_hardwired_processor

[/] [sap_hardwired_processor/] [branches/] [CPU8_1_tb.v] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 sssayeekum
`timescale 1ns / 1ps
2
 
3
////////////////////////////////////////////////////////////////////////////////
4
// Company: 
5
// Engineer:
6
//
7
// Create Date:   11:26:14 11/28/2021
8
// Design Name:   CPU8_1
9
// Module Name:   F:/VIDEO FACTORY/XILINX/SAP_HARDWIRED_PROCESSOR/CPU8_1_tb.v
10
// Project Name:  SAP_HARDWIRED_PROCESSOR
11
// Target Device:  
12
// Tool versions:  
13
// Description: 
14
//
15
// Verilog Test Fixture created by ISE for module: CPU8_1
16
//
17
// Dependencies:
18
// 
19
// Revision:
20
// Revision 0.01 - File Created
21
// Additional Comments:
22
// 
23
////////////////////////////////////////////////////////////////////////////////
24
 
25
module CPU8_1_tb;
26
 
27
        // Inputs
28
        reg clk;
29
        reg rst;
30
 
31
        // Outputs
32
        wire [3:0] PC_OUT;
33
        wire [5:0] T;
34
        wire [3:0] ADDR_out;
35
        wire [7:0] DATA_OUT_1;
36
        wire [3:0] IR_OUT_w1;
37
        wire [3:0] IR_OUT_w2;
38
        wire [7:0] ALU_out;
39
        wire LDA;
40
        wire ADD;
41
        wire SUB;
42
        wire OUT;
43
        wire HLT;
44
        wire [7:0] DATA_OUT;
45
        wire [7:0] ACC_OUT;
46
        wire CP;
47
        wire EP;
48
        wire LM;
49
        wire CE;
50
        wire LI;
51
        wire EI;
52
        wire LA;
53
        wire EA;
54
        wire SU;
55
        wire EU;
56
        wire LB;
57
        wire LO;
58
        wire NOP;
59
 
60
        // Instantiate the Unit Under Test (UUT)
61
        CPU8_1 uut (
62
                .clk(clk),
63
                .rst(rst),
64
                .PC_OUT(PC_OUT),
65
                .T(T),
66
                .ADDR_out(ADDR_out),
67
                .DATA_OUT_1(DATA_OUT_1),
68
                .IR_OUT_w1(IR_OUT_w1),
69
                .IR_OUT_w2(IR_OUT_w2),
70
                .ALU_out(ALU_out),
71
                .LDA(LDA),
72
                .ADD(ADD),
73
                .SUB(SUB),
74
                .OUT(OUT),
75
                .HLT(HLT),
76
                .DATA_OUT(DATA_OUT),
77
                .ACC_OUT(ACC_OUT),
78
                .CP(CP),
79
                .EP(EP),
80
                .LM(LM),
81
                .CE(CE),
82
                .LI(LI),
83
                .EI(EI),
84
                .LA(LA),
85
                .EA(EA),
86
                .SU(SU),
87
                .EU(EU),
88
                .LB(LB),
89
                .LO(LO),
90
                .NOP(NOP)
91
        );
92
 
93
        initial begin
94
                // Initialize Inputs
95
                clk = 0;
96
                rst = 0;
97
 
98
                // Wait 100 ns for global reset to finish
99
                #50;
100
      clk = 0;
101
                rst = 1;
102
 
103
      #50;
104
      clk = 1;
105
                rst = 0;
106
 
107
      #50;
108
      clk = 0;
109
                rst = 0;
110
 
111
      #50;
112
      clk = 1;
113
                rst = 0;
114
 
115
      #50;
116
      clk = 0;
117
                rst = 0;
118
 
119
      #50;
120
      clk = 1;
121
                rst = 0;
122
 
123
      #50;
124
      clk = 0;
125
                rst = 0;
126
 
127
      #50;
128
      clk = 1;
129
                rst = 0;
130
 
131
      #50;
132
      clk = 0;
133
                rst = 0;
134
 
135
      #50;
136
      clk = 1;
137
                rst = 0;
138
                // Add stimulus here
139
 
140
        end
141
 
142
endmodule
143
 

powered by: WebSVN 2.1.0

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