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# 46668

Vivado - ERROR: [Common 17-165] Too many positional options when parsing '.tcl', please type ' -help' for usage info


An error or critical warning indicating "Too many positional options"  is received when sourcing a Tcl file, running a Tcl command from the Tcl console, or when an XDC constraint file is being parsed.

The error can be seen after copying commands from Vivado documentation (PDF files) opened from the Xilinx Documentation Navigator (DocNav).

I can source a Tcl script which contains commands that all work without error from the Tcl console.

However, sourcing the file results in the following errors:

Critical Warning: [Common 17-165] Too many positional options when parsing '<constraint>.xdc', please type '<command> -help' for usage info. ["XX.xdc":198]
ERROR: [Common 17-165] Too may positional options when parsing 'file', please type '<command> -help' for usage info.

What does this error mean? How can I resolve it? 


Check the existing command compared to the published constraint syntax.. type <Command name> -help in the Tcl console for syntax information.

The message indicates a Tcl command line syntax error where there are more options / arguments for a Tcl command or portion of the Tcl command. 

Usually, there are two arguments where only one is expected.

Since the XDC commands are all Tcl commands, they are parsed as any other Tcl command.
Some of the most common causes of this message are:

Unicode (double byte) character is entered into a Tcl command.

The - and / characters are frequently found to be an issue because they are characters that are expected to be in many Tcl commands. 
However, these characters are often automatically transformed by some editors from the ASCII format to a unicode character.

Many Xilinx documents (PDF format) were created with the AutoFormat feature enabled which converts "normal dashes" (-) into an "en dash". 
Additionally, copying any working command to an editor with AutoFormat feature enabled may cause this reformatting.
The solution is to replace any "en dashes" with "normal dashes" (-).

Many Non-English standard character sets include characters that are not single byte (ASCII) format. 

In some cases the character is not very different from an ASCII character. 

Users should be careful not to introduce these characters into a command.

Un-intended Spaces:

Entering a command that takes a directory argument when the directory has spaces in the path requires that the path be escaped with double quotes or curly brackets (braces).

For example {/eda/my projects/project_1}

Using the Backslash character in a directory path

In Tcl, the backslash is an escape character that will be ignored or used as a special character depending on what follows. 

"\t for example indicates a tab character. 

Therefore the directory c:\designs\test1 will be interpreted as c:designs    est1.

To resolve this issue, use one of the following solutions:

  • Manually correct the incorrect format of the character.
  • Open the XDC file in Notepad++ or another editor encoded in an ANSI standard, where these alternate characters will be revealed, so that the Unicode characters can be corrected.
  • Manually enter the constraint in XDC in English input method and remove the old one.
AR# 46668
日期 05/12/2014
状态 Active
Type 综合文章
  • PlanAhead - 13.4