aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/log.cc7
-rw-r--r--kernel/log.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/kernel/log.cc b/kernel/log.cc
index fe84184a5..12dc453dc 100644
--- a/kernel/log.cc
+++ b/kernel/log.cc
@@ -427,6 +427,13 @@ const char *log_id(RTLIL::IdString str)
return p+1;
}
+void log_module(RTLIL::Module *module, std::string indent)
+{
+ std::stringstream buf;
+ ILANG_BACKEND::dump_module(buf, indent, module, module->design, false);
+ log("%s", buf.str().c_str());
+}
+
void log_cell(RTLIL::Cell *cell, std::string indent)
{
std::stringstream buf;
diff --git a/kernel/log.h b/kernel/log.h
index 33e624dcb..f830655c1 100644
--- a/kernel/log.h
+++ b/kernel/log.h
@@ -85,6 +85,7 @@ template<typename T> static inline const char *log_id(T *obj) {
return log_id(obj->name);
}
+void log_module(RTLIL::Module *module, std::string indent = "");
void log_cell(RTLIL::Cell *cell, std::string indent = "");
#ifndef NDEBUG