3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-21 13:23:40 +00:00

sim: Improvements and fixes for yw cosim

* Fixed $cover handling
  * Improved sparse memory handling when writing traces
  * JSON summary output
This commit is contained in:
Jannis Harder 2023-01-10 17:04:06 +01:00
parent 636b9f2705
commit 7ddec5093f
6 changed files with 152 additions and 50 deletions

View file

@ -29,6 +29,7 @@
#include "kernel/log.h"
#include "kernel/mem.h"
#include "kernel/json.h"
#include "kernel/yw.h"
#include <string>
USING_YOSYS_NAMESPACE
@ -141,18 +142,6 @@ struct BtorWorker
return " " + infostr;
}
template<class T> static std::vector<std::string> witness_path(T *obj) {
std::vector<std::string> path;
if (obj->name.isPublic()) {
auto hdlname = obj->get_string_attribute(ID::hdlname);
for (auto token : split_tokens(hdlname))
path.push_back("\\" + token);
}
if (path.empty())
path.push_back(obj->name.str());
return path;
}
void ywmap_state(const SigSpec &sig) {
if (ywmap_json.active())
ywmap_states.emplace_back(sig);