|
From: Cary R. <cy...@ya...> - 2020-05-17 02:38:35
|
And on the subject of $fclose() should it print a warning when you try to close one of the preopened MDC/FDs? Should it print a message if the underlying fclose() fails for some reason? We do cleanup the entry even if it fails so it is no longer available, but vpi_mcd_close() returns the descriptor for any failing items (well it does it correctly now) so we could report underlying issues correctly.
Cary
On Saturday, May 16, 2020, 4:24:29 PM PDT, Cary R. via Iverilog-devel <ive...@li...> wrote:
It looks like Icarus along with at least one of the Big-3 simulators allows, without warning, the various file I/O system tasks/functions to accept a NULL (0) file descriptor/MCD. I can see this as helpful if you want to disable output by just setting the FD/MCD to zero, but it could be an issue if the $fopen failed and the user did not check so having a warning would be beneficial for that. We do print a warning for an invalid non-zero FD/MCD.
So should a zero FD/MCD print a warning or do we just want it to return as if nothing happened?
I tend to like the warnings, but I'm not certain if there is an easy way to disable MCD output without using the zero value. Should $fclose be handled differently?
Thoughts/suggestions appreciated.
Thanks,
Cary
_______________________________________________
Iverilog-devel mailing list
Ive...@li...
https://lists.sourceforge.net/lists/listinfo/iverilog-devel
|