aboutsummaryrefslogtreecommitdiffstats
path: root/passes
Commit message (Collapse)AuthorAgeFilesLines
* assertpmux: Fix crash on unused $pmux output.Marcelina Kościelnicka2021-02-221-1/+1
| | | | Fixes #2595.
* Fixes command line for abc pass in -fast -sop modeRobert Baruch2021-02-161-1/+1
|
* Merge pull request #2529 from zachjs/unnamed-genblkwhitequark2021-02-041-23/+22
|\ | | | | verilog: significant block scoping improvements
| * verilog: significant block scoping improvementsZachary Snow2021-01-311-23/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change set contains a number of bug fixes and improvements related to scoping and resolution in generate and procedural blocks. While many of the frontend changes are interdependent, it may be possible bring the techmap changes in under a separate PR. Declarations within unnamed generate blocks previously encountered issues because the data declarations were left un-prefixed, breaking proper scoping. The LRM outlines behavior for generating names for unnamed generate blocks. The original goal was to add this implicit labelling, but doing so exposed a number of issues downstream. Additional testing highlighted other closely related scope resolution issues, which have been fixed. This change also adds support for block item declarations within unnamed blocks in SystemVerilog mode. 1. Unlabled generate blocks are now implicitly named according to the LRM in `label_genblks`, which is invoked at the beginning of module elaboration 2. The Verilog parser no longer wraps explicitly named generate blocks in a synthetic unnamed generate block to avoid creating extra hierarchy levels where they should not exist 3. The techmap phase now allows special control identifiers to be used outside of the topmost scope, which is necessary because such wires and cells often appear in unlabeled generate blocks, which now prefix the declarations within 4. Some techlibs required modifications because they relied on the previous invalid scope resolution behavior 5. `expand_genblock` has been simplified, now only expanding the outermost scope, completely deferring the inspection and elaboration of nested scopes; names are now resolved by looking in the innermost scope and stepping outward 6. Loop variables now always become localparams during unrolling, allowing them to be resolved and shadowed like any other identifier 7. Identifiers in synthetic function call scopes are now prefixed and resolved in largely the same manner as other blocks before: `$func$\func_01$tests/simple/scopes.blk.v:60$5$\blk\x` after: `\func_01$func$tests/simple/scopes.v:60$5.blk.x` 8. Support identifiers referencing a local generate scope nested more than 1 level deep, i.e. `B.C.x` while within generate scope `A`, or using a prefix of a current or parent scope, i.e. `B.C.D.x` while in `A.B`, `A.B.C`, or `A.B.C.D` 9. Variables can now be declared within unnamed blocks in SystemVerilog mode Addresses the following issues: 656, 2423, 2493
* | Merge pull request #2564 from whitequark/flatten-improve-errorwhitequark2021-01-291-1/+1
|\ \ | | | | | | flatten: clarify confusing error message
| * | flatten: clarify confusing error message.whitequark2021-01-261-1/+1
| |/
* | Merge pull request #2535 from Ravenslofty/scc-specifyClaire Xen2021-01-282-18/+61
|\ \ | |/ |/| scc: Add -specify option to find loops in boxes
| * scc: Add -specify option to find loops in boxesDan Ravensloft2021-01-262-18/+61
| |
* | Merge pull request #2549 from pgadfort/support-multiple-libswhitequark2021-01-251-15/+21
|\ \ | | | | | | adding support for passing multiple liberty files to abc
| * | adding support for passing multiple liberty files to abcPeter Gadfort2021-01-181-15/+21
| | |
* | | Merge pull request #2536 from TobiasFaller/masterMiodrag Milanović2021-01-201-0/+1
|\ \ \ | |/ / |/| | Fixed missing goto statement in passes/techmap/abc.cc
| * | Fixed missing goto statement in passes/techmap/abc.ccTobias Faller2021-01-121-0/+1
| |/
* / opt_share: Fix X and CO signal width for shifted $alu in opt_share.Marcelina Kościelnicka2021-01-141-2/+2
|/ | | | | | These need to be the same length as actual Y, not visible part of Y. Fixes #2538.
* plugin: enhance no-plugin errorumarcor2020-12-291-1/+5
|
* passes/pmgen/pmgen.py: trivial change to remove C++ compiler warningsLarry Doolittle2020-12-231-2/+2
| | | | Verified that the result still builds and passes self-tests
* Fix use-after-free in LUT opt passStefanBruens2020-12-221-2/+4
| | | | | RTLIL::Module::remove(Cell* cell) calls `delete cell`. Any subsequent accesses of `cell` then causes undefined behavior.
* Sign extend port connections where necessaryZachary Snow2020-12-182-3/+10
| | | | | | | | | | | - Signed cell outputs are sign extended when bound to larger wires - Signed connections are sign extended when bound to larger cell inputs - Sign extension is performed in hierarchy and flatten phases - genrtlil indirects signed constants through signed wires - Other phases producing RTLIL may need to be updated to preserve signedness information - Resolves #1418 - Resolves #2265
* Return nice error in pmgen generated code, fixes #2482Miodrag Milanovic2020-12-091-2/+6
|
* bugpoint: add -wires option.whitequark2020-12-071-3/+38
|
* bugpoint: try to remove whole processes first.whitequark2020-12-071-4/+40
|
* bugpoint: accept quoted strings in -grep.whitequark2020-12-071-1/+4
|
* bugpoint: add -command option.whitequark2020-12-071-13/+21
|
* Add #include needed to build with gcc-11Gabriel Somlo2020-11-261-0/+1
| | | | Suggested by Jeff Law <law@redhat.com>
* Merge pull request #2450 from nitz/sim-vcd-filenamewhitequark2020-11-251-1/+3
|\ | | | | Add rewrite_filename for sim -vcd argument.
| * Add rewrite_filename for sim -vcd argument.Chris Dailey2020-11-241-1/+3
| |
* | Merge pull request #2428 from whitequark/check-processeswhitequark2020-11-241-22/+55
|\ \ | |/ |/| check: add support for processes
| * check: add support for processes.whitequark2020-11-031-3/+38
| |
| * check: reformat log/help text to match most other passeswhitequark2020-11-031-19/+17
| |
* | Expose abc and data paths as globalsMiodrag Milanovic2020-11-062-29/+2
|/
* This patch adds support for defining the ABC location at runtime instead of ↵Ethan Mahintorabi2020-10-281-1/+6
| | | | | | at compile time. This is helpful in build systems like bazel which do not have stable locations for binaries or directories during the compilation phase. This change should be backwards compatible with the existing behavior.
* Merge pull request #2403 from nakengelhardt/sim_timescaleN. Engelhardt2020-10-221-0/+21
|\ | | | | sim -vcd: add date, version, and option for timescale
| * use strftime instead of put_time for gcc 4.8 compatibilityN. Engelhardt2020-10-211-4/+5
| |
| * wild guessing at the problem because it builds fine on my machinesN. Engelhardt2020-10-161-0/+3
| |
| * sim -vcd: add date, version, and option for timescaleN. Engelhardt2020-10-161-0/+17
| |
* | memory_dff: Fix needlessly duplicating enable bits.Marcelina Kościelnicka2020-10-221-0/+8
| | | | | | | | | | | | | | | | | | When the register being merged into the EN signal happens to be a $sdff, the current code creates a new $mux for every bit, even if they happen to be identical (as is usually the case), preventing proper grouping further down the flow. Fix this by adding a simple cache. Fixes #2409.
* | sim: Use Mem helper.Marcelina Kościelnicka2020-10-211-103/+90
| |
* | clk2fflogic: Use Mem helper.Marcelina Kościelnicka2020-10-211-68/+45
| |
* | opt_mem: Use Mem helpers.Marcelina Kościelnicka2020-10-211-81/+6
| |
* | memory_bram: Use Mem helpers.Marcelina Kościelnicka2020-10-211-121/+90
| |
* | memory_map: Use Mem helpers.Marcelina Kościelnicka2020-10-211-138/+81
| |
* | memory_unpack: Use Mem helpers.Marcelina Kościelnicka2020-10-211-106/+10
| |
* | memory_collect: Use Mem helpers.Marcelina Kościelnicka2020-10-211-223/+9
| |
* | memory_nordff: Use Mem helpers.Marcelina Kościelnicka2020-10-211-63/+9
|/
* opt_clean: Better memory handling.Marcelina Kościelnicka2020-10-081-8/+45
| | | | | | | | Previously, `$memwr` and `$meminit` cells were always preserved (along with the memory itself). With this change, they are instead part of the main cell mark-and-sweep pass: a memory (and its `$meminit` and `$memwr` cells) is only preserved iff any associated `$memrd` cell needs to be preserved.
* Validate parameters only when they are usedMiodrag Milanovic2020-09-251-5/+7
|
* use the new isPublic() in a few placesN. Engelhardt2020-09-149-17/+17
|
* Merge pull request #2356 from whitequark/flatten-techmap-no-tpl_driven-sigmapwhitequark2020-08-272-9/+6
|\ | | | | flatten, techmap: don't canonicalize tpl driven bits via sigmap
| * flatten, techmap: don't canonicalize tpl driven bits via sigmap.whitequark2020-08-262-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For connection `assign a = b;`, `sigmap(a)` returns `b`. This is exactly the opposite of the desired canonicalization for driven bits. Consider the following code: module foo(inout a, b); assign a = b; endmodule module bar(output c); foo f(c, 1'b0); endmodule Before this commit, the inout ports would be swapped after flattening (and cause a crash while attempting to drive a constant value). This issue was introduced in 9f772eb9. Fixes #2183.
* | Merge pull request #2358 from whitequark/rename-ilang-to-rtlilwhitequark2020-08-277-24/+24
|\ \ | | | | | | Replace "ILANG" with "RTLIL" everywhere
| * | Replace "ILANG" with "RTLIL" everywhere.whitequark2020-08-267-24/+24
| |/ | | | | | | | | | | | | | | | | | | The only difference between "RTLIL" and "ILANG" is that the latter is the text representation of the former, as opposed to the in-memory graph representation. This distinction serves no purpose but confuses people: it is not obvious that the ILANG backend writes RTLIL graphs. Passes `write_ilang` and `read_ilang` are provided as aliases to `write_rtlil` and `read_rtlil` for compatibility.