1 | --------------------------------------------------------------------------------
|
2 | -- Company:
|
3 | -- Engineer:
|
4 | --
|
5 | -- Create Date: 09:25:42 12/26/2009
|
6 | -- Design Name:
|
7 | -- Module Name: D:/VHDL TUTORIAL/SIMULATOR_PULS/Modeltest.vhd
|
8 | -- Project Name: SIMULATOR_PULS
|
9 | -- Target Device:
|
10 | -- Tool versions:
|
11 | -- Description:
|
12 | --
|
13 | -- VHDL Test Bench Created by ISE for module: FLASH_CONTROLLER
|
14 | --
|
15 | -- Dependencies:
|
16 | --
|
17 | -- Revision:
|
18 | -- Revision 0.01 - File Created
|
19 | -- Additional Comments:
|
20 | --
|
21 | -- Notes:
|
22 | -- This testbench has been automatically generated using types std_logic and
|
23 | -- std_logic_vector for the ports of the unit under test. Xilinx recommends
|
24 | -- that these types always be used for the top-level I/O of a design in order
|
25 | -- to guarantee that the testbench will bind correctly to the post-implementation
|
26 | -- simulation model.
|
27 | --------------------------------------------------------------------------------
|
28 | LIBRARY ieee;
|
29 | USE ieee.std_logic_1164.ALL;
|
30 | USE ieee.std_logic_unsigned.all;
|
31 | USE ieee.numeric_std.ALL;
|
32 |
|
33 | ENTITY Modeltest IS
|
34 | END Modeltest;
|
35 |
|
36 | ARCHITECTURE behavior OF Modeltest IS
|
37 |
|
38 | -- Component Declaration for the Unit Under Test (UUT)
|
39 |
|
40 | COMPONENT FLASH_CONTROLLER
|
41 | PORT(
|
42 | FLASH_RESET : IN std_logic;
|
43 | FLASH_CLK : IN std_logic;
|
44 | FLASH_ADD : OUT std_logic_vector(23 downto 0);
|
45 | FLASH_RP : OUT std_logic;
|
46 | FLASH_CE : OUT std_logic;
|
47 | FLASH_OE : OUT std_logic;
|
48 | FLASH_DATA : IN std_logic_vector(7 downto 0);
|
49 | DATAOUT : OUT std_logic_vector(11 downto 0)
|
50 | );
|
51 | END COMPONENT;
|
52 |
|
53 |
|
54 | --Inputs
|
55 | signal FLASH_RESET : std_logic := '0';
|
56 | signal FLASH_CLK : std_logic := '0';
|
57 | signal FLASH_DATA : std_logic_vector(7 downto 0) := (others => '0');
|
58 |
|
59 | --Outputs
|
60 | signal FLASH_ADD : std_logic_vector(23 downto 0);
|
61 | signal FLASH_RP : std_logic;
|
62 | signal FLASH_CE : std_logic;
|
63 | signal FLASH_OE : std_logic;
|
64 | signal DATAOUT : std_logic_vector(11 downto 0);
|
65 |
|
66 | -- Clock period definitions
|
67 | constant FLASH_CLK_period : time := 100 ns;
|
68 |
|
69 | BEGIN
|
70 |
|
71 | -- Instantiate the Unit Under Test (UUT)
|
72 | uut: FLASH_CONTROLLER PORT MAP (
|
73 | FLASH_RESET => FLASH_RESET,
|
74 | FLASH_CLK => FLASH_CLK,
|
75 | FLASH_ADD => FLASH_ADD,
|
76 | FLASH_RP => FLASH_RP,
|
77 | FLASH_CE => FLASH_CE,
|
78 | FLASH_OE => FLASH_OE,
|
79 | FLASH_DATA => FLASH_DATA,
|
80 | DATAOUT => DATAOUT
|
81 | );
|
82 |
|
83 | -- Clock process definitions
|
84 | FLASH_CLK_process :process
|
85 | begin
|
86 | FLASH_CLK <= '0';
|
87 | wait for FLASH_CLK_period/2;
|
88 | FLASH_CLK <= '1';
|
89 | wait for FLASH_CLK_period/2;
|
90 | end process;
|
91 |
|
92 |
|
93 | -- Stimulus process
|
94 | stim_proc: process
|
95 | begin
|
96 | FLASH_RESET <= '1';
|
97 | wait for 125 ns;
|
98 | FLASH_RESET <= '0';
|
99 |
|
100 |
|
101 | wait;
|
102 | end process;
|
103 |
|
104 | END;
|