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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.74/] [rtl/] [w11a/] [pdp11_statleds.vhd] - Blame information for rev 30

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 wfjm
-- $Id: pdp11_statleds.vhd 677 2015-05-09 21:52:32Z mueller $
2 29 wfjm
--
3
-- Copyright 2015- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4
--
5
-- This program is free software; you may redistribute and/or modify it under
6
-- the terms of the GNU General Public License as published by the Free
7
-- Software Foundation, either version 2, or at your option any later version.
8
--
9
-- This program is distributed in the hope that it will be useful, but
10
-- WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
11
-- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12
-- for complete details.
13
--
14
------------------------------------------------------------------------------
15
-- Module Name:    pdp11_statleds - syn
16
-- Description:    pdp11: status leds
17
--
18
-- Dependencies:   -
19
-- Test bench:     -
20
-- Target Devices: generic
21
-- Tool versions:  ise 14.7; viv 2014.4; ghdl 0.31
22
--
23
-- Revision History: 
24
-- Date         Rev Version  Comment
25
-- 2015-02-20   649   1.0    Initial version 
26
------------------------------------------------------------------------------
27
--   LED  (7)    MEM_ACT_W
28
--        (6)    MEM_ACT_R
29
--        (5)    cmdbusy (all rlink access, mostly rdma)
30
--      (4:0)    if cpugo=1 show cpu mode activity
31
--                  (4) kernel mode, pri>0
32
--                  (3) kernel mode, pri=0
33
--                  (2) kernel mode, wait
34
--                  (1) supervisor mode
35
--                  (0) user mode
36
--              if cpugo=0 shows cpurust
37
--                  (4) '1'
38
--                (3:0) cpurust code
39
 
40
library ieee;
41
use ieee.std_logic_1164.all;
42
use ieee.numeric_std.all;
43
 
44
use work.slvtypes.all;
45
use work.pdp11.all;
46
 
47
-- ----------------------------------------------------------------------------
48
 
49
entity pdp11_statleds is                -- status leds
50
  port (
51
    MEM_ACT_R : in slbit;               -- memory active read
52
    MEM_ACT_W : in slbit;               -- memory active write
53
    CP_STAT : in cp_stat_type;          -- console port status
54 30 wfjm
    DM_STAT_DP : in dm_stat_dp_type;    -- debug and monitor status - dpath
55 29 wfjm
    STATLEDS : out slv8                 -- 8 bit CPU status 
56
  );
57
end pdp11_statleds;
58
 
59
architecture syn of pdp11_statleds is
60
 
61
begin
62
 
63
  proc_led: process (MEM_ACT_W, MEM_ACT_R, CP_STAT, DM_STAT_DP.psw)
64
    variable iled : slv8 := (others=>'0');
65
  begin
66
    iled := (others=>'0');
67
 
68
    iled(7) := MEM_ACT_W;
69
    iled(6) := MEM_ACT_R;
70
    iled(5) := CP_STAT.cmdbusy;
71
    if CP_STAT.cpugo = '1' then
72
      case DM_STAT_DP.psw.cmode is
73
        when c_psw_kmode =>
74
          if CP_STAT.cpuwait = '1' then
75
            iled(2) := '1';
76
          elsif unsigned(DM_STAT_DP.psw.pri) = 0 then
77
            iled(3) := '1';
78
          else
79
            iled(4) := '1';
80
          end if;
81
        when c_psw_smode =>
82
          iled(1) := '1';
83
        when c_psw_umode =>
84
          iled(0) := '1';
85
        when others => null;
86
      end case;
87
    else
88
      iled(4) := '1';
89
      iled(3 downto 0) := CP_STAT.cpurust;
90
    end if;
91
 
92
    STATLEDS <= iled;
93
 
94
  end process proc_led;
95
 
96
end syn;

powered by: WebSVN 2.1.0

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