-
Notifications
You must be signed in to change notification settings - Fork 11
/
Verilog testbench
50 lines (45 loc) · 1004 Bytes
/
Verilog testbench
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
`timescale 1ns / 1ps
//////////////////////////////////////////////////////////////////////////////////
// Company:
// Engineer:
//
// Create Date: 16.07.2020 23:44:40
// Design Name:
// Module Name: Traffic_Light_Controller_TB
// Project Name:
// Target Devices:
// Tool Versions:
// Description:
//
// Dependencies:
//
// Revision:
// Revision 0.01 - File Created
// Additional Comments:
//
//////////////////////////////////////////////////////////////////////////////////
module Traffic_Light_Controller_TB;
reg clk,rst;
wire [2:0]light_M1;
wire [2:0]light_S;
wire [2:0]light_MT;
wire [2:0]light_M2;
Traffic_Light_Controller dut(.clk(clk) , .rst(rst) , .light_M1(light_M1) , .light_S(light_S) ,.light_M2(light_M2),.light_MT(light_MT) );
initial
begin
clk=1'b0;
forever #(1000000000/2) clk=~clk;
end
// initial
// $stop;//to add ps
initial
begin
rst=0;
#1000000000;
rst=1;
#1000000000;
rst=0;
#(1000000000*200);
$finish;
end
endmodule