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

Subversion Repositories pdp8

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

powered by: WebSVN 2.1.0

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