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 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 danv
-------------------------------------------------------------------------------
2
--
3 3 danv
-- Copyright 2020
4 2 danv
-- ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
5
-- P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
6 3 danv
-- 
7
-- Licensed under the Apache License, Version 2.0 (the "License");
8
-- you may not use this file except in compliance with the License.
9
-- You may obtain a copy of the License at
10
-- 
11
--     http://www.apache.org/licenses/LICENSE-2.0
12
-- 
13
-- Unless required by applicable law or agreed to in writing, software
14
-- distributed under the License is distributed on an "AS IS" BASIS,
15
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
-- See the License for the specific language governing permissions and
17
-- limitations under the License.
18 2 danv
--
19
-------------------------------------------------------------------------------
20
 
21
LIBRARY IEEE, common_pkg_lib;
22
USE IEEE.std_logic_1164.ALL;
23
USE IEEE.numeric_std.ALL;
24
USE common_pkg_lib.common_pkg.ALL;
25
 
26
-- Purpose: Adapt from ready latency 1 to 0 to make a look ahead FIFO
27
-- Description: -
28
-- Remark:
29
-- . Derived from dp_latency_adapter.vhd.
30
-- . There is no need for a rd_emp output signal, because a show ahead FIFO
31
--   will have rd_val='0' when it is empty.
32
 
33
 
34
ENTITY common_fifo_rd IS
35
  GENERIC (
36
    g_dat_w : NATURAL := 18
37
  );
38
  PORT (
39
    rst        : IN  STD_LOGIC;
40
    clk        : IN  STD_LOGIC;
41
    -- ST sink: RL = 1
42
    fifo_req   : OUT STD_LOGIC;
43
    fifo_dat   : IN  STD_LOGIC_VECTOR(g_dat_w-1 DOWNTO 0);
44
    fifo_val   : IN  STD_LOGIC := '0';
45
    -- ST source: RL = 0
46
    rd_req     : IN  STD_LOGIC;
47
    rd_dat     : OUT STD_LOGIC_VECTOR(g_dat_w-1 DOWNTO 0);
48
    rd_val     : OUT STD_LOGIC
49
  );
50
END common_fifo_rd;
51
 
52
 
53
ARCHITECTURE wrap OF common_fifo_rd IS
54
 
55
 
56
BEGIN
57
 
58
  u_rl0 : ENTITY work.common_rl_decrease
59
  GENERIC MAP (
60
    g_adapt       => TRUE,
61
    g_dat_w       => g_dat_w
62
  )
63
  PORT MAP (
64
    rst           => rst,
65
    clk           => clk,
66
    -- ST sink: RL = 1
67
    snk_out_ready => fifo_req,
68
    snk_in_dat    => fifo_dat,
69
    snk_in_val    => fifo_val,
70
    -- ST source: RL = 0
71
    src_in_ready  => rd_req,
72
    src_out_dat   => rd_dat,
73
    src_out_val   => rd_val
74
  );
75
 
76
END wrap;

powered by: WebSVN 2.1.0

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