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

Subversion Repositories pdp8

[/] [pdp8/] [trunk/] [pdp8/] [cpu/] [pex.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 Exit Delay (PEX) Register
7
--!
8
--! \file
9
--!      pex.vhd
10
--!
11
--! \details
12
--!      The Panel Exit Delay (PEX) Register is set by the PEX
13
--!      instruction.   When a JMP, JMS, RET1, or RET2 instruction
14
--!      is executed with the PEX Register set, the CPU will exit
15
--!      panel mode.  The PEX Register is cleared by the JMP, JMS,
16
--!      RET1, or RET2 instruction.
17
--!
18
--! \author
19
--!      Rob Doyle - doyle (at) cox (dot) net
20
--!
21
--------------------------------------------------------------------
22
--
23
--  Copyright (C) 2009, 2011, 2012 Rob Doyle
24
--
25
-- This source file may be used and distributed without
26
-- restriction provided that this copyright statement is not
27
-- removed from the file and that any derivative work contains
28
-- the original copyright notice and the associated disclaimer.
29
--
30
-- This source file is free software; you can redistribute it
31
-- and/or modify it under the terms of the GNU Lesser General
32
-- Public License as published by the Free Software Foundation;
33
-- version 2.1 of the License.
34
--
35
-- This source is distributed in the hope that it will be
36
-- useful, but WITHOUT ANY WARRANTY; without even the implied
37
-- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
38
-- PURPOSE. See the GNU Lesser General Public License for more
39
-- details.
40
--
41
-- You should have received a copy of the GNU Lesser General
42
-- Public License along with this source; if not, download it
43
-- from http://www.gnu.org/licenses/lgpl.txt
44
--
45
--------------------------------------------------------------------
46
--
47
-- Comments are formatted for doxygen
48
--
49
 
50
library ieee;                                   --! IEEE Library
51
use ieee.std_logic_1164.all;                    --! IEEE 1164
52
use ieee.numeric_std.all;                       --! IEEE Numeric Standard
53
use work.cpu_types.all;                         --! Types
54
 
55
--
56
--! CPU Panel Exit Delay (PEX) Register Entity
57
--
58
 
59
entity ePEX is port (
60
    sys   : in  sys_t;                          --! Clock/Reset
61
    pexOP : in  pexOP_t;                        --! PEX Operation
62
    PEX   : out std_logic                       --! PEX Output
63
);
64
end ePEX;
65
 
66
--
67
--! CPU Panel Exit Delay (PEX) Register RTL
68
--
69
 
70
architecture rtl of ePEX is
71
 
72
    signal pexREG : std_logic;                  --! Panel Exit Delay Register
73
    signal pexMUX : std_logic;                  --! Panel Exit Delay Register Multiplexer
74
 
75
begin
76
 
77
    --
78
    -- PEX Multiplexer
79
    --
80
 
81
    with pexOP select
82
        pexMUX <= pexREG when pexopNOP,
83
                  '0'    when pexopCLR,
84
                  '1'    when pexopSET;
85
    --
86
    --! PEX Register
87
    --
88
 
89
    REG_PEX : process(sys)
90
    begin
91
        if sys.rst = '1' then
92
            pexREG <= '0';
93
        elsif rising_edge(sys.clk) then
94
            pexREG <= pexMUX;
95
        end if;
96
    end process REG_PEX;
97
 
98
    PEX <= pexREG;
99
 
100
end rtl;

powered by: WebSVN 2.1.0

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