From: Adrian Weber Date: Tue, 16 Mar 2021 11:50:17 +0000 (+0100) Subject: fix of crashung readout in case of triggers not together with in the DLM (CALIBRATION... X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=f2f0cb255334c8821bd80914cc9dc9917447892f;p=cri.git fix of crashung readout in case of triggers not together with in the DLM (CALIBRATION; seen while no DLM transmitted.). Now in case of 0xD trigger, the last DLM message is written to CTS and the readout is finished. --- diff --git a/src/DLM_CTS_generator.vhd b/src/DLM_CTS_generator.vhd index 8f7b946..36bfbf9 100644 --- a/src/DLM_CTS_generator.vhd +++ b/src/DLM_CTS_generator.vhd @@ -29,6 +29,7 @@ entity DLM_CTS_generator is --data output for read-out TRIGGER_IN : in std_logic; + TRIGGER_TYPE : in std_logic_vector( 3 downto 0) := x"1"; -- Data connection to Streamer DATA_OUT : out std_logic_vector(31 downto 0); @@ -162,10 +163,14 @@ begin case rdostate is when RDO_IDLE => if TRIGGER_IN = '1' and config_rdo_disable_i = '0' then - if dlm_ready = '0' then - rdostate <= RDO_WAIT; - else + if TRIGGER_TYPE = x"D" then -- calibration trigger. Trigger is not initialised by DLM rdostate <= RDO_WRITE; + else + if dlm_ready = '0' then + rdostate <= RDO_WAIT; + else + rdostate <= RDO_WRITE; + end if; end if; end if;