From c38283dbd033ba95554600bbaa850de707ab2a78 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Tue, 2 Sep 2014 17:48:41 +0200 Subject: Small bug fixes in $not, $neg, and $shiftx models --- kernel/calc.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'kernel/calc.cc') diff --git a/kernel/calc.cc b/kernel/calc.cc index 7bfdb8955..4048e4a1f 100644 --- a/kernel/calc.cc +++ b/kernel/calc.cc @@ -591,10 +591,9 @@ RTLIL::Const RTLIL::const_bu0(const RTLIL::Const &arg1, const RTLIL::Const&, boo RTLIL::Const RTLIL::const_neg(const RTLIL::Const &arg1, const RTLIL::Const&, bool signed1, bool, int result_len) { RTLIL::Const arg1_ext = arg1; - extend(arg1_ext, result_len, signed1); - RTLIL::Const zero(RTLIL::State::S0, 1); - return RTLIL::const_sub(zero, arg1_ext, false, signed1, result_len); + + return RTLIL::const_sub(zero, arg1_ext, true, signed1, result_len); } YOSYS_NAMESPACE_END -- cgit v1.2.3