From b9cecbef6420acbea600a91b18c1f99dbfc2933c Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Sun, 27 Jul 2008 19:05:49 +0100 Subject: [PATCH] Make sure LPM comparison result is std_logic not Boolean --- tgt-vhdl/lpm.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tgt-vhdl/lpm.cc b/tgt-vhdl/lpm.cc index 3221b85c6..e3370b263 100644 --- a/tgt-vhdl/lpm.cc +++ b/tgt-vhdl/lpm.cc @@ -130,7 +130,9 @@ static vhdl_expr *rel_lpm_to_expr(vhdl_scope *scope, ivl_lpm_t lpm, vhdl_binop_t expr->add_expr(e); } - return expr; + // Need to make sure output is std_logic rather than Boolean + vhdl_type std_logic(VHDL_TYPE_STD_LOGIC); + return expr->cast(&std_logic); } static vhdl_expr *part_select_vp_lpm_to_expr(vhdl_scope *scope, ivl_lpm_t lpm)