aboutsummaryrefslogtreecommitdiffstats
path: root/passes/opt/opt_expr.cc
Commit message (Collapse)AuthorAgeFilesLines
* opt_expr: Remove -clkinv option, make it the default.Marcelina Kościelnicka2020-07-311-9/+9
| | | | | Adds -noclkinv option just in case the old behavior was actually useful to someone.
* opt_expr: Fix handling of $_XNOR_ cells with A = B.Marcelina Kościelnicka2020-07-291-1/+1
| | | | Fixes #2311.
* opt_expr: Fix crash on $mul optimization with more zeros removed than Y has.Marcelina Kościelnicka2020-07-051-0/+8
| | | | Fixes #2221.
* Merge pull request #2168 from whitequark/assert-unused-exprsclairexen2020-06-251-1/+1
|\ | | | | Use (and ignore) the expression provided to log_assert in NDEBUG builds
| * Remove YS_ATTRIBUTE(unused) where present just for log_assert()/log_debug().whitequark2020-06-191-1/+1
| |
* | Add support for new FF types in some opt passes.Marcelina Kościelnicka2020-06-231-3/+32
|/
* Use C++11 final/override keywords.whitequark2020-06-181-2/+2
|
* Add flooring division operatorXiretza2020-05-281-6/+25
| | | | | | | | | | The $div and $mod cells use truncating division semantics (rounding towards 0), as defined by e.g. Verilog. Another rounding mode, flooring (rounding towards negative infinity), can be used in e.g. VHDL. The new $divfloor cell provides this flooring division. This commit also fixes the handling of $div in opt_expr, which was previously optimized as if it was $divfloor.
* Add flooring modulo operatorXiretza2020-05-281-5/+28
| | | | | | | | | | | The $div and $mod cells use truncating division semantics (rounding towards 0), as defined by e.g. Verilog. Another rounding mode, flooring (rounding towards negative infinity), can be used in e.g. VHDL. The new $modfloor cell provides this flooring modulo (also known as "remainder" in several languages, but this name is ambiguous). This commit also fixes the handling of $mod in opt_expr, which was previously optimized as if it was $modfloor.
* opt_expr: Sx to Sz; spotted by @XiretzaEddie Hung2020-05-141-1/+1
|
* Merge pull request #1994 from YosysHQ/eddie/fix_bug1758Eddie Hung2020-05-141-25/+111
|\ | | | | opt_expr: improve single-bit $and/$or/$xor/$xnor cells; gate cells too
| * Fix whitespaceEddie Hung2020-05-141-1/+1
| |
| * opt_expr: consume_x to require/imply !keepdcEddie Hung2020-05-081-5/+6
| |
| * opt_expr: restore consume_x; use for coarse grained tooEddie Hung2020-05-081-6/+6
| |
| * opt_expr: const_xnor replacement to pad Y with 1'b1Eddie Hung2020-04-241-1/+2
| |
| * opt_expr: more fixes for $xor/$xnorEddie Hung2020-04-241-23/+47
| |
| * opt_expr: do not group by X, more fixesEddie Hung2020-04-231-18/+59
| |
| * opt_expr: improve single-bit $and/$or/$xor/$xnor cells; gate cells tooEddie Hung2020-04-231-10/+29
| |
* | Fix the other "opt_expr -fine" bug introduced in 213a89558Claire Wolf2020-05-021-7/+19
| | | | | | | | Signed-off-by: Claire Wolf <claire@symbioticeda.com>
* | Fix "opt_expr -fine" bug introduced in 213a89558Claire Wolf2020-05-011-7/+19
|/ | | | Signed-off-by: Claire Wolf <claire@symbioticeda.com>
* opt_expr: Fix X and CO outputs for $alu identity-mapping rules.Marcelina Kościelnicka2020-04-161-2/+17
|
* opt_expr: Add more $alu optimizations.Marcelina Kościelnicka2020-04-141-19/+110
| | | | | | | | | | | Detect the places in the $alu where the carry bit is constant (due to const A[i] == B[i] ^ BI) and split it into smaller $alu at these points. Also, make the existing const-carry detection for low bits more generic (now handles cases where both BI and CI are constant, but not equal to one another). Fixes #1912.
* opt_expr: Optimize multiplications with low 0 bits in operands.Marcelina Kościelnicka2020-04-131-0/+33
| | | | Fixes #1500.
* kernel: big fat patch to use more ID::*, otherwise ID(*)Eddie Hung2020-04-021-147/+147
|
* Merge pull request #1845 from YosysHQ/eddie/kernel_speedupEddie Hung2020-04-021-4/+4
|\ | | | | kernel: speedup by using more pass-by-const-ref
| * kernel: SigSpec use more const& + overloads to prevent implicit SigSpecEddie Hung2020-03-131-4/+4
| |
* | Merge pull request #1828 from YosysHQ/eddie/celltypes_speedupEddie Hung2020-04-011-3/+3
|\ \ | | | | | | kernel: share a single CellTypes within a pass
| * | Code review fixesEddie Hung2020-03-301-1/+1
| | |
| * | kernel: share a single CellTypes within a passEddie Hung2020-03-181-3/+3
| |/
* | Merge pull request #1790 from YosysHQ/eddie/opt_expr_xorEddie Hung2020-04-011-3/+37
|\ \ | | | | | | opt_expr: optimise $xor/$xnor/$_XOR_/$_XNOR_ -s with constant inputs
| * | opt_expr: fix failing $xnor testEddie Hung2020-03-201-2/+17
| | |
| * | opt_expr: fix missing braceEddie Hung2020-03-201-2/+4
| | |
| * | opt_expr: extend to $xnor and $_XNOR_Eddie Hung2020-03-191-8/+12
| | |
| * | opt_expr: optimise 1-bit $xor or $_XOR_ with constant inputEddie Hung2020-03-191-1/+14
| |/
* | opt_expr: remove redundantEddie Hung2020-03-191-3/+0
| |
* | opt_expr: optimise $sub when both A[i] and B[i] == 1'b1Eddie Hung2020-03-191-9/+20
| |
* | opt_expr: optimise for identity $alu-s just like $add/$subEddie Hung2020-03-191-7/+31
|/
* Fix opt_expr.eqneq.cmpzero debug printAlyssa Milburn2019-12-151-1/+1
|
* Fix handling of z_digit "?" and fix optimization of cmp with "z"Clifford Wolf2019-09-131-0/+4
| | | | Signed-off-by: Clifford Wolf <clifford@clifford.at>
* Copy-paste typoEddie Hung2019-08-221-1/+1
|
* Respect opt_expr -keepdc as per @cliffordwolfEddie Hung2019-08-221-1/+1
|
* Handle $shift and Y_WIDTH > 1 as per @cliffordwolfEddie Hung2019-08-221-4/+8
|
* Add cover()Eddie Hung2019-08-221-0/+1
|
* Canonical formEddie Hung2019-08-221-5/+5
|
* opt_expr to trim A port of $shiftx if Y_WIDTH == 1Eddie Hung2019-08-211-0/+17
|
* Merge pull request #1283 from YosysHQ/clifford/fix1255Clifford Wolf2019-08-171-1/+2
|\ | | | | Fix various NDEBUG compiler warnings
| * Merge branch 'master' into clifford/fix1255Clifford Wolf2019-08-151-356/+404
| |\
| * | Fix various NDEBUG compiler warnings, closes #1255Clifford Wolf2019-08-131-1/+2
| | | | | | | | | | | | Signed-off-by: Clifford Wolf <clifford@clifford.at>
* | | Use ID::keep more liberally tooEddie Hung2019-08-151-1/+1
| | |
* | | Use more ID::{A,B,Y,blackbox,whitebox}Eddie Hung2019-08-151-159/+159
| | |