From 122890fef402ec16b4913e5c3827b37ef16a98d6 Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Tue, 2 Sep 2008 19:02:54 +0100 Subject: [PATCH] Make sure LPM expression is cast to the output type This fixes some signed/unsigned bugs identified by the signedX tests. --- tgt-vhdl/lpm.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tgt-vhdl/lpm.cc b/tgt-vhdl/lpm.cc index 3c2af5ead..22dd53394 100644 --- a/tgt-vhdl/lpm.cc +++ b/tgt-vhdl/lpm.cc @@ -323,7 +323,7 @@ int draw_lpm(vhdl_arch *arch, ivl_lpm_t lpm) out->set_slice(off, ivl_lpm_width(lpm) - 1); } - arch->add_stmt(new vhdl_cassign_stmt(out, f)); + arch->add_stmt(new vhdl_cassign_stmt(out, f->cast(out->get_type()))); return 0; }