From: Anton Blanchard Date: Mon, 14 Dec 2020 05:54:07 +0000 (+1100) Subject: Fix an issue in flash controller when BOOT_CLOCKS is false X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c870040a20c23423a5e65efb1913198bfc366fae;p=microwatt.git Fix an issue in flash controller when BOOT_CLOCKS is false If BOOT_CLOCKS is false we currently get stuck in the flash state machine. This patch from Ben fixes it. Also fix an x state issue I see in icarus verilog where we need to reset auto_state. Signed-off-by: Anton Blanchard --- diff --git a/spi_flash_ctrl.vhdl b/spi_flash_ctrl.vhdl index d2b4992..e34a7c0 100644 --- a/spi_flash_ctrl.vhdl +++ b/spi_flash_ctrl.vhdl @@ -350,6 +350,7 @@ begin if rising_edge(clk) then if rst = '1' then auto_last_addr <= (others => '0'); + auto_state <= AUTO_BOOT; else auto_state <= auto_next; auto_cnt <= auto_cnt_next; @@ -429,6 +430,8 @@ begin if cmd_ready = '1' then auto_next <= AUTO_IDLE; end if; + else + auto_next <= AUTO_IDLE; end if; when AUTO_IDLE => -- Access to the memory map only when manual CS isn't set