w11 - vhd 0.794
W11 CPU core and support modules
Loading...
Searching...
No Matches
pdp11_ledmux.vhd
Go to the documentation of this file.
1-- $Id: pdp11_ledmux.vhd 1181 2019-07-08 17:00:50Z mueller $
2-- SPDX-License-Identifier: GPL-3.0-or-later
3-- Copyright 2015-2018 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4--
5------------------------------------------------------------------------------
6-- Module Name: pdp11_ledmux - syn
7-- Description: pdp11: hio led mux
8--
9-- Dependencies: -
10-- Test bench: -
11-- Target Devices: generic
12-- Tool versions: ise 14.7; viv 2018.2; ghdl 0.31-0.34
13--
14-- Revision History:
15-- Date Rev Version Comment
16-- 2018-10-07 1054 1.1 use DM_STAT_EXP instead of DM_STAT_DP
17-- 2015-02-27 652 1.0 Initial version
18-- 2015-02-20 649 0.1 First draft
19------------------------------------------------------------------------------
20
21library ieee;
22use ieee.std_logic_1164.all;
23use ieee.numeric_std.all;
24
25use work.slvtypes.all;
26use work.pdp11.all;
27
28-- ----------------------------------------------------------------------------
29
30entity pdp11_ledmux is -- hio led mux
31 generic (
32 LWIDTH : positive := 8); -- led width
33 port (
34 SEL : in slbit; -- select (0=stat;1=dr)
35 STATLEDS : in slv8; -- 8 bit CPU status
36 DM_STAT_EXP : in dm_stat_exp_type; -- debug and monitor - exports
37 LED : out slv(LWIDTH-1 downto 0) -- hio leds
38 );
39end pdp11_ledmux;
40
41architecture syn of pdp11_ledmux is
42
43begin
44
45 assert LWIDTH=8 or LWIDTH=16
46 report "assert(LWIDTH=8 or LWIDTH=16): unsupported LWIDTH"
47 severity failure;
48
49 proc_mux: process (SEL, STATLEDS, DM_STAT_EXP)
50 variable iled : slv(LWIDTH-1 downto 0) := (others=>'0');
51 begin
52 iled := (others=>'0');
53
54 if SEL = '0' then
55 iled(STATLEDS'range) := STATLEDS;
56 else
57 if LWIDTH=8 then
58 iled := DM_STAT_EXP.dp_dsrc(11 downto 4); --take middle part
59 else
60 iled := DM_STAT_EXP.dp_dsrc(iled'range);
61 end if;
62 end if;
63
64 LED <= iled;
65
66 end process proc_mux;
67
68end syn;
in STATLEDS slv8
LWIDTH positive := 8
out LED slv( LWIDTH- 1 downto 0)
in DM_STAT_EXP dm_stat_exp_type
in SEL slbit
Definition: pdp11.vhd:123
std_logic slbit
Definition: slvtypes.vhd:30
std_logic_vector( 7 downto 0) slv8
Definition: slvtypes.vhd:40
std_logic_vector slv
Definition: slvtypes.vhd:31