forked from zhzdeng/Single-cycle-CPU
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTextFile.v
More file actions
63 lines (56 loc) · 1.45 KB
/
TextFile.v
File metadata and controls
63 lines (56 loc) · 1.45 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
`timescale 1ns / 1ps
////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 13:32:09 04/19/2016
// Design Name: SingleCycleCPU
// Module Name: Y:/Desktop/Single-cycle-CPU/TextFile.v
// Project Name: CPU
// Target Device:
// Tool versions:
// Description:
//
// Verilog Test Fixture created by ISE for module: SingleCycleCPU
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
////////////////////////////////////////////////////////////////////////////////
module TextFile;
// Instantiate the Unit Under Test (UUT)
SingleCycleCPU uut (clk, Extsel, PCWre, InsMemRW, RegOut,
RegWre, ALUSrcB, ALUM2Reg, PCSrc, DataMemRW, ALUOp, _instruction,
_PcOut, _PcIn, _zero, _extendOut, _thirdRg, _RgData1, _RgData2,
_WriteData, _ALUResult, _DataOut, _PcIndect);
reg clk;
wire Extsel, PCWre, InsMemRW, RegOut,
RegWre, ALUSrcB, ALUM2Reg, PCSrc, DataMemRW;
wire [2:0] ALUOp;
// 中间数据
wire [31:0]_instruction;
wire [31:0]_PcOut;
wire [31:0]_PcIn;
wire _zero;
wire [31:0]_extendOut;
wire [4:0]_thirdRg;
wire [31:0]_RgData1;
wire [31:0]_RgData2;
wire [31:0]_WriteData;
wire [31:0]_ALUResult;
wire [31:0]_DataOut;
wire [31:0]_PcIndect;
initial begin
clk = 1;
// Initialize Inputs
#20
clk = 1'b1;
forever #20 clk = !clk;
// Wait 100 ns for global reset to finish
#600 $stop;
// Add stimulus here
end
endmodule