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:
To resolve this error, ensure the file exists, and the path is correct, using the correct path delimiters for the operating system.