Claude
New Member
Offline
Posts: 5
|
So apparently, I was mis-reading the documentation, there seem to be provision in Verilog-2001 for 2**31 available file descriptors and when specifying: $sformat(inst_filename, "EVL_DBG_%m.log"); // mcd = $fopen("%m"); MCD only 30 channel since now MSB of MCD is reserved to identify multi-channel vs file descriptors handle = $fopen(inst_filename, "w"); // Should have 2**31 possibilities $fdisplay(handle, "tran %d:%b", handle, handle); $debug("tran %d:%b %m", handle, handle); $fclose(handle); $debug(" --> should be closing %d:%b", handle, handle); tmp = $fopen(inst_filename, "w"); $debug(" --> should be able to reuse %d:%b, getting %d:%b", handle, handle, tmp, tmp); $fdisplay(tmp, "tran %d:%b", tmp, tmp); $fclose(tmp);
I do get results going up to larger number of file ID:
tran -32:-100000 xi0.xi0.xi0.xdd6.xdd0.a_evl_2tak --> should be closing -32:-100000 --> should be able to reuse -32:-100000, getting -33:-100001
This is the odd part, although I closed descriptor '-32', I cannot re-use it
... continues until ...
tran -1030:-10000000110 xi0.xi0.xi15.xi45.xi0.xi25.xmmp1.xmm0.xdsub.a_evl_2tak --> should be closing -1030:-10000000110 --> should be able to reuse -1030:-10000000110, getting -1031:-10000000111 * ERROR * $fopen() failed. There were not any available file descriptors ...
which is expected because my verilog-AMS vendor indicates in its manual that they have set the limit to 999.
So I am starting to wonder if this is not actually working as per Verilog-2001 and I only did not realize that $fclose() is only executed when a step has converged similarly to how $display() is implemented.
If not, then it is a vendor implementation issue. i am also following-up with them, but hoped someone might already know the answer here,
PS: Re-reading the post I realized that we had already discussed the working 500+ open file test, but at some point I went back to multi-channel (as opposed to file descriptor) thinking that it would work better and thus the apparent disconnect, at least now I know exactly why I only have 999 possibilities ;)
Thank you, Claude
|