From 5b6e9410126b5696ccdbffb07b35ab66b80c94bc Mon Sep 17 00:00:00 2001 From: Michael Boehmer Date: Sun, 20 Mar 2022 10:30:12 +0100 Subject: [PATCH] CTS with 3ch TDC --- backplanemaster/par.p2t | 2 +- cts/config_simple.vhd | 4 ++-- cts/par.p2t | 2 +- cts/trb3sc_cts.vhd | 9 ++++++--- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/backplanemaster/par.p2t b/backplanemaster/par.p2t index 569fcb2..3a11e9f 100644 --- a/backplanemaster/par.p2t +++ b/backplanemaster/par.p2t @@ -1,7 +1,7 @@ -w -l 5 -s 12 --t 33 # seed setting here! 32 +-t 32 # seed setting here! 32 -c 1 -e 2 -i 15 diff --git a/cts/config_simple.vhd b/cts/config_simple.vhd index e258855..27ea225 100644 --- a/cts/config_simple.vhd +++ b/cts/config_simple.vhd @@ -48,8 +48,8 @@ package config is -- TDC stuff constant NUM_TDC_MODULES : integer range 1 to 4 := 1; -- number of tdc modules to implement - constant NUM_TDC_CHANNELS : integer range 1 to 65 := 5; -- number of tdc channels per module - constant NUM_TDC_CHANNELS_POWER2 : integer range 0 to 6 := 4; --the nearest power of two, for convenience reasons + constant NUM_TDC_CHANNELS : integer range 1 to 65 := 3; -- number of tdc channels per module + constant NUM_TDC_CHANNELS_POWER2 : integer range 0 to 6 := 2; --the nearest power of two, for convenience reasons constant DOUBLE_EDGE_TYPE : integer range 0 to 3 := 0; --double edge type: 0, 1, 2, 3 -- 0: single edge only, -- 1: same channel, diff --git a/cts/par.p2t b/cts/par.p2t index 51f613b..32f0380 100644 --- a/cts/par.p2t +++ b/cts/par.p2t @@ -1,7 +1,7 @@ -w -l 5 -s 10 --t 3 # seed setting here! 3 4 13 17 37 51 +-t 13 # seed setting here! 3 4 13 17 37 51 -c 0 -e 0 -i 6 diff --git a/cts/trb3sc_cts.vhd b/cts/trb3sc_cts.vhd index 1044954..6019db4 100644 --- a/cts/trb3sc_cts.vhd +++ b/cts/trb3sc_cts.vhd @@ -360,7 +360,7 @@ gen_PCSB : if USE_BACKPLANE = c_NO and USE_ADDON = c_NO generate ) port map( -- Clocks and reset - CLK_REF_FULL => clk_full_osc, -- CLK_SUPPL_PCLK + CLK_REF_FULL => clk_full_osc, SYSCLK => clk_sys, RESET => reset_i, -- check -- Media Interface TX/RX @@ -392,7 +392,7 @@ gen_PCSB : if USE_BACKPLANE = c_NO and USE_ADDON = c_NO generate QUAD_RST_IN => '0', -- check GLOBAL_RESET_OUT => open, SLAVE_ACTIVE_OUT => open, - SLAVE_ACTIVE_IN => slave_active_fake, --'1', + SLAVE_ACTIVE_IN => slave_active_fake, TX_PLL_LOL_IN => tx_pll_lol_all_i, TX_PLL_LOL_OUT => tx_pll_lol_qd_b_i, TX_CLK_AVAIL_OUT => tx_clk_avail_i, @@ -1082,7 +1082,10 @@ end generate; -- For single edge measurements gen_single : if DOUBLE_EDGE_TYPE = 0 or DOUBLE_EDGE_TYPE = 1 or DOUBLE_EDGE_TYPE = 3 generate - hit_in_i(NUM_TDC_CHANNELS-1 downto 1) <= INP(NUM_TDC_CHANNELS-2 downto 0); +-- hit_in_i(NUM_TDC_CHANNELS-1 downto 1) <= INP(NUM_TDC_CHANNELS-2 downto 0); +-- hit_in_i(NUM_TDC_CHANNELS-1 downto 3) <= INP(NUM_TDC_CHANNELS-2 downto 2); + hit_in_i(2) <= tx_dlm_i; + hit_in_i(1) <= rx_dlm_i; end generate; end architecture; -- 2.43.0