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

Subversion Repositories astron_ram

[/] [astron_ram/] [trunk/] [common_paged_ram_rw_rw.vhd] - Blame information for rev 3

Go to most recent revision | 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
-- Purpose: Multi page memory
22
-- Description:
23
--   When next_page_* pulses then the next access will occur in the next page.
24
-- Remarks:
25
-- . See common_paged_ram_crw_crw for details.
26
 
27
LIBRARY IEEE, technology_lib;
28
USE IEEE.std_logic_1164.ALL;
29
USE IEEE.numeric_std.ALL;
30
LIBRARY common_pkg_lib;
31
USE common_pkg_lib.common_pkg.ALL;
32
USE technology_lib.technology_select_pkg.ALL;
33
 
34
ENTITY common_paged_ram_rw_rw IS
35
  GENERIC (
36
    g_technology      : NATURAL := c_tech_select_default;
37
    g_str             : STRING := "use_adr";
38
    g_data_w          : NATURAL;
39
    g_nof_pages       : NATURAL := 2;  -- >= 2
40
    g_page_sz         : NATURAL;
41
    g_start_page_a    : NATURAL := 0;
42
    g_start_page_b    : NATURAL := 0;
43
    g_rd_latency      : NATURAL := 1;
44
    g_true_dual_port  : BOOLEAN := TRUE
45
  );
46
  PORT (
47
    rst         : IN  STD_LOGIC;
48
    clk         : IN  STD_LOGIC;
49
    clken       : IN  STD_LOGIC := '1';
50
    next_page_a : IN  STD_LOGIC;
51
    adr_a       : IN  STD_LOGIC_VECTOR(ceil_log2(g_page_sz)-1 DOWNTO 0) := (OTHERS=>'0');
52
    wr_en_a     : IN  STD_LOGIC := '0';
53
    wr_dat_a    : IN  STD_LOGIC_VECTOR(g_data_w-1 DOWNTO 0) := (OTHERS=>'0');
54
    rd_en_a     : IN  STD_LOGIC := '1';
55
    rd_dat_a    : OUT STD_LOGIC_VECTOR(g_data_w-1 DOWNTO 0);
56
    rd_val_a    : OUT STD_LOGIC;
57
    next_page_b : IN  STD_LOGIC;
58
    adr_b       : IN  STD_LOGIC_VECTOR(ceil_log2(g_page_sz)-1 DOWNTO 0) := (OTHERS=>'0');
59
    wr_en_b     : IN  STD_LOGIC := '0';
60
    wr_dat_b    : IN  STD_LOGIC_VECTOR(g_data_w-1 DOWNTO 0) := (OTHERS=>'0');
61
    rd_en_b     : IN  STD_LOGIC := '1';
62
    rd_dat_b    : OUT STD_LOGIC_VECTOR(g_data_w-1 DOWNTO 0);
63
    rd_val_b    : OUT STD_LOGIC
64
  );
65
END common_paged_ram_rw_rw;
66
 
67
 
68
ARCHITECTURE str OF common_paged_ram_rw_rw IS
69
 
70
BEGIN
71
 
72
  u_crw_crw : ENTITY work.common_paged_ram_crw_crw
73
  GENERIC MAP (
74
    g_technology     => g_technology,
75
    g_str            => g_str,
76
    g_data_w         => g_data_w,
77
    g_nof_pages      => g_nof_pages,
78
    g_page_sz        => g_page_sz,
79
    g_start_page_a   => g_start_page_a,
80
    g_start_page_b   => g_start_page_b,
81
    g_rd_latency     => g_rd_latency,
82
    g_true_dual_port => g_true_dual_port
83
  )
84
  PORT MAP (
85
    rst_a       => rst,
86
    rst_b       => rst,
87
    clk_a       => clk,
88
    clk_b       => clk,
89
    clken_a     => clken,
90
    clken_b     => clken,
91
    next_page_a => next_page_a,
92
    adr_a       => adr_a,
93
    wr_en_a     => wr_en_a,
94
    wr_dat_a    => wr_dat_a,
95
    rd_en_a     => rd_en_a,
96
    rd_dat_a    => rd_dat_a,
97
    rd_val_a    => rd_val_a,
98
    next_page_b => next_page_b,
99
    adr_b       => adr_b,
100
    wr_en_b     => wr_en_b,
101
    wr_dat_b    => wr_dat_b,
102
    rd_en_b     => rd_en_b,
103
    rd_dat_b    => rd_dat_b,
104
    rd_val_b    => rd_val_b
105
  );
106
 
107
END str;

powered by: WebSVN 2.1.0

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