AR# 18498: 6.3i XST - XST creates incorrect logic with a multiply subtract function for Virtex-4
6.3i XST - XST creates incorrect logic with a multiply subtract function for Virtex-4
Keywords: DSP48, MACC, MADD, wrong, logic
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: