Skip to content
Snippets Groups Projects
Commit 6e023360 authored by Theodor-Adrian Stana's avatar Theodor-Adrian Stana Committed by Tomasz Wlostowski
Browse files

Fixed the FSM watchdog max value bug


Signed-off-by: default avatarTheodor Stana <t.stana@cern.ch>
Signed-off-by: default avatarTomasz Włostowski <tomasz.wlostowski@cern.ch>
parent 37f93117
No related merge requests found
......@@ -66,7 +66,7 @@ architecture behav of gc_fsm_watchdog is
--============================================================================
-- Signal declarations
--============================================================================
signal wdt : unsigned(f_log2_size(g_wdt_max)-1 downto 0);
signal wdt : unsigned(f_log2_size(g_wdt_max)-1 downto 0);
--==============================================================================
-- architecture begin
......@@ -84,7 +84,7 @@ begin
fsm_rst_o <= '0';
else
wdt <= wdt + 1;
if (wdt = g_wdt_max) then
if (wdt = g_wdt_max-1) then
fsm_rst_o <= '1';
end if;
end if;
......
......@@ -61,7 +61,7 @@ architecture behav of tb_gc_fsm_watchdog is
constant c_clk_per : time := 50 ns;
constant c_reset_width : time := 112 ns;
constant c_fsm_time : positive := 32767;
constant c_fsm_time : positive := 32766;
--============================================================================
-- Signal declarations
......@@ -105,7 +105,7 @@ begin
DUT : gc_fsm_watchdog
generic map
(
g_wdt_max => 65536
g_wdt_max => 32768
)
port map
(
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment