+
+ clock_monitor: process (pll_clkout, gpio_clk, clkmon_dly1, clkmon_wdg, clkmon_fail_next)
+ begin
+ if pll_clkout'event and pll_clkout = '1' then
+ clkmon_dly1 <= gpio_clk;
+ clkmon_dly2 <= clkmon_dly1;
+ if clkmon_dly1 = '0' and clkmon_dly2 = '1' then
+ clkmon_wdg <= 6;
+ clkmon_fail_next <= '0';
+ elsif clkmon_wdg > 0 then
+ clkmon_wdg <= clkmon_wdg - 1;
+ clkmon_fail_next <= '0';
+ else
+ clkmon_wdg <= 0;
+ clkmon_fail_next <= '1';
+ end if;
+ clkmon_fail <= clkmon_fail_next;
+ end if;
+ end process;
+
+ async_rst: process (gpio_clk, reset_async, reset_sync)
+ begin
+ if reset_async = '1' then
+ failsafe <= '1';
+ elsif gpio_clk'event and gpio_clk = '1' then
+ failsafe <= next_failsafe or reset_sync;
+ end if;
+ end process;
+
+ sync_rst: process (gpio_clk, reset_async)
+ begin
+ if gpio_clk'event and gpio_clk = '1' then
+ reset_sync <= reset_async;
+ end if;
+ end process;
+