22--> 1) The Si chip - takes 40MHz from Hub and produces clean 40MHz inputs to the FPGA and the TI chip
23--> 2) The TI chip - takes 40MHz from the Si chip, and produces the 160MHz and 240MHz MGT reference clocks. If the Si chip is not working,
24--> then this device will also fail to produce the correct frequencies
25--> 3) The ethernet PHY chip has a 25MHz oscilator and it produces a 125MHz signal to the FPGA when working properly. If this chip is not working properly
26--> it has been observed to produce 25MHz or even a random frequence like 116MHz. However, since the results of this checker are intended to
27--> be read via IPBus, we have to assume that the 125MHz is working correctly.
28--> Thus there is no explicite 125MHz check
29
30--> The circuit below resets all three counters at the end of each measurement sequence.
31--> The length of the sequence is determined by the "reset_count" generic
32--> At the end of each sequence the values of clk_40_count and clk_160_count are checked against a constant value
33--> If the value matches within a range, then the "good" bit is set
34--> If the value does not match within the range, then the "good" bit is cleared.
35
36
37
38
39library IEEE;
40use IEEE.STD_LOGIC_1164.ALL;
41use IEEE.STD_LOGIC_UNSIGNED.ALL;
42
43-- Uncomment the following library declaration if using
44-- arithmetic functions with Signed or Unsigned values
45--use IEEE.NUMERIC_STD.ALL;
46
47-- Uncomment the following library declaration if instantiating