]> jspc29.x-matter.uni-frankfurt.de Git - trbnet.git/commitdiff
add option to reboot-on-reset to reload handler
authorJan Michel <j.michel@gsi.de>
Tue, 28 Jun 2022 14:43:29 +0000 (16:43 +0200)
committerJan Michel <j.michel@gsi.de>
Tue, 28 Jun 2022 14:43:29 +0000 (16:43 +0200)
special/fpga_reboot.vhd
special/spi_flash_and_fpga_reload_record.vhd
trb_net_components.vhd

index 9be0432f6afea94ed1d33fd7bf601d46e36099e3..a1e22ec6bc3a4981304e31de2ac427497fa5b520 100644 (file)
@@ -8,6 +8,7 @@ entity fpga_reboot is
     CLK       : in std_logic;
     RESET     : in std_logic;
     DO_REBOOT : in std_logic;
+    REBOOT_ON_RESET : in std_logic := '0';
     PROGRAMN  : out std_logic := '1'
     );
 end entity;
@@ -24,7 +25,7 @@ PROC_REBOOT : process
   begin
     wait until rising_edge(CLK);
     if RESET = '1' then
-      delayed_restart_fpga   <= '0';
+      delayed_restart_fpga   <= REBOOT_ON_RESET;
       restart_fpga_counter   <= x"000";
     else
       delayed_restart_fpga     <= '0';
@@ -41,4 +42,4 @@ PROC_REBOOT : process
 
 PROGRAMN                 <= not delayed_restart_fpga;    
     
-end architecture;
\ No newline at end of file
+end architecture;
index 7243d4bc6dde49f2fabab258df6cd7784d6e7996..6cc586a508353e539c42d3aed9a42e020b9f27c3 100644 (file)
@@ -16,8 +16,9 @@ entity spi_flash_and_fpga_reload_record is
     BUS_TX               : out CTRLBUS_TX;
     BUS_RX               : in  CTRLBUS_RX; 
 
-    DO_REBOOT_IN   : in  std_logic;      
-    PROGRAMN       : out std_logic;
+    DO_REBOOT_IN    : in  std_logic;
+    REBOOT_ON_RESET : in std_logic := '0';
+    PROGRAMN        : out std_logic;
     
     SPI_CS_OUT     : out std_logic;
     SPI_SCK_OUT    : out std_logic;
@@ -155,11 +156,12 @@ THE_SPI_MEMORY: spi_databus_memory
 ---------------------------------------------------------------------------
 -- Reboot FPGA
 ---------------------------------------------------------------------------
-THE_FPGA_REBOOT : fpga_reboot
+THE_FPGA_REBOOT : entity work.fpga_reboot
   port map(
     CLK       => CLK_IN,
     RESET     => RESET_IN,
     DO_REBOOT => DO_REBOOT_IN,
+    REBOOT_ON_RESET => REBOOT_ON_RESET,
     PROGRAMN  => PROGRAMN
     );
 
index 3729cef3092aa5b4a40a6feb741669a1c39fdd1b..3fe4ecf3a01cdd6d6e38ad8cc494390d7f80dac2 100644 (file)
@@ -1348,6 +1348,7 @@ end component;
       CLK       : in  std_logic;\r
       RESET     : in  std_logic;\r
       DO_REBOOT : in  std_logic;\r
+      REBOOT_ON_RESET : in std_logic := '0';\r
       PROGRAMN  : out std_logic\r
       );\r
   end component;\r