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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.5/] [rtl/] [ibus/] [iblib.vhd] - Blame information for rev 16

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

Line No. Rev Author Line
1 2 wfjm
-- $Id: iblib.vhd 314 2010-07-09 17:38:41Z mueller $
2
--
3
-- Copyright 2008-2010 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
-- Package Name:   iblib
16
-- Description:    Definitions for ibus interface and bus entities
17
--
18
-- Dependencies:   -
19
-- Tool versions:  xst 8.1, 8.2, 9.1, 9.2; ghdl 0.18-0.25
20
-- Revision History: 
21
-- Date         Rev Version  Comment
22
-- 2010-06-11   303   1.1    added racc,cacc signals to ib_mreq_type
23
-- 2009-06-01   221   1.0.1  added dip signal to ib_mreq_type
24
-- 2008-08-22   161   1.0    Initial version (extracted from pdp11.vhd)
25
------------------------------------------------------------------------------
26
 
27
library ieee;
28
use ieee.std_logic_1164.all;
29
use ieee.std_logic_arith.all;
30
 
31
use work.slvtypes.all;
32
 
33
package iblib is
34
 
35
type ib_mreq_type is record             -- ibus - master request
36
  req  : slbit;                         -- request
37
  we   : slbit;                         -- write enable
38
  be0  : slbit;                         -- byte enable low
39
  be1  : slbit;                         -- byte enable high
40
  dip  : slbit;                         -- data in pause: rmw cycle 1st part
41
  cacc : slbit;                         -- console access
42
  racc : slbit;                         -- remote access
43
  addr : slv13_1;                       -- address bit(12:1)
44
  din  : slv16;                         -- data (input to slave)
45
end record ib_mreq_type;
46
 
47
constant ib_mreq_init : ib_mreq_type :=
48
  ('0','0','0','0',                     -- req, we, be0, be1,
49
   '0','0','0',                         -- dip, cacc, racc
50
   (others=>'0'),                       -- addr
51
   (others=>'0'));                      -- din
52
 
53
type ib_sres_type is record             -- ibus - slave response
54
  ack  : slbit;                         -- acknowledge
55
  busy : slbit;                         -- busy
56
  dout : slv16;                         -- data (output from slave)
57
end record ib_sres_type;
58
 
59
constant ib_sres_init : ib_sres_type :=
60
  ('0','0',                             -- ack, busy
61
   (others=>'0'));                      -- dout
62
 
63
type ib_sres_vector is array (natural range <>) of ib_sres_type;
64
 
65
subtype ibf_byte1  is integer range 15 downto 8;
66
subtype ibf_byte0  is integer range  7 downto 0;
67
 
68
component ib_sres_or_2 is               -- ibus result or, 2 input
69
  port (
70
    IB_SRES_1 :  in ib_sres_type;                 -- ib_sres input 1
71
    IB_SRES_2 :  in ib_sres_type := ib_sres_init; -- ib_sres input 2
72
    IB_SRES_OR : out ib_sres_type       -- ib_sres or'ed output
73
  );
74
end component;
75
component ib_sres_or_3 is               -- ibus result or, 3 input
76
  port (
77
    IB_SRES_1 :  in ib_sres_type;                 -- ib_sres input 1
78
    IB_SRES_2 :  in ib_sres_type := ib_sres_init; -- ib_sres input 2
79
    IB_SRES_3 :  in ib_sres_type := ib_sres_init; -- ib_sres input 3
80
    IB_SRES_OR : out ib_sres_type       -- ib_sres or'ed output
81
  );
82
end component;
83
component ib_sres_or_4 is               -- ibus result or, 4 input
84
  port (
85
    IB_SRES_1 :  in ib_sres_type;                 -- ib_sres input 1
86
    IB_SRES_2 :  in ib_sres_type := ib_sres_init; -- ib_sres input 2
87
    IB_SRES_3 :  in ib_sres_type := ib_sres_init; -- ib_sres input 3
88
    IB_SRES_4 :  in ib_sres_type := ib_sres_init; -- ib_sres input 4
89
    IB_SRES_OR : out ib_sres_type       -- ib_sres or'ed output
90
  );
91
end component;
92
 
93
component ib_sres_or_gen is             -- ibus result or, generic
94
  generic (
95
    WIDTH : natural := 4);              -- number of input ports
96
  port (
97
    IB_SRES_IN : in ib_sres_vector(1 to WIDTH); -- ib_sres input array
98
    IB_SRES_OR : out ib_sres_type               -- ib_sres or'ed output
99
  );
100
end component;
101
 
102
type intmap_type is record              -- interrupt map entry type
103
  vec : integer;                        -- vector address
104
  pri : integer;                        -- priority
105
end record intmap_type;
106
constant intmap_init : intmap_type := (0,0);
107
 
108
type intmap_array_type is array (15 downto 0) of intmap_type;
109
constant intmap_array_init : intmap_array_type := (others=>intmap_init);
110
 
111
component ib_intmap is                  -- external interrupt mapper
112
  generic (
113
    INTMAP : intmap_array_type := intmap_array_init);
114
  port (
115
    EI_REQ : in slv16_1;                -- interrupt request lines
116
    EI_ACKM : in slbit;                 -- interrupt acknowledge (from master)
117
    EI_ACK : out slv16_1;               -- interrupt acknowledge (to requestor)
118
    EI_PRI : out slv3;                  -- interrupt priority
119
    EI_VECT : out slv9_2                -- interrupt vector
120
  );
121
end component;
122
 
123
end package iblib;

powered by: WebSVN 2.1.0

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