+/EE316

digital logic

git clone https://git.julia.blue/+/EE316

Joseph RyanUpload whole semester91885ad

master
691 B63 linesraw
1`timescale 1ns / 1ps
2
3module tb_call_system;
4
5reg clk;
6reg call_button;
7reg cancel_button;
8
9wire light_state;
10
11call_system_dataflow u1 (
12.clk(clk),
13.call_button(call_button),
14.cancel_button(cancel_button),
15.light_state(light_state)
16    );
17    
18initial
19begin
20
21clk = 0;
22call_button = 0;
23cancel_button = 0;
24#10;
25
26call_button = 1;
27cancel_button = 0;
28#10;
29
30call_button = 0;
31cancel_button = 1;
32#10;
33
34call_button = 1;
35cancel_button = 1;
36#10;
37
38call_button = 0;
39cancel_button = 0;
40#10;
41
42call_button = 1;
43cancel_button = 0;
44#10;
45
46cancel_button = 1;
47#20;
48
49cancel_button = 0;
50#20;
51
52call_button = 0;
53cancel_button = 1;
54#20;
55
56call_button = 0;
57cancel_button = 0;
58
59end
60
61always #5 clk = ~clk;
62    
63endmodule