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

Subversion Repositories w11

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 wfjm
-- $Id: fifo_1c_dram.vhd 314 2010-07-09 17:38:41Z mueller $
2
--
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
use ieee.std_logic_arith.all;
40
 
41
use work.slvtypes.all;
42
use work.memlib.all;
43
 
44
entity fifo_1c_dram is                  -- fifo, 1 clock, dram based
45
  generic (
46
    AWIDTH : positive :=  7;            -- address width (sets size)
47
    DWIDTH : positive := 16);           -- data width
48
  port (
49
    CLK : in slbit;                     -- clock
50
    RESET : in slbit;                   -- reset
51
    DI : in slv(DWIDTH-1 downto 0);     -- input data
52
    ENA : in slbit;                     -- write enable
53
    BUSY : out slbit;                   -- write port hold    
54
    DO : out slv(DWIDTH-1 downto 0);    -- output data
55
    VAL : out slbit;                    -- read valid
56
    HOLD : in slbit;                    -- read hold
57
    SIZE : out slv(AWIDTH downto 0)     -- number of used slots
58
  );
59
end fifo_1c_dram;
60
 
61
 
62
architecture syn of fifo_1c_dram is
63
 
64
  signal WE : slbit := '0';
65
  signal RE : slbit := '0';
66
  signal SIZE_L : slv(AWIDTH-1 downto 0) := (others=>'0');
67
  signal EMPTY : slbit := '0';
68
  signal FULL : slbit := '0';
69
 
70
begin
71
 
72
  FIFO : fifo_1c_dram_raw
73
    generic map (
74
      AWIDTH => AWIDTH,
75
      DWIDTH => DWIDTH)
76
    port map (
77
      CLK   => CLK,
78
      RESET => RESET,
79
      WE => WE,
80
      RE => RE,
81
      DI => DI,
82
      DO => DO,
83
      SIZE => SIZE_L,
84
      EMPTY => EMPTY,
85
      FULL => FULL
86
    );
87
 
88
  WE <= ENA and (not FULL);
89
  RE <= (not EMPTY) and (not HOLD);
90
 
91
  BUSY <= FULL;
92
  VAL  <= not EMPTY;
93
  SIZE <= FULL & SIZE_L;
94
 
95
end syn;

powered by: WebSVN 2.1.0

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