1 | -- VHDL Entity FACT_FAD_TB_lib.timer_tb.symbol
|
---|
2 | --
|
---|
3 | -- Created:
|
---|
4 | -- by - dneise.UNKNOWN (E5B-LABOR6)
|
---|
5 | -- at - 12:25:01 23.02.2011
|
---|
6 | --
|
---|
7 | -- Generated by Mentor Graphics' HDL Designer(TM) 2009.2 (Build 10)
|
---|
8 | --
|
---|
9 |
|
---|
10 |
|
---|
11 | ENTITY timer_tb IS
|
---|
12 | GENERIC(
|
---|
13 | TIMER_WIDTH : integer := 32;
|
---|
14 | PRESCALER : integer := 2500
|
---|
15 | );
|
---|
16 | -- Declarations
|
---|
17 |
|
---|
18 | END timer_tb ;
|
---|
19 |
|
---|
20 | --
|
---|
21 | -- VHDL Architecture FACT_FAD_TB_lib.timer_tb.struct
|
---|
22 | --
|
---|
23 | -- Created:
|
---|
24 | -- by - dneise.UNKNOWN (E5B-LABOR6)
|
---|
25 | -- at - 12:25:01 23.02.2011
|
---|
26 | --
|
---|
27 | -- Generated by Mentor Graphics' HDL Designer(TM) 2009.2 (Build 10)
|
---|
28 | --
|
---|
29 | LIBRARY ieee;
|
---|
30 | USE ieee.std_logic_1164.ALL;
|
---|
31 | USE ieee.std_logic_arith.ALL;
|
---|
32 | USE ieee.std_logic_unsigned.all;
|
---|
33 |
|
---|
34 | LIBRARY FACT_FAD_lib;
|
---|
35 | LIBRARY FACT_FAD_TB_lib;
|
---|
36 |
|
---|
37 | ARCHITECTURE struct OF timer_tb IS
|
---|
38 |
|
---|
39 | -- Architecture declarations
|
---|
40 |
|
---|
41 | -- Internal signal declarations
|
---|
42 | SIGNAL clk : std_logic;
|
---|
43 | SIGNAL enable_i : std_logic;
|
---|
44 | SIGNAL reset_synch_i : std_logic;
|
---|
45 | SIGNAL synch_i : std_logic;
|
---|
46 | SIGNAL synched_o : std_logic := '0';
|
---|
47 | SIGNAL time_o : std_logic_vector( TIMER_WIDTH-1 DOWNTO 0);
|
---|
48 |
|
---|
49 |
|
---|
50 | -- Component Declarations
|
---|
51 | COMPONENT timer
|
---|
52 | GENERIC (
|
---|
53 | TIMER_WIDTH : integer := 32;
|
---|
54 | PRESCALER : integer := 5000
|
---|
55 | );
|
---|
56 | PORT (
|
---|
57 | clk : IN std_logic;
|
---|
58 | enable_i : IN std_logic;
|
---|
59 | reset_synch_i : IN std_logic;
|
---|
60 | synch_i : IN std_logic;
|
---|
61 | synched_o : OUT std_logic := '0';
|
---|
62 | time_o : OUT std_logic_vector ( TIMER_WIDTH-1 DOWNTO 0)
|
---|
63 | );
|
---|
64 | END COMPONENT;
|
---|
65 | COMPONENT timer_tester
|
---|
66 | PORT (
|
---|
67 | synched_o : IN std_logic;
|
---|
68 | time_o : IN std_logic_vector ( 31 DOWNTO 0);
|
---|
69 | clk : OUT std_logic;
|
---|
70 | enable_i : OUT std_logic;
|
---|
71 | reset_synch_i : OUT std_logic;
|
---|
72 | synch_i : OUT std_logic
|
---|
73 | );
|
---|
74 | END COMPONENT;
|
---|
75 |
|
---|
76 | -- Optional embedded configurations
|
---|
77 | -- pragma synthesis_off
|
---|
78 | FOR ALL : timer USE ENTITY FACT_FAD_lib.timer;
|
---|
79 | FOR ALL : timer_tester USE ENTITY FACT_FAD_TB_lib.timer_tester;
|
---|
80 | -- pragma synthesis_on
|
---|
81 |
|
---|
82 |
|
---|
83 | BEGIN
|
---|
84 |
|
---|
85 | -- Instance port mappings.
|
---|
86 | U_0 : timer
|
---|
87 | GENERIC MAP (
|
---|
88 | TIMER_WIDTH => 32,
|
---|
89 | PRESCALER => 5000
|
---|
90 | )
|
---|
91 | PORT MAP (
|
---|
92 | clk => clk,
|
---|
93 | time_o => time_o,
|
---|
94 | synch_i => synch_i,
|
---|
95 | synched_o => synched_o,
|
---|
96 | reset_synch_i => reset_synch_i,
|
---|
97 | enable_i => enable_i
|
---|
98 | );
|
---|
99 | U_1 : timer_tester
|
---|
100 | PORT MAP (
|
---|
101 | synched_o => synched_o,
|
---|
102 | time_o => time_o,
|
---|
103 | enable_i => enable_i,
|
---|
104 | reset_synch_i => reset_synch_i,
|
---|
105 | clk => clk,
|
---|
106 | synch_i => synch_i
|
---|
107 | );
|
---|
108 |
|
---|
109 | END struct;
|
---|