From 09851580902c1a1c7d06aa0332915351fcbe7109 Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Fri, 8 Aug 2008 20:07:22 +0100 Subject: [PATCH] Handle %% in $display --- tgt-vhdl/display.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tgt-vhdl/display.cc b/tgt-vhdl/display.cc index e70f1bce5..91367b466 100644 --- a/tgt-vhdl/display.cc +++ b/tgt-vhdl/display.cc @@ -141,10 +141,15 @@ int draw_stask_display(vhdl_procedural *proc, stmt_container *container, ss << ch; p += 3; } - else if (*p == '%') { + else if (*p == '%' && *(++p) != '%') { flush_string(ss, container); - p++; // Ignore the format (!) + // TODO: This needs to be re-written + // ...it does not handle format codes at all! + // Unfortunately, there is no printf-like + // function in VHDL + + assert(i < count); ivl_expr_t net = ivl_stmt_parm(stmt, i++); assert(net);