From 8a3309d79da9fba9971ac981955a91b5fd0db460 Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Tue, 14 Oct 2008 20:21:19 +0100 Subject: [PATCH] Add a comment to the output about casex/z translation --- tgt-vhdl/stmt.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tgt-vhdl/stmt.cc b/tgt-vhdl/stmt.cc index fac0c640e..f5644825e 100644 --- a/tgt-vhdl/stmt.cc +++ b/tgt-vhdl/stmt.cc @@ -653,6 +653,14 @@ int draw_casezx(vhdl_procedural *proc, stmt_container *container, draw_stmt(proc, where, ivl_stmt_case_stmt(stmt, i), is_last); } + // Add a comment to say that this corresponds to a casex/z statement + // as this may not be obvious + ostringstream ss; + ss << "Generated from case" + << (ivl_statement_type(stmt) == IVL_ST_CASEX ? 'x' : 'z') + << " statement at " << ivl_stmt_file(stmt) << ":" << ivl_stmt_lineno(stmt); + result->set_comment(ss.str()); + container->add_stmt(result); // We don't actually use the generated `test' expression