Skip to content

Commit

Permalink
[gptmr] fix threshold = 0 configuration
Browse files Browse the repository at this point in the history
should immediately trigger an interrupt when the GPTMR gets enabled
  • Loading branch information
stnolting committed Feb 25, 2024
1 parent 259e70c commit e7da256
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rtl/core/neorv32_gptmr.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ begin
end process counter_core;

-- counter = threshold? --
timer.match <= '1' when (timer.count = timer.thres) else '0';
timer.match <= '1' when (timer.count = timer.thres) and (ctrl(ctrl_en_c) = '1') else '0';

-- match edge detector --
timer.trigger <= '1' when (timer.match_ff = '0') and (timer.match = '1') else '0';
Expand Down
2 changes: 1 addition & 1 deletion rtl/core/neorv32_package.vhd
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ package neorv32_package is

-- Architecture Constants -----------------------------------------------------------------
-- -------------------------------------------------------------------------------------------
constant hw_version_c : std_ulogic_vector(31 downto 0) := x"01090509"; -- hardware version
constant hw_version_c : std_ulogic_vector(31 downto 0) := x"01090510"; -- hardware version
constant archid_c : natural := 19; -- official RISC-V architecture ID
constant XLEN : natural := 32; -- native data path width

Expand Down

0 comments on commit e7da256

Please sign in to comment.