AR# 18498

|

6.3i XST - XST creates incorrect logic with a multiply subtract function for Virtex-4

Description

Keywords: DSP48, MACC, MADD, wrong, logic

Urgency: Urgent

General Description:
XST will incorrectly map the construct below into the DSP48 slice:

:
P <= (A*B)-C;
:

The above function cannot be placed into the DSP48. Other variations of the above construct will infer correct logic.

Solution

1

To work around this issue, set the use_dsp switch to no. This can be done globally in Project Navigator or on the specific signal through the HDL code:

In Project Navigator

1. Right-click the 'Synthesize - XST' process and select 'Properties...'.
2. Select the 'HDL Options' tab.
3. Change the 'Use DSP48' switch to 'no'.
4. Push the OK button.

2

You can split the function into two parts in the HDL code and place a KEEP constraint to prevent XST from merging the two functions into the DSP48 slice. The multiply function will be pushed into a DSP48 slice, and the subtract function will utilize slice logic:

Verilog

module dsp(a,b,c,prod);
input [7:0] a,b,c;
output [15:0] prod;

//Verilog 2001 attribute passing
(* KEEP = "true" *)
wire [15:0] temp;

//Verilog 95 meta comment
//synthesis attribute KEEP of temp "true"
assign temp = (a * b);
assign prod = temp - c;

endmodule


VHDL

:
:
attribute KEEP: string;
attribute KEEP of temp : signal is "true";
:

begin

temp <= a * b;
prod <= temp - c;
:
:

end architecture;
AR# 18498
Date 07/18/2007
Status Archive
Type General Article
People Also Viewed