From: Clifford Wolf Date: Sat, 11 Feb 2017 10:08:12 +0000 (+0100) Subject: Add log_wire() API X-Git-Tag: yosys-0.8~503 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=63dfdb5d7fcfb9c0ec2a5352a34cf9119e28766a;p=yosys.git Add log_wire() API --- diff --git a/kernel/log.cc b/kernel/log.cc index cd16bb344..956d93fd1 100644 --- a/kernel/log.cc +++ b/kernel/log.cc @@ -488,6 +488,13 @@ void log_cell(RTLIL::Cell *cell, std::string indent) log("%s", buf.str().c_str()); } +void log_wire(RTLIL::Wire *wire, std::string indent) +{ + std::stringstream buf; + ILANG_BACKEND::dump_wire(buf, indent, wire); + log("%s", buf.str().c_str()); +} + // --------------------------------------------------- // This is the magic behind the code coverage counters // --------------------------------------------------- diff --git a/kernel/log.h b/kernel/log.h index 5b1729eb1..34b8ac3a5 100644 --- a/kernel/log.h +++ b/kernel/log.h @@ -90,6 +90,7 @@ template static inline const char *log_id(T *obj) { void log_module(RTLIL::Module *module, std::string indent = ""); void log_cell(RTLIL::Cell *cell, std::string indent = ""); +void log_wire(RTLIL::Wire *wire, std::string indent = ""); #ifndef NDEBUG static inline void log_assert_worker(bool cond, const char *expr, const char *file, int line) {