mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-13 04:28:18 +00:00
Fix for last clock edge data
This commit is contained in:
parent
ca261d3c28
commit
fca168797e
|
@ -184,6 +184,7 @@ void FstData::reconstructAllAtTimes(std::vector<fstHandle> &signal, uint64_t sta
|
||||||
fstReaderSetUnlimitedTimeRange(ctx);
|
fstReaderSetUnlimitedTimeRange(ctx);
|
||||||
fstReaderSetFacProcessMaskAll(ctx);
|
fstReaderSetFacProcessMaskAll(ctx);
|
||||||
fstReaderIterBlocks2(ctx, reconstruct_clb_attimes, reconstruct_clb_varlen_attimes, this, nullptr);
|
fstReaderIterBlocks2(ctx, reconstruct_clb_attimes, reconstruct_clb_varlen_attimes, this, nullptr);
|
||||||
|
past_data = last_data;
|
||||||
callback(last_time);
|
callback(last_time);
|
||||||
if (last_time!=end_time)
|
if (last_time!=end_time)
|
||||||
callback(end_time);
|
callback(end_time);
|
||||||
|
|
|
@ -1125,7 +1125,7 @@ struct SimWorker : SimShared
|
||||||
try {
|
try {
|
||||||
fst->reconstructAllAtTimes(fst_clock, startCount, stopCount, [&](uint64_t time) {
|
fst->reconstructAllAtTimes(fst_clock, startCount, stopCount, [&](uint64_t time) {
|
||||||
log("Co-simulating %s %d [%lu%s].\n", (all_samples ? "sample" : "cycle"), cycle, (unsigned long)time, fst->getTimescaleString());
|
log("Co-simulating %s %d [%lu%s].\n", (all_samples ? "sample" : "cycle"), cycle, (unsigned long)time, fst->getTimescaleString());
|
||||||
bool did_something = time < stopCount; // FIXME
|
bool did_something = false;
|
||||||
for(auto &item : inputs) {
|
for(auto &item : inputs) {
|
||||||
std::string v = fst->valueOf(item.second);
|
std::string v = fst->valueOf(item.second);
|
||||||
did_something |= top->set_state(item.first, Const::from_string(v));
|
did_something |= top->set_state(item.first, Const::from_string(v));
|
||||||
|
@ -1138,8 +1138,6 @@ struct SimWorker : SimShared
|
||||||
}
|
}
|
||||||
if (did_something)
|
if (did_something)
|
||||||
update();
|
update();
|
||||||
else
|
|
||||||
log("nothing to update.\n");
|
|
||||||
write_output_step(time);
|
write_output_step(time);
|
||||||
|
|
||||||
bool status = top->checkSignals();
|
bool status = top->checkSignals();
|
||||||
|
|
Loading…
Reference in a new issue