Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fstReaderOpen failed for temporary FST file #637

Closed
avelure opened this issue Feb 28, 2023 · 12 comments
Closed

fstReaderOpen failed for temporary FST file #637

avelure opened this issue Feb 28, 2023 · 12 comments

Comments

@avelure
Copy link

avelure commented Feb 28, 2023

I get
** Fatal: 1050ns+3: fstReaderOpen failed for temporary FST file
when trying to create a VCD file with the command
nvc --std=08 -e test-beh -r -w --format=vcd

I get a temp.fst file and a test-beh.vcd, however the vcd file is empty.

@nickg
Copy link
Owner

nickg commented Mar 5, 2023

I couldn't reproduce this (but I only used a simple test case). Can you try running the fst2vcd program that comes with GtkWave on the temp.fst file and see if that gives any error?

@nickg nickg added the wave label Mar 5, 2023
@avelure
Copy link
Author

avelure commented Mar 6, 2023

It was the same reproducer as in #614.
fst2vcd has no problems converting it and both fst and vcd shows fine in gtkwave.

@erick166
Copy link

erick166 commented Aug 7, 2024

I've tried generating a VCD file using the "-w --format=vcd" arguments, but the file appears to be empty.
It works however if I use "--format=fst", any ideas why?

@nickg
Copy link
Owner

nickg commented Aug 7, 2024

@erick166 are you using Windows as well? The VCD writer is actually just the FST writer with an extra step where it writes the FST to a temporary file and then does the equivalent of fst2vcd on it.

@erick166
Copy link

erick166 commented Aug 7, 2024

Yes, I'm using Windows.

@nickg
Copy link
Owner

nickg commented Aug 7, 2024

I'm still unable to reproduce this (trying MinGW x64 build in a Windows 10 VM). Does it happen reliably with any design you try? @erick166 did you get the same "fstReaderOpen failed for temporary FST file" as in the first message?

@nickg nickg added the windows label Aug 7, 2024
@erick166
Copy link

erick166 commented Aug 7, 2024

Yes, it happens with different testbenches and I also get the same message. Could it maybe be something in the file path separators for the temporary file?

@nickg
Copy link
Owner

nickg commented Aug 7, 2024

I managed to reproduce it: it works fine in MSYS2 MingW x64 but not UCRT x64 (and I guess Clang x64 too since it uses the same libc).

@nickg
Copy link
Owner

nickg commented Aug 7, 2024

The problem seems to be a difference in behaviour under UCRT in GtkWave's fstapi.c library that we import. I'm still not sure I understand what's going on but I pushed a workaround that fixes it for me. Could you test again?

@erick166
Copy link

erick166 commented Aug 8, 2024

I tested with the fix and it works for me as well, thanks!

@avelure
Copy link
Author

avelure commented Aug 8, 2024

I can confirm I was likely using either ucrt64 or clang64 at the time.

@nickg
Copy link
Owner

nickg commented Aug 9, 2024

Thanks for testing. I submitted a slightly improved fix to GtkWave in gtkwave/gtkwave#376.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants