UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 16026

5.2i XST - XST does not properly initialize the inference of a block ROM

Description

Keywords: block, RAM, ROM, initial, initialize, INIT, infer, XST, VHDL

Urgency: Standard

General Description:
When block ROM is inferred through VHDL, XST does not make any distinction between the direction of the ROM constants and the way in which the block RAM is initialized. To illustrate this, in the following two examples, XST programs the same values in the same locations.

Example 1:

type rom is array (255 downto 0) of std_logic_vector (3 downto 0);
constant ROM1 : rom := (
"0000", "0001", "0010", "0011", "0100", "0101", "0110", "0111",
"1000", "1001", "1010", "1011", "1100", "1101", "1110", "1111",
:
:

Example 2:

type rom is array (0 to 255) of std_logic_vector (3 downto 0);
constant ROM1 : rom := (
"0000", "0001", "0010", "0011", "0100", "0101", "0110", "0111",
"1000", "1001", "1010", "1011", "1100", "1101", "1110", "1111",
:
:

Solution

When inferring ROM, use only the following type of construct:

type rom is array (0 to 255) of std_logic_vector (3 downto 0);
constant ROM1 : rom := (
"0000", "0001", "0010", "0011", "0100", "0101", "0110", "0111",
"1000", "1001", "1010", "1011", "1100", "1101", "1110", "1111",
:

This ensures that the constant values are associated with the proper address.

This problem is fixed in the latest 5.2i Service Pack, available at:
http://support.xilinx.com/support/techsup/sw_updates
The first service pack containing the fix is 5.2i Service Pack 1.
AR# 16026
Date Created 10/29/2002
Last Updated 10/20/2005
Status Archive
Type General Article