Commit ac97acd0 authored by David Cussans's avatar David Cussans

Corrected bug in shutter code.

The triggers would have been permanently disabled if the shutter was disabled.

After fix triggers are no longer disabled if the shutter is disabled.
parent 933c60e5
......@@ -33,7 +33,7 @@ use IEEE.math_real.all;
--! At time T1 after Emin signal shutter_o goes higher
--! At time T2 after Emin veto_o goes low
--! At time T3 after Emin shutter_o goes low and veto_o goes high.
--
--! ( If sequence is not enabled, then veto_o is always low. )
--! \n\n<b>Last changes:</b>\n
--!
......@@ -187,9 +187,10 @@ BEGIN
END IF;
END PROCESS p_comparators;
-- sequence: Emin --> Shutter-on --> Veto-off --> (shutter-off,veto-on)
-- NB. Need to ensure T1 < T2 < T3
s_veto <= '0' when (s_counter_lt_t3 ='1') and (s_counter_lt_t2 = '0') else '1';
--! sequence: Emin --> Shutter-on --> Veto-off --> (shutter-off,veto-on)
--! NB. Need to ensure T1 < T2 < T3
--! If enable_sequence_i=0 then veto is always low.
s_veto <= '0' when ((s_counter_lt_t3 ='1') and (s_counter_lt_t2 = '0')) or (enable_sequence_i='0') else '1';
s_shutter <= '1' when (s_counter_lt_t3 ='1') and (s_counter_lt_t1 = '0') else '0';
--! Process to set output signals
......
......@@ -62,7 +62,7 @@ ENTITY T0_Shutter_Iface IS
--! Output Signals
shutter_o: OUT STD_LOGIC; --! Shutter signal.
shutter_veto_o: OUT STD_LOGIC; --! Goes high when shutter vetoes triggers
shutter_veto_o: OUT STD_LOGIC; --! Goes high when shutter vetoes triggers. NB. Should be *low* when shutters are disabled.
run_active_o: out std_logic; --! goes high when run is active.
T0_o: out std_logic --! T0 synchronization pulse. Pulses on leading edge of run_active_o
);
......
......@@ -25,7 +25,7 @@ use work.ipbus.ALL;
entity top is
generic(
constant FW_VERSION : unsigned(31 downto 0):= X"1e000013"; -- Firmware revision. Remember to change this as needed.
constant FW_VERSION : unsigned(31 downto 0):= X"1e000014"; -- Firmware revision. Remember to change this as needed.
g_NUM_DUTS : positive := 4; -- <- was 3
g_NUM_TRIG_INPUTS :positive := 6;-- <- was 4
g_NUM_EDGE_INPUTS :positive := 6;-- <-- was 4
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment