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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.6/] [rtl/] [vlib/] [memlib/] [fifo_1c_dram.vhd] - Blame information for rev 24

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 13 wfjm
-- $Id: fifo_1c_dram.vhd 421 2011-11-07 21:23:50Z mueller $
2 2 wfjm
--
3
-- Copyright 2007- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4
--
5
-- This program is free software; you may redistribute and/or modify it under
6
-- the terms of the GNU General Public License as published by the Free
7
-- Software Foundation, either version 2, or at your option any later version.
8
--
9
-- This program is distributed in the hope that it will be useful, but
10
-- WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
11
-- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12
-- for complete details.
13
--
14
------------------------------------------------------------------------------
15
-- Module Name:    fifo_1c_dram - syn
16
-- Description:    FIFO, single clock domain, distributed RAM based, with
17
--                 enable/busy/valid/hold interface.
18
--
19
-- Dependencies:   fifo_1c_dram_raw
20
--
21
-- Test bench:     tb/tb_fifo_1c_dram
22
-- Target Devices: generic Spartan, Virtex
23
-- Tool versions:  xst 8.1, 8.2, 9.1, 9.2; ghdl 0.18-0.25
24
-- Revision History: 
25
-- Date         Rev Version  Comment
26
-- 2007-06-06    49   1.0    Initial version 
27
--
28
-- Some synthesis results:
29
-- - 2007-12-27 ise 8.2.03 for xc3s1000-ft256-4:
30
--   AWIDTH DWIDTH  LUT.l LUT.m  Flop   clock(xst est.)
31
--        4     16     31    32    22   153MHz     ( 16 words)
32
--        5     16     49    64    23   120MHz     ( 32 words)
33
--        6     16     70   128    23   120MHz     ( 64 words)
34
--        7     16    111   256    30   120MHz     (128 words)
35
------------------------------------------------------------------------------
36
 
37
library ieee;
38
use ieee.std_logic_1164.all;
39
 
40
use work.slvtypes.all;
41
use work.memlib.all;
42
 
43
entity fifo_1c_dram is                  -- fifo, 1 clock, dram based
44
  generic (
45
    AWIDTH : positive :=  7;            -- address width (sets size)
46
    DWIDTH : positive := 16);           -- data width
47
  port (
48
    CLK : in slbit;                     -- clock
49
    RESET : in slbit;                   -- reset
50
    DI : in slv(DWIDTH-1 downto 0);     -- input data
51
    ENA : in slbit;                     -- write enable
52
    BUSY : out slbit;                   -- write port hold    
53
    DO : out slv(DWIDTH-1 downto 0);    -- output data
54
    VAL : out slbit;                    -- read valid
55
    HOLD : in slbit;                    -- read hold
56
    SIZE : out slv(AWIDTH downto 0)     -- number of used slots
57
  );
58
end fifo_1c_dram;
59
 
60
 
61
architecture syn of fifo_1c_dram is
62
 
63
  signal WE : slbit := '0';
64
  signal RE : slbit := '0';
65
  signal SIZE_L : slv(AWIDTH-1 downto 0) := (others=>'0');
66
  signal EMPTY : slbit := '0';
67
  signal FULL : slbit := '0';
68
 
69
begin
70
 
71
  FIFO : fifo_1c_dram_raw
72
    generic map (
73
      AWIDTH => AWIDTH,
74
      DWIDTH => DWIDTH)
75
    port map (
76
      CLK   => CLK,
77
      RESET => RESET,
78
      WE => WE,
79
      RE => RE,
80
      DI => DI,
81
      DO => DO,
82
      SIZE => SIZE_L,
83
      EMPTY => EMPTY,
84
      FULL => FULL
85
    );
86
 
87
  WE <= ENA and (not FULL);
88
  RE <= (not EMPTY) and (not HOLD);
89
 
90
  BUSY <= FULL;
91
  VAL  <= not EMPTY;
92
  SIZE <= FULL & SIZE_L;
93
 
94
end syn;

powered by: WebSVN 2.1.0

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