Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
xst.pdf
Скачиваний:
141
Добавлен:
11.06.2015
Размер:
5.64 Mб
Скачать

R

Macro Generation

Table 3-2: Primitives Used by XST (Virtex-II Devices and Higher) (Cont’d)

RAM

Clock Edge

Primitives

 

 

 

Single-Port Synchronous Block

N/A

RAMB4_Sn

RAM

 

 

 

 

 

Dual-Port Synchronous Block RAM

N/A

RAMB4_Sm_Sn

 

 

 

Controlling Implementation of Inferred RAM

To better control the implementation of the inferred RAM, XST offers a way to control RAM inference, and to select the generation of distributed RAM or block RAMs (if possible).

The “RAM Style (RAM_STYLE)” attribute specifies that an inferred RAM be generated using:

Block RAM if the value is block

Distributed RAM if the value is distributed

Apply the “RAM Style (RAM_STYLE)” attribute to:

A signal that defines the RAM, or

The instance name of the RAM

The “RAM Style (RAM_STYLE)” attribute can also be global.

If the RAM resources are limited, XST can generate additional RAMs using registers. To generate additional RAMs using registers, use “RAM Extraction (RAM_EXTRACT)” with the value set to no.

ROMs in Macro Generation

A ROM can be inferred when all assigned contexts in a Case or If...else statement are constants. Macro inference considers only ROMs of at least 16 words with no width restriction. For example, the following HDL equation can be implemented with a ROM of 16 words of 4 bits:

data = if address = 0000 then 0010 if address = 0001 then 1100 if address = 0010 then 1011

...

if address = 1111 then 0001

A ROM can also be inferred from an array composed entirely of constants, as shown in the following coding example:

type ROM_TYPE is array(15 downto 0)of std_logic_vector(3 downto 0); constant ROM : rom_type := ("0010", "1100", "1011", ..., "0001");

...

data <= ROM(conv_integer(address));

“ROM Extraction (ROM_EXTRACT)” can be used to disable the inference of ROMs. Set the value to yes to enable ROM inference. Set the value to no to disable ROM inference. The default is yes.

XST User Guide

www.xilinx.com

263

10.1

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]