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

Subversion Repositories astron_fifo

[/] [astron_fifo/] [trunk/] [common_fifo_rd.vhd] - Blame information for rev 2

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 danv
-------------------------------------------------------------------------------
2
--
3
-- Copyright (C) 2010
4
-- ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
5
-- JIVE (Joint Institute for VLBI in Europe) <http://www.jive.nl/>
6
-- P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
7
--
8
-- This program is free software: you can redistribute it and/or modify
9
-- it under the terms of the GNU General Public License as published by
10
-- the Free Software Foundation, either version 3 of the License, or
11
-- (at your option) any later version.
12
--
13
-- This program is distributed in the hope that it will be useful,
14
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
15
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
-- GNU General Public License for more details.
17
--
18
-- You should have received a copy of the GNU General Public License
19
-- along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
--
21
-------------------------------------------------------------------------------
22
 
23
LIBRARY IEEE, common_pkg_lib;
24
USE IEEE.std_logic_1164.ALL;
25
USE IEEE.numeric_std.ALL;
26
USE common_pkg_lib.common_pkg.ALL;
27
 
28
-- Purpose: Adapt from ready latency 1 to 0 to make a look ahead FIFO
29
-- Description: -
30
-- Remark:
31
-- . Derived from dp_latency_adapter.vhd.
32
-- . There is no need for a rd_emp output signal, because a show ahead FIFO
33
--   will have rd_val='0' when it is empty.
34
 
35
 
36
ENTITY common_fifo_rd IS
37
  GENERIC (
38
    g_dat_w : NATURAL := 18
39
  );
40
  PORT (
41
    rst        : IN  STD_LOGIC;
42
    clk        : IN  STD_LOGIC;
43
    -- ST sink: RL = 1
44
    fifo_req   : OUT STD_LOGIC;
45
    fifo_dat   : IN  STD_LOGIC_VECTOR(g_dat_w-1 DOWNTO 0);
46
    fifo_val   : IN  STD_LOGIC := '0';
47
    -- ST source: RL = 0
48
    rd_req     : IN  STD_LOGIC;
49
    rd_dat     : OUT STD_LOGIC_VECTOR(g_dat_w-1 DOWNTO 0);
50
    rd_val     : OUT STD_LOGIC
51
  );
52
END common_fifo_rd;
53
 
54
 
55
ARCHITECTURE wrap OF common_fifo_rd IS
56
 
57
 
58
BEGIN
59
 
60
  u_rl0 : ENTITY work.common_rl_decrease
61
  GENERIC MAP (
62
    g_adapt       => TRUE,
63
    g_dat_w       => g_dat_w
64
  )
65
  PORT MAP (
66
    rst           => rst,
67
    clk           => clk,
68
    -- ST sink: RL = 1
69
    snk_out_ready => fifo_req,
70
    snk_in_dat    => fifo_dat,
71
    snk_in_val    => fifo_val,
72
    -- ST source: RL = 0
73
    src_in_ready  => rd_req,
74
    src_out_dat   => rd_dat,
75
    src_out_val   => rd_val
76
  );
77
 
78
END wrap;

powered by: WebSVN 2.1.0

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