syncram64.vhd

来自「The GRLIB IP Library is an integrated se」· VHDL 代码 · 共 59 行

VHD
59
字号
------------------------------------------------------------------------------  This file is a part of the GRLIB VHDL IP LIBRARY--  Copyright (C) 2004 GAISLER RESEARCH----  This program is free software; you can redistribute it and/or modify--  it under the terms of the GNU General Public License as published by--  the Free Software Foundation; either version 2 of the License, or--  (at your option) any later version.----  See the file COPYING for the full details of the license.--------------------------------------------------------------------------------- Entity: 	syncram64-- File:	syncram64.vhd-- Author:	Jiri Gaisler - Gaisler Research-- Description:	64-bit syncronous 1-port ram with 32-bit write strobes--		and tech selection------------------------------------------------------------------------------library ieee;use ieee.std_logic_1164.all;library grlib;use grlib.tech.all;library gaisler;use gaisler.memory.all;use gaisler.mem_xilinx.all;  entity syncram64 is  generic (tech : integer := 0; abits : integer := 6);  port (    clk     : in  std_ulogic;    address : in  std_logic_vector (abits -1 downto 0);    datain  : in  std_logic_vector (63 downto 0);    dataout : out std_logic_vector (63 downto 0);    enable  : in  std_logic_vector (1 downto 0);    write   : in  std_logic_vector (1 downto 0)  );end;architecture rtl of syncram64 isbegin  xc2v : if (tech = virtex2) or (tech = spartan3) generate     u0 : virtex2_syncram64 generic map (abits)         port map (clk, address, datain, dataout, enable, write);  end generate;  noxc2v : if not ((tech = virtex2) or (tech = spartan3)) generate     u0 : syncram generic map (tech, abits, 32)         port map (clk, address, datain(63 downto 32), dataout(63 downto 32), 	           enable(1), write(1));    u1 : syncram generic map (tech, abits, 32)         port map (clk, address, datain(31 downto 0), dataout(31 downto 0), 	           enable(0), write(0));  end generate;end;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?