diff --git a/CHANGELOG.md b/CHANGELOG.md index e1fc7ad0f..1fc46fe6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ mimpid = 0x01040312 => 01.04.03.12 => Version 01.04.03.12 => v1.4.3.12 | Date (*dd.mm.yyyy*) | Version | Comment | |:----------:|:-------:|:--------| +| 01.06.2022 | 1.7.1.11 | :bug: fixed bug in **debugger's** single-stepping mode (bug introduced with version 1.7.1.9); [#329](https://github.com/stnolting/neorv32/pull/329) | | 29.05.2022 | 1.7.1.10 | rework **bootloader's** "SPI flash presence detection"; added new option (`SPI_FLASH_ADDR_BYTES`) to customize the bootloader SPI flash address width (16-, 24- or 32-bit); [#321](https://github.com/stnolting/neorv32/pull/321) | | 29.05.2022 | 1.7.1.9 | :bug: fixed bug in **CPU trap logic**: collision of synchronous and asynchronous exceptions; [#327](https://github.com/stnolting/neorv32/pull/327) | | 19.05.2022 | 1.7.1.8 | :bug: fixed bug in **XIP** address conversion logic: sub-word read accesses (half-word, byte) returned wrong data; [#320](https://github.com/stnolting/neorv32/pull/320) | diff --git a/rtl/core/neorv32_cpu_control.vhd b/rtl/core/neorv32_cpu_control.vhd index 9cbc42b62..64d402a5c 100644 --- a/rtl/core/neorv32_cpu_control.vhd +++ b/rtl/core/neorv32_cpu_control.vhd @@ -236,7 +236,6 @@ architecture neorv32_cpu_control_rtl of neorv32_cpu_control is exc_fire : std_ulogic; -- set if there is a valid source in the exception buffer irq_buf : std_ulogic_vector(irq_width_c-1 downto 0); irq_fire : std_ulogic; -- set if there is a valid source in the interrupt buffer - irq_pend : std_ulogic; -- pending IRQ trigger cause : std_ulogic_vector(6 downto 0); -- trap ID for mcause CSR cause_nxt : std_ulogic_vector(6 downto 0); db_irq_fire : std_ulogic; -- set if there is a valid IRQ source in the "enter debug mode" trap buffer @@ -1487,7 +1486,6 @@ begin if (rstn_i = '0') then trap_ctrl.exc_buf <= (others => '0'); trap_ctrl.irq_buf <= (others => '0'); - trap_ctrl.irq_pend <= '0'; trap_ctrl.env_start <= '0'; trap_ctrl.cause <= (others => '0'); elsif rising_edge(clk_i) then @@ -1534,17 +1532,11 @@ begin -- ---------------------------------------------------------- - -- buffer IRQs until we have evaluated any potential sync. exceptions (issue #325) -- - if (trap_ctrl.env_start_ack = '1') then -- trap handling started - no pending IRQs anymore (at least not NOW) - trap_ctrl.irq_pend <= '0'; - elsif (execute_engine.state = EXECUTE) or (execute_engine.state = TRAP_ENTER) then - -- sample IRQs in EXECUTE or TRAP_ENTER (e.g. during sleep) state only to continue execution even on permanent IRQ - trap_ctrl.irq_pend <= trap_ctrl.irq_fire; - end if; - -- trap environment control -- if (trap_ctrl.env_start = '0') then -- no started trap handler yet - if ((trap_ctrl.exc_fire = '1')) or ((trap_ctrl.irq_fire = '1') and (trap_ctrl.irq_pend = '1')) then + if ((trap_ctrl.exc_fire = '1')) or -- sync. exception firing + -- trigger IRQs in EXECUTE or TRAP_ENTER (e.g. during sleep) state only to continue execution even on permanent IRQ + ((trap_ctrl.irq_fire = '1') and ((execute_engine.state = EXECUTE) or (execute_engine.state = TRAP_ENTER))) then -- async. exception (IRQ) firing trap_ctrl.env_start <= '1'; -- now execute engine can start trap handler end if; else -- trap environment ready to start diff --git a/rtl/core/neorv32_package.vhd b/rtl/core/neorv32_package.vhd index 0a0705b8e..9b6b6bcaa 100644 --- a/rtl/core/neorv32_package.vhd +++ b/rtl/core/neorv32_package.vhd @@ -68,7 +68,7 @@ package neorv32_package is -- Architecture Constants (do not modify!) ------------------------------------------------ -- ------------------------------------------------------------------------------------------- constant data_width_c : natural := 32; -- native data path width - do not change! - constant hw_version_c : std_ulogic_vector(31 downto 0) := x"01070110"; -- NEORV32 version - no touchy! + constant hw_version_c : std_ulogic_vector(31 downto 0) := x"01070111"; -- NEORV32 version - no touchy! constant archid_c : natural := 19; -- official NEORV32 architecture ID - hands off! -- Check if we're inside the Matrix -------------------------------------------------------