From 6b3a53ee01cadb720ab6e61dd7599cd151828866 Mon Sep 17 00:00:00 2001 From: Jan Michel Date: Tue, 27 Aug 2024 14:44:30 +0200 Subject: [PATCH] extend documentation and update default settings --- code/HitBuffer.vhd | 2 +- code/TDC_FF.vhd | 2 +- dataformat.md | 17 ++++++++++++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/code/HitBuffer.vhd b/code/HitBuffer.vhd index 8984abf..836d7b6 100644 --- a/code/HitBuffer.vhd +++ b/code/HitBuffer.vhd @@ -157,7 +157,7 @@ THE_HIT_BUF : entity work.fifo_36x32 WrEn => hit_buffer_write, RdEn => hit_buffer_read, Reset => hit_buffer_reset, - AmFullThresh => "01000", + AmFullThresh => "01010", Q => hit_buffer_dout, WCNT => hit_buffer_level, Empty => hit_buffer_empty, diff --git a/code/TDC_FF.vhd b/code/TDC_FF.vhd index 8171c74..6817745 100644 --- a/code/TDC_FF.vhd +++ b/code/TDC_FF.vhd @@ -52,7 +52,7 @@ type status_t is array(0 to 31) of std_logic_vector(95 downto 0); signal hitbuffer_status : status_t; signal CONF_enable : std_logic_vector(31 downto 0) := (others => '1'); -signal CONF_configure : std_logic_vector(31 downto 0) := x"64139301"; +signal CONF_configure : std_logic_vector(31 downto 0) := x"01139301"; alias CONF_externalcalibration : std_logic is CONF_configure(0); alias CONF_SPIKE : std_logic_vector(3 downto 0) is CONF_configure(11 downto 8); alias CONF_window : std_logic_vector(8 downto 0) is CONF_configure(20 downto 12); diff --git a/dataformat.md b/dataformat.md index 875c8b3..27fff51 100644 --- a/dataformat.md +++ b/dataformat.md @@ -13,14 +13,29 @@ General Remarks * Data is not output in ordered fashion, hits are sent mixed between channels, not ordered by time. * There might be up to 10 hits per channel + +TDC Calibration +-- * TDC calibration is not necessary by default -* TDC calibration is implemented in two options (usual 0xd trigger type): +* TDC calibration is implemented in two options (usual 0xd trigger type, and 0xa trigger type for individual calibration): * Internal calibration with a 50 ns long pulse * Calibration pulse using the analog front-end chips * about 110 ns long, depending on front-end settings * Might give several hits especially with low thresholds +Data Handling +-- +* No single edges are recorded +* A rising edge is saved and stored together with the falling edge as soon as it arrives + * A spike rejection discards signals below a threshold. Can be configured in steps of 6.4 ns, with an inaccuracy of 6.4 ns (typically set to 19 ns) + * A long signal suppression discards signals with a ToT larger than some threshold (500 ns typical) +* A 10 hit hit buffer stores values + * Words are removed from the hit buffer if their rising edge is older than the trigger window size (2 us typical) + * Words are removed if the buffer gets full +* Readout takes place a configurable time after the reference time arrived (with delay in CTS: few ten nanoseconds) + + Data Format (v0) -- * All time information is encoded in units of 0.4 ns. -- 2.43.0