Line | |
---|
1 | -- TestBench Template |
---|
2 | |
---|
3 | LIBRARY ieee; |
---|
4 | USE ieee.std_logic_1164.ALL; |
---|
5 | USE ieee.numeric_std.ALL; |
---|
6 | |
---|
7 | ENTITY testbench IS |
---|
8 | END testbench; |
---|
9 | |
---|
10 | ARCHITECTURE behavior OF testbench IS |
---|
11 | |
---|
12 | -- Component Declaration |
---|
13 | COMPONENT <component name> |
---|
14 | PORT( |
---|
15 | <port1> : IN std_logic; |
---|
16 | <port2> : IN std_logic_vector(3 downto 0); |
---|
17 | <port3> : OUT std_logic_vector(3 downto 0) |
---|
18 | ); |
---|
19 | END COMPONENT; |
---|
20 | |
---|
21 | SIGNAL <signal1> : std_logic; |
---|
22 | SIGNAL <signal2> : std_logic_vector(3 downto 0); |
---|
23 | |
---|
24 | |
---|
25 | BEGIN |
---|
26 | |
---|
27 | -- Component Instantiation |
---|
28 | uut: <component name> PORT MAP( |
---|
29 | <port1> => <signal1>, |
---|
30 | <port3> => <signal2> |
---|
31 | ); |
---|
32 | |
---|
33 | |
---|
34 | -- Test Bench Statements |
---|
35 | tb : PROCESS |
---|
36 | BEGIN |
---|
37 | |
---|
38 | wait for 100 ns; -- wait until global set/reset completes |
---|
39 | |
---|
40 | -- Add user defined stimulus here |
---|
41 | |
---|
42 | wait; -- will wait forever |
---|
43 | END PROCESS tb; |
---|
44 | -- End Test Bench |
---|
45 | |
---|
46 | END; |
---|
Note: See
TracBrowser
for help on using the repository browser.