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

Subversion Repositories mips_enhanced

[/] [mips_enhanced/] [trunk/] [grlib-gpl-1.0.19-b3188/] [lib/] [techmap/] [maps/] [syncram_dp.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dimamali
------------------------------------------------------------------------------
2
--  This file is a part of the GRLIB VHDL IP LIBRARY
3
--  Copyright (C) 2003, Gaisler Research
4
--
5
--  This program is free software; you can redistribute it and/or modify
6
--  it under the terms of the GNU General Public License as published by
7
--  the Free Software Foundation; either version 2 of the License, or
8
--  (at your option) any later version.
9
--
10
--  This program is distributed in the hope that it will be useful,
11
--  but WITHOUT ANY WARRANTY; without even the implied warranty of
12
--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
--  GNU General Public License for more details.
14
--
15
--  You should have received a copy of the GNU General Public License
16
--  along with this program; if not, write to the Free Software
17
--  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
18
-----------------------------------------------------------------------------
19
-- Entity:      syncram_dp
20
-- File:        syncram_dp.vhd
21
-- Author:      Jiri Gaisler - Gaisler Research
22
-- Description: syncronous dual-port ram with tech selection
23
------------------------------------------------------------------------------
24
 
25
library ieee;
26
library techmap;
27
use ieee.std_logic_1164.all;
28
use techmap.gencomp.all;
29
use work.allmem.all;
30
 
31
entity syncram_dp is
32
  generic (tech : integer := 0; abits : integer := 6; dbits : integer := 8 );
33
  port (
34
    clk1     : in std_ulogic;
35
    address1 : in std_logic_vector((abits -1) downto 0);
36
    datain1  : in std_logic_vector((dbits -1) downto 0);
37
    dataout1 : out std_logic_vector((dbits -1) downto 0);
38
    enable1  : in std_ulogic;
39
    write1   : in std_ulogic;
40
    clk2     : in std_ulogic;
41
    address2 : in std_logic_vector((abits -1) downto 0);
42
    datain2  : in std_logic_vector((dbits -1) downto 0);
43
    dataout2 : out std_logic_vector((dbits -1) downto 0);
44
    enable2  : in std_ulogic;
45
    write2   : in std_ulogic;
46
    testin   : in std_logic_vector(3 downto 0) := "0000");
47
end;
48
 
49
architecture rtl of syncram_dp is
50
begin
51
 
52
-- pragma translate_off
53
  inf : if has_dpram(tech) = 0 generate
54
    x : process
55
    begin
56
      assert false report "synram_dp: technology " & tech_table(tech) &
57
        " not supported"
58
      severity failure;
59
      wait;
60
    end process;
61
  end generate;
62
-- pragma translate_on
63
 
64
  xcv : if tech = virtex generate
65
    x0 : virtex_syncram_dp generic map (abits, dbits)
66
         port map (clk1, address1, datain1, dataout1, enable1, write1,
67
                   clk2, address2, datain2, dataout2, enable2, write2);
68
  end generate;
69
 
70
  xc2v : if (tech = virtex2) or (tech = spartan3) or (tech = virtex4)
71
        or (tech = spartan3e) or (tech = virtex5)
72
  generate
73
    x0 : virtex2_syncram_dp generic map (abits, dbits)
74
         port map (clk1, address1, datain1, dataout1, enable1, write1,
75
                   clk2, address2, datain2, dataout2, enable2, write2);
76
  end generate;
77
 
78
  vir  : if tech = memvirage generate
79
    x0 : virage_syncram_dp generic map (abits, dbits)
80
         port map (clk1, address1, datain1, dataout1, enable1, write1,
81
                   clk2, address2, datain2, dataout2, enable2, write2);
82
  end generate;
83
 
84
  arti : if tech = memartisan generate
85
    x0 : artisan_syncram_dp generic map (abits, dbits)
86
         port map (clk1, address1, datain1, dataout1, enable1, write1,
87
                   clk2, address2, datain2, dataout2, enable2, write2);
88
  end generate;
89
 
90
  axc  : if tech = axcel generate
91
    x0 : axcel_syncram_2p generic map (abits, dbits)
92
    port map (clk1, enable1, address1, dataout1, clk1, address1, datain1, write1);
93
    x1 : axcel_syncram_2p generic map (abits, dbits)
94
    port map (clk1, enable2, address2, dataout2, clk1, address1, datain1, write1);
95
  end generate;
96
 
97
  pa3  : if tech = apa3 generate
98
    x0 : proasic3_syncram_dp generic map (abits, dbits)
99
         port map (clk1, address1, datain1, dataout1, enable1, write1,
100
                   clk2, address2, datain2, dataout2, enable2, write2);
101
  end generate;
102
 
103
  alt : if (tech = altera) or (tech = stratix1) or (tech = stratix2) or
104
        (tech = stratix3) or (tech = cyclone3) generate
105
    x0 : altera_syncram_dp generic map (abits, dbits)
106
         port map (clk1, address1, datain1, dataout1, enable1, write1,
107
                   clk2, address2, datain2, dataout2, enable2, write2);
108
  end generate;
109
 
110
  lat  : if tech = lattice generate
111
    x0 : ec_syncram_dp generic map (abits, dbits)
112
         port map (clk1, address1, datain1, dataout1, enable1, write1,
113
                   clk2, address2, datain2, dataout2, enable2, write2);
114
  end generate;
115
 
116
  vir90  : if tech = memvirage90 generate
117
    x0 : virage90_syncram_dp generic map (abits, dbits)
118
         port map (clk1, address1, datain1, dataout1, enable1, write1,
119
                   clk2, address2, datain2, dataout2, enable2, write2);
120
  end generate;
121
 
122
  atrh : if tech = atc18rha generate
123
    x0 : atc18rha_syncram_dp generic map (abits, dbits)
124
         port map (clk1, address1, datain1, dataout1, enable1, write1,
125
                   clk2, address2, datain2, dataout2, enable2, write2, testin);
126
  end generate;
127
end;
128
 

powered by: WebSVN 2.1.0

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