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

Subversion Repositories pdp8

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 trurl
------------------------------------------------------------------
2
--!
3
--! PDP-8 Processor
4
--!
5
--! \brief
6
--!      CPU Interrupt Enable (IE) Register
7
--!
8
--!      The IE register is modified under the following
9
--!      conditions:
10
--!      -# the IE Register is cleared on entry to an interrupt,
11
--!         and
12
--!      -# the IE Register is cleared when the Front Panel CLEAR
13
--!         switch is asserted, and
14
--!      -# the IE Register is cleared when the Skip If Interupt
15
--!         System Is On (SKON) instruction is executed, and
16
--!      -# the IE Register is cleared when the Interrupt Disable
17
--!         (IOF) instruction is executed, and
18
--!      -# the IE Register is set when the Interrupt Enable
19
--!         (ION) instruction is executed, and
20
--!
21
--! \note
22
--!      Per tribal knowledge, several unimplemented
23
--!      instructions have the side-effect of performing an
24
--!      interrupt Enable (ION) instruction which also sets
25
--!      the IE Register.  These are enumerated in the CPU
26
--!      VHDL code, but not summarized here.
27
--!
28
--! \file
29
--!      ie.vhd
30
--!
31
--! \author
32
--!      Rob Doyle - doyle (at) cox (dot) net
33
--!
34
--------------------------------------------------------------------
35
--
36
--  Copyright (C) 2009, 2010, 2011 Rob Doyle
37
--
38
-- This source file may be used and distributed without
39
-- restriction provided that this copyright statement is not
40
-- removed from the file and that any derivative work contains
41
-- the original copyright notice and the associated disclaimer.
42
--
43
-- This source file is free software; you can redistribute it
44
-- and/or modify it under the terms of the GNU Lesser General
45
-- Public License as published by the Free Software Foundation;
46
-- version 2.1 of the License.
47
--
48
-- This source is distributed in the hope that it will be
49
-- useful, but WITHOUT ANY WARRANTY; without even the implied
50
-- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
51
-- PURPOSE. See the GNU Lesser General Public License for more
52
-- details.
53
--
54
-- You should have received a copy of the GNU Lesser General
55
-- Public License along with this source; if not, download it
56
-- from http://www.gnu.org/licenses/lgpl.txt
57
--
58
--------------------------------------------------------------------
59
--
60
-- Comments are formatted for doxygen
61
--
62
 
63
library ieee;                                   --! IEEE Library
64
use ieee.std_logic_1164.all;                    --! IEEE 1164
65
use work.cpu_types.all;                         --! Types
66
 
67
--
68
--! CPU Interrupt Enable (IE) Register Entity
69
--
70
 
71
entity eIE is port (
72
    sys  : in  sys_t;                           --! Clock/Reset
73
    ieOP : in  ieOP_t;                          --! IE Operation
74
    IE   : out std_logic                        --! IE Output
75
);
76
end eIE;
77
 
78
--
79
--! CPU Interrupt Enable (IE) Register RTL
80
--
81
 
82
architecture rtl of eIE is
83
 
84
    signal ieREG   : std_logic;               --! Interrupt Enable Flip-Flop
85
    signal ieMUX   : std_logic;               --! Interrupt Enable Flip-Flop Multiplexer
86
 
87
begin
88
 
89
    --
90
    -- IE Multiplexer
91
    --
92
 
93
    with ieOP select
94
        ieMUX <= ieREG when ieopNOP,
95
                 '0'   when ieopCLR,
96
                 '1'   when ieopSET;
97
 
98
    --
99
    --! IE Register
100
    --
101
 
102
    REG_IE : process(sys)
103
    begin
104
        if sys.rst = '1' then
105
            ieREG <= '0';
106
        elsif rising_edge(sys.clk) then
107
            ieREG <= ieMUX;
108
        end if;
109
    end process REG_IE;
110
 
111
    IE <= ieREG;
112
 
113
end rtl;

powered by: WebSVN 2.1.0

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