source: firmware/FAD/FACT_FAD_TB_lib/hdl/timer_tb_struct.vhd@ 18340

Last change on this file since 18340 was 11755, checked in by neise, 13 years ago
reinit of this svn repos .... it was all too messy deleted the old folders and restarted with FACT_FAD_lib only. (well and the testbenches)
File size: 2.8 KB
Line 
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
11ENTITY timer_tb IS
12 GENERIC(
13 TIMER_WIDTH : integer := 32;
14 PRESCALER : integer := 2500
15 );
16-- Declarations
17
18END 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--
29LIBRARY ieee;
30USE ieee.std_logic_1164.ALL;
31USE ieee.std_logic_arith.ALL;
32USE ieee.std_logic_unsigned.all;
33
34LIBRARY FACT_FAD_lib;
35LIBRARY FACT_FAD_TB_lib;
36
37ARCHITECTURE 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
83BEGIN
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
109END struct;
Note: See TracBrowser for help on using the repository browser.