mirror of https://github.com/YosysHQ/yosys.git
Fix sim writeback check for yw_cosim
Writeback of simulation state into initial state was only working for `run()` and `run_cosim_fst()`. This change moves the writeback into the `write_output_files()` function so that all simulation modes work with the writeback option.
This commit is contained in:
parent
4251d37f4f
commit
5a4e72f57a
|
@ -1162,6 +1162,11 @@ struct SimWorker : SimShared
|
|||
}
|
||||
for(auto& writer : outputfiles)
|
||||
writer->write(use_signal);
|
||||
|
||||
if (writeback) {
|
||||
pool<Module*> wbmods;
|
||||
top->writeback(wbmods);
|
||||
}
|
||||
}
|
||||
|
||||
void update(bool gclk)
|
||||
|
@ -1265,11 +1270,6 @@ struct SimWorker : SimShared
|
|||
register_output_step(10*numcycles + 2);
|
||||
|
||||
write_output_files();
|
||||
|
||||
if (writeback) {
|
||||
pool<Module*> wbmods;
|
||||
top->writeback(wbmods);
|
||||
}
|
||||
}
|
||||
|
||||
void run_cosim_fst(Module *topmod, int numcycles)
|
||||
|
@ -1394,11 +1394,6 @@ struct SimWorker : SimShared
|
|||
}
|
||||
|
||||
write_output_files();
|
||||
|
||||
if (writeback) {
|
||||
pool<Module*> wbmods;
|
||||
top->writeback(wbmods);
|
||||
}
|
||||
delete fst;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue