1 --------------------------------------------------------------------------------
3 -- DIST MEM GEN Core - Stimulus Generator For Single Port RAM Configuration
5 --------------------------------------------------------------------------------
7 -- (c) Copyright 2006_3010 Xilinx, Inc. All rights reserved.
9 -- This file contains confidential and proprietary information
10 -- of Xilinx, Inc. and is protected under U.S. and
11 -- international copyright and other intellectual property
15 -- This disclaimer is not a license and does not grant any
16 -- rights to the materials distributed herewith. Except as
17 -- otherwise provided in a valid license issued to you by
18 -- Xilinx, and to the maximum extent permitted by applicable
19 -- law: (1) THESE MATERIALS ARE MADE AVAILABLE "AS IS" AND
20 -- WITH ALL FAULTS, AND XILINX HEREBY DISCLAIMS ALL WARRANTIES
21 -- AND CONDITIONS, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING
22 -- BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, NON-
23 -- INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and
24 -- (2) Xilinx shall not be liable (whether in contract or tort,
25 -- including negligence, or under any other theory of
26 -- liability) for any loss or damage of any kind or nature
27 -- related to, arising under or in connection with these
28 -- materials, including for any direct, or any indirect,
29 -- special, incidental, or consequential loss or damage
30 -- (including loss of data, profits, goodwill, or any type of
31 -- loss or damage suffered as a result of any action brought
32 -- by a third party) even if such damage or loss was
33 -- reasonably foreseeable or Xilinx had been advised of the
34 -- possibility of the same.
36 -- CRITICAL APPLICATIONS
37 -- Xilinx products are not designed or intended to be fail-
38 -- safe, or for use in any application requiring fail-safe
39 -- performance, such as life-support or safety devices or
40 -- systems, Class III medical devices, nuclear facilities,
41 -- applications related to the deployment of airbags, or any
42 -- other applications that could lead to death, personal
43 -- injury, or severe property or environmental damage
44 -- (individually and collectively, "Critical
45 -- Applications"). Customer assumes the sole risk and
46 -- liability of any use of Xilinx products in Critical
47 -- Applications, subject only to applicable laws and
48 -- regulations governing limitations on product liability.
50 -- THIS COPYRIGHT NOTICE AND DISCLAIMER MUST BE RETAINED AS
51 -- PART OF THIS FILE AT ALL TIMES.
53 --------------------------------------------------------------------------------
55 -- Filename: Ethernet_RAM_tb_stim_gen.vhd
58 -- Stimulus Generation For ROM
60 --------------------------------------------------------------------------------
61 -- Author: IP Solutions Division
63 -- History: Sep 12, 2011 - First Release
64 --------------------------------------------------------------------------------
66 --------------------------------------------------------------------------------
67 -- Library Declarations
68 --------------------------------------------------------------------------------
70 USE IEEE.STD_LOGIC_1164.
ALL;
71 USE IEEE.STD_LOGIC_ARITH.
ALL;
72 USE IEEE.STD_LOGIC_UNSIGNED.
ALL;
73 USE IEEE.STD_LOGIC_MISC.
ALL;
78 USE work.Ethernet_RAM_TB_PKG.
ALL;
88 END REGISTER_LOGIC_SRAM;
96 IF(RISING_EDGE(CLK)) THEN
107 USE IEEE.STD_LOGIC_1164.
ALL;
108 USE IEEE.STD_LOGIC_ARITH.
ALL;
109 USE IEEE.STD_LOGIC_UNSIGNED.
ALL;
110 USE IEEE.STD_LOGIC_MISC.
ALL;
114 USE work.Ethernet_RAM_TB_PKG.
ALL;
120 A : OUT (11-1 downto 0) := (OTHERS => '0');
121 D : OUT (64-1 downto 0) := (OTHERS => '0');
123 DATA_IN : IN (63 DOWNTO 0);
--OUTPUT VECTOR
125 CHECK_DATA : OUT := '0'
127 END Ethernet_RAM_TB_STIM_GEN;
131 CONSTANT ZERO : (31 DOWNTO 0) := (OTHERS => '0');
132 CONSTANT DATA_PART_CNT_A: :=1;
133 SIGNAL WRITE_ADDR : (31 DOWNTO 0) := (OTHERS => '0');
134 SIGNAL WRITE_ADDR_INT : (10 DOWNTO 0) := (OTHERS => '0');
135 SIGNAL DO_READ_REG : (4 DOWNTO 0) :=(OTHERS => '0');
136 SIGNAL READ_ADDR_INT : (10 DOWNTO 0) := (OTHERS => '0');
137 SIGNAL READ_ADDR : (31 DOWNTO 0) := (OTHERS => '0');
138 SIGNAL D_INT : (63 DOWNTO 0) := (OTHERS => '0');
139 SIGNAL DO_WRITE : := '0';
140 SIGNAL DO_READ : := '0';
141 SIGNAL COUNT_NO : :=0;
143 WRITE_ADDR_INT(10 DOWNTO 0) <= WRITE_ADDR(10 DOWNTO 0);
144 READ_ADDR_INT(10 DOWNTO 0) <= READ_ADDR(10 DOWNTO 0);
145 A <= IF_THEN_ELSE(DO_WRITE='1',WRITE_ADDR_INT,READ_ADDR_INT);
147 CHECK_DATA <= DO_READ;
159 ADDR_OUT => READ_ADDR
164 C_MAX_DEPTH =>
2048 )
171 ADDR_OUT => WRITE_ADDR
176 DATA_GEN_WIDTH =>
64,
178 DATA_PART_CNT => DATA_PART_CNT_A,
188 WR_RD_PROCESS:
PROCESS (CLK)
190 IF(RISING_EDGE(CLK)) THEN
195 ELSIF(COUNT_NO < 4) THEN
198 COUNT_NO <= COUNT_NO + 1;
199 ELSIF(COUNT_NO< 8) THEN
202 COUNT_NO <= COUNT_NO + 1;
203 ELSIF(COUNT_NO=8) THEN
211 BEGIN_SHIFT_REG: FOR I IN 0 TO 4 GENERATE
213 DFF_RIGHT: IF I=0 GENERATE
222 END GENERATE DFF_RIGHT;
223 DFF_OTHERS: IF ((I>0) AND (I<=4)) GENERATE
227 Q => DO_READ_REG
(I
),
230 D => DO_READ_REG
(I-
1)
232 END GENERATE DFF_OTHERS;
233 END GENERATE BEGIN_SHIFT_REG;
236 WE <= IF_THEN_ELSE(DO_WRITE='1','1','0') ;