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

Subversion Repositories astron_ram

[/] [astron_ram/] [trunk/] [common_ram_r_w.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) 2014
4
-- ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
5
-- P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
6
--
7
-- This program is free software: you can redistribute it and/or modify
8
-- it under the terms of the GNU General Public License as published by
9
-- the Free Software Foundation, either version 3 of the License, or
10
-- (at your option) any later version.
11
--
12
-- This program is distributed in the hope that it will be useful,
13
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
14
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
-- GNU General Public License for more details.
16
--
17
-- You should have received a copy of the GNU General Public License
18
-- along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
--
20
-------------------------------------------------------------------------------
21
 
22
LIBRARY IEEE, technology_lib;
23
USE IEEE.std_logic_1164.ALL;
24
USE work.common_ram_pkg.ALL;
25
USE technology_lib.technology_select_pkg.ALL;
26
 
27
ENTITY common_ram_r_w IS
28
  GENERIC (
29
    g_technology : NATURAL := c_tech_select_default;
30
    g_ram        : t_c_mem := c_mem_ram;
31
    g_init_file  : STRING := "UNUSED";
32
    g_true_dual_port : BOOLEAN := TRUE
33
  );
34
  PORT (
35
    rst       : IN  STD_LOGIC := '0';
36
    clk       : IN  STD_LOGIC;
37
    clken     : IN  STD_LOGIC := '1';
38
    wr_en     : IN  STD_LOGIC := '0';
39
    wr_adr    : IN  STD_LOGIC_VECTOR(g_ram.adr_w-1 DOWNTO 0) := (OTHERS=>'0');
40
    wr_dat    : IN  STD_LOGIC_VECTOR(g_ram.dat_w-1 DOWNTO 0) := (OTHERS=>'0');
41
    rd_en     : IN  STD_LOGIC := '1';
42
    rd_adr    : IN  STD_LOGIC_VECTOR(g_ram.adr_w-1 DOWNTO 0);
43
    rd_dat    : OUT STD_LOGIC_VECTOR(g_ram.dat_w-1 DOWNTO 0);
44
    rd_val    : OUT STD_LOGIC
45
  );
46
END common_ram_r_w;
47
 
48
 
49
ARCHITECTURE str OF common_ram_r_w IS
50
 
51
BEGIN
52
 
53
  -- Use port a only for write
54
  -- Use port b only for read
55
 
56
  u_rw_rw : ENTITY work.common_ram_rw_rw
57
  GENERIC MAP (
58
    g_technology => g_technology,
59
    g_ram        => g_ram,
60
    g_init_file  => g_init_file,
61
    g_true_dual_port => g_true_dual_port
62
  )
63
  PORT MAP (
64
    rst       => rst,
65
    clk       => clk,
66
    clken     => clken,
67
    wr_en_a   => wr_en,
68
    wr_en_b   => '0',
69
    wr_dat_a  => wr_dat,
70
    --wr_dat_b  => (OTHERS=>'0'),
71
    adr_a     => wr_adr,
72
    adr_b     => rd_adr,
73
    rd_en_a   => '0',
74
    rd_en_b   => rd_en,
75
    rd_dat_a  => OPEN,
76
    rd_dat_b  => rd_dat,
77
    rd_val_a  => OPEN,
78
    rd_val_b  => rd_val
79
  );
80
 
81
END str;
82
 

powered by: WebSVN 2.1.0

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