AR# 2230: FPGA Express: Using RLOC_ORIGIN with Express RPMs
AR# 2230
|
FPGA Express: Using RLOC_ORIGIN with Express RPMs
Description
Keywords: FGPA Express, Foundation Express, RLOC, RLOC_ORIGIN, UCF, RPM
Urgency: Standard
General Description: FPGA Express uses its knowledge to build Relationally Placed Macros (RPMs). For example, an eight bit counter will be built four rows high and one column wide. This placement is achieved by placing Relative LOCation constraints (RLOCs) on the FMAPs, Flip Flops, and carry logic that is used to build the counter. However, RLOCs simply group this logic together; they do not determine where on the die this component will be placed.
RLOCed groups may be given an RLOC_ORIGIN to define the upper left hand corner of the RPM. Express does not allow attribute passing, so this attribute may not be applied to the source HDL or otherwise entered within Express.
This solution explains how to enter these constraints via the UCF.
This solution only applies to FPGA Express version 2.0.x.
Solution
An RLOC_ORIGIN constraint is applied to any element containing an RLOC constraint. Although RLOCs will also be placed on FMAPs and Carry logic, the most predictable element type is the flip flop. Flip flops are named by Express according to the output net name followed by "_reg" and the bus index, if necessary.
For example, if your code contains:
COUNT <= COUNT + 1;
and COUNT is an 8 bit signal, the XNF file will contain a line like this:
This predictable name, COUNT_reg<0> can be used in the UCF file as follows:
INST COUNT_reg<0> RLOC_ORIGIN=R1C1;
This syntax will place the origin of the counter RPM in the top left hand corner of the die. It does not matter which bus bit is used, although it is highly recommended you use the most significant or least significant bit.
Hierarchy in XNF files produced by Express is denoted by underscores. If this counter is in a level called "LOWER", then the proper syntax to use would be:
INST LOWER_COUNT_reg<0> RLOC_ORIGIN=R1C1;
If the Preserve attribute has been used in the Express constraints GUI, and subsequently multiple XNF files have been produced (creating LOWER.XNF in this example), the hierarchy delimiter will be a forward slash. In this case:
INST LOWER/COUNT_reg<0> RLOC_ORIGIN=R1C1;
For more information about RPMs, RLOCs, and RLOC_ORIGIN, please see Chapter 4 of the Libraries Guide.