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

ISim : ERROR: File descriptor (0) passed to $fscanf is not valid


I am receiving the following error when running a simulation:

ERROR: File descriptor (0) passed to $fscanf is not valid

What is this and how do I resolve it?


This error indicates that the file referenced in the $fscanf command could not be found. This message is preceded by a file not found message such as the following:

WARNING: at 100 ns: file ./sim/data.txt could not be opened
ERROR: File descriptor (0) passed to $fscanf is not valid

This error has been seen with several root causes such as the following:

  1. The file path delimiters are incorrect for the operating system: "\" instead of "/" in UNIX.
  2. The file path is incorrect
  3. The file does not exist

To resolve this error, ensure the file exists, and the path is correct, using the correct path delimiters for the operating system.

AR# 47891
Date Created 05/14/2012
Last Updated 12/15/2012
Status Active
Type General Article
  • ISE Design Suite - 14.1