forked from PrayagS/MIPS_16bit
-
Notifications
You must be signed in to change notification settings - Fork 1
/
data_dependency_block_tb.v
88 lines (71 loc) · 1.58 KB
/
data_dependency_block_tb.v
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
78
79
80
81
82
83
84
85
86
87
`timescale 1ns / 1ps
////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 08:49:26 10/04/2019
// Design Name: data_dependency_block
// Module Name: /media/DATA/Xilinx_Projects/MIPS_16bit/data_dependency_block_tb.v
// Project Name: MIPS_16bit
// Target Device:
// Tool versions:
// Description:
//
// Verilog Test Fixture created by ISE for module: data_dependency_block
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
////////////////////////////////////////////////////////////////////////////////
module data_dependency_block_tb;
// Inputs
reg [31:0] ins;
reg clk;
reg reset;
// Outputs
wire [15:0] imm;
wire [5:0] op_dec;
wire [4:0] RW_dm;
wire [1:0] mux_sel_A;
wire [1:0] mux_sel_B;
wire imm_sel;
wire mem_en_ex;
wire mem_rw_ex;
wire mem_mux_sel_dm;
// Instantiate the Unit Under Test (UUT)
data_dependency_block uut (
.imm(imm),
.op_dec(op_dec),
.RW_dm(RW_dm),
.mux_sel_A(mux_sel_A),
.mux_sel_B(mux_sel_B),
.imm_sel(imm_sel),
.mem_en_ex(mem_en_ex),
.mem_rw_ex(mem_rw_ex),
.mem_mux_sel_dm(mem_mux_sel_dm),
.ins(ins),
.clk(clk),
.reset(reset)
);
initial begin
// Initialize Inputs
clk = 0;
reset = 1;
#2;
reset = 0;
#6;
reset = 1;
#2;
ins = 32'b00000000001000100001100000000000;
#10;
ins = 32'b01010000100000010000000000000000;
#20;
ins = 32'b00010000101000010010000000000000;
#10;
ins = 32'b00110100110000010000000000000101;
end
always #5 clk = ~clk;
endmodule