| 1 |
14 |
mjlyons |
|
| 2 |
|
|
--------------------------------------------------------------------------------
|
| 3 |
|
|
--
|
| 4 |
|
|
-- BLK MEM GEN v6.2 Core - Top-level wrapper
|
| 5 |
|
|
--
|
| 6 |
|
|
--------------------------------------------------------------------------------
|
| 7 |
|
|
--
|
| 8 |
|
|
-- (c) Copyright 2006-2011 Xilinx, Inc. All rights reserved.
|
| 9 |
|
|
--
|
| 10 |
|
|
-- This file contains confidential and proprietary information
|
| 11 |
|
|
-- of Xilinx, Inc. and is protected under U.S. and
|
| 12 |
|
|
-- international copyright and other intellectual property
|
| 13 |
|
|
-- laws.
|
| 14 |
|
|
--
|
| 15 |
|
|
-- DISCLAIMER
|
| 16 |
|
|
-- This disclaimer is not a license and does not grant any
|
| 17 |
|
|
-- rights to the materials distributed herewith. Except as
|
| 18 |
|
|
-- otherwise provided in a valid license issued to you by
|
| 19 |
|
|
-- Xilinx, and to the maximum extent permitted by applicable
|
| 20 |
|
|
-- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
|
| 21 |
|
|
-- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
|
| 22 |
|
|
-- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
|
| 23 |
|
|
-- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
|
| 24 |
|
|
-- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
|
| 25 |
|
|
-- (2) Xilinx shall not be liable (whether in contract or tort,
|
| 26 |
|
|
-- including negligence, or under any other theory of
|
| 27 |
|
|
-- liability) for any loss or damage of any kind or nature
|
| 28 |
|
|
-- related to, arising under or in connection with these
|
| 29 |
|
|
-- materials, including for any direct, or any indirect,
|
| 30 |
|
|
-- special, incidental, or consequential loss or damage
|
| 31 |
|
|
-- (including loss of data, profits, goodwill, or any type of
|
| 32 |
|
|
-- loss or damage suffered as a result of any action brought
|
| 33 |
|
|
-- by a third party) even if such damage or loss was
|
| 34 |
|
|
-- reasonably foreseeable or Xilinx had been advised of the
|
| 35 |
|
|
-- possibility of the same.
|
| 36 |
|
|
--
|
| 37 |
|
|
-- CRITICAL APPLICATIONS
|
| 38 |
|
|
-- Xilinx products are not designed or intended to be fail-
|
| 39 |
|
|
-- safe, or for use in any application requiring fail-safe
|
| 40 |
|
|
-- performance, such as life-support or safety devices or
|
| 41 |
|
|
-- systems, Class III medical devices, nuclear facilities,
|
| 42 |
|
|
-- applications related to the deployment of airbags, or any
|
| 43 |
|
|
-- other applications that could lead to death, personal
|
| 44 |
|
|
-- injury, or severe property or environmental damage
|
| 45 |
|
|
-- (individually and collectively, "Critical
|
| 46 |
|
|
-- Applications"). Customer assumes the sole risk and
|
| 47 |
|
|
-- liability of any use of Xilinx products in Critical
|
| 48 |
|
|
-- Applications, subject only to applicable laws and
|
| 49 |
|
|
-- regulations governing limitations on product liability.
|
| 50 |
|
|
--
|
| 51 |
|
|
-- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
|
| 52 |
|
|
-- PART OF THIS FILE AT ALL TIMES.
|
| 53 |
|
|
--
|
| 54 |
|
|
--------------------------------------------------------------------------------
|
| 55 |
|
|
--
|
| 56 |
|
|
-- Filename: bmg_wrapper.vhd
|
| 57 |
|
|
--
|
| 58 |
|
|
-- Description:
|
| 59 |
|
|
-- This is the top-level BMG wrapper (over BMG core).
|
| 60 |
|
|
--
|
| 61 |
|
|
--------------------------------------------------------------------------------
|
| 62 |
|
|
-- Author: IP Solutions Division
|
| 63 |
|
|
--
|
| 64 |
|
|
-- History: August 31, 2005 - First Release
|
| 65 |
|
|
--------------------------------------------------------------------------------
|
| 66 |
|
|
--
|
| 67 |
|
|
-- Configured Core Parameter Values:
|
| 68 |
|
|
-- (Refer to the SIM Parameters table in the datasheet for more information on
|
| 69 |
|
|
-- the these parameters.)
|
| 70 |
|
|
-- C_FAMILY : spartan6
|
| 71 |
|
|
-- C_XDEVICEFAMILY : spartan6
|
| 72 |
|
|
-- C_INTERFACE_TYPE : 0
|
| 73 |
|
|
-- C_AXI_TYPE : 1
|
| 74 |
|
|
-- C_AXI_SLAVE_TYPE : 0
|
| 75 |
|
|
-- C_AXI_ID_WIDTH : 4
|
| 76 |
|
|
-- C_MEM_TYPE : 1
|
| 77 |
|
|
-- C_BYTE_SIZE : 9
|
| 78 |
|
|
-- C_ALGORITHM : 1
|
| 79 |
|
|
-- C_PRIM_TYPE : 1
|
| 80 |
|
|
-- C_LOAD_INIT_FILE : 0
|
| 81 |
|
|
-- C_INIT_FILE_NAME : no_coe_file_loaded
|
| 82 |
|
|
-- C_USE_DEFAULT_DATA : 0
|
| 83 |
|
|
-- C_DEFAULT_DATA : 0
|
| 84 |
|
|
-- C_RST_TYPE : SYNC
|
| 85 |
|
|
-- C_HAS_RSTA : 0
|
| 86 |
|
|
-- C_RST_PRIORITY_A : CE
|
| 87 |
|
|
-- C_RSTRAM_A : 0
|
| 88 |
|
|
-- C_INITA_VAL : 0
|
| 89 |
|
|
-- C_HAS_ENA : 1
|
| 90 |
|
|
-- C_HAS_REGCEA : 0
|
| 91 |
|
|
-- C_USE_BYTE_WEA : 0
|
| 92 |
|
|
-- C_WEA_WIDTH : 1
|
| 93 |
|
|
-- C_WRITE_MODE_A : WRITE_FIRST
|
| 94 |
|
|
-- C_WRITE_WIDTH_A : 8
|
| 95 |
|
|
-- C_READ_WIDTH_A : 8
|
| 96 |
|
|
-- C_WRITE_DEPTH_A : 4096
|
| 97 |
|
|
-- C_READ_DEPTH_A : 4096
|
| 98 |
|
|
-- C_ADDRA_WIDTH : 12
|
| 99 |
|
|
-- C_HAS_RSTB : 0
|
| 100 |
|
|
-- C_RST_PRIORITY_B : CE
|
| 101 |
|
|
-- C_RSTRAM_B : 0
|
| 102 |
|
|
-- C_INITB_VAL : 0
|
| 103 |
|
|
-- C_HAS_ENB : 1
|
| 104 |
|
|
-- C_HAS_REGCEB : 0
|
| 105 |
|
|
-- C_USE_BYTE_WEB : 0
|
| 106 |
|
|
-- C_WEB_WIDTH : 1
|
| 107 |
|
|
-- C_WRITE_MODE_B : WRITE_FIRST
|
| 108 |
|
|
-- C_WRITE_WIDTH_B : 8
|
| 109 |
|
|
-- C_READ_WIDTH_B : 8
|
| 110 |
|
|
-- C_WRITE_DEPTH_B : 4096
|
| 111 |
|
|
-- C_READ_DEPTH_B : 4096
|
| 112 |
|
|
-- C_ADDRB_WIDTH : 12
|
| 113 |
|
|
-- C_HAS_MEM_OUTPUT_REGS_A : 0
|
| 114 |
|
|
-- C_HAS_MEM_OUTPUT_REGS_B : 0
|
| 115 |
|
|
-- C_HAS_MUX_OUTPUT_REGS_A : 0
|
| 116 |
|
|
-- C_HAS_MUX_OUTPUT_REGS_B : 0
|
| 117 |
|
|
-- C_HAS_SOFTECC_INPUT_REGS_A : 0
|
| 118 |
|
|
-- C_HAS_SOFTECC_OUTPUT_REGS_B : 0
|
| 119 |
|
|
-- C_MUX_PIPELINE_STAGES : 0
|
| 120 |
|
|
-- C_USE_ECC : 0
|
| 121 |
|
|
-- C_USE_SOFTECC : 0
|
| 122 |
|
|
-- C_HAS_INJECTERR : 0
|
| 123 |
|
|
-- C_SIM_COLLISION_CHECK : ALL
|
| 124 |
|
|
-- C_COMMON_CLK : 0
|
| 125 |
|
|
-- C_DISABLE_WARN_BHV_COLL : 0
|
| 126 |
|
|
-- C_DISABLE_WARN_BHV_RANGE : 0
|
| 127 |
|
|
|
| 128 |
|
|
--------------------------------------------------------------------------------
|
| 129 |
|
|
-- Library Declarations
|
| 130 |
|
|
--------------------------------------------------------------------------------
|
| 131 |
|
|
|
| 132 |
|
|
LIBRARY IEEE;
|
| 133 |
|
|
USE IEEE.STD_LOGIC_1164.ALL;
|
| 134 |
|
|
USE IEEE.STD_LOGIC_ARITH.ALL;
|
| 135 |
|
|
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
|
| 136 |
|
|
|
| 137 |
|
|
LIBRARY UNISIM;
|
| 138 |
|
|
USE UNISIM.VCOMPONENTS.ALL;
|
| 139 |
|
|
|
| 140 |
|
|
--------------------------------------------------------------------------------
|
| 141 |
|
|
-- Entity Declaration
|
| 142 |
|
|
--------------------------------------------------------------------------------
|
| 143 |
|
|
ENTITY bmg_wrapper IS
|
| 144 |
|
|
PORT (
|
| 145 |
|
|
--Port A
|
| 146 |
|
|
CLKA : IN STD_LOGIC;
|
| 147 |
|
|
RSTA : IN STD_LOGIC; --opt port
|
| 148 |
|
|
ENA : IN STD_LOGIC; --optional port
|
| 149 |
|
|
REGCEA : IN STD_LOGIC; --optional port
|
| 150 |
|
|
WEA : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
|
| 151 |
|
|
ADDRA : IN STD_LOGIC_VECTOR(11 DOWNTO 0);
|
| 152 |
|
|
DINA : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
| 153 |
|
|
DOUTA : OUT STD_LOGIC_VECTOR(7 DOWNTO 0);
|
| 154 |
|
|
|
| 155 |
|
|
--Port B
|
| 156 |
|
|
CLKB : IN STD_LOGIC;
|
| 157 |
|
|
RSTB : IN STD_LOGIC; --opt port
|
| 158 |
|
|
ENB : IN STD_LOGIC; --optional port
|
| 159 |
|
|
REGCEB : IN STD_LOGIC; --optional port
|
| 160 |
|
|
WEB : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
|
| 161 |
|
|
ADDRB : IN STD_LOGIC_VECTOR(11 DOWNTO 0);
|
| 162 |
|
|
DINB : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
| 163 |
|
|
DOUTB : OUT STD_LOGIC_VECTOR(7 DOWNTO 0);
|
| 164 |
|
|
|
| 165 |
|
|
--ECC
|
| 166 |
|
|
INJECTSBITERR : IN STD_LOGIC; --optional port
|
| 167 |
|
|
INJECTDBITERR : IN STD_LOGIC; --optional port
|
| 168 |
|
|
SBITERR : OUT STD_LOGIC; --optional port
|
| 169 |
|
|
DBITERR : OUT STD_LOGIC; --optional port
|
| 170 |
|
|
RDADDRECC : OUT STD_LOGIC_VECTOR(11 DOWNTO 0); --optional port
|
| 171 |
|
|
-- AXI BMG Input and Output Port Declarations
|
| 172 |
|
|
|
| 173 |
|
|
-- AXI Global Signals
|
| 174 |
|
|
S_ACLK : IN STD_LOGIC;
|
| 175 |
|
|
S_AXI_AWID : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
|
| 176 |
|
|
S_AXI_AWADDR : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
|
| 177 |
|
|
S_AXI_AWLEN : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
| 178 |
|
|
S_AXI_AWSIZE : IN STD_LOGIC_VECTOR(2 DOWNTO 0);
|
| 179 |
|
|
S_AXI_AWBURST : IN STD_LOGIC_VECTOR(1 DOWNTO 0);
|
| 180 |
|
|
S_AXI_AWVALID : IN STD_LOGIC;
|
| 181 |
|
|
S_AXI_AWREADY : OUT STD_LOGIC;
|
| 182 |
|
|
S_AXI_WDATA : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
| 183 |
|
|
S_AXI_WSTRB : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
|
| 184 |
|
|
S_AXI_WLAST : IN STD_LOGIC;
|
| 185 |
|
|
S_AXI_WVALID : IN STD_LOGIC;
|
| 186 |
|
|
S_AXI_WREADY : OUT STD_LOGIC;
|
| 187 |
|
|
S_AXI_BID : OUT STD_LOGIC_VECTOR(3 DOWNTO 0):= (OTHERS => '0');
|
| 188 |
|
|
S_AXI_BRESP : OUT STD_LOGIC_VECTOR(1 DOWNTO 0);
|
| 189 |
|
|
S_AXI_BVALID : OUT STD_LOGIC;
|
| 190 |
|
|
S_AXI_BREADY : IN STD_LOGIC;
|
| 191 |
|
|
|
| 192 |
|
|
-- AXI Full/Lite Slave Read (Write side)
|
| 193 |
|
|
S_AXI_ARID : IN STD_LOGIC_VECTOR(3 DOWNTO 0);
|
| 194 |
|
|
S_AXI_ARADDR : IN STD_LOGIC_VECTOR(31 DOWNTO 0);
|
| 195 |
|
|
S_AXI_ARLEN : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
| 196 |
|
|
S_AXI_ARSIZE : IN STD_LOGIC_VECTOR(2 DOWNTO 0);
|
| 197 |
|
|
S_AXI_ARBURST : IN STD_LOGIC_VECTOR(1 DOWNTO 0);
|
| 198 |
|
|
S_AXI_ARVALID : IN STD_LOGIC;
|
| 199 |
|
|
S_AXI_ARREADY : OUT STD_LOGIC;
|
| 200 |
|
|
S_AXI_RID : OUT STD_LOGIC_VECTOR(3 DOWNTO 0):= (OTHERS => '0');
|
| 201 |
|
|
S_AXI_RDATA : OUT STD_LOGIC_VECTOR(7 DOWNTO 0);
|
| 202 |
|
|
S_AXI_RRESP : OUT STD_LOGIC_VECTOR(1 DOWNTO 0);
|
| 203 |
|
|
S_AXI_RLAST : OUT STD_LOGIC;
|
| 204 |
|
|
S_AXI_RVALID : OUT STD_LOGIC;
|
| 205 |
|
|
S_AXI_RREADY : IN STD_LOGIC;
|
| 206 |
|
|
|
| 207 |
|
|
-- AXI Full/Lite Sideband Signals
|
| 208 |
|
|
S_AXI_INJECTSBITERR : IN STD_LOGIC;
|
| 209 |
|
|
S_AXI_INJECTDBITERR : IN STD_LOGIC;
|
| 210 |
|
|
S_AXI_SBITERR : OUT STD_LOGIC;
|
| 211 |
|
|
S_AXI_DBITERR : OUT STD_LOGIC;
|
| 212 |
|
|
S_AXI_RDADDRECC : OUT STD_LOGIC_VECTOR(11 DOWNTO 0);
|
| 213 |
|
|
S_ARESETN : IN STD_LOGIC
|
| 214 |
|
|
|
| 215 |
|
|
|
| 216 |
|
|
);
|
| 217 |
|
|
|
| 218 |
|
|
END bmg_wrapper;
|
| 219 |
|
|
|
| 220 |
|
|
|
| 221 |
|
|
ARCHITECTURE xilinx OF bmg_wrapper IS
|
| 222 |
|
|
|
| 223 |
|
|
COMPONENT spiloopmem_top IS
|
| 224 |
|
|
PORT (
|
| 225 |
|
|
--Port A
|
| 226 |
|
|
ENA : IN STD_LOGIC; --opt port
|
| 227 |
|
|
|
| 228 |
|
|
WEA : IN STD_LOGIC_VECTOR(0 DOWNTO 0);
|
| 229 |
|
|
ADDRA : IN STD_LOGIC_VECTOR(11 DOWNTO 0);
|
| 230 |
|
|
|
| 231 |
|
|
DINA : IN STD_LOGIC_VECTOR(7 DOWNTO 0);
|
| 232 |
|
|
|
| 233 |
|
|
|
| 234 |
|
|
CLKA : IN STD_LOGIC;
|
| 235 |
|
|
|
| 236 |
|
|
|
| 237 |
|
|
--Port B
|
| 238 |
|
|
ENB : IN STD_LOGIC; --opt port
|
| 239 |
|
|
ADDRB : IN STD_LOGIC_VECTOR(11 DOWNTO 0);
|
| 240 |
|
|
DOUTB : OUT STD_LOGIC_VECTOR(7 DOWNTO 0);
|
| 241 |
|
|
CLKB : IN STD_LOGIC
|
| 242 |
|
|
|
| 243 |
|
|
|
| 244 |
|
|
);
|
| 245 |
|
|
END COMPONENT;
|
| 246 |
|
|
|
| 247 |
|
|
BEGIN
|
| 248 |
|
|
|
| 249 |
|
|
bmg0 : spiloopmem_top
|
| 250 |
|
|
PORT MAP (
|
| 251 |
|
|
--Port A
|
| 252 |
|
|
ENA => ENA,
|
| 253 |
|
|
|
| 254 |
|
|
WEA => WEA,
|
| 255 |
|
|
ADDRA => ADDRA,
|
| 256 |
|
|
|
| 257 |
|
|
DINA => DINA,
|
| 258 |
|
|
|
| 259 |
|
|
CLKA => CLKA,
|
| 260 |
|
|
|
| 261 |
|
|
--Port B
|
| 262 |
|
|
ENB => ENB,
|
| 263 |
|
|
ADDRB => ADDRB,
|
| 264 |
|
|
DOUTB => DOUTB,
|
| 265 |
|
|
CLKB => CLKB
|
| 266 |
|
|
|
| 267 |
|
|
|
| 268 |
|
|
);
|
| 269 |
|
|
END xilinx;
|