Geoffrey_Coram
|
The 1364-2005 Verilog Language Reference Manual says (17.2.4.3):
The number of successfully matched and assigned input items is returned in code; this number can be 0 in the event of an early matching failure between an input character and the control string. If the input ends before the first matching failure or conversion, EOF is returned. Applications can call $ferror to determine the cause of the most recent error (see 17.2.7).
It sounds like 6.1 complies with the current LRM. I see similar wording in 1364-2001, but 1364-1995 doesn't even seem to have $fscanf. Since V-AMS is based on 1364-1995, the fact that it runs at all means some extensions were added in Spectre.
You might be able to work around this if EOF would be defined appropriately in the different versions, as long as you test for equality with "EOF" and not with "-1"
|