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

Subversion Repositories plb2wbbridge

[/] [plb2wbbridge/] [trunk/] [systems/] [EDK_Libs/] [WishboneIPLib/] [pcores/] [plb2wb_bridge_v1_00_a/] [hdl/] [vhdl/] [plb2wb_pkg.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 feddischso
----------------------------------------------------------------------
2
----                                                              ----
3
----  PLB2WB-Bridge                                               ----
4
----                                                              ----
5
----  This file is part of the PLB-to-WB-Bridge project           ----
6
----  http://opencores.org/project,plb2wbbridge                   ----
7
----                                                              ----
8
----  Description                                                 ----
9
----  Implementation of a PLB-to-WB-Bridge according to           ----
10
----  PLB-to-WB Bridge specification document.                    ----
11
----                                                              ----
12
----  To Do:                                                      ----
13
----   Nothing                                                    ----
14
----                                                              ----
15
----  Author(s):                                                  ----
16
----      - Christian Haettich                                    ----
17
----        feddischson@opencores.org                             ----
18
----                                                              ----
19
----------------------------------------------------------------------
20
----                                                              ----
21
---- Copyright (C) 2010 Authors                                   ----
22
----                                                              ----
23
---- This source file may be used and distributed without         ----
24
---- restriction provided that this copyright statement is not    ----
25
---- removed from the file and that any derivative work contains  ----
26
---- the original copyright notice and the associated disclaimer. ----
27
----                                                              ----
28
---- This source file is free software; you can redistribute it   ----
29
---- and/or modify it under the terms of the GNU Lesser General   ----
30
---- Public License as published by the Free Software Foundation; ----
31
---- either version 2.1 of the License, or (at your option) any   ----
32
---- later version.                                               ----
33
----                                                              ----
34
---- This source is distributed in the hope that it will be       ----
35
---- useful, but WITHOUT ANY WARRANTY; without even the implied   ----
36
---- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ----
37
---- PURPOSE.  See the GNU Lesser General Public License for more ----
38
---- details.                                                     ----
39
----                                                              ----
40
---- You should have received a copy of the GNU Lesser General    ----
41
---- Public License along with this source; if not, download it   ----
42
---- from http://www.opencores.org/lgpl.shtml                     ----
43
----                                                              ----
44
----------------------------------------------------------------------
45
 
46
 
47
library ieee;
48
use ieee.std_logic_1164.all;
49
use ieee.numeric_std.all;
50
use ieee.std_logic_unsigned.all;
51
 
52
package plb2wb_pkg is
53
 
54
   --
55
   --    The range of the address pipeline depth
56
   constant PIPE_D_MIN        : integer := 2;
57
   constant PIPE_D_MAX        : integer := 512;
58
 
59
 
60
   --     The range of the wishbone-data-bus width
61
   constant WB_DWIDTH_MIN     : integer := 32;
62
   constant WB_DWIDTH_MAX     : integer := 64;
63
 
64
   --     The range of the wishbone-address-bus width
65
   constant WB_AWIDTH_MIN     : integer := 32;
66
   constant WB_AWIDTH_MAX     : integer := 64;
67
 
68
   constant PLB_DWIDTH_MIN    : integer := 32;
69
   constant PLB_DWIDTH_MAX    : integer := 128;
70
 
71
 
72
 
73
 
74
   --
75
   -- error and reset info types and functions
76
   --
77
   constant STATUS2PLB_INFO_SIZE : integer := 3;
78
 
79
   constant STATUS2PLB_W_ERR     : integer := 0 ;
80
   constant STATUS2PLB_RST       : integer := 1 ;
81
   constant STATUS2PLB_IRQ       : integer := 2 ;
82
 
83
   --     The size data-size of the read/write buffer
84
   constant RBUF_DWIDTH32     : integer := 33;
85
   constant WBUF_DWIDTH32     : integer := 32;
86
 
87
 
88
 
89
   constant STATUS_CONTINUE  : std_logic_vector := "0";
90
   constant STATUS_ABORT     : std_logic_vector := "1";
91
 
92
 
93
 
94
   constant IRQ_INFO_SIZE  : integer := 32;
95
 
96
 
97
   function log2( steps : natural ) return natural;
98
 
99
end package plb2wb_pkg;
100
 
101
 
102
 
103
package body plb2wb_pkg is
104
 
105
 
106
   function log2( steps : natural ) return natural is
107
   variable size : natural := 1;
108
   begin
109
      while( 2**size < steps ) loop
110
         size := size + 1;
111
      end loop;
112
      return size;
113
   end log2;
114
 
115
end package body plb2wb_pkg;
116
 
117
 

powered by: WebSVN 2.1.0

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