1 ------------------------------------------------------------------------------- 2 -- File : OctalPortRam.vhd 3 -- Company : SLAC National Accelerator Laboratory 4 -- Created : 2016-04-12 5 -- Last update: 2016-04-19 6 ------------------------------------------------------------------------------- 7 -- Description: This module infers a Quad Port RAM as 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_arith.
all;
21 use ieee.std_logic_unsigned.
all;
39 -- Port A (Read/Write) 96 constant FULL_DATA_WIDTH_C : := NUM_BYTES_C*BYTE_WIDTH_G;
102 signal mem : mem_type := (others => INIT_C);
106 -- Attribute for XST (Xilinx Synthesis) 107 attribute ram_style : ;
108 attribute ram_style of mem : signal is "distributed";
110 attribute ram_extract : ;
111 attribute ram_extract of mem : signal is "TRUE";
113 -- Attribute for Synplicity Synthesizer 114 attribute syn_ramstyle : ;
115 attribute syn_ramstyle of mem : signal is "distributed";
117 attribute syn_keep : ;
118 attribute syn_keep of mem : signal is "TRUE";
124 report "MODE_G must be either no-change, read-first, or write-first" 131 PORT_A_NOT_REG : if (REG_EN_G = false) generate 135 if rising_edge(clka) then 137 for i in NUM_BYTES_C-1 downto 0 loop 138 if (weaByteInt(i) = '1') then 152 PORT_A_REG : if (REG_EN_G = true) generate 154 NO_CHANGE_MODE : if MODE_G = "no-change" generate 157 if rising_edge(clka) then 159 for i in NUM_BYTES_C-1 downto 0 loop 160 if (weaByteInt(i) = '1') then 171 if rising_edge(clka) then 172 if (en_a = '1' and weaByteInt = 0) then 183 READ_FIRST_MODE : if MODE_G = "read-first" generate 186 if rising_edge(clka) then 189 for i in 0 to NUM_BYTES_C-1 loop 190 if (weaByteInt(i) = '1') then 203 WRITE_FIRST_MODE : if MODE_G = "write-first" generate 206 if rising_edge(clka) then 208 for i in NUM_BYTES_C-1 downto 0 loop 209 if (weaByteInt(i) = '1') then 227 PORT_B_REG : if (REG_EN_G = true) generate 230 if rising_edge(clkb) then 233 elsif en_b = '1' then 240 PORT_B_NOT_REG : if (REG_EN_G = false) generate 245 PORT_C_REG : if (REG_EN_G = true) generate 248 if rising_edge(clkc) then 251 elsif en_c = '1' then 258 PORT_C_NOT_REG : if (REG_EN_G = false) generate 263 PORT_D_REG : if (REG_EN_G = true) generate 266 if rising_edge(clkd) then 269 elsif en_d = '1' then 276 PORT_D_NOT_REG : if (REG_EN_G = false) generate 281 PORT_E_REG : if (REG_EN_G = true) generate 284 if rising_edge(clke) then 287 elsif en_e = '1' then 294 PORT_E_NOT_REG : if (REG_EN_G = false) generate 299 PORT_F_REG : if (REG_EN_G = true) generate 302 if rising_edge(clkf) then 305 elsif en_f = '1' then 312 PORT_F_NOT_REG : if (REG_EN_G = false) generate 317 PORT_G_REG : if (REG_EN_G = true) generate 320 if rising_edge(clkg) then 323 elsif en_g = '1' then 330 PORT_G_NOT_REG : if (REG_EN_G = false) generate 335 PORT_H_REG : if (REG_EN_G = true) generate 338 if rising_edge(clkh) then 341 elsif en_h = '1' then 348 PORT_H_NOT_REG : if (REG_EN_G = false) generate in rstesl :=not ( RST_POLARITY_G)
out doutbslv( DATA_WIDTH_G- 1 downto 0)
MODE_Gstring := "no-change"
out douteslv( DATA_WIDTH_G- 1 downto 0)
in rstasl :=not ( RST_POLARITY_G)
ADDR_WIDTH_Ginteger range 1 to ( 2** 24):= 4
out doutgslv( DATA_WIDTH_G- 1 downto 0)
in rstbsl :=not ( RST_POLARITY_G)
out doutcslv( DATA_WIDTH_G- 1 downto 0)
in addreslv( ADDR_WIDTH_G- 1 downto 0) :=( others => '0')
in addrcslv( ADDR_WIDTH_G- 1 downto 0) :=( others => '0')
in rsthsl :=not ( RST_POLARITY_G)
in addraslv( ADDR_WIDTH_G- 1 downto 0) :=( others => '0')
in dinaslv( DATA_WIDTH_G- 1 downto 0) :=( others => '0')
in rstdsl :=not ( RST_POLARITY_G)
out doutfslv( DATA_WIDTH_G- 1 downto 0)
in weaByteslv( wordCount( DATA_WIDTH_G, BYTE_WIDTH_G)- 1 downto 0) :=( others => '0')
in addrgslv( ADDR_WIDTH_G- 1 downto 0) :=( others => '0')
in rstgsl :=not ( RST_POLARITY_G)
out douthslv( DATA_WIDTH_G- 1 downto 0)
DATA_WIDTH_Ginteger range 1 to ( 2** 24):= 16
in addrdslv( ADDR_WIDTH_G- 1 downto 0) :=( others => '0')
out doutaslv( DATA_WIDTH_G- 1 downto 0)
BYTE_WR_EN_Gboolean := false
in addrhslv( ADDR_WIDTH_G- 1 downto 0) :=( others => '0')
out doutdslv( DATA_WIDTH_G- 1 downto 0)
in addrfslv( ADDR_WIDTH_G- 1 downto 0) :=( others => '0')
in rstfsl :=not ( RST_POLARITY_G)
in rstcsl :=not ( RST_POLARITY_G)
in addrbslv( ADDR_WIDTH_G- 1 downto 0) :=( others => '0')