From 8445af505f6f58cf4bf0b2ddb262cd92ca989d23 Mon Sep 17 00:00:00 2001 From: Jan Michel Date: Fri, 20 Dec 2024 11:02:50 +0100 Subject: [PATCH] edge detect for fpga reboot --- special/fpga_reboot.vhd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; -- 2.43.0