From 63dfdb5d7fcfb9c0ec2a5352a34cf9119e28766a Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sat, 11 Feb 2017 11:08:12 +0100 Subject: [PATCH] Add log_wire() API --- kernel/log.cc | 7 +++++++ kernel/log.h | 1 + 2 files changed, 8 insertions(+) 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) { -- 2.30.2