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

Subversion Repositories pdp8

[/] [pdp8/] [trunk/] [pdp8/] [kc8e.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
--!      KC8E Front Panel
7
--!
8
--! \details
9
--!      This package contatins the interface to the front panel
10
--!      switches and LEDs.
11
--!
12
--! \file
13
--!      kc8e.vhd
14
--!
15
--! \author
16
--!      Rob Doyle - doyle (at) cox (dot) net
17
--!
18
--------------------------------------------------------------------
19
--
20
--  Copyright (C) 2010, 2011 Rob Doyle
21
--
22
-- This source file may be used and distributed without
23
-- restriction provided that this copyright statement is not
24
-- removed from the file and that any derivative work contains
25
-- the original copyright notice and the associated disclaimer.
26
--
27
-- This source file is free software; you can redistribute it
28
-- and/or modify it under the terms of the GNU Lesser General
29
-- Public License as published by the Free Software Foundation;
30
-- version 2.1 of the License.
31
--
32
-- This source is distributed in the hope that it will be
33
-- useful, but WITHOUT ANY WARRANTY; without even the implied
34
-- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
35
-- PURPOSE. See the GNU Lesser General Public License for more
36
-- details.
37
--
38
-- You should have received a copy of the GNU Lesser General
39
-- Public License along with this source; if not, download it
40
-- from http://www.gnu.org/licenses/lgpl.txt
41
--
42
--------------------------------------------------------------------
43
--
44
-- Comments are formatted for doxygen
45
--
46
 
47
library ieee;                                   --! IEEE Library
48
use ieee.std_logic_1164.all;                    --! IEEE 1164
49
use work.kc8e_types.all;                        --! KC8E Types
50
use work.cpu_types.all;                         --! CPU Types
51
 
52
--
53
--! KC8E Front Panel Entity
54
--
55
 
56
entity eKC8E is port (
57
    sys     : in  sys_t;                        --! Clock/Reset
58
    cpu     : in  cpu_t;                        --! CPU Registers
59
    swROT   : in  swROT_t;                      --! Rotary Switch
60
    swDATA  : in  data_t;                       --! Switch Data
61
    ledRUN  : out std_logic;                    --! RUN LED
62
    ledADDR : out xaddr_t;                      --! Address LEDS
63
    ledDATA : out data_t;                       --! Data LEDS
64
    dev     : out dev_t                         --! Device Data
65
);
66
 
67
end eKC8E;
68
 
69
--
70
--! KC8E Front Panel RTL
71
--
72
 
73
architecture rtl of eKC8E is
74
 
75
begin
76
 
77
    with swROT select
78
        ledDATA <= cpu.regs.PC     when dispPC,
79
                   cpu.regs.AC     when dispAC,
80
                   cpu.regs.IR     when dispIR,
81
                   cpu.regs.MA     when dispMA,
82
                   cpu.regs.MD     when dispMD,
83
                   cpu.regs.MQ     when dispMQ,
84
                   cpu.regs.ST     when dispST,
85
                   cpu.regs.SC     when dispSC,
86
                   (others => '0') when others;
87
 
88
    ledADDR <= cpu.regs.XMA & cpu.regs.MA;
89
    ledRUN  <= cpu.run;
90
    dev     <= nullDEV;
91
 
92
end rtl;

powered by: WebSVN 2.1.0

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