diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-09-02 17:48:41 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-09-02 17:48:41 +0200 |
commit | c38283dbd033ba95554600bbaa850de707ab2a78 (patch) | |
tree | 26c4d56235b59a023c3cfdd6023014cc322c7509 /kernel/calc.cc | |
parent | acd7a99aef0f698580dc6a6d202a79f36fdf5360 (diff) | |
download | yosys-c38283dbd033ba95554600bbaa850de707ab2a78.tar.gz yosys-c38283dbd033ba95554600bbaa850de707ab2a78.tar.bz2 yosys-c38283dbd033ba95554600bbaa850de707ab2a78.zip |
Small bug fixes in $not, $neg, and $shiftx models
Diffstat (limited to 'kernel/calc.cc')
-rw-r--r-- | kernel/calc.cc | 5 |
1 files changed, 2 insertions, 3 deletions
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 |