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
N. Engelhardt
39ba90a8b8
Merge pull request #2156 from XarkLabs/master
...
Fix Verilator sim warnings: 1 BLKSEQ and 3 WIDTH
2020-06-16 12:31:34 +02:00
whitequark
334ec5fa0a
Merge pull request #2159 from MerryMage/cxxrtl-mul
...
cxxrtl: Implement chunk-wise multiplication
2020-06-15 06:08:17 +00:00
whitequark
8d70f7abf9
cxxrtl: avoid unused variable warning for transparent $memrd ports. NFC.
2020-06-15 06:00:16 +00:00
MerryMage
f7ae9b0851
cxxrtl: Implement chunk-wise multiplication
2020-06-15 05:54:57 +01:00
whitequark
9d0f1aa222
Merge pull request #2158 from miek/sshr-sign-extension
...
cxxrtl: fix sshr sign-extension.
2020-06-15 01:37:05 +00:00
Mike Walters
66a2de2912
cxxrtl: fix sshr sign-extension.
2020-06-15 01:01:49 +01:00
Xark
9509444ef2
Fix Verilator sim warnings: 1 BLKSEQ and 3 WIDTH
2020-06-14 00:45:22 -07:00
whitequark
74e93e083f
Merge pull request #2155 from whitequark/fix-wasm-wasi-sdk-11
...
kernel: guard include of signal.h more precisely
2020-06-13 23:28:18 +00:00
whitequark
7137f99658
kernel: guard include of signal.h more precisely.
...
Upgrading to WASI SDK 11.0 caused the WASM build to fail because WASM
does not have signals. (Arguably Yosys was broken even before, it was
just broken silently.)
2020-06-13 22:37:04 +00:00
whitequark
971a765155
Merge pull request #2151 from whitequark/cxxrtl-fix-rzext
...
cxxrtl: fix rzext()
2020-06-13 22:18:35 +00:00
Alberto Gonzalez
f5d7cd60f5
splitnets: Clean up pseudo-private member usage
2020-06-13 05:47:55 +00:00
Alberto Gonzalez
b70de98bd1
splitnets: Slightly improve efficiency by avoiding some unnecessary lookups
2020-06-13 05:26:30 +00:00
whitequark
dc6961f3d4
Merge pull request #2145 from whitequark/cxxrtl-splitnets
...
cxxrtl: handle multipart signals
2020-06-13 04:23:22 +00:00
whitequark
3783ad625e
Merge pull request #2152 from whitequark/cxxrtl-always-inline
...
cxxrtl: always inline internal cells and slice/concat operations
2020-06-13 04:17:49 +00:00
whitequark
107911dbec
cxxrtl: always inline internal cells and slice/concat operations.
...
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.
2020-06-13 01:52:06 +00:00
whitequark
6cf02ed94f
cxxrtl: fix rzext().
...
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.
2020-06-13 00:49:44 +00:00