From: Jan Michel Date: Thu, 20 Jul 2023 13:42:59 +0000 (+0200) Subject: add signal in advance of reboot to e.g. switch of Serdes / SFP X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=12ba035861e1e05c3b6c072124d2dd0307fa38fe;p=trbnet.git add signal in advance of reboot to e.g. switch of Serdes / SFP --- diff --git a/special/fpga_reboot.vhd b/special/fpga_reboot.vhd index a1e22ec..ffa7d79 100644 --- a/special/fpga_reboot.vhd +++ b/special/fpga_reboot.vhd @@ -9,6 +9,7 @@ entity fpga_reboot is RESET : in std_logic; DO_REBOOT : in std_logic; REBOOT_ON_RESET : in std_logic := '0'; + PREPARE_FOR_RELOAD : out std_logic; PROGRAMN : out std_logic := '1' ); end entity; @@ -29,10 +30,14 @@ PROC_REBOOT : process restart_fpga_counter <= x"000"; else delayed_restart_fpga <= '0'; + PREPARE_FOR_RELOAD <= '0'; if DO_REBOOT = '1' then restart_fpga_counter <= x"001"; elsif restart_fpga_counter /= x"000" then restart_fpga_counter <= restart_fpga_counter + 1; + if restart_fpga_counter >= x"800" then + PREPARE_FOR_RELOAD <= '1'; + end if; if restart_fpga_counter >= x"F00" then delayed_restart_fpga <= '1'; end if; diff --git a/special/spi_flash_and_fpga_reload_record.vhd b/special/spi_flash_and_fpga_reload_record.vhd index 6cc586a..d66527e 100644 --- a/special/spi_flash_and_fpga_reload_record.vhd +++ b/special/spi_flash_and_fpga_reload_record.vhd @@ -18,8 +18,9 @@ entity spi_flash_and_fpga_reload_record is DO_REBOOT_IN : in std_logic; REBOOT_ON_RESET : in std_logic := '0'; - PROGRAMN : out std_logic; - + PROGRAMN : out std_logic; + PREPARE_FOR_RELOAD : out std_logic; + SPI_CS_OUT : out std_logic; SPI_SCK_OUT : out std_logic; SPI_SDO_OUT : out std_logic; @@ -162,6 +163,7 @@ THE_FPGA_REBOOT : entity work.fpga_reboot RESET => RESET_IN, DO_REBOOT => DO_REBOOT_IN, REBOOT_ON_RESET => REBOOT_ON_RESET, + PREPARE_FOR_RELOAD => PREPARE_FOR_RELOAD, PROGRAMN => PROGRAMN );