Commit Graph

9911 Commits

Author SHA1 Message Date
Kamil Rakoczy 470df03f3d Move combined assign tests to single file
Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
2020-06-25 14:19:16 +02:00
Kamil Rakoczy 539087f417 Support missing sub-assign and and-assign operators
Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
2020-06-25 13:29:06 +02:00
Kamil Rakoczy f6d06c9f7b Add xor-assignment test
Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
2020-06-24 14:46:21 +02:00
Lukasz Dalek a4b4c22c96 Support missing xor-assign operator
Signed-off-by: Lukasz Dalek <ldalek@antmicro.com>
2020-06-24 14:32:12 +02:00
Kamil Rakoczy a5ca4eeefb Add or-assignment and plus-assignment tests
Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
2020-06-24 11:56:26 +02:00
Kamil Rakoczy 22408f24c7 Add plus-assignment operator
Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
2020-06-24 11:54:30 +02:00
Kamil Rakoczy 416a66aee8 Add or-assignment operator
Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
2020-06-24 11:53:50 +02:00
whitequark 0835a86e30
Merge pull request #2185 from YosysHQ/mwk/cxxrtl-ff-types
cxxrtl: Add support for the new FF types.
2020-06-24 05:40:01 +00:00
Marcelina Kościelnicka cb9a8ad0f2 cxxrtl: Add support for the new FF types. 2020-06-24 02:15:08 +02:00
Marcelina Kościelnicka 8f12c5b063 simplemap: Fix $dffsre mapping. 2020-06-23 23:16:43 +02:00
clairexen 2a59cd9ed0
Merge pull request #1818 from YosysHQ/mwk/new-ff-types
Add new FF types to library.
2020-06-23 20:25:52 +02:00
Marcelina Kościelnicka 88e7f90663 Update dff2dffe, dff2dffs, zinit to new FF types. 2020-06-23 18:24:53 +02:00
Marcelina Kościelnicka e71d827590 Add add* functions for the new FF types 2020-06-23 15:40:02 +02:00
Marcelina Kościelnicka 832acc8648 Add new FF types to simplemap. 2020-06-23 15:40:02 +02:00
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
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
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 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