1 ------------------------------------------------------------------------------- 2 -- File : DualPortRam.vhd 3 -- Company : SLAC National Accelerator Laboratory 4 -- Created : 2013-12-18 5 -- Last update: 2016-05-09 6 ------------------------------------------------------------------------------- 7 -- Description: This module infers either Block RAM or distributed RAM 8 ------------------------------------------------------------------------------- 9 -- This file is part of 'SLAC Firmware Standard Library'. 10 -- It is subject to the license terms in the LICENSE.txt file found in the 11 -- top-level directory of this distribution and at: 12 -- https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. 13 -- No part of 'SLAC Firmware Standard Library', including this file, 14 -- may be copied, modified, propagated, or distributed except according to 15 -- the terms contained in the LICENSE.txt file. 16 ------------------------------------------------------------------------------- 19 use ieee.std_logic_1164.
all;
20 use ieee.std_logic_unsigned.
all;
27 -- MODE_G = {"no-change","read-first","write-first"} 51 regcea :
in sl := '1';
58 regceb :
in sl := '1');
97 dinb =>
(others => '0'
),
102 GEN_LUTRAM : if (BRAM_EN_G = false) generate 134 addrc =>
(others => '0'
),
140 addrd =>
(others => '0'
),
in rstdsl :=not ( RST_POLARITY_G)
in dinaslv( DATA_WIDTH_G- 1 downto 0) :=( others => '0')
in weaByteslv( wordCount( DATA_WIDTH_G, BYTE_WIDTH_G)- 1 downto 0) :=( others => '0')
in rstbsl :=not ( RST_POLARITY_G)
ADDR_WIDTH_Ginteger range 1 to ( 2** 24):= 9
BYTE_WR_EN_Gboolean := false
sl :=not ( RST_POLARITY_G) FORCE_RST_C
out doutbslv( DATA_WIDTH_G- 1 downto 0)
in weaByteslv( wordCount( DATA_WIDTH_G, BYTE_WIDTH_G)- 1 downto 0) :=( others => '0')
DATA_WIDTH_Ginteger range 1 to ( 2** 24):= 18
BYTE_WR_EN_Gboolean := false
ADDR_WIDTH_Ginteger range 1 to ( 2** 24):= 4
ADDR_WIDTH_Ginteger range 1 to ( 2** 24):= 4
MODE_Gstring := "read-first"
out doutaslv( DATA_WIDTH_G- 1 downto 0)
out doutdslv( DATA_WIDTH_G- 1 downto 0)
BYTE_WR_EN_Gboolean := false
out doutaslv( DATA_WIDTH_G- 1 downto 0)
MODE_Gstring := "read-first"
DOB_REG_Gboolean := false
in addraslv( ADDR_WIDTH_G- 1 downto 0) :=( others => '0')
out doutaslv( DATA_WIDTH_G- 1 downto 0)
out doutbslv( DATA_WIDTH_G- 1 downto 0)
DOB_REG_Gboolean := false
in rstcsl :=not ( RST_POLARITY_G)
out doutcslv( DATA_WIDTH_G- 1 downto 0)
in addrbslv( ADDR_WIDTH_G- 1 downto 0) :=( others => '0')
in addrcslv( ADDR_WIDTH_G- 1 downto 0) :=( others => '0')
in weaByteslv( wordCount( DATA_WIDTH_G, BYTE_WIDTH_G)- 1 downto 0) :=( others => '1')
DATA_WIDTH_Ginteger range 1 to ( 2** 24):= 16
in rstasl :=not ( RST_POLARITY_G)
in addraslv( ADDR_WIDTH_G- 1 downto 0) :=( others => '0')
in dinaslv( DATA_WIDTH_G- 1 downto 0) :=( others => '0')
DOA_REG_Gboolean := false
DOA_REG_Gboolean := false
in addrdslv( ADDR_WIDTH_G- 1 downto 0) :=( others => '0')
in rstasl :=not ( RST_POLARITY_G)
out doutbslv( DATA_WIDTH_G- 1 downto 0)
in addraslv( ADDR_WIDTH_G- 1 downto 0) :=( others => '0')
in addrbslv( ADDR_WIDTH_G- 1 downto 0) :=( others => '0')
MODE_Gstring := "read-first"
in rstasl :=not ( RST_POLARITY_G)
in rstbsl :=not ( RST_POLARITY_G)
in rstbsl :=not ( RST_POLARITY_G)
DATA_WIDTH_Ginteger range 1 to ( 2** 24):= 16
in dinaslv( DATA_WIDTH_G- 1 downto 0) :=( others => '0')
in dinbslv( DATA_WIDTH_G- 1 downto 0) :=( others => '0')
in addrbslv( ADDR_WIDTH_G- 1 downto 0) :=( others => '0')