mirror of
https://github.com/YosysHQ/yosys
synced 2026-05-30 21:57:47 +00:00
rtlil: add dump_sigmap for hacky signorm debugging
This commit is contained in:
parent
b859080ef2
commit
fb03a34277
2 changed files with 20 additions and 0 deletions
|
|
@ -2119,6 +2119,7 @@ public:
|
||||||
pool<RTLIL::Cell *> pending_deleted_cells;
|
pool<RTLIL::Cell *> pending_deleted_cells;
|
||||||
dict<RTLIL::Wire *, pool<RTLIL::Cell *>> buf_norm_connect_index;
|
dict<RTLIL::Wire *, pool<RTLIL::Cell *>> buf_norm_connect_index;
|
||||||
void bufNormalize();
|
void bufNormalize();
|
||||||
|
void dump_sigmap();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
SigNormIndex *sig_norm_index = nullptr;
|
SigNormIndex *sig_norm_index = nullptr;
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,19 @@ struct RTLIL::SigNormIndex
|
||||||
setup_fanout();
|
setup_fanout();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void dump_sigmap() {
|
||||||
|
for (auto [name, wire] : module->wires_) {
|
||||||
|
log_debug("wire %s %p %s\n", name, wire, wire->name);
|
||||||
|
SigSpec ss(wire);
|
||||||
|
log_debug("ss %s\n", log_signal(ss));
|
||||||
|
sigmap(ss);
|
||||||
|
log_debug("sigmapped %s\n", log_signal(ss));
|
||||||
|
}
|
||||||
|
for (auto [lhs, rhs] : module->connections_) {
|
||||||
|
log_debug("connection %s %s\n", log_signal(lhs), log_signal(rhs));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void normalize() {
|
void normalize() {
|
||||||
flush_connections();
|
flush_connections();
|
||||||
flush_newly_driven();
|
flush_newly_driven();
|
||||||
|
|
@ -346,6 +359,12 @@ void RTLIL::Module::sigNormalize()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RTLIL::Module::dump_sigmap()
|
||||||
|
{
|
||||||
|
if (sig_norm_index != nullptr)
|
||||||
|
sig_norm_index->dump_sigmap();
|
||||||
|
}
|
||||||
|
|
||||||
void RTLIL::Module::clear_sig_norm_index()
|
void RTLIL::Module::clear_sig_norm_index()
|
||||||
{
|
{
|
||||||
if (sig_norm_index == nullptr)
|
if (sig_norm_index == nullptr)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue