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

Subversion Repositories pdp8

[/] [pdp8/] [trunk/] [pdp8/] [cpu/] [emode.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 Arithmetic Mode A (EMODE) Register
7
--!
8
--! \file
9
--!      emode.vhd
10
--!
11
--! \author
12
--!      Rob Doyle - doyle (at) cox (dot) net
13
--!
14
--------------------------------------------------------------------
15
--
16
--  Copyright (C) 2009 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 Arithmetic Mode A (EMODE) Register Entity
50
--
51
 
52
entity eEMODE is port (
53
    sys     : in  sys_t;                        --! Clock/Reset
54
    emodeOP : in  emodeOP_t;                    --! emode Operation
55
    EMODE   : out std_logic                     --! emode Output
56
);
57
end eEMODE;
58
 
59
--
60
--! CPU Extended Arithmetic Mode A (EMODE) Register RTL
61
--
62
 
63
architecture rtl of eEMODE is
64
 
65
    signal emodeREG : std_logic;                --! EAE Mode Flip-Flop
66
    signal emodeMUX : std_logic;                --! EAE Mode Multiplexer
67
 
68
begin
69
 
70
    --
71
    -- EMODE Multiplexer
72
    --
73
 
74
    with emodeop select
75
        emodeMUX <= emodeREG when emodeopNOP,   -- EMODE <- EMODE
76
                    '0'      when emodeopCLR,   -- EMODE <- '0'
77
                    '1'      when emodeopSET;   -- EMODE <- '1'
78
 
79
    --
80
    --! EMODE Register
81
    --
82
 
83
    REG_EMODE : process(sys)
84
    begin
85
        if sys.rst = '1' then
86
            emodeREG <= '0';
87
        elsif rising_edge(sys.clk) then
88
            emodeREG <= emodeMUX;
89
        end if;
90
    end process REG_EMODE;
91
 
92
    EMODE <= emodeREG;
93
 
94
end rtl;

powered by: WebSVN 2.1.0

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