From fb96e2385229b1312d0a356ae556f04257b44e05 Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Tue, 9 Feb 2010 11:46:08 +0000 Subject: [PATCH] - fixed rounding issue in usec prescaler 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@743 cc03376c-175c-47c8-b038-4cd826a8556b --- lib/misc/gpio_wb.vhd | 2 +- lib/ps2_port/src/ps2_core.vhd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/misc/gpio_wb.vhd b/lib/misc/gpio_wb.vhd index 7454201..32ddf4d 100644 --- a/lib/misc/gpio_wb.vhd +++ b/lib/misc/gpio_wb.vhd @@ -34,7 +34,7 @@ END gpio_wb; ARCHITECTURE behavior OF gpio_wb IS constant num_timers : natural := 2; - constant ncycles_usec : natural := natural(f_sysclk + 0.5); + constant ncycles_usec : natural := natural(f_sysclk); signal gpo0_reg : unsigned(31 downto 0); signal gpo1_reg : unsigned(31 downto 0); diff --git a/lib/ps2_port/src/ps2_core.vhd b/lib/ps2_port/src/ps2_core.vhd index 215a2d8..9a3dab0 100644 --- a/lib/ps2_port/src/ps2_core.vhd +++ b/lib/ps2_port/src/ps2_core.vhd @@ -69,7 +69,7 @@ type line_state_tx_t is (tx_idle_st, tx_clock_assert_st, tx_start_latency_st, tx_ack_trans_st, tx_ack_sample_st, tx_valid_st); -- Constant -constant prescaler_us : integer := integer(f_sys_clk + 0.5); +constant prescaler_us : integer := integer(f_sys_clk); constant timeout_us : integer := 15000; constant time_clock_assert : integer := 120; constant time_clock_abort : integer := 500;