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/] [fifo_wdat.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.std_logic_arith.all;
50
use ieee.std_logic_unsigned.all;
51
 
52
 
53
library plb2wb_bridge_v1_00_a;
54
use plb2wb_bridge_v1_00_a.plb2wb_pkg.all;
55
 
56
 
57
entity fifo_wdat is
58
   generic
59
   (
60
      SYNCHRONY               : boolean := true; -- true = synchron
61
                                                 -- false = asynchron
62
      C_SPLB_NATIVE_DWIDTH    : integer
63
               range PLB_DWIDTH_MIN to PLB_DWIDTH_MAX := WBUF_DWIDTH32
64
   );
65
   port(
66
      rd_en   : in  std_logic      := 'X';
67
      wr_en   : in  std_logic      := 'X';
68
      wr_clk  : in  std_logic      := 'X';
69
      rst     : in  std_logic      := 'X';
70
      rd_clk  : in  std_logic      := 'X';
71
      din     : in  std_logic_vector ( WBUF_DWIDTH32-1 downto 0 );
72
      full    : out std_logic;
73
      empty   : out std_logic;
74
      dout    : out std_logic_vector ( WBUF_DWIDTH32-1 downto 0 )
75
   );
76
end entity fifo_wdat;
77
 
78
 
79
 
80
 
81
architecture IMP of fifo_wdat is
82
 
83
 
84
   component fifo_wdat_cc_32 is
85
     port (
86
       rd_en : in STD_LOGIC := 'X';
87
       wr_en : in STD_LOGIC := 'X';
88
       full : out STD_LOGIC;
89
       empty : out STD_LOGIC;
90
       clk : in STD_LOGIC := 'X';
91
       rst : in STD_LOGIC := 'X';
92
       dout : out STD_LOGIC_VECTOR ( WBUF_DWIDTH32-1 downto 0 );
93
       din : in STD_LOGIC_VECTOR ( WBUF_DWIDTH32-1 downto 0 )
94
     );
95
   end component fifo_wdat_cc_32;
96
 
97
 
98
   component fifo_wdat_ic_32 is
99
     port (
100
       rd_en : in STD_LOGIC := 'X';
101
       wr_en : in STD_LOGIC := 'X';
102
       full : out STD_LOGIC;
103
       empty : out STD_LOGIC;
104
       wr_clk : in STD_LOGIC := 'X';
105
       rst : in STD_LOGIC := 'X';
106
       rd_clk : in STD_LOGIC := 'X';
107
       dout : out STD_LOGIC_VECTOR ( WBUF_DWIDTH32-1 downto 0 );
108
       din : in STD_LOGIC_VECTOR ( WBUF_DWIDTH32-1 downto 0 )
109
     );
110
   end component fifo_wdat_ic_32;
111
 
112
begin
113
 
114
 
115
 
116
fifo1: if ( SYNCHRONY = true and C_SPLB_NATIVE_DWIDTH = WBUF_DWIDTH32 )
117
generate
118
U_fifo_cc : fifo_wdat_cc_32
119
   port map(
120
      rd_en    => rd_en,
121
      wr_en    => wr_en,
122
      full     => full,
123
      empty    => empty,
124
      clk      => rd_clk,     -- rd_clk is the same than wr_clk
125
      rst      => rst,
126
      dout     => dout,
127
      din      => din
128
   );
129
end generate fifo1;
130
 
131
fifo2: if ( SYNCHRONY = false and C_SPLB_NATIVE_DWIDTH = WBUF_DWIDTH32 )
132
generate
133
U_fifo_ic : fifo_wdat_ic_32
134
   port map(
135
      rd_en    => rd_en,
136
      wr_en    => wr_en,
137
      full     => full,
138
      empty    => empty,
139
      rd_clk   => rd_clk,
140
      wr_clk   => wr_clk,
141
      rst      => rst,
142
      dout     => dout,
143
      din      => din
144
   );
145
end generate fifo2;
146
 
147
 
148
 
149
 
150
end architecture IMP;

powered by: WebSVN 2.1.0

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