Line 1... |
Line 1... |
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
--
|
--
|
-- The Timer/Counter unit.
|
-- The Timer/Counter unit.
|
--
|
--
|
-- $Id: timer.vhd,v 1.2 2004-04-15 22:05:13 arniml Exp $
|
-- $Id: timer.vhd,v 1.3 2004-05-16 15:32:57 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 127... |
Line 127... |
|
|
-- sample in state according to generic
|
-- sample in state according to generic
|
-- Old devices: sample at the beginning of state 3
|
-- Old devices: sample at the beginning of state 3
|
-- New devices: sample in state 4
|
-- New devices: sample in state 4
|
if (sample_t1_state_g = 3 and clk_mstate_i = MSTATE3) or
|
if (sample_t1_state_g = 3 and clk_mstate_i = MSTATE3) or
|
(sample_t1_state_g = 4 and clk_mstate_i = MSTATE3) then
|
(sample_t1_state_g = 4 and clk_mstate_i = MSTATE4) then
|
-- detect falling edge
|
-- detect falling edge
|
if t1_q = '1' and t1_i = '0' then
|
if t1_q = '1' and t1_i = '0' then
|
t1_inc_s <= true;
|
t1_inc_s <= true;
|
end if;
|
end if;
|
end if;
|
end if;
|
Line 252... |
Line 252... |
|
|
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
-- File History:
|
-- File History:
|
--
|
--
|
-- $Log: not supported by cvs2svn $
|
-- $Log: not supported by cvs2svn $
|
|
-- Revision 1.2 2004/04/15 22:05:13 arniml
|
|
-- 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
|
--
|
--
|
--
|
--
|
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|