From f643864e54c962a14b792b26953493de8aa7b0b9 Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Tue, 10 Mar 2009 10:36:29 +0000 Subject: [PATCH] - removed timer reset dring RST_I Committed on the Free edition of March Hare Software CVSNT Server. Upgrade to CVS Suite for more features and support: http://march-hare.com/cvsnt/ git-svn-id: http://moon:8086/svn/vhdl/trunk@379 cc03376c-175c-47c8-b038-4cd826a8556b --- lib/misc/gpio_wb.vhd | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/lib/misc/gpio_wb.vhd b/lib/misc/gpio_wb.vhd index 4f358b1..851399c 100644 --- a/lib/misc/gpio_wb.vhd +++ b/lib/misc/gpio_wb.vhd @@ -160,10 +160,7 @@ tick_usec_timer: begin if rising_edge(CLK_I) then cnt_usec_en <= '0'; - if RST_I = '1' then - tick_usec <= 0; - cnt_usec_en <= '0'; - elsif tick_usec = tick_usec_t'high then + if tick_usec >= tick_usec_t'high then tick_usec <= 0; cnt_usec_en <= '1'; else @@ -177,13 +174,10 @@ cnt_usec_timer: begin if rising_edge(CLK_I) then cnt_sec_en <= '0'; - if RST_I = '1' then - cnt_usec <= (others => '0'); - cnt_sec_en <= '0'; - elsif cnt_usec_we = '1' then + if cnt_usec_we = '1' then cnt_usec <= cnt_usec_preset; elsif cnt_usec_en = '1' then - if cnt_usec = to_unsigned(1E6 - 1, 32) then + if cnt_usec >= to_unsigned(1E6 - 1, 32) then cnt_usec <= (others => '0'); cnt_sec_en <= '1'; else @@ -197,9 +191,7 @@ cnt_sec_timer: process(CLK_I) begin if rising_edge(CLK_I) then - if RST_I = '1' then - cnt_sec <= (others => '0'); - elsif cnt_sec_we = '1' then + if cnt_sec_we = '1' then cnt_sec <= cnt_sec_preset; elsif cnt_sec_en = '1' then cnt_sec <= cnt_sec + 1;