From a7b07696238dbfd8e4fb5fd41d597200abef4909 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Wed, 27 Jul 2016 15:40:17 +0200 Subject: Added "read_verilog -dump_rtlil" --- kernel/log.cc | 7 +++++++ kernel/log.h | 1 + 2 files changed, 8 insertions(+) (limited to 'kernel') 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 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 -- cgit v1.2.3