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_wbuf.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
library plb2wb_bridge_v1_00_a;
53
 
54
 
55
 
56
entity plb2wb_wbuf is
57
 
58
   generic(
59
      SYNCHRONY                     : boolean := true;
60
      C_SPLB_DWIDTH                 : integer := 32;
61
      C_SPLB_NATIVE_DWIDTH          : integer := 32;
62
      C_SPLB_SIZE_WIDTH             : integer := 4
63
   );
64
   port(
65
      wb_clk_i                      : IN  std_logic;
66
      SPLB_Clk                      : IN  std_logic;
67
      plb2wb_rst                    : IN  std_logic;
68
 
69
 
70
      PLB_size                      : in  std_logic_vector( 0 to C_SPLB_SIZE_WIDTH-1   );
71
      PLB_wrDBus                    : IN  std_logic_vector( 0 to C_SPLB_DWIDTH-1       );
72
 
73
 
74
      TCU_wbufWEn                   : in  std_logic;
75
      TCU_wbufREn                   : in  std_logic;
76
 
77
      WBF_empty                     : OUT std_logic;
78
      WBF_full                      : OUT std_logic;
79
      WBF_wBus                      : OUT std_logic_vector( 0 to C_SPLB_NATIVE_DWIDTH-1  )
80
 
81
 
82
 
83
   );
84
end entity plb2wb_wbuf;
85
 
86
 
87
architecture IMP_32 of plb2wb_wbuf is
88
 
89
   constant FIFO_IN_OUT_SIZE  : integer := C_SPLB_NATIVE_DWIDTH ;
90
 
91
   signal wbuf_dout           : std_logic_vector( FIFO_IN_OUT_SIZE-1 downto 0 );
92
   signal wbuf_din            : std_logic_vector( FIFO_IN_OUT_SIZE-1 downto 0 );
93
   signal wbuf_wen            : std_logic;
94
 
95
begin
96
 
97
   --TODO: WBF_full must be or'ed with mid-buffer-full
98
   -- and it must not be written to mid-buffer if it is full!
99
 
100
 
101
   wbuf_wen <= TCU_wbufWEn;
102
   wbuf_din <= PLB_wrDBus( 0 to 31 );
103
   WBF_wBus <= wbuf_dout( 31 downto 0 );
104
 
105
   wbuf : entity plb2wb_bridge_v1_00_a.fifo_wdat( IMP )
106
   generic map(
107
      SYNCHRONY            => SYNCHRONY,
108
      C_SPLB_NATIVE_DWIDTH => C_SPLB_NATIVE_DWIDTH
109
   )
110
   port map(
111
      rd_en          => TCU_wbufREn,
112
      wr_en          => wbuf_wen,
113
      full           => WBF_full,
114
      empty          => WBF_empty,
115
      wr_clk         => SPLB_Clk,
116
      rst            => plb2wb_rst,
117
      rd_clk         => wb_clk_i,
118
      dout           => wbuf_dout,
119
      din            => wbuf_din
120
   );
121
 
122
end architecture IMP_32;

powered by: WebSVN 2.1.0

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