aboutsummaryrefslogtreecommitdiffstats
path: root/backends
Commit message (Collapse)AuthorAgeFilesLines
...
* | | cxxrtl: improve handling of FFs with async inputs (other than CLK).whitequark2020-09-021-22/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, the meaning of "sync def" included some flip-flop cells but not others. There was no actual reason for this; it was just poorly defined. After this commit, a "sync def" means that a wire holds design state because it is connected directly to a flip-flop output, and may never be unbuffered. This is not affected by presence of async inputs.
* | | cxxrtl: expose port direction in debug information.whitequark2020-09-023-5/+51
| | | | | | | | | | | | | | | | | | This can be useful to distinguish e.g. a combinatorially driven wire with type `CXXRTL_VALUE` from a module input with the same type, as well as general introspection.
* | | cxxrtl: fix typo in comment. NFC.whitequark2020-09-021-1/+1
| | |
* | | cxxrtl: fix inaccuracy in CXXRTL_ALIAS documentation. NFC.whitequark2020-09-021-1/+1
|/ / | | | | | | | | Nodes driven by a constant value have type CXXRTL_VALUE and their `next` pointer set to NULL. (This is already documented.)
* | write_smt2: fix SMT-LIB tutorial URLwhitequark2020-08-291-1/+1
| |
* | Replace "ILANG" with "RTLIL" everywhere.whitequark2020-08-265-34/+49
| | | | | | | | | | | | | | | | | | | | 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.
* | Ensure smt2 comments are associated with accessorsNoah Moroze2020-08-201-9/+20
| |
* | Respect \A_SIGNED for $shiftXiretza2020-08-183-17/+23
| | | | | | | | | | | | This reflects the behaviour of $shr/$shl, which sign-extend their A operands to the size of their output, then do a logical shift (shift in 0-bits).
* | cxxrtl.h: Fix incorrect CarryOut in alu()Andy Knowles2020-08-121-8/+3
| |
* | cxxrtl.h: Fix incorrect CarryOut in alu when Bits % 32 != 0 && Invert == FalseAndy Knowles2020-08-121-2/+8
| |
* | verilog_backend: Add handling for all FF types.Marcelina Kościelnicka2020-07-301-252/+134
|/
* smtio: Emit `mode: start` options before `set-logic` command and any other ↵Alberto Gonzalez2020-07-201-1/+8
| | | | | | options after it. Refer to the SMT-LIB specification, section 4.1.7. According to the spec, some options can only be specified in `start` mode. Once the solver sees `set-logic`, it moves to `assert` mode.
* smtio: Add support for parsing `yosys-smt2-solver-option` info statements.Alberto Gonzalez2020-07-201-3/+10
|
* smt2: Add `-solver-option` option.Alberto Gonzalez2020-07-201-0/+13
|
* Only allow "sat" and "unsat" smt solver responses in yosys-smtbmcClaire Wolf2020-07-202-4/+4
| | | | Signed-off-by: Claire Wolf <claire@symbioticeda.com>
* Merge pull request #2273 from whitequark/write-verilog-always-star-initialclairexen2020-07-161-0/+5
|\ | | | | verilog_backend: in non-SV mode, add a trigger for `always @*`
| * verilog_backend: in non-SV mode, add a trigger for `always @*`.whitequark2020-07-161-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit only affects translation of RTLIL processes (for which there is limited support). Due to the event-driven nature of Verilog, processes like reg x; always @* x <= 1; may never execute. This can be fixed in SystemVerilog code by using `always_comb` instead of `always @*`, but in Verilog-2001 the options are limited. This commit implements the following workaround: reg init = 0; reg x; always @* begin if (init) begin end x <= 1; end Fixes #2271.
* | Merge pull request #2272 from whitequark/write-verilog-svclairexen2020-07-161-11/+18
|\| | | | | verilog_backend: add `-sv` option, make `-o <filename>.sv` work
| * verilog_backend: add `-sv` option, make `-o <filename>.sv` work.whitequark2020-07-161-11/+18
| | | | | | | | See #2271.
* | cxxrtl: fix typo. NFC.whitequark2020-07-141-1/+1
|/
* cxxrtl: expose eval() and commit() via the C API.whitequark2020-07-122-0/+20
|
* cxxrtl: add missing extern "C".whitequark2020-07-091-0/+1
| | | | This bug was hidden if a header was generated.
* cxxrtl: update help text.whitequark2020-06-261-2/+2
|
* Merge pull request #2168 from whitequark/assert-unused-exprsclairexen2020-06-251-2/+0
|\ | | | | Use (and ignore) the expression provided to log_assert in NDEBUG builds
| * Use (and ignore) the expression provided to log_assert in NDEBUG builds.whitequark2020-06-191-2/+0
| | | | | | | | | | This avoids warnings in NDEBUG builds emitted when a variable is only used in log_assert, but is always defined.
* | cxxrtl: Add support for the new FF types.Marcelina Kościelnicka2020-06-241-5/+22
|/
* Merge pull request #2173 from whitequark/use-cxx11-final-overridewhitequark2020-06-1917-40/+40
|\ | | | | Use C++11 final/override/[[noreturn]]
| * Use C++11 final/override keywords.whitequark2020-06-1817-40/+40
| |
* | cxxrtl: add .get() and .set() accessors on value<> and wire<>.whitequark2020-06-191-6/+47
|/ | | | | | | | | | | | | For several reasons: * They're more convenient than accessing .data. * They accommodate variably-sized types like size_t transparently. * They statically ensure that no out of range conversions happen. For now these are only provided for unsigned integers, but eventually they should be provided for signed integers too. (Annoyingly this affects conversions to/from `char` at the moment.) Fixes #2127.
* Merge pull request #2167 from whitequark/cxxrtl-fix-ndebugwhitequark2020-06-181-1/+2
|\ | | | | cxxrtl: don't compute vital values in log_assert()
| * cxxrtl: don't compute vital values in log_assert().whitequark2020-06-171-1/+2
| | | | | | | | | | | | This breaks NDEBUG builds. Fixes #2166.
* | Merge pull request #2163 from jfng/cxxrtl-blackbox-debuginfowhitequark2020-06-171-13/+17
|\ \ | | | | | | cxxrtl: restrict the debug info of a blackbox to its ports.
| * | cxxrtl: restrict the debug info of a blackbox to its ports.Jean-François Nguyen2020-06-161-13/+17
| |/
* | Merge pull request #2160 from whitequark/cxxrtl-fix-warningwhitequark2020-06-171-21/+23
|\ \ | |/ |/| cxxrtl: avoid unused variable warning for transparent $memrd ports
| * cxxrtl: avoid unused variable warning for transparent $memrd ports. NFC.whitequark2020-06-151-21/+23
| |
* | Merge pull request #2159 from MerryMage/cxxrtl-mulwhitequark2020-06-151-17/+22
|\ \ | |/ |/| cxxrtl: Implement chunk-wise multiplication
| * cxxrtl: Implement chunk-wise multiplicationMerryMage2020-06-151-17/+22
| |
* | Merge pull request #2158 from miek/sshr-sign-extensionwhitequark2020-06-151-2/+4
|\ \ | |/ |/| cxxrtl: fix sshr sign-extension.
| * cxxrtl: fix sshr sign-extension.Mike Walters2020-06-151-2/+4
| |
* | Merge pull request #2151 from whitequark/cxxrtl-fix-rzextwhitequark2020-06-131-2/+2
|\ \ | |/ |/| cxxrtl: fix rzext()
| * cxxrtl: fix rzext().whitequark2020-06-131-2/+2
| | | | | | | | | | | | | | This was a correctness issue, but one of the consequences is that it resulted in jumps in generated machine code where there should have been none. As a side effect of fixing the bug, Minerva SoC became 10% faster.
* | Merge pull request #2145 from whitequark/cxxrtl-splitnetswhitequark2020-06-135-67/+156
|\ \ | | | | | | cxxrtl: handle multipart signals
| * | cxxrtl: handle multipart signals.whitequark2020-06-115-27/+94
| | | | | | | | | | | | This avoids losing design visibility when using the `splitnets` pass.
| * | cxxrtl: expose RTLIL::{Wire,Memory}->start_offset in debug info.whitequark2020-06-113-40/+62
| | |
* | | cxxrtl: always inline internal cells and slice/concat operations.whitequark2020-06-131-4/+108
| |/ |/| | | | | | | | | This can result in massive reduction in runtime, up to 50% depending on workload. Currently people are using `-mllvm -inline-threshold=` as a workaround (with clang++), but this solution is more portable.
* | cxxrtl: elide $pmux cells.whitequark2020-06-121-30/+16
| | | | | | | | | | On Minerva, this improves runtime by around 10%, mostly by ensuring that the logic driving FFs is packed into edge conditionals.
* | cxxrtl: annotate port direction as comments.whitequark2020-06-121-1/+8
| |
* | cxxrtl: unbuffer output wires of toplevel module.whitequark2020-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | Without unbuffering output wires of, at least, toplevel modules, it is not possible to have most designs that rely on IO via toplevel ports (as opposed to using exclusively blackboxes) converge within one delta cycle. That seriously impairs the performance of CXXRTL. This commit avoids unbuffering outputs of all modules solely so that in future, CXXRTL could gain fully separate compilation, and not for any present technical reason.
* | cxxrtl: simplify unbuffering of input wires.whitequark2020-06-121-20/+17
|/ | | | This also fixes an edge case with (*keep*) input ports.
* Merge pull request #2141 from whitequark/cxxrtl-cxx11whitequark2020-06-103-8/+10
|\ | | | | cxxrtl: various compiler compatibility fixes