yosys/frontends
whitequark c34d7b13f4 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`.
2020-02-07 00:41:54 +00:00
..
aiger Add and use SigSpec::reverse() 2020-01-28 10:37:16 -08:00
ast ast: avoid intermediate wires/assigns when lowering to AST_MEMINIT. 2020-02-07 00:41:54 +00:00
blif Fix parsing of .cname BLIF statements 2019-10-16 09:06:57 +02:00
ilang read_ilang: do bounds checking on bit indices 2019-11-27 22:24:39 +01:00
json Update JSON front-end to process new attr/param encoding 2019-08-01 12:48:22 +02:00
liberty stoi -> atoi 2019-08-07 11:09:17 -07:00
rpc Fixes for MSVC build 2019-10-04 16:29:46 +02:00
verific Merge pull request #1667 from YosysHQ/clifford/verificnand 2020-01-30 19:55:53 +01:00
verilog sv: Improve handling of wildcard port connections 2020-02-02 16:12:33 +00:00