Marcelina Kościelnicka
119f79d8b9
Add support for new FF types in some opt passes.
2020-06-23 15:40:02 +02:00
Marcelina Kościelnicka
b0bee396a8
Add new builtin FF types
...
The new types include:
- FFs with async reset and enable (`$adffe`, `$_DFFE_[NP][NP][01][NP]_`)
- FFs with sync reset (`$sdff`, `$_SDFF_[NP][NP][01]_`)
- FFs with sync reset and enable, reset priority (`$sdffs`, `$_SDFFE_[NP][NP][01][NP]_`)
- FFs with sync reset and enable, enable priority (`$sdffce`, `$_SDFFCE_[NP][NP][01][NP]_`)
- FFs with async reset, set, and enable (`$dffsre`, `$_DFFSRE_[NP][NP][NP][NP]_`)
- latches with reset or set (`$adlatch`, `$_DLATCH_[NP][NP][01]_`)
The new FF types are not actually used anywhere yet (this is left
for future commits).
2020-06-23 15:40:02 +02:00
whitequark
8c4cb1885b
Merge pull request #2182 from whitequark/update-abc
...
Update ABC
2020-06-22 17:01:59 +00:00
whitequark
778332384a
Update ABC.
2020-06-22 14:18:07 +00:00
whitequark
97f3a7fc30
Merge pull request #2181 from whitequark/minisat-wasm-signal
...
minisat: add missing include guard for WASI
2020-06-22 00:10:25 +00:00
whitequark
21d44ebec7
minisat: add missing include guard for WASI.
...
Including signal.h used to be allowed in WASI by mistake, but it's
an error since SDK 11.
2020-06-21 21:26:21 +00:00
whitequark
692ec5fc9d
Merge pull request #2180 from Xiretza/pyosys-override
...
pyosys: Use C++11 override keyword for bindings
2020-06-21 15:19:23 +00:00
Xiretza
a367281d30
pyosys: Use C++11 override keyword for bindings
...
7191dd16
dropped the YS_OVERRIDE macro, but it was still being generated
by the python bindings generator, resulting in errors like these when
compiled with ENABLE_PYOSYS=1:
kernel/python_wrappers.cc:350:21: error: expected ‘;’ at end of member declaration
350 | virtual void help() YS_OVERRIDE;
| ^
| ;
kernel/python_wrappers.cc:350:23: error: ‘YS_OVERRIDE’ does not name a type
350 | virtual void help() YS_OVERRIDE;
| ^~~~~~~~~~~
2020-06-21 16:30:00 +02:00
Alberto Gonzalez
28c2dd470b
log: Remove unused `_POSIX_TIMERS` branch in `PerformanceTimer::query()`.
2020-06-21 02:16:52 +00:00
Alberto Gonzalez
a564cc806f
log, qbfsat: Include child process time in `PerformanceTimer::query()` and report the time for each call to the QBF-SAT solver.
2020-06-21 02:16:52 +00:00
Alberto Gonzalez
62a9e62a1b
qbfsat: Simplify solution recovery parsing and tweak the solution regexes.
2020-06-21 02:16:11 +00:00
Alberto Gonzalez
e1fedf054e
qbfsat: Avoid instantiating `AttrObject`s directly.
...
Co-Authored-By: Claire Wolf <claire@symbioticeda.com>
2020-06-21 02:16:11 +00:00
Alberto Gonzalez
08cede4669
qbfsat: Simplify solution format and replace `SigBit::str()` with `log_signal()`.
...
Co-Authored-By: Claire Wolf <claire@symbioticeda.com>
2020-06-21 02:16:11 +00:00
Alberto Gonzalez
4ab41c6435
qbfsat: Fixes three bugs.
...
1. Infinite loop in the optimization procedure when the first solution found while maximizing is at zero.
2. A signed-ness issue when maximizing.
3. Erroneously entering bisection mode with no wire to optimize.
2020-06-21 02:16:11 +00:00
Alberto Gonzalez
a3d1f8637a
qbfsat: Use bit precise mapping for hole value wires and a more robust hole spec for writing to and specializing from a solution file.
2020-06-21 02:16:11 +00:00
whitequark
992d694d39
Merge pull request #2177 from boqwxp/dict-iterator-jump
...
hashlib, rtlil: Add `operator+()` and `operator+=()` to `dict` iterators
2020-06-21 02:05:12 +00:00
Kazuki Sakamoto
429d37ff41
static cast: simplify
2020-06-19 19:09:43 -07:00
Kazuki Sakamoto
6bf75be73b
static cast: add tests
2020-06-19 17:40:38 -07:00
Kazuki Sakamoto
185bbbe681
static cast: support changing size and signedness
...
Support SystemVerilog Static Cast
- size
- signedness
- (type is not supposted yet)
Fix #535
2020-06-19 17:39:20 -07:00
Alberto Gonzalez
d71a9badda
dict: Remove guard for past-the-end iterators that might mask problems in static analysis.
...
Co-Authored-By: whitequark <whitequark@whitequark.org>
2020-06-19 21:04:29 +00:00
whitequark
338ecbe02f
Merge pull request #2178 from boqwxp/design-select
...
rtlil: Add `Design::select()` for selecting whole modules
2020-06-19 19:57:25 +00:00
Alberto Gonzalez
3ccdab940c
rtlil: Add `Design::select()` for selecting whole modules.
2020-06-19 18:16:33 +00:00
Alberto Gonzalez
e5a2d17b5d
hashlib, rtlil: Add `operator+=()` to `dict<>::iterator` and `dict<>::const_iterator` and add `operator+()` and `operator+=()` to `ObjIterator`.
2020-06-19 17:44:29 +00:00
whitequark
c8c3c7af87
Use [[maybe_unused]] instead of YS_ATTRIBUTE(unused).
...
[[maybe_unused]] is available since C++17, so this commit adds
a polyfill YS_MAYBE_UNUSED. Once we require C++17 we can drop it.
2020-06-19 15:48:58 +00:00
whitequark
118e4caa37
Remove YS_ATTRIBUTE(unused) where present just for log_assert()/log_debug().
2020-06-19 15:48:58 +00:00
whitequark
21692c4a2e
Use (and ignore) the expression provided to log_debug in NDEBUG builds.
2020-06-19 15:48:58 +00:00
whitequark
2ffdb74fb1
Use (and ignore) the expression provided to log_assert in NDEBUG builds.
...
This avoids warnings in NDEBUG builds emitted when a variable is only
used in log_assert, but is always defined.
2020-06-19 15:48:58 +00:00
whitequark
d5d0cc88d2
Merge pull request #2175 from Xiretza/missing-noreturn
...
Add missing [[noreturn]] to log_file_error()
2020-06-19 15:46:54 +00:00
Xiretza
817411044a
Add missing [[noreturn]] to log_file_error()
...
Previously this was tagged only with YS_ATTRIBUTE(noreturn), but not
YS_NORETURN, so it got lost in #2173 , resulting in warnings in
frontends/ast/simplify.cc:
frontends/ast/simplify.cc:267:1: warning: function declared 'noreturn' should not return [-Winvalid-noreturn]
}
^
frontends/ast/simplify.cc:379:1: warning: function declared 'noreturn' should not return [-Winvalid-noreturn]
}
^
2020-06-19 11:46:06 +02:00
whitequark
ede4b10da8
Merge pull request #2173 from whitequark/use-cxx11-final-override
...
Use C++11 final/override/[[noreturn]]
2020-06-19 06:15:33 +00:00
whitequark
bcbd44c673
Merge pull request #2174 from whitequark/fix-github-linguist
...
Fix GitHub misidentifying *.v files as Coq
2020-06-19 06:09:42 +00:00
whitequark
78f39f6ebc
Fix GitHub misidentifying *.v files as Coq.
2020-06-19 06:08:18 +00:00
whitequark
87f45b7bd0
Merge pull request #2171 from whitequark/cxxrtl-accessors
...
cxxrtl: add .get() and .set() accessors on value<> and wire<>
2020-06-19 03:52:29 +00:00
whitequark
962a2f3bff
cxxrtl: add .get() and .set() accessors on value<> and wire<>.
...
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 .
2020-06-19 02:31:35 +00:00
whitequark
b3b9f1bf2e
Merge pull request #2170 from boqwxp/cutpoint-efficiency
...
cutpoint: Improve efficiency by iterating over module ports instead of module wires
2020-06-19 01:13:19 +00:00
whitequark
60478a8e3a
Use C++11 [[noreturn]] attribute.
2020-06-19 01:06:48 +00:00
whitequark
7191dd16f9
Use C++11 final/override keywords.
2020-06-18 23:34:52 +00:00
Alberto Gonzalez
76dfa81790
cutpoint: Improve efficiency by iterating over module ports instead of module wires.
2020-06-18 17:42:36 +00:00
N. Engelhardt
dfde1cf1c5
Merge pull request #2153 from boqwxp/splitnets-cleanup
...
splitnets: Cleanup and efficiency improvements
2020-06-18 19:16:55 +02:00
whitequark
8344846787
Merge pull request #2167 from whitequark/cxxrtl-fix-ndebug
...
cxxrtl: don't compute vital values in log_assert()
2020-06-18 16:57:51 +00:00
whitequark
5439faebf9
Merge pull request #2142 from whitequark/splitnets-hdlname
...
splitnets: propagate (*hdlname*) and disambiguate via start_offset
2020-06-18 16:57:24 +00:00
Miodrag Milanović
2123019ac6
Merge pull request #2164 from madebr/msvc
...
Get yosys building on Visual Studio
2020-06-18 12:44:21 +02:00
whitequark
3c4e974d7b
cxxrtl: don't compute vital values in log_assert().
...
This breaks NDEBUG builds.
Fixes #2166 .
2020-06-17 19:27:47 +00:00
Anonymous Maarten
60fb9cabcf
msvc does not support designated initializers in structs
2020-06-17 16:20:52 +02:00
Anonymous Maarten
504f220619
MSVC does not understand __builtin_unreachable
2020-06-17 15:10:08 +02:00
Anonymous Maarten
35008e6d40
MSVC cannot omit operand in conditional
2020-06-17 15:10:08 +02:00
Anonymous Maarten
c9c13c29df
MSVC defines TRANSPARENT too
2020-06-17 15:10:08 +02:00
whitequark
c4f20f744b
Merge pull request #2163 from jfng/cxxrtl-blackbox-debuginfo
...
cxxrtl: restrict the debug info of a blackbox to its ports.
2020-06-17 06:07:41 +00:00
whitequark
eaf66037a5
Merge pull request #2160 from whitequark/cxxrtl-fix-warning
...
cxxrtl: avoid unused variable warning for transparent $memrd ports
2020-06-17 06:06:58 +00:00
Jean-François Nguyen
8d98c3861d
cxxrtl: restrict the debug info of a blackbox to its ports.
2020-06-16 15:30:56 +02:00