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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.7/] [rtl/] [w11a/] [pdp11_dspmux.vhd] - Blame information for rev 36

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

Line No. Rev Author Line
1 30 wfjm
-- $Id: pdp11_dspmux.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_dspmux - syn
16
-- Description:    pdp11: hio dsp 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-22   650   1.0    Initial version 
26
-- 2015-02-21   649   0.1    First draft
27
------------------------------------------------------------------------------
28
-- selects display data
29
--   4 Digit Displays
30
--     SEL(1:0)  00  ABCLKDIV
31
--               01  DM_STAT_DP.pc
32
--               10  DISPREG 
33
--               11  DM_STAT_DP.dsrc
34
--
35
--  8 Digit Displays
36
--     SEL(1)   select DSP(7:4)
37
--                0  ABCLKDIV
38
--                1  DM_STAT_DP.pc
39
--     SEL(0)   select DSP(7:4)
40
--                0  DISPREG
41
--                1  DM_STAT_DP.dsrc
42
--                
43
 
44
library ieee;
45
use ieee.std_logic_1164.all;
46
use ieee.numeric_std.all;
47
 
48
use work.slvtypes.all;
49
use work.pdp11.all;
50
 
51
-- ----------------------------------------------------------------------------
52
 
53
entity pdp11_dspmux is               -- hio dsp mux
54
  generic (
55
    DCWIDTH : positive := 2);           -- digit counter width (2 or 3)
56
  port (
57
    SEL : in slv2;                      -- select
58
    ABCLKDIV : in slv16;                -- serport clock divider
59 30 wfjm
    DM_STAT_DP : in dm_stat_dp_type;    -- debug and monitor status - dpath
60 29 wfjm
    DISPREG : in slv16;                 -- display register
61
    DSP_DAT : out slv(4*(2**DCWIDTH)-1 downto 0)   -- display data
62
  );
63
end pdp11_dspmux;
64
 
65
architecture syn of pdp11_dspmux is
66
 
67
  subtype  dspdat_msb is integer range 4*(2**DCWIDTH)-1 downto 4*(2**DCWIDTH)-16;
68
  subtype  dspdat_lsb is integer range 15 downto 0;
69
 
70
begin
71
 
72
  assert DCWIDTH=2 or DCWIDTH=3
73
    report "assert(DCWIDTH=2 or DCWIDTH=3): unsupported DCWIDTH"
74
    severity failure;
75
 
76
  proc_mux: process (SEL, ABCLKDIV, DM_STAT_DP, DISPREG)
77
    variable idat : slv(4*(2**DCWIDTH)-1 downto 0) := (others=>'0');
78
  begin
79
    idat := (others=>'0');
80
 
81
    if DCWIDTH = 2 then
82
 
83
      case SEL is
84
        when "00" =>
85
          idat(dspdat_lsb) := ABCLKDIV;
86
        when "01" =>
87
          idat(dspdat_lsb) := DM_STAT_DP.pc;
88
        when "10" =>
89
          idat(dspdat_lsb) := DISPREG;
90
        when "11" =>
91
          idat(dspdat_lsb) := DM_STAT_DP.dsrc;
92
        when others => null;
93
      end case;
94
 
95
    else
96
 
97
      if SEL(1) = '0' then
98
        idat(dspdat_msb) := ABCLKDIV;
99
      else
100
        idat(dspdat_msb) := DM_STAT_DP.pc;
101
      end if;
102
 
103
      if SEL(0) = '0' then
104
        idat(dspdat_lsb) := DISPREG;
105
      else
106
        idat(dspdat_lsb) := DM_STAT_DP.dsrc;
107
      end if;
108
 
109
    end if;
110
 
111
    DSP_DAT <= idat;
112
 
113
  end process proc_mux;
114
 
115
end syn;

powered by: WebSVN 2.1.0

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