source: firmware/FAD/FACT_FAD_TB_lib/hdl/REFCLK_counter_tester_beha.vhd.bak@ 17997

Last change on this file since 17997 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: 1.4 KB
Line 
1--
2-- VHDL Architecture FACT_FAD_TB_lib.REFCLK_counter_tester.beha
3--
4-- Created:
5-- by - dneise.UNKNOWN (E5B-LABOR6)
6-- at - 08:52:02 04.02.2011
7--
8-- using Mentor Graphics HDL Designer(TM) 2009.2 (Build 10)
9--
10LIBRARY ieee;
11USE ieee.std_logic_1164.ALL;
12USE IEEE.NUMERIC_STD.ALL;
13LIBRARY FACT_FAD_lib;
14USE FACT_FAD_lib.fad_definitions.ALL;
15
16ENTITY REFCLK_counter_tester IS
17 PORT(
18 alarm_refclk_too_high : IN std_logic;
19 alarm_refclk_too_low : IN std_logic;
20 counter_result : IN std_logic_vector (11 DOWNTO 0);
21 clk : out std_logic;
22 refclk_in : OUT std_logic
23 );
24
25-- Declarations
26
27END REFCLK_counter_tester ;
28
29--
30ARCHITECTURE beha OF REFCLK_counter_tester IS
31constant REFCLK_PERIOD : time := 1012ns;
32constant clock_period : time := 20ns;
33
34signal refclk_i : std_logic := '0';
35signal refclk_en : std_logic;
36
37BEGIN
38 refclk_in <= refclk_i and refclk_en;
39
40 clk_en_proc: process
41 begin
42 refclk_en <= '1';
43 wait for 4 ms;
44 refclk_en <= '0';
45 wait;
46 end process clk_en_proc;
47
48 clock_gen_proc: process
49 begin
50 clk <= '0';
51 wait for clock_period / 2;
52 clk <= '1';
53 wait for clock_period / 2;
54 end process clock_gen_proc;
55
56
57 ref_clock_gen_proc: process
58 begin
59 refclk_i <= '0';
60 wait for REFCLK_PERIOD / 2;
61 refclk_i <= '1';
62 wait for REFCLK_PERIOD / 2;
63 end process ref_clock_gen_proc;
64
65END ARCHITECTURE beha;
66
Note: See TracBrowser for help on using the repository browser.