begin
+assert not (USE_RXCLOCK = c_YES and USE_200MHZOSCILLATOR = c_YES) report "RX Clock and 200 MHz oscillator not implemented" severity error;
+assert not (USE_120_MHZ = c_YES and USE_200MHZOSCILLATOR = c_YES) report "120 MHz with 200 MHz oscillator not implemented" severity error;
+
SYS_CLK_OUT <= clk_selected_half;
FULL_CLK_OUT <= clk_selected_full;
REF_CLK_OUT <= clk_selected_ref;
-- Make internal clock 200 MHz if required
---------------------------------------------------------------------------
gen_200 : if USE_120_MHZ = c_NO generate
- THE_INT_PLL : entity work.pll_in240_out200
- port map(
- CLK => INT_CLK_IN,
- CLKOP => open, --200
- CLKOS => clk_int_full, --same as OP, but for DCS
- CLKOK => clk_int_half, --100
- LOCK => pll_int_lock
- );
-
+ gen_osc240 : if USE_200MHZOSCILLATOR = c_NO generate
+ THE_INT_PLL : entity work.pll_in240_out200
+ port map(
+ CLK => INT_CLK_IN,
+ CLKOP => open, --200
+ CLKOS => clk_int_full, --same as OP, but for DCS
+ CLKOK => clk_int_half, --100
+ LOCK => pll_int_lock
+ );
+ end generate;
+ gen_osc200 : if USE_200MHZOSCILLATOR = c_YES generate
+ THE_INT_PLL : entity work.pll_in200_out200
+ port map(
+ CLK => INT_CLK_IN,
+ CLKOP => open, --200
+ CLKOS => clk_int_full, --same as OP, but for DCS
+ CLKOK => clk_int_half, --100
+ LOCK => pll_int_lock
+ );
+ end generate;
+
gen_ext_pll : if USE_EXTERNAL_CLOCK = c_YES generate
THE_EXT_PLL : entity work.pll_in200_out100
port map(
--Runs with 120 MHz instead of 100 MHz
constant USE_120_MHZ : integer := c_NO;
+ constant USE_200MHZOSCILLATOR : integer := c_NO;
constant USE_EXTERNAL_CLOCK : integer := c_YES; --'no' not implemented.
constant CLOCK_FAST_SELECT : integer := c_YES; --fast clock select (135us) or slow (280ms)?
constant MONITOR_INPUT_NUM : integer := 32;
- constant INCLUDE_TDC : integer range c_NO to c_YES := c_NO;
- constant TDC_CHANNEL_NUMBER : integer := 5;
- constant DOUBLE_EDGE_TYPE : integer range 0 to 3 := 0; --double edge type: 0, 1, 2, 3
+ constant INCLUDE_TDC : integer range c_NO to c_YES := c_YES;
+ constant TDC_CHANNEL_NUMBER : integer := 9;
+ constant DOUBLE_EDGE_TYPE : integer range 0 to 3 := 3; --double edge type: 0, 1, 2, 3
-- 0: single edge only,
-- 1: same channel,
-- 2: alternating channels,
t(52 downto 52) := std_logic_vector(to_unsigned(USE_120_MHZ,1));
t(53 downto 53) := std_logic_vector(to_unsigned(USE_RXCLOCK,1));
t(54 downto 54) := std_logic_vector(to_unsigned(USE_EXTERNAL_CLOCK,1));
+ t(55 downto 55) := std_logic_vector(to_unsigned(USE_200MHZOSCILLATOR,1));
return t;
end function;
cts_addon_triggers_in(17 downto 2) <= INP(79 downto 64);
buscts_tx.nack <= '0';
buscts_tx.ack <= '0';
+
---------------------------------------------------------------------------
-- TDC
---------------------------------------------------------------------------