Line 1... |
Line 1... |
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
--
|
--
|
-- The Clock Control unit.
|
-- The Clock Control unit.
|
-- Clock States and Machine Cycles are generated here.
|
-- Clock States and Machine Cycles are generated here.
|
--
|
--
|
-- $Id: clock_ctrl.vhd,v 1.5 2004-10-25 19:35:41 arniml Exp $
|
-- $Id: clock_ctrl.vhd,v 1.6 2004-10-25 20:31:12 arniml Exp $
|
--
|
--
|
-- Copyright (c) 2004, Arnim Laeuger (arniml@opencores.org)
|
-- Copyright (c) 2004, Arnim Laeuger (arniml@opencores.org)
|
--
|
--
|
-- All rights reserved
|
-- All rights reserved
|
--
|
--
|
Line 207... |
Line 207... |
if xtal3_s then
|
if xtal3_s then
|
psen_q <= false;
|
psen_q <= false;
|
end if;
|
end if;
|
|
|
when MSTATE2 =>
|
when MSTATE2 =>
|
|
if xtal2_s then
|
|
-- PROG is removed at the end of XTAL2 of second machine cycle
|
|
-- according to the user manual, PROG should be removed at the
|
|
-- end of XTAL3 but this would raise the need to change P2 at
|
|
-- XTAL1 or XTAL2 -> introduction of inter-xtal timing in
|
|
-- the rest of the core.
|
|
prog_q <= false;
|
|
end if;
|
if xtal3_s then
|
if xtal3_s then
|
-- RD, WR are removed at the end of XTAL3 of second machine cycle
|
-- RD, WR are removed at the end of XTAL3 of second machine cycle
|
rd_q <= false;
|
rd_q <= false;
|
wr_q <= false;
|
wr_q <= false;
|
-- PROG is removed at the and of XTAL3 of second machine cycle
|
|
prog_q <= false;
|
|
end if;
|
end if;
|
|
|
when MSTATE3 =>
|
when MSTATE3 =>
|
-- ALE is set at the end of XTAL2 of every machine cycle
|
-- ALE is set at the end of XTAL2 of every machine cycle
|
if xtal2_s then
|
if xtal2_s then
|
Line 378... |
Line 384... |
|
|
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
-- File History:
|
-- File History:
|
--
|
--
|
-- $Log: not supported by cvs2svn $
|
-- $Log: not supported by cvs2svn $
|
|
-- Revision 1.5 2004/10/25 19:35:41 arniml
|
|
-- deassert rd_q, wr_q and prog_q at end of XTAL3
|
|
--
|
-- Revision 1.4 2004/04/24 23:44:25 arniml
|
-- Revision 1.4 2004/04/24 23:44:25 arniml
|
-- move from std_logic_arith to numeric_std
|
-- move from std_logic_arith to numeric_std
|
--
|
--
|
-- Revision 1.3 2004/04/18 18:56:23 arniml
|
-- Revision 1.3 2004/04/18 18:56:23 arniml
|
-- reset machine state to MSTATE3 to allow proper instruction fetch
|
-- reset machine state to MSTATE3 to allow proper instruction fetch
|