OpenCores
URL https://opencores.org/ocsvn/pdp8/pdp8/trunk

Subversion Repositories pdp8

[/] [pdp8/] [trunk/] [pdp8/] [cpu/] [ii.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 trurl
------------------------------------------------------------------
2
--!
3
--! PDP- Processor
4
--!
5
--! \brief
6
--!      CPU Interrupt Inhibit (II) Register
7
--!
8
--! \details
9
--!      The Interrupt Inhibit (II) Register is set whenever there
10
--!      is an instruction executed that could change the
11
--!      Instruction Field (IF) Register.  These include CIF, CDI,
12
--!      RMF, RTF, CAF, CUF, SUF.  The II Register is cleared when
13
--!      the next JMP, JMS, RTN1, or RTN2 instruction is executed.
14
--! 
15
--!      This prevents an interrupt from occuring between the CIF
16
--!     (or like) instruction and the return (or like) instruction.
17
--!
18
--! \file
19
--!      ii.vhd
20
--!
21
--! \author
22
--!      Rob Doyle - doyle (at) cox (dot) net
23
--!
24
--------------------------------------------------------------------
25
--
26
--  Copyright (C) 2009, 2011, 2010 Rob Doyle
27
--
28
-- This source file may be used and distributed without
29
-- restriction provided that this copyright statement is not
30
-- removed from the file and that any derivative work contains
31
-- the original copyright notice and the associated disclaimer.
32
--
33
-- This source file is free software; you can redistribute it
34
-- and/or modify it under the terms of the GNU Lesser General
35
-- Public License as published by the Free Software Foundation;
36
-- version 2.1 of the License.
37
--
38
-- This source is distributed in the hope that it will be
39
-- useful, but WITHOUT ANY WARRANTY; without even the implied
40
-- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
41
-- PURPOSE. See the GNU Lesser General Public License for more
42
-- details.
43
--
44
-- You should have received a copy of the GNU Lesser General
45
-- Public License along with this source; if not, download it
46
-- from http://www.gnu.org/licenses/lgpl.txt
47
--
48
--------------------------------------------------------------------
49
--
50
-- Comments are formatted for doxygen
51
--
52
 
53
library ieee;                                   --! IEEE Library
54
use ieee.std_logic_1164.all;                    --! IEEE 1164
55
use ieee.numeric_std.all;                       --! IEEE Numeric Standard
56
use work.cpu_types.all;                         --! Types
57
 
58
--
59
--! CPU Interrupt Inhibit (II) Register Entity
60
--
61
 
62
entity eII is port (
63
    sys  : in  sys_t;                           --! Clock/Reset
64
    iiOP : in  iiop_t;                          --! II Operation
65
    II   : out std_logic                        --! II Output
66
);
67
end eII;
68
 
69
--
70
--! CPU Interrupt Inhibit (II) Register RTL
71
--
72
 
73
architecture rtl of eII is
74
 
75
    signal iiREG : std_logic;                   --! Interrupt Inhibit Flip-Flop
76
    signal iiMUX : std_logic;                   --! Interrupt Inhibit Flip-Flop Multiplexer
77
 
78
begin
79
 
80
    --
81
    -- II Multiplexer
82
    --
83
 
84
    with iiOP select
85
        iiMUX <= iiREG when iiopNOP,
86
                 '0'   when iiopCLR,
87
                 '1'   when iiopSET;
88
 
89
    --
90
    --! II Register
91
    --
92
 
93
    REG_II : process(sys)
94
    begin
95
        if sys.rst = '1' then
96
            iiREG <= '0';
97
        elsif rising_edge(sys.clk) then
98
            iiREG <= iiMUX;
99
        end if;
100
    end process REG_II;
101
 
102
    II <= iiREG;
103
 
104
end rtl;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.