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

Subversion Repositories mips_enhanced

[/] [mips_enhanced/] [trunk/] [grlib-gpl-1.0.19-b3188/] [lib/] [gaisler/] [pci/] [pcilib.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dimamali
------------------------------------------------------------------------------
2
--  This file is a part of the GRLIB VHDL IP LIBRARY
3
--  Copyright (C) 2003, Gaisler Research
4
--
5
--  This program is free software; you can redistribute it and/or modify
6
--  it under the terms of the GNU General Public License as published by
7
--  the Free Software Foundation; either version 2 of the License, or
8
--  (at your option) any later version.
9
--
10
--  This program is distributed in the hope that it will be useful,
11
--  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
--  GNU General Public License for more details.
14
--
15
--  You should have received a copy of the GNU General Public License
16
--  along with this program; if not, write to the Free Software
17
--  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
18
-----------------------------------------------------------------------------
19
-- Entity:      pcilib
20
-- File:        pcilib.vhd
21
-- Author:      Alf Vaerneus - Gaisler Research
22
-- Description: Package with type declarations for PCI registers & constants
23
------------------------------------------------------------------------------
24
 
25
library ieee;
26
use ieee.std_logic_1164.all;
27
library grlib;
28
use grlib.amba.all;
29
use grlib.stdlib.all;
30
 
31
package pcilib is
32
 
33
constant zero : std_logic_vector(31 downto 0) := (others => '0');
34
constant addzero : std_logic_vector(31 downto 0) := (others => '0');
35
subtype word4 is std_logic_vector(3 downto 0);
36
subtype word32 is std_logic_vector(31 downto 0);
37
-- Constants for PCI commands
38
constant pci_memory_read : word4 := "0110";
39
constant pci_memory_write : word4 := "0111";
40
constant pci_config_read : word4 := "1010";
41
constant pci_config_write : word4 := "1011";
42
constant INT_ACK      : word4 := "0000";
43
constant SPEC_CYCLE   : word4 := "0001";
44
constant IO_READ      : word4 := "0010";
45
constant IO_WRITE     : word4 := "0011";
46
constant MEM_READ     : word4 := "0110";
47
constant MEM_WRITE    : word4 := "0111";
48
constant CONF_READ    : word4 := "1010";
49
constant CONF_WRITE   : word4 := "1011";
50
constant MEM_R_MULT   : word4 := "1100";
51
constant DAC          : word4 := "1101";
52
constant MEM_R_LINE   : word4 := "1110";
53
constant MEM_W_INV    : word4 := "1111";
54
-- Constants for word size
55
constant W_SIZE_8_n     : word4 := "1110"; -- word size active low
56
constant W_SIZE_16_n    : word4 := "1100";
57
constant W_SIZE_32_n    : word4 := "0000";
58
 
59
 
60
 
61
type pci_config_command_type is record
62
--  ioen     : std_logic; -- I/O access enable
63
  men      : std_logic; -- Memory access enable
64
  msen     : std_logic; -- Master enable
65
--  spcen    : std_logic; -- Special cycle enable
66
  mwie     : std_logic; -- Memory write and invalidate enable
67
--  vgaps    : std_logic; -- VGA palette snooping enable
68
  per      : std_logic; -- Parity error response enable
69
--  wcc      : std_logic; -- Address stepping enable
70
--  serre    : std_logic; -- Enable SERR# driver
71
--  fbtbe    : std_logic; -- Fast back-to-back enable
72
end record;
73
type pci_config_status_type is record
74
--  c66mhz   : std_logic; -- 66MHz capability
75
--  udf      : std_logic; -- UDF supported
76
--  fbtbc    : std_logic; -- Fast back-to-back capability
77
  dped     : std_logic; -- Data parity error detected
78
--  dst      : std_logic_vector(1 downto 0); -- DEVSEL timing
79
  sta      : std_logic; -- Signaled target abort
80
  rta      : std_logic; -- Received target abort
81
  rma      : std_logic; -- Received master abort
82
--  sse      : std_logic; -- Signaled system error
83
  dpe      : std_logic; -- Detected parity error
84
end record;
85
--type pci_config_type is record
86
--  conf_en  : std_logic;
87
--  bus      : std_logic_vector(7 downto 0);
88
--  dev      : std_logic_vector(4 downto 0);
89
--  func     : std_logic_vector(2 downto 0);
90
--  reg      : std_logic_vector(5 downto 0);
91
--  data     : std_logic_vector(31 downto 0);
92
--end record;
93
type pci_sigs_type is record
94
  ad       : std_logic_vector(31 downto 0);
95
  cbe      : std_logic_vector(3 downto 0);
96
  frame    : std_logic; -- Master frame
97
  devsel   : std_logic; -- PCI device select
98
  trdy     : std_logic; -- Target ready
99
  irdy     : std_logic; -- Master ready
100
  stop     : std_logic; -- Target stop request
101
  par      : std_logic; -- PCI bus parity
102
  req      : std_logic; -- Master bus request
103
  perr     : std_logic; -- Parity Error
104
  oe_par   : std_logic;
105
  oe_ad    : std_logic;
106
  oe_ctrl  : std_logic;
107
  oe_cbe   : std_logic;
108
  oe_frame : std_logic;
109
  oe_irdy  : std_logic;
110
  oe_req   : std_logic;
111
  oe_perr  : std_logic;
112
end record;
113
 
114
 
115
end ;

powered by: WebSVN 2.1.0

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