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

powered by: WebSVN 2.1.0

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