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

Subversion Repositories funbase_ip_library

[/] [funbase_ip_library/] [trunk/] [TUT/] [ip.hwp.accelerator/] [dctqidct/] [1.0/] [hdl/] [common_da/] [DPRAM.vhd] - Blame information for rev 145

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 145 lanttu
------------------------------------------------------------------------------
2
-- TUT / DCS
3
------------------------------------------------------------------------------
4
-- Author               : Timo Alho
5
-- e-mail               : timo.a.alho@tut.fi
6
-- Date                 : 15.06.2004 16:52:53
7
-- File                 : DPRAM.vhd
8
-- Design               : VHDL Entity DPRAM.trl
9
------------------------------------------------------------------------------
10
-- Description  : Dualport ram
11
------------------------------------------------------------------------------
12
LIBRARY ieee;
13
USE ieee.std_logic_1164.ALL;
14
USE ieee.std_logic_arith.ALL;
15
 
16
ENTITY DPRAM IS
17
   GENERIC(
18
      dataw_g : integer := 18;
19
      addrw_g : integer := 5
20
   );
21
   PORT(
22
      clk     : IN     std_logic;
23
      d_in    : IN     std_logic_vector (dataw_g-1 DOWNTO 0);  --input data
24
      rdaddr  : IN     std_logic_vector (addrw_g-1 DOWNTO 0);  --read address
25
      we      : IN     std_logic;                              -- write enable
26
      wraddr  : IN     std_logic_vector (addrw_g-1 DOWNTO 0);  --write address
27
      ram_out : OUT    std_logic_vector (dataw_g-1 DOWNTO 0)   --output data
28
   );
29
 
30
-- Declarations
31
 
32
END DPRAM ;
33
 
34
--
35
ARCHITECTURE rtl OF DPRAM IS
36
  TYPE mw_I0ram_type IS ARRAY (((2**addrw_g) -1) DOWNTO 0)
37
    OF std_logic_vector(dataw_g-1 DOWNTO 0);
38
  SIGNAL mw_I0ram_table : mw_I0ram_type; -- := (OTHERS => (OTHERS => '0'));
39
 
40
BEGIN
41
 
42
  I0write : PROCESS (clk)
43
  BEGIN
44
    IF (clk'event AND clk = '1') THEN
45
      IF (we = '1' OR we = 'H') THEN
46
        mw_I0ram_table(CONV_INTEGER(unsigned(wraddr))) <= d_in;
47
      END IF;
48
    END IF;
49
  END PROCESS I0write;
50
 
51
  I0read : PROCESS (clk)
52
  BEGIN
53
    IF (clk'event AND clk = '1') THEN
54
      ram_out <= mw_I0ram_table(CONV_INTEGER(unsigned(rdaddr)));
55
    END IF;
56
  END PROCESS I0read;
57
 
58
END rtl;
59
 

powered by: WebSVN 2.1.0

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