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

Subversion Repositories w11

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

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

Line No. Rev Author Line
1 30 wfjm
-- $Id: pdp11_ledmux.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_ledmux - syn
16
-- Description:    pdp11: hio led mux
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-27   652   1.0    Initial version 
26
-- 2015-02-20   649   0.1    First draft
27
------------------------------------------------------------------------------
28
 
29
library ieee;
30
use ieee.std_logic_1164.all;
31
use ieee.numeric_std.all;
32
 
33
use work.slvtypes.all;
34
use work.pdp11.all;
35
 
36
-- ----------------------------------------------------------------------------
37
 
38
entity pdp11_ledmux is                  -- hio led mux
39
  generic (
40
    LWIDTH : positive := 8);            -- led width
41
  port (
42
    SEL : in slbit;                     -- select (0=stat;1=dr)
43
    STATLEDS : in slv8;                 -- 8 bit CPU status
44 30 wfjm
    DM_STAT_DP : in dm_stat_dp_type;    -- debug and monitor status - dpath
45 29 wfjm
    LED : out slv(LWIDTH-1 downto 0)    -- hio leds
46
  );
47
end pdp11_ledmux;
48
 
49
architecture syn of pdp11_ledmux is
50
 
51
begin
52
 
53
  assert LWIDTH=8 or LWIDTH=16
54
    report "assert(LWIDTH=8 or LWIDTH=16): unsupported LWIDTH"
55
    severity failure;
56
 
57
  proc_mux: process (SEL, STATLEDS, DM_STAT_DP.dsrc)
58
    variable iled : slv(LWIDTH-1 downto 0) := (others=>'0');
59
  begin
60
    iled := (others=>'0');
61
 
62
    if SEL = '0' then
63
      iled(STATLEDS'range) := STATLEDS;
64
    else
65
      if LWIDTH=8 then
66
        iled :=  DM_STAT_DP.dsrc(11 downto 4); --take middle part
67
      else
68
        iled :=  DM_STAT_DP.dsrc(iled'range);
69
      end if;
70
    end if;
71
 
72
    LED <= iled;
73
 
74
  end process proc_mux;
75
 
76
end syn;

powered by: WebSVN 2.1.0

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