Line 1... |
Line 1... |
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
--
|
--
|
-- The Timer/Counter unit.
|
-- The Timer/Counter unit.
|
--
|
--
|
-- $Id: timer.vhd,v 1.3 2004-05-16 15:32:57 arniml Exp $
|
-- $Id: timer.vhd,v 1.4 2004-07-04 13:06:45 arniml Exp $
|
--
|
--
|
-- All rights reserved
|
-- All rights reserved
|
--
|
--
|
-- Redistribution and use in source and synthezised forms, with or without
|
-- Redistribution and use in source and synthezised forms, with or without
|
-- modification, are permitted provided that the following conditions are met:
|
-- modification, are permitted provided that the following conditions are met:
|
Line 180... |
Line 180... |
-- Implements the counter, the prescaler and other registers.
|
-- Implements the counter, the prescaler and other registers.
|
--
|
--
|
regs: process (res_i, clk_i)
|
regs: process (res_i, clk_i)
|
begin
|
begin
|
if res_i = res_active_c then
|
if res_i = res_active_c then
|
counter_q <= (others => '0');
|
|
overflow_q <= false;
|
overflow_q <= false;
|
t1_q <= '0';
|
t1_q <= '0';
|
prescaler_q <= (others => '0');
|
prescaler_q <= (others => '0');
|
inc_sel_q <= NONE;
|
inc_sel_q <= NONE;
|
|
|
Line 252... |
Line 251... |
|
|
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
-- File History:
|
-- File History:
|
--
|
--
|
-- $Log: not supported by cvs2svn $
|
-- $Log: not supported by cvs2svn $
|
|
-- Revision 1.3 2004/05/16 15:32:57 arniml
|
|
-- fix edge detector bug for counter
|
|
--
|
-- Revision 1.2 2004/04/15 22:05:13 arniml
|
-- Revision 1.2 2004/04/15 22:05:13 arniml
|
-- increment prescaler with MSTATE4
|
-- increment prescaler with MSTATE4
|
--
|
--
|
-- Revision 1.1 2004/03/23 21:31:53 arniml
|
-- Revision 1.1 2004/03/23 21:31:53 arniml
|
-- initial check-in
|
-- initial check-in
|