enjoy-digital / litex

Build your hardware, easily!
Other
3.02k stars 571 forks source link

Fixes: Fix not close trace file when the sim is finished #2120

Closed juiceRv closed 2 weeks ago

juiceRv commented 2 weeks ago

Description

During my testing of LiteX simulations using Verilator, I discovered that when the BIOS executes the finish command to properly terminate the simulation, the FST files were not being closed correctly. This resulted in sim.fst and sim.fst.hier not being merged properly.

Changes

Testing

Additional Information

Thank you to the authors for designing such an excellent project with LiteX! I hope this fix can be accepted upstream.

juiceRv commented 2 weeks ago
litex_sim --cpu-type=picorv32 --sim-debug --gtkwave-savefile --trace --trace-fst --with-sdram --sdram-module MT48LC16M16 --sdram-data-width 32 --soc-csv csr.csv

Once the simulation is running, execute the following trace commands:

trace
sdram_init
trace
finish
enjoy-digital commented 2 weeks ago

Thanks @juiceRv!