3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-07-21 20:02:07 +00:00

cxxrtl: include attributes in performer::on_print callback.

This is useful primarily to determine the source location, but can also
be used for any other purpose.
This commit is contained in:
Catherine 2024-01-16 16:17:10 +00:00
parent 905f07c03f
commit 5a1fcdea13
2 changed files with 31 additions and 28 deletions

View file

@ -1079,7 +1079,10 @@ struct CxxrtlWorker {
f << indent << "};\n";
f << indent << "if (performer) {\n";
inc_indent();
f << indent << "performer->on_print(formatter(performer->time(), performer->realtime()));\n";
f << indent << "static const metadata_map attributes = ";
dump_metadata_map(cell->attributes);
f << ";\n";
f << indent << "performer->on_print(formatter(performer->time(), performer->realtime()), attributes);\n";
dec_indent();
f << indent << "} else {\n";
inc_indent();