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

Subversion Repositories pdp8

[/] [pdp8/] [trunk/] [pdp8/] [cpu/] [pwrtrp.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 Power-On Trap (PWRTRP) Register
7
--!
8
--! \details
9
--!      The Power-On Trap (PWRTRP) Register is association with
10
--!      the STARTUP input is used to control the startup
11
--!      operation of the CPU.
12
--!
13
--!      The PWRTRP Register is defined in the HD-6120
14
--!      documentation.
15
--!
16
--!      When the unit is configured as a HD-6120, the PWRTRP
17
--!      Register will be set to the state of STARTUP input
18
--!      when the reset input is negated.
19
--!
20
--!      If the PWRTRP register is set, the unit will boot
21
--!      to the Normal Mode Boot Vector (Address 0000).
22
--!      Otherwise the unit will boot to the Panel Mode
23
--!      Boot Vector (Address 7777)
24
--!
25
--! \todo
26
--!      Probably don't need this register.  Delete it.
27
--!      Just initialize the PC dependant on the STARTUP
28
--!      input to 0000 or 7777.
29
--!
30
--! \file
31
--!      pwrtrp.vhd
32
--!
33
--! \author
34
--!      Rob Doyle - doyle (at) cox (dot) net
35
--!
36
--------------------------------------------------------------------
37
--
38
--  Copyright (C) 2009, 2010, 2011 Rob Doyle
39
--
40
-- This source file may be used and distributed without
41
-- restriction provided that this copyright statement is not
42
-- removed from the file and that any derivative work contains
43
-- the original copyright notice and the associated disclaimer.
44
--
45
-- This source file is free software; you can redistribute it
46
-- and/or modify it under the terms of the GNU Lesser General
47
-- Public License as published by the Free Software Foundation;
48
-- version 2.1 of the License.
49
--
50
-- This source is distributed in the hope that it will be
51
-- useful, but WITHOUT ANY WARRANTY; without even the implied
52
-- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
53
-- PURPOSE. See the GNU Lesser General Public License for more
54
-- details.
55
--
56
-- You should have received a copy of the GNU Lesser General
57
-- Public License along with this source; if not, download it
58
-- from http://www.gnu.org/licenses/lgpl.txt
59
--
60
--------------------------------------------------------------------
61
--
62
-- Comments are formatted for doxygen
63
--
64
 
65
library ieee;                                   --! IEEE Library
66
use ieee.std_logic_1164.all;                    --! IEEE 1164
67
use work.cpu_types.all;                         --! Types
68
 
69
--
70
--! CPU Power-On Trap (PWRTRP) Register Entity
71
--
72
 
73
entity ePWRTRP is port (
74
    sys      : in  sys_t;                       --! Clock/Reset
75
    pwrtrpOP : in  pwrtrpop_t;                  --! PWRTRP Operation
76
    PWRTRP   : out std_logic                    --! PWRTRP Output
77
);
78
end ePWRTRP;
79
 
80
--
81
--! CPU Power-On Trap (PWRTRP) Register RTL
82
--
83
 
84
architecture rtl of ePWRTRP is
85
 
86
    signal pwrtrpREG : std_logic;               --! Power On Trap Flip-Flop
87
    signal pwrtrpMUX : std_logic;               --! Power On Trap Flip-Flop Multiplexer
88
 
89
begin
90
 
91
    --
92
    -- PWRTRP Multiplexer
93
    --
94
 
95
    with pwrtrpOP select
96
        pwrtrpMUX <= pwrtrpREG when pwrtrpopNOP,
97
                    '0'        when pwrtrpopCLR,
98
                    '1'        when pwrtrpopSET;
99
 
100
    --
101
    --! PWRTRP Register
102
    --
103
 
104
    REG_PWRTRP : process(sys)
105
    begin
106
        if sys.rst = '1' then
107
            pwrtrpREG <= '0';
108
        elsif rising_edge(sys.clk) then
109
            pwrtrpREG <= pwrtrpMUX;
110
        end if;
111
    end process REG_PWRTRP;
112
 
113
    PWRTRP <= pwrtrpREG;
114
 
115
end rtl;

powered by: WebSVN 2.1.0

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