3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-07-25 16:42:35 +00:00
This commit is contained in:
Emil J. Tywoniak 2026-06-12 00:18:53 +02:00
parent afdae7b87e
commit c3ffbf6fae
229 changed files with 3902 additions and 3835 deletions

View file

@ -309,12 +309,12 @@ struct Graph {
{
GraphNode *g = nullptr;
if (!grp.second.selected_module(module->name))
if (!grp.second.selected_module(module->meta_->name))
continue;
for (auto wire : module->wires()) {
if (!wire->name.isPublic()) continue;
if (!grp.second.selected_member(module->name, wire->name)) continue;
if (!grp.second.selected_member(module->meta_->name, wire->name.ref())) continue;
for (auto bit : sigmap(wire)) {
auto it = wire_nodes.find(bit);
if (it == wire_nodes.end())
@ -708,8 +708,8 @@ struct VizWorker
c->attributes.erase(vg_id);
for (auto g : graph.nodes) {
for (auto name : g->names()) {
auto w = module->wire(name);
auto c = module->cell(name);
auto w = module->wire(module->design->twines.lookup(name.str()));
auto c = module->cell(module->design->twines.lookup(name.str()));
if (w) w->attributes[vg_id] = g->index;
if (c) c->attributes[vg_id] = g->index;
}
@ -718,7 +718,7 @@ struct VizWorker
void write_dot(FILE *f)
{
fprintf(f, "digraph \"%s\" {\n", module->name.unescape().c_str());
fprintf(f, "digraph \"%s\" {\n", design->twines.unescaped_str(module->name).c_str());
fprintf(f, " rankdir = LR;\n");
dict<GraphNode*, std::vector<std::vector<std::string>>> extra_lines;
@ -782,7 +782,7 @@ struct VizWorker
g->names().sort();
std::string label; // = stringf("vg=%d\\n", g->index);
for (auto n : g->names())
label = label + (label.empty() ? "" : "\\n") + n.unescape();
label = label + (label.empty() ? "" : "\\n") + design->twines.unescaped_str(n);
fprintf(f, "\tn%d [shape=rectangle,label=\"%s\"];\n", g->index, label.c_str());
} else {
std::string label = stringf("vg=%d | %d cells", g->index, GetSize(g->names()));