UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 55469

Vivado Synthesis - Passing a generic constant through Vivado Project settings causes synthesis to fail with "Error [Synth 8-111] bad syntax for constant: ''"

Description

I am passing variable as a generic (-generic {XYZ INV}) to my design but synthesis gives the following error:

"ERROR: [Synth-111] bad syntax for constant: 'INV'"

I have attempted to set the generic in the "Language Options" under "Project Settings..." as well as with the set_property Tcl command.
If I change the variable to some constant value (numeric), then synthesis goes through fine.

Solution

The issue is that when a string is passed to generic, the constant string is not maintained as a variable.

In the example above, the generic is passed to synthesis as XYZ = \"INV\", but synthesis is failing with "error [Synth 8-111] bad syntax for constant: 'INV'".

If the user escapes the variable as shown in the following example, synthesis gets the correct value and is able to pass:

-generic {XYZ={"INV"}} 
set_property generic {XYZ={\"INV\"}} [current_fileset]
AR# 55469
Date Created 04/09/2013
Last Updated 04/15/2013
Status Active
Type General Article
Tools
  • Vivado Design Suite