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

Subversion Repositories pdp8

[/] [pdp8/] [trunk/] [pdp8/] [cpu/] [hlttrp.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 Halt Trap Flip-Flop (HLTTRP)
7
--!
8
--! \details
9
--!      When the Halt Trap Flip-Flop is asserted, the CPU will
10
--!      HALT at the end of the current instruction.
11
--!
12
--!      The HLTTRB register is modified under the following
13
--!      conditions:
14
--!      -# the HLTTRP Register is cleared on entry to the HALT
15
--!         state, and
16
--!      -# the HLTTRP Register is set when a Halt (HLT)
17
--!         instruction is executed, and
18
--!      -# the HLTTRP Register is cleared when the unit is
19
--!         configured as a HD-6120, and the unit is in Panel
20
--!         Mode, and the Panel Go (PGO) instruction is
21
--!         executed.
22
--!
23
--! \file
24
--!      hlttrp.vhd
25
--!
26
--! \author
27
--!      Rob Doyle - doyle (at) cox (dot) net
28
--!
29
--------------------------------------------------------------------
30
--
31
--  Copyright (C) 2009 Rob Doyle
32
--
33
-- This source file may be used and distributed without
34
-- restriction provided that this copyright statement is not
35
-- removed from the file and that any derivative work contains
36
-- the original copyright notice and the associated disclaimer.
37
--
38
-- This source file is free software; you can redistribute it
39
-- and/or modify it under the terms of the GNU Lesser General
40
-- Public License as published by the Free Software Foundation;
41
-- version 2.1 of the License.
42
--
43
-- This source is distributed in the hope that it will be
44
-- useful, but WITHOUT ANY WARRANTY; without even the implied
45
-- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
46
-- PURPOSE. See the GNU Lesser General Public License for more
47
-- details.
48
--
49
-- You should have received a copy of the GNU Lesser General
50
-- Public License along with this source; if not, download it
51
-- from http://www.gnu.org/licenses/lgpl.txt
52
--
53
--------------------------------------------------------------------
54
--
55
-- Comments are formatted for doxygen
56
--
57
 
58
library ieee;                                   --! IEEE Library
59
use ieee.std_logic_1164.all;                    --! IEEE 1164
60
use work.cpu_types.all;                         --! Types
61
 
62
--
63
--! CPU Halt Trap Flip-Flop (HLTTRP) Entity
64
--
65
 
66
entity eHLTTRP is port (
67
    sys      : in  sys_t;                       --! Clock/Reset
68
    hlttrpOP : in  hlttrpOP_t;                  --! HLTTRP Operation
69
    HLTTRP   : out std_logic                    --! HLTTRP Output
70
);
71
end eHLTTRP;
72
 
73
--
74
--! CPU Halt Trap Flip-Flop (HLTTRP) RTL
75
--
76
 
77
architecture rtl of eHLTTRP is
78
 
79
    signal hlttrpREG : std_logic;               --! Hlttrp Flip-Flop
80
    signal hlttrpMUX : std_logic;               --! Hlttrp Flip-Flop Multiplexer
81
 
82
begin
83
 
84
    --
85
    -- HLTTRP Multiplexer
86
    --
87
 
88
    with hlttrpOP select
89
        hlttrpMUX <= hlttrpREG when hlttrpopNOP,
90
                     '0'      when hlttrpopCLR,
91
                     '1'      when hlttrpopSET;
92
 
93
    --
94
    --! HLTTRP Register
95
    --
96
 
97
    REG_HLTTRP : process(sys)
98
    begin
99
        if sys.rst = '1' then
100
            hlttrpREG <= '0';
101
        elsif rising_edge(sys.clk) then
102
            hlttrpREG <= hlttrpMUX;
103
        end if;
104
    end process REG_HLTTRP;
105
 
106
    HLTTRP <= hlttrpREG;
107
 
108
end rtl;

powered by: WebSVN 2.1.0

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