| 1 |
2 |
trurl |
------------------------------------------------------------------
|
| 2 |
|
|
--!
|
| 3 |
|
|
--! PDP-8 Processor
|
| 4 |
|
|
--!
|
| 5 |
|
|
--! \brief
|
| 6 |
|
|
--! CPU Control Panel Mode (CTRLFF) Register
|
| 7 |
|
|
--!
|
| 8 |
|
|
--! \details
|
| 9 |
|
|
--! When the CTRLFF is asserted the unit is in HD6120 Panel
|
| 10 |
|
|
--! Mode.
|
| 11 |
|
|
--!
|
| 12 |
|
|
--! CTRLFF is asserted when:
|
| 13 |
|
|
--! -# A Control Panel Request Interrupt is acknowledged.
|
| 14 |
|
|
--! -# A Panel Request 0 (PR0) Instruction is executed
|
| 15 |
|
|
--! which causes a Control Panel TRAP (i.e., the
|
| 16 |
|
|
--! PNLTRP Register is asserted).
|
| 17 |
|
|
--! -# A Panel Request 1 (PR1) Instruction is executed
|
| 18 |
|
|
--! which causes a Control Panel TRAP (i.e., the
|
| 19 |
|
|
--! PNLTRP Register is asserted).
|
| 20 |
|
|
--! -# A Panel Request 2 (PR2) Instruction is executed
|
| 21 |
|
|
--! which causes a Control Panel TRAP (i.e., the
|
| 22 |
|
|
--! PNLTRP Register is asserted).
|
| 23 |
|
|
--! -# A Panel Request 3 (PR3) Instruction is executed
|
| 24 |
|
|
--! which causes a Control Panel TRAP (i.e., the
|
| 25 |
|
|
--! PNLTRP Register is asserted).
|
| 26 |
|
|
--!
|
| 27 |
|
|
--! CTRLFF is negated when:
|
| 28 |
|
|
--! -# A JMP instruction is executed after a PEX instruction
|
| 29 |
|
|
--! is executed (i.e., the PEX Register is asserted).
|
| 30 |
|
|
--! -# A JMS instruction is executed after a PEX instruction
|
| 31 |
|
|
--! is executed (i.e., the PEX Register is asserted).
|
| 32 |
|
|
--! -# A RTN instruction is executed after a PEX instruction
|
| 33 |
|
|
--! is executed (i.e., the PEX Register is asserted).
|
| 34 |
|
|
--!
|
| 35 |
|
|
--! When the unit is in HD6120 Control Panel Mode, it is
|
| 36 |
|
|
--! operating in a mode that is not strictly PDP8 compatible.
|
| 37 |
|
|
--! In fact, HD6120 Control Panel Mode can be used to
|
| 38 |
|
|
--! virtualize a PDP8. In HD6120 Control Panel mode,
|
| 39 |
|
|
--! several new OPCODES are available, and several PDP8
|
| 40 |
|
|
--! OPCODES are redefined.
|
| 41 |
|
|
--!
|
| 42 |
|
|
--! Also in HD6120 mode, a whole new 32K word address space
|
| 43 |
|
|
--! becomes available for use.
|
| 44 |
|
|
--!
|
| 45 |
|
|
--! \file
|
| 46 |
|
|
--! ctrlff.vhd
|
| 47 |
|
|
--!
|
| 48 |
|
|
--! \author
|
| 49 |
|
|
--! Rob Doyle - doyle (at) cox (dot) net
|
| 50 |
|
|
--!
|
| 51 |
|
|
--------------------------------------------------------------------
|
| 52 |
|
|
--
|
| 53 |
|
|
-- Copyright (C) 2009 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 Control Panel Mode Flip-Flop (CTRLFF) Entity
|
| 87 |
|
|
--
|
| 88 |
|
|
|
| 89 |
|
|
entity eCTRLFF is port (
|
| 90 |
|
|
sys : in sys_t; --! Clock/Reset
|
| 91 |
|
|
ctrlffop : in ctrlffop_t; --! CTRLFF Operation
|
| 92 |
|
|
CTRLFF : out std_logic --! CTRLFF Output
|
| 93 |
|
|
);
|
| 94 |
|
|
end eCTRLFF;
|
| 95 |
|
|
|
| 96 |
|
|
--
|
| 97 |
|
|
--! CPU Control Panel Mode Flip-Flop (CTRLFF) RTL
|
| 98 |
|
|
--
|
| 99 |
|
|
|
| 100 |
|
|
architecture rtl of eCTRLFF is
|
| 101 |
|
|
|
| 102 |
|
|
signal ctrlffREG : std_logic; --! Control Panel Flip-Flop
|
| 103 |
|
|
signal ctrlffMUX : std_logic; --! Control Panel Flip-Flop Multiplexer
|
| 104 |
|
|
|
| 105 |
|
|
begin
|
| 106 |
|
|
|
| 107 |
|
|
--
|
| 108 |
|
|
-- CTRLFF Multiplexer
|
| 109 |
|
|
--
|
| 110 |
|
|
|
| 111 |
|
|
with ctrlffop select
|
| 112 |
|
|
ctrlffmux <= ctrlffREG when ctrlffopNOP, -- CTRLFF <- CTRLFF
|
| 113 |
|
|
'0' when ctrlffopCLR, -- CTRLFF <- '0'
|
| 114 |
|
|
'1' when ctrlffopSET; -- CTRLFF <- '1'
|
| 115 |
|
|
|
| 116 |
|
|
--
|
| 117 |
|
|
--! CTRLFF Register
|
| 118 |
|
|
--
|
| 119 |
|
|
|
| 120 |
|
|
REG_CTRLFF : process(sys)
|
| 121 |
|
|
begin
|
| 122 |
|
|
if sys.rst = '1' then
|
| 123 |
|
|
ctrlffREG <= '0';
|
| 124 |
|
|
elsif rising_edge(sys.clk) then
|
| 125 |
|
|
ctrlffREG <= ctrlffMUX;
|
| 126 |
|
|
end if;
|
| 127 |
|
|
end process REG_CTRLFF;
|
| 128 |
|
|
|
| 129 |
|
|
CTRLFF <= ctrlffREG;
|
| 130 |
|
|
|
| 131 |
|
|
end rtl;
|