In reply to dave_59:
Code works if we do not pass any ‘mode’ argument while opening file.
That seems to suggest that $fopen with MCD (Multi-Channel Descriptor) works fine in your tool, but not with a “fd” (Recall V2K added the FD concept with type as the 2nd argument to $fopen).
Maybe there is a +v2k switch needed in your tool? Which tool do you use? Also try few things:
- Use $ferror after the $fopen to see the “fd” is returned properly
- Use plain $fdisplay and see if that works
- Try “w” mode first to see if that works.
File IO has been a pain with some tools, but not this bad I suppose.
Good Luck
Ajeetha, CVC