From 5fa144ec3aa59e86c03aa97130198e83de597404 Mon Sep 17 00:00:00 2001 From: "Li.XiongHui" Date: Thu, 7 Nov 2024 14:21:14 +0800 Subject: [PATCH] Fixes: Fix no close trace file when the sim is finished --- litex/build/sim/core/veril.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/litex/build/sim/core/veril.cpp b/litex/build/sim/core/veril.cpp index 1e79b6d9d..cda7bf689 100644 --- a/litex/build/sim/core/veril.cpp +++ b/litex/build/sim/core/veril.cpp @@ -78,7 +78,11 @@ extern "C" void litex_sim_tracer_dump() extern "C" int litex_sim_got_finish() { + int finished; tfp->flush(); + if(finished = Verilated::gotFinish()) { + tfp->close(); + } return Verilated::gotFinish(); }