Last sample from input does not represent change
authorMiodrag Milanovic <mmicko@gmail.com>
Fri, 22 Apr 2022 11:46:11 +0000 (13:46 +0200)
committerMiodrag Milanovic <mmicko@gmail.com>
Fri, 22 Apr 2022 11:46:11 +0000 (13:46 +0200)
passes/sat/sim.cc

index f480168bdf2804346e90f13c8b8d96d6ac9b8b17..345ca3494122dd7ecbbde17d79fede2a63df71c9 100644 (file)
@@ -1805,8 +1805,9 @@ struct AIWWriter : public OutputWriter
 
                std::map<int, Yosys::RTLIL::Const> current;
                bool first = true;
-               for(auto& d : worker->output_data)
+               for (auto iter = worker->output_data.begin(); iter != std::prev(worker->output_data.end()); ++iter)
                {
+                       auto& d = *iter;
                        for (auto &data : d.second)
                        {
                                current[data.first] = data.second;