This repository was archived by the owner on Oct 21, 2023. It is now read-only.
forked from lihengtao/Organization-MultiCPU
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtop_test.v
More file actions
78 lines (68 loc) · 1.41 KB
/
Copy pathtop_test.v
File metadata and controls
78 lines (68 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
`timescale 1ns / 1ps
////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 22:35:31 06/29/2020
// Design Name: top
// Module Name: D:/ISE/Organization/MultiCPU/Code/test/top_test.v
// Project Name: MultiCPU
// Target Device:
// Tool versions:
// Description:
//
// Verilog Test Fixture created by ISE for module: top
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
////////////////////////////////////////////////////////////////////////////////
module top_test;
// Inputs
reg clk;
reg clk_CPU;
reg rst;
// Outputs
wire [31:0] PC;
wire [31:0] Inst;
wire [31:0] Data_write;
wire [31:0] Data_read;
wire [31:0] Addr;
wire mem_w;
wire [4:0] state;
wire [2:0] RAMCtrl;
// Instantiate the Unit Under Test (UUT)
top uut (
.clk(clk),
.clk_CPU(clk_CPU),
.rst(rst),
.PC(PC),
.Inst(Inst),
.Data_write(Data_write),
.Data_read(Data_read),
.Addr(Addr),
.mem_w(mem_w),
.state(state),
.RAMCtrl(RAMCtrl)
);
initial begin
rst = 0;
clk = 0;
clk_CPU = 1;
fork
forever begin
#10 clk = ~clk;
clk_CPU = ~clk_CPU;
end
begin
#50;
rst = 1;
#50;
rst = 0;
end
join
end
endmodule