From d8f10e7aa26471b92d0cc510cbaab33bb9cc8f36 Mon Sep 17 00:00:00 2001 From: Stephen Williams Date: Mon, 14 Jul 2014 16:22:35 -0700 Subject: [PATCH] Improbe vvp support for wide mux devices. --- tgt-vvp/draw_mux.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tgt-vvp/draw_mux.c b/tgt-vvp/draw_mux.c index 2e3585b35..4fb27270f 100644 --- a/tgt-vvp/draw_mux.c +++ b/tgt-vvp/draw_mux.c @@ -110,7 +110,7 @@ static void draw_lpm_mux_nest(ivl_lpm_t net, const char*muxz) unsigned swidth = ivl_lpm_selects(net); char*select_input; - assert(swidth < sizeof(unsigned)); + assert(swidth < 8*sizeof(unsigned)); assert(ivl_lpm_size(net) == (1U << swidth)); select_input = strdup(draw_net_input(ivl_lpm_select(net))); @@ -127,8 +127,8 @@ static void draw_lpm_mux_nest(ivl_lpm_t net, const char*muxz) } for (level = 1 ; level < swidth-1 ; level += 1) { - fprintf(vvp_out, "L_%p/%us .part %s, %u, 1;\n", - net, level, select_input, level); + fprintf(vvp_out, "L_%p/%us .part %s, %u, 1; Bit %u of the select\n", + net, level, select_input, level, level); for (idx = 0 ; idx < (ivl_lpm_size(net) >> level); idx += 2) { fprintf(vvp_out, "L_%p/%u/%d .functor %s %u",