AR# 18498


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


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.



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.


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:


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;



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


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

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