diff options
author | Clifford Wolf <clifford@clifford.at> | 2019-05-24 16:22:34 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2019-05-24 16:22:34 +0200 |
commit | b7dd7c2dcd8e3e9b10407799f2978872a80f1860 (patch) | |
tree | 9583961de22cb4e707b140dd0ccd73849c4ba00d /backends/btor | |
parent | 67a4850e3505e97bcb01fb02a688beee89af6e76 (diff) | |
download | yosys-b7dd7c2dcd8e3e9b10407799f2978872a80f1860.tar.gz yosys-b7dd7c2dcd8e3e9b10407799f2978872a80f1860.tar.bz2 yosys-b7dd7c2dcd8e3e9b10407799f2978872a80f1860.zip |
Add proper error message for btor recursion_guard
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'backends/btor')
-rw-r--r-- | backends/btor/btor.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/backends/btor/btor.cc b/backends/btor/btor.cc index 91f238fa5..511a11942 100644 --- a/backends/btor/btor.cc +++ b/backends/btor/btor.cc @@ -129,7 +129,13 @@ struct BtorWorker void export_cell(Cell *cell) { - log_assert(cell_recursion_guard.count(cell) == 0); + if (cell_recursion_guard.count(cell)) { + string cell_list; + for (auto c : cell_recursion_guard) + cell_list += stringf("\n %s", log_id(c)); + log_error("Found topological loop while processing cell %s. Active cells:%s\n", log_id(cell), cell_list.c_str()); + } + cell_recursion_guard.insert(cell); btorf_push(log_id(cell)); |