-
Notifications
You must be signed in to change notification settings - Fork 2
/
brain_m_test.v
101 lines (89 loc) · 1.4 KB
/
brain_m_test.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
88
89
90
91
92
93
94
95
96
97
98
99
100
`timescale 1ns / 1ps
////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 20:40:44 12/21/2015
// Design Name: brain_m
// Module Name: /home/merterm/Desktop/brain_M/brain_m_test.v
// Project Name: brain_M
// Target Device:
// Tool versions:
// Description:
//
// Verilog Test Fixture created by ISE for module: brain_m
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
////////////////////////////////////////////////////////////////////////////////
module brain_m_test;
// Inputs
reg clk;
reg [6:0] dist;
reg mode;
reg start;
reg E;
// Outputs
wire color;
wire OE;
wire [4:0] shape;
// Instantiate the Unit Under Test (UUT)
brain_m uut (
.clk(clk),
.dist(dist),
.mode(mode),
.start(start),
.E(E),
.color(color),
.OE(OE),
.shape(shape)
);
initial begin
// Initialize Inputs
clk = 0;
dist = 0;
mode = 0;
start = 0;
E = 0;
// Wait 100 ns for global reset to finish
#100;
// Add stimulus here
start = 1;
dist = 12;
#2
dist = 11;
#2
dist = 10;
#2
dist = 9;
#2
dist = 8;
#2
dist = 7;
#2
dist = 6;
#2
dist = 5;
#2
dist = 4;
#2
dist = 3;
#2
dist = 2;
#10
start = 0;
#10
dist = 100;
mode = 1;
start = 1;
#10
mode = 0;
start = 0;
end
always
#5 clk = !clk;
endmodule