whitequark [Wed, 1 Jan 2020 20:18:28 +0000 (20:18 +0000)]
ast: avoid intermediate wires/assigns when lowering to AST_MEMINIT.
Before this commit, every initial assignment to a memory generated
two wires and four assigns in a process. For unknown reasons (I did
not investigate), large amounts of assigns cause quadratic slowdown
later in the AST frontend, in processAst/removeSignalFromCaseTree.
As a consequence, common and reasonable Verilog code, such as:
reg [`WIDTH:0] mem [0:`DEPTH];
integer i; initial for (i = 0; i <= `DEPTH; i++) mem[i] = 0;
took extremely long time to be processed; around 80 s for a 8-wide,
8192-deep memory.
After this commit, initial assignments where address and/or data are
constant (after `generate`) do not incur the cost of intermediate
wires; expressions like `mem[i+1]=i^(i<<1)` are considered constant.
This results in speedups of orders of magnitude for common memory
sizes; it now takes merely 0.4 s to process a 8-wide, 8192-deep
memory, and only 5.8 s to process a 8-wide, 131072-deep one.
As a bonus, this change also results in nontrivial speedups later
in the synthesis pipeline, since pass sequencing issues meant that
all of these intermediate wires were subject to transformations such
as width reduction, even though they existed solely to be constant
folded away in `memory_collect`.
Eddie Hung [Thu, 6 Feb 2020 04:21:40 +0000 (20:21 -0800)]
Merge pull request #1682 from YosysHQ/eddie/opt_after_techmap
synth_*: call 'opt -fast' after 'techmap'
Eddie Hung [Thu, 6 Feb 2020 02:39:01 +0000 (18:39 -0800)]
synth_*: call 'opt -fast' after 'techmap'
Eddie Hung [Thu, 6 Feb 2020 00:41:09 +0000 (16:41 -0800)]
shiftx2mux: fix select out of bounds
Eddie Hung [Wed, 5 Feb 2020 22:56:26 +0000 (14:56 -0800)]
Merge pull request #1576 from YosysHQ/eddie/opt_merge_init
opt_merge: discard \init of '$' cells with 'Q' port when merging
Eddie Hung [Wed, 5 Feb 2020 22:55:57 +0000 (14:55 -0800)]
Merge pull request #1650 from YosysHQ/eddie/shiftx2mux
techmap LSB-first for compatible $shift/$shiftx cells
Eddie Hung [Wed, 5 Feb 2020 22:46:48 +0000 (14:46 -0800)]
abc9_ops: -reintegrate to use derived_type for box_ports
Eddie Hung [Wed, 5 Feb 2020 18:47:31 +0000 (10:47 -0800)]
Merge remote-tracking branch 'origin/master' into eddie/shiftx2mux
Eddie Hung [Wed, 5 Feb 2020 18:31:18 +0000 (19:31 +0100)]
Merge pull request #1638 from YosysHQ/eddie/fix1631
clk2fflogic: work for bit-level $_DFF_* and $_DFFSR_*
Eddie Hung [Wed, 5 Feb 2020 17:59:40 +0000 (18:59 +0100)]
Merge pull request #1661 from YosysHQ/eddie/abc9_required
abc9: add support for required times
Marcelina Kościelnicka [Mon, 3 Feb 2020 13:57:17 +0000 (14:57 +0100)]
Add opt_lut_ins pass. (#1673)
David Shah [Sun, 2 Feb 2020 18:12:28 +0000 (18:12 +0000)]
Merge pull request #1516 from YosysHQ/dave/dotstar
sv: Add support for wildcard port connections (.*)
David Shah [Fri, 22 Nov 2019 15:32:46 +0000 (15:32 +0000)]
Update CHANGELOG and README
Signed-off-by: David Shah <dave@ds0.me>
David Shah [Fri, 22 Nov 2019 15:07:55 +0000 (15:07 +0000)]
sv: Improve handling of wildcard port connections
Signed-off-by: David Shah <dave@ds0.me>
David Shah [Fri, 22 Nov 2019 12:57:51 +0000 (12:57 +0000)]
sv: More tests for wildcard port connections
Signed-off-by: David Shah <dave@ds0.me>
David Shah [Fri, 22 Nov 2019 09:21:35 +0000 (09:21 +0000)]
hierarchy: Correct handling of wildcard port connections with default values
Signed-off-by: David Shah <dave@ds0.me>
David Shah [Fri, 22 Nov 2019 09:16:37 +0000 (09:16 +0000)]
sv: Add tests for wildcard port connections
Signed-off-by: David Shah <dave@ds0.me>
David Shah [Fri, 22 Nov 2019 09:04:54 +0000 (09:04 +0000)]
hierarchy: Resolve SV wildcard port connections
Signed-off-by: David Shah <dave@ds0.me>
David Shah [Fri, 22 Nov 2019 08:24:01 +0000 (08:24 +0000)]
sv: Add lexing and parsing of .* (wildcard port conns)
Signed-off-by: David Shah <dave@ds0.me>
David Shah [Sun, 2 Feb 2020 14:53:46 +0000 (14:53 +0000)]
Merge pull request #1647 from YosysHQ/dave/sprintf
ast: Add support for $sformatf system function
David Shah [Sun, 2 Feb 2020 14:53:32 +0000 (14:53 +0000)]
Merge pull request #1657 from YosysHQ/dave/xilinx-dsp-multonly
synth_xilinx: add -dsp-multonly
Marcin Kościelnicki [Sun, 2 Feb 2020 10:26:00 +0000 (11:26 +0100)]
xilinx: use RAM32M/RAM64M for memories with two read ports
This fixes inefficient LUT RAM usage for memories with one write
and two read ports (commonly used as register files).
David Shah [Mon, 27 Jan 2020 11:19:27 +0000 (11:19 +0000)]
xilinx_dsp: Add multonly scratchpad var to bypass
Signed-off-by: David Shah <dave@ds0.me>
Marcin Kościelnicki [Sat, 1 Feb 2020 09:21:19 +0000 (10:21 +0100)]
json: remove the 32-bit parameter special case
Before, the rules for encoding parameters in JSON were as follows:
- if the parameter is not a string:
- if it is exactly 32 bits long and there are no z or x bits, emit it
as an int
- otherwise, emit it as a string made of 0/1/x/z characters
- if the parameter is a string:
- if it contains only 0/1/x/z characters, append a space at the end
to distinguish it from a non-string
- otherwise, emit it directly
However, this caused a problem in the json11 parser used in nextpnr:
yosys emits unsigned ints, and nextpnr parses them as signed, using
the value of INT_MIN for values that overflow the signed int range.
This caused destruction of LUT5 initialization values. Since both
nextpnr and yosys parser can also accept 32-bit parameters in the
same encoding as other widths, let's just remove that special case.
The old behavior is still left behind a `-compat-int` flag, in case
someone relies on it.
Eddie Hung [Fri, 31 Jan 2020 09:34:13 +0000 (09:34 +0000)]
Merge pull request #1668 from gsomlo/gls-abc9-external
abc9: Fix regression breaking support for use of ABCEXTERNAL
Gabriel Somlo [Thu, 30 Jan 2020 20:12:43 +0000 (15:12 -0500)]
abc9: restore ability to use ABCEXTERNAL
Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
Claire Wolf [Thu, 30 Jan 2020 18:55:53 +0000 (19:55 +0100)]
Merge pull request #1667 from YosysHQ/clifford/verificnand
Add Verific support for OPER_REDUCE_NAND
Claire Wolf [Thu, 30 Jan 2020 17:05:16 +0000 (18:05 +0100)]
Merge pull request #1503 from YosysHQ/eddie/verific_help
`verific` pass to print help message when command syntax error
Claire Wolf [Thu, 30 Jan 2020 17:03:35 +0000 (18:03 +0100)]
Merge pull request #1654 from YosysHQ/eddie/sby_fix69
verific: unflatten struct ports
Claire Wolf [Thu, 30 Jan 2020 17:01:13 +0000 (18:01 +0100)]
Add Verific support for OPER_REDUCE_NAND
Signed-off-by: Claire Wolf <clifford@clifford.at>
Claire Wolf [Wed, 29 Jan 2020 16:01:24 +0000 (17:01 +0100)]
Merge branch 'vector_fix' of https://github.com/Kmanfi/yosys
Also some minor fixes to the original PR.
Claire Wolf [Wed, 29 Jan 2020 14:27:11 +0000 (15:27 +0100)]
Merge pull request #1662 from YosysHQ/dave/opt-reduce-move-check
opt_reduce: Call check() per run rather than per optimised cell
Claire Wolf [Wed, 29 Jan 2020 14:25:56 +0000 (15:25 +0100)]
Merge pull request #1665 from YosysHQ/clifford/edifkeep
Preserve wires with keep attribute in EDIF back-end
Claire Wolf [Wed, 29 Jan 2020 14:25:03 +0000 (15:25 +0100)]
Merge pull request #1659 from YosysHQ/clifford/experimental
Add log_experimental() and experimental() API and "yosys -x"
N. Engelhardt [Wed, 29 Jan 2020 14:21:28 +0000 (15:21 +0100)]
Merge pull request #1510 from pumbor/master
handle anonymous unions to fix #1080
Claire Wolf [Wed, 29 Jan 2020 13:07:11 +0000 (14:07 +0100)]
Preserve wires with keep attribute in EDIF back-end
Signed-off-by: Claire Wolf <clifford@clifford.at>
Miodrag Milanović [Wed, 29 Jan 2020 10:18:06 +0000 (11:18 +0100)]
Merge pull request #1559 from YosysHQ/efinix_test_fix
Fix for non-deterministic test
Eddie Hung [Wed, 29 Jan 2020 02:11:34 +0000 (18:11 -0800)]
Add "help -all" and "help -celltypes" sanity test
Eddie Hung [Wed, 29 Jan 2020 01:48:43 +0000 (17:48 -0800)]
synth_xilinx: cleanup help
Eddie Hung [Wed, 29 Jan 2020 01:41:57 +0000 (17:41 -0800)]
synth_xilinx: fix help when no active_design; fixes #1664
Marcin Kościelnicki [Thu, 21 Nov 2019 12:05:30 +0000 (13:05 +0100)]
xilinx: Add simulation model for DSP48 (Virtex 4).
Eddie Hung [Tue, 28 Jan 2020 20:46:18 +0000 (12:46 -0800)]
Merge remote-tracking branch 'origin/master' into eddie/opt_merge_init
Eddie Hung [Tue, 28 Jan 2020 19:55:51 +0000 (11:55 -0800)]
Merge pull request #1660 from YosysHQ/eddie/abc9_unpermute_luts
Unpermute LUT ordering for ice40/ecp5/xilinx
Eddie Hung [Tue, 28 Jan 2020 18:37:16 +0000 (10:37 -0800)]
Add and use SigSpec::reverse()
Eddie Hung [Tue, 28 Jan 2020 18:17:47 +0000 (10:17 -0800)]
Fix unresolved conflict from #1573
Miodrag Milanovic [Tue, 28 Jan 2020 17:26:10 +0000 (18:26 +0100)]
Updated test to use assert-max
Claire Wolf [Tue, 28 Jan 2020 16:51:50 +0000 (17:51 +0100)]
Improve logging use of experimental features
Signed-off-by: Claire Wolf <clifford@clifford.at>
Claire Wolf [Tue, 28 Jan 2020 16:40:28 +0000 (17:40 +0100)]
Merge pull request #1567 from YosysHQ/eddie/sat_init_warning
sat: suppress 'Warning: ignoring initial value on non-register: ...' when init[i] = 1'bx
N. Engelhardt [Tue, 28 Jan 2020 16:24:54 +0000 (17:24 +0100)]
Merge pull request #1573 from YosysHQ/eddie/xilinx_tristate
synth_xilinx: error out if tristate without '-iopad'
David Shah [Tue, 28 Jan 2020 09:42:01 +0000 (09:42 +0000)]
opt_reduce: Call check() per run rather than per optimised cell
Signed-off-by: David Shah <dave@ds0.me>
Pepijn de Vos [Tue, 26 Nov 2019 11:56:06 +0000 (12:56 +0100)]
redirect fuser stderr to /dev/null
Claire Wolf [Tue, 28 Jan 2020 08:41:08 +0000 (09:41 +0100)]
Merge pull request #1553 from whitequark/manual-dffx
Document $dffe, $dffsr, $_DFFE_*, $_DFFSR_* cells
Eddie Hung [Mon, 27 Jan 2020 22:22:46 +0000 (14:22 -0800)]
abc9_ops: -check for negative arrival/required times
Eddie Hung [Mon, 27 Jan 2020 22:02:13 +0000 (14:02 -0800)]
Fix $lut input ordering -- SigSpec(std::initializer_list<>) is backwards
Just like Verilog...
Eddie Hung [Mon, 27 Jan 2020 21:56:16 +0000 (13:56 -0800)]
Import tests from #1628
Eddie Hung [Tue, 21 Jan 2020 20:29:07 +0000 (12:29 -0800)]
xilinx/ice40/ecp5: undo permuting LUT masks in lut_map
Now done in read_aiger
Eddie Hung [Mon, 27 Jan 2020 21:29:15 +0000 (13:29 -0800)]
Merge pull request #1619 from YosysHQ/eddie/abc9_refactor
Refactor `abc9` pass
Eddie Hung [Mon, 27 Jan 2020 20:30:39 +0000 (12:30 -0800)]
Fix typo
Eddie Hung [Mon, 27 Jan 2020 20:29:28 +0000 (12:29 -0800)]
Merge branch 'eddie/abc9_refactor' into eddie/abc9_required
Eddie Hung [Mon, 27 Jan 2020 19:18:21 +0000 (11:18 -0800)]
abc9_ops: add comments
Eddie Hung [Mon, 27 Jan 2020 18:34:10 +0000 (10:34 -0800)]
Merge remote-tracking branch 'origin/master' into eddie/verific_help
Eddie Hung [Mon, 27 Jan 2020 18:32:18 +0000 (10:32 -0800)]
verific: no help() when no YOSYS_ENABLE_VERIFIC
Eddie Hung [Mon, 27 Jan 2020 18:15:22 +0000 (10:15 -0800)]
verific: also unflatten for 'hierarchy' flow as per @cliffordwolf
Eddie Hung [Mon, 27 Jan 2020 17:54:04 +0000 (09:54 -0800)]
Merge pull request #1656 from YosysHQ/eddie/ice40_abc9_warnings
ice40: reduce ABC9 internal fanout warnings with a param for CI->I3
Claire Wolf [Mon, 27 Jan 2020 17:27:47 +0000 (18:27 +0100)]
Add log_experimental() and experimental() API and "yosys -x"
Signed-off-by: Claire Wolf <clifford@clifford.at>
Claire Wolf [Mon, 27 Jan 2020 16:59:58 +0000 (17:59 +0100)]
Merge pull request #1658 from YosysHQ/clifford/smtbmcsolvernotfound
Improve yosys-smtbmc "solver not found" handling
Claire Wolf [Mon, 27 Jan 2020 16:48:56 +0000 (17:48 +0100)]
Improve yosys-smtbmc "solver not found" handling
Signed-off-by: Claire Wolf <clifford@clifford.at>
Claire Wolf [Mon, 27 Jan 2020 11:59:27 +0000 (12:59 +0100)]
Merge pull request #1613 from porglezomp-misc/version-flag-alias
Add --version and -version as aliases for -V
Eddie Hung [Fri, 24 Jan 2020 21:11:43 +0000 (13:11 -0800)]
read_aiger: set abc9_box_seq attr
Eddie Hung [Fri, 24 Jan 2020 20:16:05 +0000 (12:16 -0800)]
ice40: add SB_SPRAM256KA arrival time
Eddie Hung [Fri, 24 Jan 2020 19:59:48 +0000 (11:59 -0800)]
ice40: reduce ABC9 internal fanout warnings with a param for CI->I3
Eddie Hung [Fri, 24 Jan 2020 18:12:52 +0000 (10:12 -0800)]
verific: unflatten struct ports
Eddie Hung [Fri, 24 Jan 2020 06:45:34 +0000 (22:45 -0800)]
abc9: -reintegrate recover type from existing cell, check against boxid
Eddie Hung [Fri, 24 Jan 2020 03:55:11 +0000 (19:55 -0800)]
simple_abc9 tests to discard whitebox before write for sim
Eddie Hung [Fri, 24 Jan 2020 03:55:11 +0000 (19:55 -0800)]
simple_abc9 tests to discard whitebox before write for sim
Eddie Hung [Fri, 24 Jan 2020 02:53:14 +0000 (18:53 -0800)]
abc_box_id -> abc9_box_id in test
Eddie Hung [Fri, 24 Jan 2020 03:08:51 +0000 (19:08 -0800)]
abc9: warning message if no modules selected
Eddie Hung [Wed, 22 Jan 2020 22:22:03 +0000 (14:22 -0800)]
Fix $__ABC9_ASYNC1 to output 1'b1 not 1'b0
Eddie Hung [Fri, 24 Jan 2020 02:56:25 +0000 (18:56 -0800)]
Test for (* keep *)-ed abc9_box_id
Eddie Hung [Fri, 24 Jan 2020 02:56:06 +0000 (18:56 -0800)]
abc9_ops: -prep_xaiger to skip (* keep *) cells
Eddie Hung [Fri, 24 Jan 2020 02:53:14 +0000 (18:53 -0800)]
abc_box_id -> abc9_box_id in test
Eddie Hung [Thu, 23 Jan 2020 22:58:56 +0000 (14:58 -0800)]
abc9_ops -prep_dff: insert async s/r mux in holes when replacing $_DFF_*
Eddie Hung [Thu, 23 Jan 2020 04:54:03 +0000 (20:54 -0800)]
alumacc: undo accidental commit
Eddie Hung [Wed, 22 Jan 2020 22:22:03 +0000 (14:22 -0800)]
Fix $__ABC9_ASYNC1 to output 1'b1 not 1'b0
Eddie Hung [Wed, 22 Jan 2020 22:21:25 +0000 (14:21 -0800)]
read_aiger: also parse abc9_mergeability
Eddie Hung [Wed, 22 Jan 2020 20:30:14 +0000 (12:30 -0800)]
Merge remote-tracking branch 'origin/eddie/abc9_fixes' into eddie/abc9_refactor
Eddie Hung [Wed, 22 Jan 2020 20:27:41 +0000 (12:27 -0800)]
Merge pull request #1652 from YosysHQ/eddie/abc9_fixes
Eddie/abc9 fixes
Eddie Hung [Wed, 22 Jan 2020 18:08:48 +0000 (10:08 -0800)]
abc9: error out if flip-flop init is 1'b1 for '-dff'
Due to ABC sequential synthesis restriction
Eddie Hung [Wed, 22 Jan 2020 17:36:54 +0000 (09:36 -0800)]
abc9: fix scratchpad entry abc9.verify
Eddie Hung [Wed, 22 Jan 2020 00:50:04 +0000 (16:50 -0800)]
Update tests with reduced area
Eddie Hung [Wed, 22 Jan 2020 00:49:34 +0000 (16:49 -0800)]
Explicitly create separate $mux cells
Eddie Hung [Wed, 22 Jan 2020 00:27:40 +0000 (16:27 -0800)]
Merge remote-tracking branch 'origin/master' into eddie/abc9_refactor
Eddie Hung [Tue, 21 Jan 2020 23:02:37 +0000 (15:02 -0800)]
Fix tests -- when Y_WIDTH is non-pow-2
Eddie Hung [Tue, 21 Jan 2020 22:08:24 +0000 (14:08 -0800)]
Move from +/shiftx2mux.v into +/techmap.v; cleanup
Eddie Hung [Thu, 16 Jan 2020 23:25:49 +0000 (15:25 -0800)]
New techmap +/shiftx2mux.v which decomposes LSB first; better for ABC
Eddie Hung [Tue, 21 Jan 2020 19:56:01 +0000 (11:56 -0800)]
read_aiger: discard LUT inputs with nodeID == 0; not < 2
Eddie Hung [Tue, 21 Jan 2020 19:16:50 +0000 (11:16 -0800)]
read_aiger: ignore constant inputs on LUTs
Eddie Hung [Tue, 21 Jan 2020 17:43:04 +0000 (09:43 -0800)]
write_xaiger: fix for (* keep *) on flop output
Claire Wolf [Tue, 21 Jan 2020 17:37:06 +0000 (18:37 +0100)]
Merge pull request #1637 from YosysHQ/mwk/fix-1634
fsm_detect: Add a cache to avoid excessive CPU usage for big mux networks.
Claire Wolf [Tue, 21 Jan 2020 17:35:15 +0000 (18:35 +0100)]
Merge pull request #1629 from YosysHQ/mwk/edif-z
edif: Just ignore connections to 'z