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

Subversion Repositories pdp8

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 trurl
------------------------------------------------------------------
2
--!
3
--! PDP8 Processor
4
--!
5
--! \brief
6
--!      CPU Panel Mode Trap (PNLTRP) Register
7
--!
8
--! \details
9
--!      A Panel Trap is one of the many ways to enter Panel Mode.  
10
--!
11
--!      If the unit is configured as a HD-6120 and the ION Delay
12
--!      (ID) Register is cleared and the Interrupt Inhibit (II)
13
--!      Register is cleared and the unit is not in Panel Mode,
14
--!      (CTRLFF cleared) then before the next instruction the
15
--!      unit will execute a Panel Trap by saving the return
16
--!      address in address 0000 and vectoring to address 7777.
17
--!      
18
--!      The PNLTRP register is modified under the following
19
--!      conditions:
20
--!      -# the PNLTRP Register is cleared if the unit is
21
--!         configured as a HD-6120 and the unit is in Panel
22
--!         Mode (CTRLFF asserted) and a Panel Read Status
23
--!         (PRS) instruction is executed.
24
--!      -# the PNLTRP Register is cleared if the unit is
25
--!         configured as a HD-6120 and the unit is in Panel
26
--!         Mode (CTRLFF asserted) and a Panel Exit
27
--!         (PEX) instruction is executed.
28
--!      -# the PNLTRP Register is set if the unit is
29
--!         configured as a HD-6120 and the unit is not in Panel
30
--!         Mode (CTRLFF negated) and a Panel Request 0
31
--!         (PR0) instruction is executed.
32
--!      -# the PNLTRP Register is set if the unit is
33
--!         configured as a HD-6120 and the unit is not in Panel
34
--!         Mode (CTRLFF negated) and a Panel Request 1
35
--!         (PR1) instruction is executed.
36
--!      -# the PNLTRP Register is set if the unit is
37
--!         configured as a HD-6120 and the unit is not in Panel
38
--!         Mode (CTRLFF negated) and a Panel Request 2
39
--!         (PR2) instruction is executed.
40
--!      -# the PNLTRP Register is set if the unit is
41
--!         configured as a HD-6120 and the unit is not in Panel
42
--!         Mode (CTRLFF negated) and a Panel Request 3
43
--!         (PR3) instruction is executed.
44
--!
45
--! \file
46
--!      pnltrp.vhd
47
--!
48
--! \author
49
--!      Rob Doyle - doyle (at) cox (dot) net
50
--!
51
--------------------------------------------------------------------
52
--
53
--  Copyright (C) 2009, 2010, 2011 Rob Doyle
54
--
55
-- This source file may be used and distributed without
56
-- restriction provided that this copyright statement is not
57
-- removed from the file and that any derivative work contains
58
-- the original copyright notice and the associated disclaimer.
59
--
60
-- This source file is free software; you can redistribute it
61
-- and/or modify it under the terms of the GNU Lesser General
62
-- Public License as published by the Free Software Foundation;
63
-- version 2.1 of the License.
64
--
65
-- This source is distributed in the hope that it will be
66
-- useful, but WITHOUT ANY WARRANTY; without even the implied
67
-- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
68
-- PURPOSE. See the GNU Lesser General Public License for more
69
-- details.
70
--
71
-- You should have received a copy of the GNU Lesser General
72
-- Public License along with this source; if not, download it
73
-- from http://www.gnu.org/licenses/lgpl.txt
74
--
75
--------------------------------------------------------------------
76
--
77
-- Comments are formatted for doxygen
78
--
79
 
80
library ieee;                                   --! IEEE Library
81
use ieee.std_logic_1164.all;                    --! IEEE 1164
82
use ieee.numeric_std.all;                       --! IEEE Numeric Standard
83
use work.cpu_types.all;                         --! Types
84
 
85
--
86
--! CPU Panel Mode Trap (PNLTRP) Register Entity
87
--
88
 
89
entity ePNLTRP is port (
90
    sys      : in  sys_t;                       --! Clock/Reset
91
    pnltrpOP : in  pnltrpop_t;                  --! PNLTRP Operation
92
    PNLTRP   : out std_logic                    --! PNLTRP Output
93
);
94
end ePNLTRP;
95
 
96
--
97
--! CPU Panel Mode Trap (PNLTRP) Register RTL
98
--
99
 
100
architecture rtl of ePNLTRP is
101
 
102
    signal pnltrpREG : std_logic;               --! Panel Trap Flip-Flop
103
    signal pnltrpMUX : std_logic;               --! Panel Trap Flip-Flop Multiplexer
104
 
105
begin
106
 
107
    --
108
    -- PNLTRP Multiplexer
109
    --
110
 
111
    with pnltrpOP select
112
        pnltrpMUX <= pnltrpREG when pnltrpopNOP,
113
                     '0'       when pnltrpopCLR,
114
                     '1'       when pnltrpopSET;
115
 
116
    --
117
    --! PNLTRP Register
118
    --
119
 
120
    REG_PNLTRP : process(sys)
121
    begin
122
        if sys.rst = '1' then
123
            pnltrpREG <= '0';
124
        elsif rising_edge(sys.clk) then
125
            pnltrpREG <= pnltrpMUX;
126
        end if;
127
    end process REG_PNLTRP;
128
 
129
    PNLTRP <= pnltrpREG;
130
 
131
end rtl;

powered by: WebSVN 2.1.0

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