From: Jan Michel Date: Fri, 20 Dec 2024 10:02:50 +0000 (+0100) Subject: edge detect for fpga reboot X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=8445af505f6f58cf4bf0b2ddb262cd92ca989d23;p=trbnet.git edge detect for fpga reboot --- diff --git a/special/fpga_reboot.vhd b/special/fpga_reboot.vhd index 9f745a3..69814e4 100644 --- a/special/fpga_reboot.vhd +++ b/special/fpga_reboot.vhd @@ -21,6 +21,8 @@ architecture fpga_reboot_arch of fpga_reboot is signal restart_fpga_counter : unsigned(11 downto 0) := x"000"; signal last_reset : std_logic := '0'; signal last_delayed_restart_fpga : std_logic; + signal last_DO_REBOOT : std_logic; + begin PROC_REBOOT : process @@ -36,9 +38,10 @@ PROC_REBOOT : process -- restart_fpga_counter <= x"000"; -- end if; -- else + last_DO_REBOOT <= DO_REBOOT; delayed_restart_fpga <= '0'; PREPARE_FOR_RELOAD <= '0'; - if DO_REBOOT = '1' or (RESET = '0' and last_reset = '1' and REBOOT_ON_RESET = '1') then + if (DO_REBOOT = '1' and last_DO_REBOOT = '0') or (RESET = '0' and last_reset = '1' and REBOOT_ON_RESET = '1') then restart_fpga_counter <= x"001"; elsif restart_fpga_counter /= x"000" then restart_fpga_counter <= restart_fpga_counter + 1;