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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [processor/] [VHDL/] [common/] [scarts_amba_pkg.vhd] - Blame information for rev 17

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

Line No. Rev Author Line
1 3 jlechner
-----------------------------------------------------------------------
2
-- This file is part of SCARTS.
3
-- 
4
-- SCARTS is free software: you can redistribute it and/or modify
5
-- it under the terms of the GNU General Public License as published by
6
-- the Free Software Foundation, either version 3 of the License, or
7
-- (at your option) any later version.
8
-- 
9
-- SCARTS is distributed in the hope that it will be useful,
10
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
11
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
-- GNU General Public License for more details.
13
-- 
14
-- You should have received a copy of the GNU General Public License
15
-- along with SCARTS.  If not, see <http://www.gnu.org/licenses/>.
16
-----------------------------------------------------------------------
17
 
18
 
19
library ieee;
20
use ieee.std_logic_1164.all;
21
 
22
 
23
package scarts_amba_pkg is
24
 
25
  constant MAX_AHB_IRQ    : integer := 8;   -- maximum interrupts
26
 
27
  constant HSIZE_BYTE:    std_logic_vector(2 downto 0) := "000";
28
  constant HSIZE_HWORD:   std_logic_vector(2 downto 0) := "001";
29
  constant HSIZE_WORD:    std_logic_vector(2 downto 0) := "010";
30
  constant HSIZE_DWORD:   std_logic_vector(2 downto 0) := "011";
31
  constant HSIZE_4WORD:   std_logic_vector(2 downto 0) := "100";
32
  constant HSIZE_8WORD:   std_logic_vector(2 downto 0) := "101";
33
  constant HSIZE_16WORD:  std_logic_vector(2 downto 0) := "110";
34
  constant HSIZE_32WORD:  std_logic_vector(2 downto 0) := "111";
35
 
36
  constant HRESP_OKAY:    std_logic_vector(1 downto 0) := "00";
37
  constant HRESP_ERROR:   std_logic_vector(1 downto 0) := "01";
38
  constant HRESP_RETRY:   std_logic_vector(1 downto 0) := "10";
39
  constant HRESP_SPLIT:   std_logic_vector(1 downto 0) := "11";
40
 
41
  constant HBURST_SINGLE: std_logic_vector(2 downto 0) := "000";
42
  constant HBURST_INCR:   std_logic_vector(2 downto 0) := "001";
43
  constant HBURST_WRAP4:  std_logic_vector(2 downto 0) := "010";
44
  constant HBURST_INCR4:  std_logic_vector(2 downto 0) := "011";
45
  constant HBURST_WRAP8:  std_logic_vector(2 downto 0) := "100";
46
  constant HBURST_INCR8:  std_logic_vector(2 downto 0) := "101";
47
  constant HBURST_WRAP16: std_logic_vector(2 downto 0) := "110";
48
  constant HBURST_INCR16: std_logic_vector(2 downto 0) := "111";
49
 
50
  constant HTRANS_IDLE:   std_logic_vector(1 downto 0) := "00";
51
  constant HTRANS_BUSY:   std_logic_vector(1 downto 0) := "01";
52
  constant HTRANS_NONSEQ: std_logic_vector(1 downto 0) := "10";
53
  constant HTRANS_SEQ:    std_logic_vector(1 downto 0) := "11";
54
 
55
  -- AHB master inputs (based on AMBA 2.0 specification)
56
 
57
  type ahb_master_in_type is record
58
    hgrant      : std_logic;
59
    hready      : std_ulogic;
60
    hresp       : std_logic_vector(1 downto 0);
61
    hrdata      : std_logic_vector(31 downto 0);
62
    hirq        : std_logic_vector(MAX_AHB_IRQ-1 downto 0); -- interrupt bus   
63
  end record;
64
 
65
  constant AMBA_MASTER_IN_VOID : ahb_master_in_type := ('0', '0',
66
                                                        (others => '0'),
67
                                                        (others => '0'),
68
                                                        (others => '0'));
69
 
70
  -- AHB master outputs (based on AMBA 2.0 specification) 
71
 
72
  type ahb_master_out_type is record
73
    hbusreq     : std_ulogic;
74
    hlock       : std_ulogic;
75
    htrans      : std_logic_vector(1 downto 0);
76
    haddr       : std_logic_vector(31 downto 0);
77
    hwrite      : std_ulogic;
78
    hsize       : std_logic_vector(2 downto 0);
79
    hburst      : std_logic_vector(2 downto 0);
80
    hprot       : std_logic_vector(3 downto 0);
81
    hwdata      : std_logic_vector(31 downto 0);
82
  end record;
83
 
84
  constant AMBA_MASTER_OUT_VOID : ahb_master_out_type := ('0', '0', (others => '0'),
85
                                                          (others => '0'), '0',
86
                                                          (others => '0'),
87
                                                          (others => '0'),
88
                                                          (others => '0'),
89
                                                          (others => '0'));
90
 
91
end scarts_amba_pkg;
92
 

powered by: WebSVN 2.1.0

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