Line 1... |
Line 1... |
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
--
|
--
|
-- The skip unit.
|
-- The skip unit.
|
-- Skip conditions are checked here and communicated to the decoder unit.
|
-- Skip conditions are checked here and communicated to the decoder unit.
|
--
|
--
|
-- $Id: t400_skip.vhd,v 1.2 2006-05-20 02:47:52 arniml Exp $
|
-- $Id: t400_skip.vhd,v 1.3 2006-05-27 19:16:52 arniml Exp $
|
--
|
--
|
-- Copyright (c) 2006 Arnim Laeuger (arniml@opencores.org)
|
-- Copyright (c) 2006 Arnim Laeuger (arniml@opencores.org)
|
--
|
--
|
-- All rights reserved
|
-- All rights reserved
|
--
|
--
|
Line 45... |
Line 45... |
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
|
|
library ieee;
|
library ieee;
|
use ieee.std_logic_1164.all;
|
use ieee.std_logic_1164.all;
|
|
|
|
use work.t400_opt_pack.all;
|
use work.t400_pack.all;
|
use work.t400_pack.all;
|
|
|
entity t400_skip is
|
entity t400_skip is
|
|
|
|
generic (
|
|
opt_type_g : integer := t400_opt_type_420_c
|
|
);
|
port (
|
port (
|
ck_i : in std_logic;
|
ck_i : in std_logic;
|
ck_en_i : in boolean;
|
ck_en_i : in boolean;
|
por_i : in boolean;
|
por_i : in boolean;
|
res_i : in boolean;
|
res_i : in boolean;
|
Line 80... |
Line 84... |
|
|
signal skip_q,
|
signal skip_q,
|
skip_next_q : boolean;
|
skip_next_q : boolean;
|
signal skip_lbi_q : boolean;
|
signal skip_lbi_q : boolean;
|
|
|
|
signal skip_int_q : boolean;
|
|
|
begin
|
begin
|
|
|
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
-- Process skip
|
-- Process skip
|
--
|
--
|
-- Purpose:
|
-- Purpose:
|
-- Implements the skip logic.
|
-- Implements the skip logic.
|
--
|
--
|
skip: process (ck_i, por_i)
|
skip: process (ck_i, por_i)
|
|
variable t420_type_v : boolean;
|
begin
|
begin
|
if por_i then
|
if por_i then
|
skip_next_q <= false;
|
skip_next_q <= false;
|
skip_q <= false;
|
skip_q <= false;
|
skip_lbi_q <= false;
|
skip_lbi_q <= false;
|
|
skip_int_q <= false;
|
|
|
elsif ck_i'event and ck_i = '1' then
|
elsif ck_i'event and ck_i = '1' then
|
if res_i then
|
if res_i then
|
-- synchronous reset upon external reset event
|
-- synchronous reset upon external reset event
|
skip_next_q <= false;
|
skip_next_q <= false;
|
skip_q <= false;
|
skip_q <= false;
|
skip_lbi_q <= false;
|
skip_lbi_q <= false;
|
|
skip_int_q <= false;
|
|
|
elsif ck_en_i then
|
elsif ck_en_i then
|
|
t420_type_v := opt_type_g = t400_opt_type_420_c;
|
|
|
if ck_en_i then
|
if ck_en_i then
|
case op_i is
|
case op_i is
|
-- update skip information ----------------------------------------
|
-- update skip information ----------------------------------------
|
when SKIP_UPDATE =>
|
when SKIP_UPDATE =>
|
skip_q <= skip_next_q;
|
skip_q <= skip_next_q;
|
Line 161... |
Line 172... |
-- skip on timer carry --------------------------------------------
|
-- skip on timer carry --------------------------------------------
|
when SKIP_TIMER =>
|
when SKIP_TIMER =>
|
skip_next_q <= tim_c_i;
|
skip_next_q <= tim_c_i;
|
null;
|
null;
|
|
|
|
-- push skip state when vectoring to interrupt routine ------------
|
|
when SKIP_PUSH =>
|
|
if t420_type_v then
|
|
-- save next skip flag
|
|
skip_int_q <= skip_next_q;
|
|
skip_next_q <= false;
|
|
-- never skip first instruction of interrupt routine
|
|
skip_q <= false;
|
|
end if;
|
|
|
|
-- pop skip state for RET from interrupt routine ------------------
|
|
when SKIP_POP =>
|
|
if t420_type_v then
|
|
skip_q <= skip_int_q;
|
|
skip_next_q <= false;
|
|
skip_int_q <= false;
|
|
end if;
|
|
|
when others =>
|
when others =>
|
null;
|
null;
|
end case;
|
end case;
|
end if;
|
end if;
|
end if;
|
end if;
|
Line 185... |
Line 214... |
|
|
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
-- File History:
|
-- File History:
|
--
|
--
|
-- $Log: not supported by cvs2svn $
|
-- $Log: not supported by cvs2svn $
|
|
-- Revision 1.2 2006/05/20 02:47:52 arniml
|
|
-- skip-on-timer implemented
|
|
--
|
-- Revision 1.1.1.1 2006/05/06 01:56:45 arniml
|
-- Revision 1.1.1.1 2006/05/06 01:56:45 arniml
|
-- import from local CVS repository, LOC_CVS_0_1
|
-- import from local CVS repository, LOC_CVS_0_1
|
--
|
--
|
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
|
|
No newline at end of file
|
No newline at end of file
|