AR# 10454


XST - Using the image attribute to define RPMs


Keywords: VHDL, RLOC, image, synthesis, macro

Urgency: Standard

General Description:
The predefined image attribute is supported in XST. This attribute converts an integer value to a string, and it can be used to compute the value of the RLOC attribute.


The following example illustrates the creation of a register bank with RLOC constraints:

In the first entity, the generic placement of a single flip-flop is defined by an RLOC attribute. The RLOC value calculation is based on the generic values.

In the second entity, using a LOOP constraint, a number of flip-flops are instantiated. The placement of each instance is defined via generics.


First Entity:

entity single_reg is
generic (row, col: integer:= 1;
slice: integer:= 0);
"R" & integer'image (row_fun(row)) & "C" & integer'image(col) & ".S" & integer'image(slice);

-- Note that functions may be used to calculate values.
u1: FD port map (D=>D, C=>CLK, Q=>Q);

Second Entity:

entity reg_bank is
my_for: for i in 1 to 8 generate
u11: single_reg generic map (row=>i, col=>1, slice=>0)
port map (D=>D(i-1), CLK=>CLK, Q=>Q(i-1));
end generate;

XST Log File

Analyzing generic Entity <single_reg> (Architecture <struct>).
row = 1
col = 1
slice = 0
Set property "user_defined = RLOC R1C1.S0" for instance <u1> in unit <single_reg>.
Analyzing generic Entity <single_reg> (Architecture <struct>).
row = 2
col = 1
slice = 0
Set property "user_defined = RLOC R2C1.S0" for instance <u1> in unit <single_reg0>.

Resulting EDIF Netlist

(instance u111_u1 ... (cellref FD ... (property RLOC (string "R1C1.S0")))
(instance u112_u1 ... (cellref FD ... (property RLOC (string "R2C1.S0")))
(instance u113_u1 ... (cellref FD ... (property RLOC (string "R3C1.S0")))
(instance u118_u1 ... (cellref FD ... (property RLOC (string "R8C1.S0")))
AR# 10454
日期 10/21/2008
状态 Archive
Type 综合文章
People Also Viewed