nvc icon indicating copy to clipboard operation
nvc copied to clipboard

Is it possible to simulate large VHDL netlists in nvc?

Open mik1234mc opened this issue 2 months ago • 4 comments

Hello Nick,

I tried to simulate quite large synthesis netlist without success. nvc draws memory till the limit of my machine. -M and -H does not seem to work for me. Is there an indication how much RAM would be needed for such a design?

nvc -H4096m -M4096m --messages=compact -a --relaxed fftmain.vhdl
nvc -H4096m -M4096m --messages=compact -e -V fftmain 
note: initialising [25ms +34208kB]
note: loading top-level unit [63ms +48160kB]
^C

Michael

fftmain.zip

mik1234mc avatar Oct 24 '25 10:10 mik1234mc

Hi @mik1234mc,

the netlist you provided can be elaborated by NVC, however, it does take some time (and memory):

[oille@runner4 flow]$ nvc -a fftmain.vhdl 
[oille@runner4 flow]$ 
[oille@runner4 flow]$ /usr/bin/time nvc -H 8192m -M 8192m -e -V fftmain
** Note: initialising [9ms +38568kB]
** Note: loading top-level unit [58ms +66728kB]
** Note: elaborating design [67049ms +9864072kB]
** Note: saving library [1109ms +2784kB]
** Note: writing JIT pack [10705ms +2935572kB]
58.18user 10.30system 1:23.32elapsed 82%CPU (0avgtext+0avgdata 12907724maxresident)k
0inputs+485408outputs (0major+3028952minor)pagefaults 0swaps

Blebowski avatar Oct 24 '25 12:10 Blebowski

@Blebowski, thank you for testing! I can confirm by migrating to a different machine the same behaviour. I somehow expected that nvc will limit its memory consumption via -M/-H options as my previous trials ended with RAM depletion and system crash.

mik1234mc avatar Oct 24 '25 12:10 mik1234mc

You are welcome @mik1234mc . NVC is quite memory hungry (certainly more than GHDL), however it has other benefits over GHDL. Btw. @nickg is it possible to somehow speed-up the elaboration ? Almost 1.5 minutes is quite long if someone wants to do debug loops (e.g. parallelize the code-gen of independent code units ?)

Blebowski avatar Oct 24 '25 12:10 Blebowski

Can you test again with the current master branch? It should be significantly improved.

nickg avatar Nov 30 '25 11:11 nickg

I suppose that memory allocation requirements were not modified, right? I need to migrate to different machine with more RAM first to test it.

mik1234mc avatar Dec 09 '25 20:12 mik1234mc

I suppose that memory allocation requirements were not modified, right? I need to migrate to different machine with more RAM first to test it.

No, it should be much lower. nvc -M 200M -H 256M -e -V fftmain_tb works for me.

nickg avatar Dec 10 '25 09:12 nickg

@nickg, thank you. I had enabled the coverage collection which masked your improvements. Apparently, the coverage collection does not respect -M and -H parameters.

mik1234mc avatar Dec 10 '25 10:12 mik1234mc