Geza Lore
70603bb752
Add static assertions for unnecessary VN_IS/VN_AS/VN_CAST
...
Fail at compile time if the result of these macros can be statically
determined (i.e.: they aways succeed or always fail). Remove unnecessary
casts discovered. No functional change.
2021-10-22 19:39:24 +01:00
Geza Lore
dae9fa5053
Use VN_AS wherever possible and obvious. No functional change.
2021-10-22 14:06:00 +01:00
Wilson Snyder
02aa639425
Internals: Add some const etc. No functional change.
2021-10-05 19:42:31 -04:00
github action
20af8a36a7
Apply 'make format'
2021-09-28 11:29:21 +00:00
Zhanglei Wang
1c1c805b07
Fix internal error on bad widths ( #3140 ) ( #3145 )
2021-09-28 07:28:02 -04:00
Wilson Snyder
08c8b0d7d6
Fix removing if statement with side effect in condition ( #3131 ).
2021-09-13 15:52:53 -04:00
Wilson Snyder
3e03cd5a4d
Commentary
2021-09-01 20:39:59 -04:00
Geza Lore
8681861be9
Improve bitop tree optimization
...
- Remove redundant casting
- Cheaper final XOR parity flip (~/^1 instead of != 0)
- Support XOR reduction of ~XOR nodes
- Don't add redundant masking of terms
- Support unmasked terms
- Add cheaper implementation for single bit only terms
- Ensure result is clean under all circumstances (this fixes current bugs)
2021-08-18 22:00:13 +01:00
Geza Lore
c69ddc46f8
Fix bitop tree optimization dropping necessary cleaning AND ( #3097 )
...
Fixes #3096 .
2021-08-14 21:09:01 +01:00
Yutetsu TAKATSUKASA
4ec8bc3589
Fix op count and wrong optimization in bitop tree ( #3099 )
...
- Fix op calculation.
- Fix wrong optimization revealed by changing the op calculation:
Not(CCast(And(a, b))) must be frozen.
2021-08-14 12:28:47 +01:00
Geza Lore
00fe36f44c
Name temporary variables based on hash of related node.
...
This improves output stability by removing sequence numbers and hence
can improve ccache hit rate. No functional change intended.
2021-08-11 17:29:22 +01:00
Wilson Snyder
b8e804f05b
Internals: Some clang-tidy cleanups. No functional change intended.
2021-07-25 13:38:27 -04:00
Wilson Snyder
8ecdc85cf7
Internals: C++11 style cleanups. No functional change.
2021-07-11 18:42:01 -04:00
Wilson Snyder
c7499133b2
Internals: C++11 for bool. No functional change.
2021-07-11 10:42:32 -04:00
Geza Lore
2825940fad
Fix dtype when simplifying masked shift.
...
Fixes #3044
2021-06-25 18:06:43 +01:00
Wilson Snyder
512fe0a2d1
Internals: Add const. No functional change.
2021-06-20 18:33:13 -04:00
Yutetsu TAKATSUKASA
ec4eb18846
Fiix incorrect result by bit tree opt ( #3023 ) ( #3030 )
...
* Add a test to reproduce #3023 . Also applied verilog-mode formatting.
* use unique_ptr. No functional change is intended.
* Introduce restorer that reverts changes during iterate() if failed.
2021-06-21 07:28:39 +09:00
Geza Lore
6c9c16c31d
Simplify redundant masking of AstShiftR/AstShiftL
...
AND(CONST,SHIFTR(_,C)) appears often after V3Expand, with C a large
enough dense mask (i.e.: of the form (1 << n) - 1) to make the masking
redundant. E.g.: 0xff & ((uint32_t)a >> 24). V3Const now replaces these
ANDs with the SHIFTR node.
Similarly, we also simplify the same with SHIFTL,
e.g.: 0xff000000 & ((uint32_t)a << 24)
2021-06-18 20:06:53 +01:00
Geza Lore
0c93c3844f
Simplify AND(CONST,OR(_,_)) with redundant terms
...
V3Expand generates a lot of OR nodes that are under a clearing mask, and
have redundant terms, e.g.: 0xff & (a << 8 | b >> 24). The 'a << 8' term
in there is redundant as it's bottom bits are all zero where the mask is
non-zero. V3Const now removes these redundant terms.
2021-06-18 19:07:00 +01:00
Geza Lore
9699192de8
Don't merge bit select assignments in C code ( #2971 )
2021-05-18 14:28:48 -04:00
Yutetsu TAKATSUKASA
8624ce6a84
Stop checking dtype for better optimization chance in BitOpTree ( #2909 )
...
* Tests: Add more case that does not match native C++ width (8, 16, 32 or 64).
* Use AstVarRef::same() instead of AstNode::sameGateTree() because the latter checks dtype in addition to scope.
AstVarRef may have different minWidth in some cases,
but the difference should be ignored in the context of bitOpTree optimization.
2021-05-04 10:40:16 +09:00
Yutetsu TAKATSUKASA
4351abfe71
Fix assertion failure in bitOpTree opt ( #2899 )
...
* Tests: Add another testcase that triggers assertion failure in bitOpTree opt.
* Fix assertion failure in bitOpTree opt reported in #2891 . Consider the follwoing case.
CCast -> WordSel -> VarRef(leaf)
* Make sure that m_bitPolarity is expanded enough.
2021-04-25 11:46:05 +09:00
Yutetsu TAKATSUKASA
56dd58d259
Fix assertion failure in bitOpTree ( #2892 )
...
* Tests: Add a test to reproduce #2891
* Fix assertion failure in binary op tree opt.
2021-04-17 05:50:30 +09:00
Geza Lore
4f36e3e6c9
Fix incorrect condition in varNotReferenced ( #2873 )
...
The intention was to not merge impure assignments, but the actual
predicate failed if the assignment was indeed pure.
This fix gains 1.5% speed on SweRV EH1.
2021-04-03 12:57:06 -04:00
Wilson Snyder
29505ef013
Support arrayed parameter functions partial ( #2846 )
2021-03-19 18:44:26 -04:00
Wilson Snyder
7469166c38
Fix or-reduction on different scopes broken in 4.110 ( #2828 ).
2021-03-10 18:08:11 -05:00
Wilson Snyder
5a4e4b2dcd
Add -Oo to disable const bit tree ( #2830 ).
2021-03-10 17:47:31 -05:00
Wilson Snyder
6ff1911110
Tests: Cover some internal code coverage issues
2021-03-07 13:52:37 -05:00
Wilson Snyder
9650aefa42
Internals: Cleanup unneeded {}. No functional change
2021-02-21 21:25:21 -05:00
Yutetsu TAKATSUKASA
bb5384bc50
Optimize bit op tree #2186 , #2632 , and #2633 ( #2751 )
...
* Tests:Add some more signals to t_const_opt_red.v
* Optimize bit op trees such as ~a[2] & a[1] & ~a[0] to 3'b010 == (3'111 & a)
* Update src/V3Const.cpp
Co-authored-by: Wilson Snyder <wsnyder@wsnyder.org>
* Update src/V3Const.cpp
Co-authored-by: Wilson Snyder <wsnyder@wsnyder.org>
* Update src/V3Const.cpp
Co-authored-by: Wilson Snyder <wsnyder@wsnyder.org>
* Apply clang-format
* Don't edit and-or tree.
* Call matchBitOpTree() after V3Expand does its job.
* Internals: Rename newNodep -> newp. No functional change is intended.
* Internals: Remove m_sels. No functional change is intended.
* Internals: Remove stringstream. No functional change is intended.
* Internals: Use V3Number::bitIs1(). No functional change is intended.
* Internals: Use V3Number instead of std::map. Resolved laek. Result should be same.
* Internals: Resolve overload of setPolarity. No functional change is intended.
* Internals: Pass failure reason. No functional change is intended.
* Internals: Add VNUser::toPtr(). No functional change is intended.
* Internals: Use user4 instead of std::map. No functional change is intended.
* Catch up with the AST style aftre V3Expand
* Internals: Rename Context to VarInfo. No functional change is intended.
* Add some more test case
* tests:Add stats to tests
Update stats in t_merge_cond.pl as matchBitopTree does some of them.
* insert CCast if necessary
* small optimization to remove redundant bit mask
* No quick exit even when unoptimizable node is found.
* Simplify removing redundant And
* simplify
* Revert "Internals: Add VNUser::toPtr(). No functional change is intended."
This reverts commit f98dce10db .
* Consider AstWordSel and cleanup
* Update test
* Update src/V3Const.cpp
Co-authored-by: Wilson Snyder <wsnyder@wsnyder.org>
* Update src/V3Const.cpp
Co-authored-by: Wilson Snyder <wsnyder@wsnyder.org>
* Update src/V3Const.cpp
Co-authored-by: Wilson Snyder <wsnyder@wsnyder.org>
* Update src/V3Const.cpp
Co-authored-by: Wilson Snyder <wsnyder@wsnyder.org>
* Update src/V3Const.cpp
Co-authored-by: Wilson Snyder <wsnyder@wsnyder.org>
* Update src/V3Const.cpp
Co-authored-by: Wilson Snyder <wsnyder@wsnyder.org>
* Apply clang-format
* Internals: rename variables. No functional change is intended.
Co-authored-by: Wilson Snyder <wsnyder@wsnyder.org>
Co-authored-by: github action <action@example.com>
2021-02-21 18:11:33 +09:00
Yutetsu TAKATSUKASA
62e877ebf0
Add transformation of '^(const ^ a)' -> '(^const) ^ (^a)' ( #2800 )
...
* Add transformation of '^(const ^ a)' -> '(^const) ^ (^a)'
* Use TREEOP instead of TREEOPC
2021-02-20 23:16:55 +09:00
Yutetsu TAKATSUKASA
120322df3e
Remove redundant AND with 1 ( #2791 )
2021-02-18 19:28:49 +09:00
Yutetsu TAKATSUKASA
878a252437
Internals: Add TREEOPC() that executes only when m_doCpp==true ( #2759 )
2021-01-17 13:53:49 +09:00
Wilson Snyder
22260c6b85
Internals: Rename V3Const TREEOPC to TREEOPA.
2021-01-15 22:13:06 -05:00
Wilson Snyder
bd602d0e2d
Copyright year update
2021-01-01 10:29:54 -05:00
Wilson Snyder
b93e409f0e
Optimize additional display statements ( #2702 ).
2020-12-19 11:12:47 -05:00
Wilson Snyder
af0e535015
Internals: Remove Xnor node type.
...
Convert to Not(Xor(x)) up front, to help code coverage and optimize out extra nots sooner.
2020-12-10 00:04:10 -05:00
Wilson Snyder
212e8fb14b
Internals: Cleanup some inlines, use constexpr. No functional change intended.
2020-12-01 18:49:03 -05:00
Wilson Snyder
b6ded59c2b
Internals: Use and enforce class final for ~5% performance boost.
2020-11-18 21:32:16 -05:00
Wilson Snyder
c0888c1b0f
Internals: Use newline instead of endl to avoid unneeded flush.
2020-11-18 21:03:23 -05:00
Wilson Snyder
1b0a48ea02
Internals: Use C++11 = default where obvious. No functional change intended.
2020-11-16 19:56:16 -05:00
Wilson Snyder
44eb362a18
clang-tidy cleanups. No functional change intended.
2020-11-10 21:40:14 -05:00
Wilson Snyder
80284c437e
Internals: Refactor some VAssign printing. No functional change.
2020-11-01 16:59:23 -05:00
Wilson Snyder
e6b0479b80
Internals: CFunc VL_RESTORER. No functional change intended.
2020-10-31 09:14:47 -04:00
Wilson Snyder
cf7b5c091a
Internals: Track some VAccess that can be ReadOnly. No functional change.
2020-10-30 22:28:51 -04:00
Wilson Snyder
1899a875a4
Internals: Create VAccess class. No functional change intended.
2020-09-07 17:09:25 -04:00
Wilson Snyder
bed3101dfc
Internals: Use VL_RESTORER class to save/restore vars. No functional change intended.
2020-08-24 21:13:28 -04:00
Wilson Snyder
f4a72946eb
Support $urandom, $urandom_range without stability.
2020-08-23 08:42:50 -04:00
Wilson Snyder
ac04e85a1c
C++11: More range for. No functional change intended.
2020-08-16 12:54:32 -04:00
Wilson Snyder
78aee6f4e7
C++11: Use sized enums (+4% performance).
2020-08-16 12:05:35 -04:00
Wilson Snyder
ee9d6dd63f
C++11: Favor auto, range for. No functional change intended.
2020-08-16 11:44:06 -04:00
Wilson Snyder
72d2cff0a1
C++11: Use member declaration initalizations. No functional change intended.
2020-08-16 11:44:06 -04:00
Wilson Snyder
042d3eed23
C++11: Use override where possible. No functional change.
2020-08-16 11:44:05 -04:00
Wilson Snyder
c0127599df
C++11: Use nullptr. No functional change.
2020-08-16 11:44:05 -04:00
Wilson Snyder
7c54a451a9
C++11: Remove pre-c11 VL_OVERRIDE etc. No functional change.
2020-08-16 11:44:05 -04:00
Wilson Snyder
75d255a3bf
Internals: clang-format
2020-07-10 18:08:04 -04:00
Geza Lore
1632160fb1
Internals: Remove redunand SenItem nodes ( #2457 )
2020-07-05 13:13:03 -04:00
Geza Lore
aa595d40de
Do not fold IF with 'bx condition before V3Unknown ( #2438 )
...
Fixes #2425
2020-06-20 04:16:07 +01:00
Conor McCullough
f40f0464e2
Fix replaceMulShift optimization ( #2413 )
2020-06-11 07:42:25 -04:00
Geza Lore
95534fa5c5
Remove unused headers ( #2389 )
2020-05-31 20:21:07 +01:00
Yossi Nivin
f9a0cf0cff
Support $countbits ( #2287 )
2020-05-10 14:27:22 -04:00
Wilson Snyder
c00cc18d37
Optimize dead code after gotos
2020-05-09 15:00:36 -04:00
Wilson Snyder
72bd91c7f1
Support $isunbounded and parameter $. ( #2104 )
2020-05-07 21:12:58 -04:00
Wilson Snyder
546ccd56c4
Internals: Enable future JumpGo to non-end. No functional change intended.
2020-05-06 21:33:05 -04:00
Wilson Snyder
ca77a93214
Add lint check for bad delay locations.
2020-05-06 19:25:13 -04:00
Wilson Snyder
15ad3f46be
Fix logical not optimization with empty begin, #2291 .
2020-04-28 21:15:20 -04:00
Wilson Snyder
def40fab9b
Internals: Rename VSigning
2020-04-19 21:19:09 -04:00
Wilson Snyder
d4f7f5297a
Support IEEE time units and time precisions, #234 . ( #2253 )
...
Includes `timescale, $printtimescale, $timeformat.
VL_TIME_MULTIPLIER, VL_TIME_PRECISION, VL_TIME_UNIT have been removed
and the time precision must now match the SystemC time precision.
To get closer behavior to older versions, use e.g. --timescale-override
"1ps/1ps".
2020-04-15 19:39:03 -04:00
Wilson Snyder
f3308d236b
clang-format remaining sources. No functional change.
2020-04-15 07:58:34 -04:00
Wilson Snyder
6eadb8e771
Add simplistic class support with many restrictions, see manual, #377 .
2020-04-05 09:30:23 -04:00
Wilson Snyder
19b472cf0b
Internals: Cleanup unused nodep in visitors. No functional change intended.
2020-04-04 08:31:14 -04:00
Wilson Snyder
38a31ae168
Cleanup misc clang-tidy warnings. No functional change intended
2020-04-03 22:31:54 -04:00
Wilson Snyder
1ce360ed5b
Add SPDX license identifiers. No functional change.
2020-03-21 11:24:24 -04:00
Wilson Snyder
609a5dc26d
Fix cppcheck warnings. No functional change intended.
2020-02-03 23:21:56 -05:00
Wilson Snyder
a4e8d39932
Spelling fixes
2020-01-24 20:10:44 -05:00
Yutetsu TAKATSUKASA
fbdf5f2dad
Internals: Mark all visit() with VL_OVERRIDE. Closes #2132 .
...
* Add VL_OVERRIDE macro so that compiler can tell my typo when trying to override a function.
* Mark visit() with VL_OVERRIDE. No functional change intended.
2020-01-21 17:35:56 -05:00
Wilson Snyder
e8ff191a17
Internals: Prepare for hierarchical NodeModule's. No functional change intended.
2020-01-20 13:27:27 -05:00
Wilson Snyder
623c4ec103
Internals: Create VL_DO_DANGLING. No functional change intended.
2020-01-16 20:17:11 -05:00
Pieter Kapsenberg
4443ab34fd
Support left justified . Closes #2101 .
2020-01-15 07:32:45 -05:00
Wilson Snyder
f23fe8fd84
Update copyright year.
2020-01-06 18:05:53 -05:00
Yutetsu TAKATSUKASA
8cdc0c4e00
Support string putc, getc, substr, bug1606.
...
Signed-off-by: Wilson Snyder <wsnyder@wsnyder.org>
2019-12-15 08:09:52 -05:00
Wilson Snyder
700f2072c0
Framework for WDatas being vectors of 64-bit EDatas, but not supporting this at this time.
2019-12-08 21:36:38 -05:00
Wilson Snyder
d65d8fda54
Optimize returns at end of functions.
2019-12-01 17:19:18 -05:00
Wilson Snyder
e04bc16ffa
Codacity cleanup
2019-11-10 13:21:05 -05:00
Wilson Snyder
2b26ca2c07
Optimize mask/and above conditionals.
2019-11-10 13:17:29 -05:00
Wilson Snyder
ce178ec987
Optimize modulus by power-of-two constants.
2019-11-10 12:12:57 -05:00
Wilson Snyder
28cbf39995
Support some unpacked arrays in parameters, bug1315.
2019-11-09 18:31:24 -05:00
Wilson Snyder
4767083a72
Internals: Rework AstInitArray to have O(1) access. No functional change intended.
2019-11-09 17:12:26 -05:00
Wilson Snyder
5811ec07e6
Update URLs to https://verilator.org
2019-11-07 22:33:59 -05:00
Wilson Snyder
67d52372e5
Fix bad-syntax crashes, bug1582.
2019-11-04 18:48:47 -05:00
Wilson Snyder
d472ef63e9
Internals: Cleanup some misnamed classes. No functional change.
2019-10-05 08:17:21 -04:00
Wilson Snyder
771a301f66
Commentary: Remove newlines, upsets some patches. No functional change.
2019-10-04 20:17:11 -04:00
Wilson Snyder
e556269692
Commentary - Spelling fixes
2019-09-12 07:22:22 -04:00
Wilson Snyder
fa904f386c
Commentary - Spelling fixes
2019-09-09 07:50:21 -04:00
Wilson Snyder
b7bd5956ea
Concats should be unsigned
2019-08-04 14:48:17 -04:00
Wilson Snyder
71265a8ec9
Internals: Rename unsized functions. No functional change.
2019-08-04 12:39:35 -04:00
Wilson Snyder
3a720204c2
Internals: Remove m_logicMap as m_detailedMap covers it. No functional change intended.
2019-08-04 08:16:24 -04:00
Wilson Snyder
0f857ce423
In errors, single quote signals and other from-user data.
2019-07-11 22:09:30 -04:00
Wilson Snyder
dacf45fea9
Fix error message continuations to avoid linenumber repetition
2019-07-11 19:15:40 -04:00
Wilson Snyder
bea34d0ced
Internals: Misc enum cleanups. No functional change.
2019-07-06 15:50:25 -04:00
Wilson Snyder
8548ecfdac
Internals: Add UASSERT_OBJ macro to replace hand-done ifs. No functional change intended.
...
This makes it easier to filter out correctly zero code-coverage lines.
2019-07-06 12:57:50 -04:00
Wilson Snyder
f6f8073058
Support logical equivalence operator <->.
2019-06-01 19:40:06 -04:00
Wilson Snyder
8846b365f4
Fix some memory leaks in V3Const/V3Unroll.
2019-05-29 22:43:26 -04:00
Wilson Snyder
b83b606267
Internals: Detab and fix spacing style issues. No functional change.
...
When diff, recommend using "git diff --ignore-all-space"
When merging, recommend using "git merge -Xignore-all-space"
2019-05-19 16:13:13 -04:00
Todd Strader
eac3458647
Internals: V3Number tracks node information, part of bug1305.
...
Signed-off-by: Wilson Snyder <wsnyder@wsnyder.org>
2019-05-09 20:03:19 -04:00
Wilson Snyder
8a4aeddbb0
Copyright year update.
2019-01-03 19:17:22 -05:00
Wilson Snyder
b8098098d8
Internals: Refactor input/output to new class in prep for ref support.
2018-10-27 17:29:00 -04:00
Wilson Snyder
304a24d03a
Internals: Fix many clang-tidy issues. No functional change intended.
2018-10-14 18:39:33 -04:00
Wilson Snyder
5ae1ce90ad
Internals: Refactor into cvtToHex function. No functional change.
2018-10-14 16:25:36 -04:00
Wilson Snyder
d87b9d25ca
Internals: Cleanup and standardize include order. No functional change intended.
2018-10-14 13:59:40 -04:00
Wilson Snyder
595419b370
Internals: Sort includes for clang-tidy. No functional change intended.
2018-10-14 07:04:18 -04:00
Wilson Snyder
442e4f35f0
Internals: Cleanup empty string constructors for clang-tidy. No functional change.
2018-10-13 23:06:36 -04:00
Wilson Snyder
e8b8b33ff6
Internals: Cleanup find with chars for clang-tidy. No functional change.
2018-10-13 22:28:59 -04:00
Wilson Snyder
e4d638c73d
Internals: Cleanup string casts. No functional change.
2018-10-13 22:02:39 -04:00
Wilson Snyder
75f28fd446
Internals: Fix spacing of function calls. No functional change.
2018-08-25 09:52:45 -04:00
Wilson Snyder
8f838433df
Internals: Fix spacing and style of v4 changes. No functional change.
2018-08-23 05:22:34 -04:00
Wilson Snyder
86d85412e1
Merge from master
2018-06-22 18:51:02 -04:00
Wilson Snyder
35a40b4930
Commentary
2018-06-22 06:35:27 -04:00
Wilson Snyder
7fc565a1bd
Merge from master
2018-06-14 19:04:36 -04:00
Wilson Snyder
5d26bca55c
Internals: Remove unneeded returns on asserts.
2018-06-13 18:05:00 -04:00
Wilson Snyder
cd4e6b35b3
Internals: Standardize debug() function generation. No functional change intended.
2018-05-14 06:50:47 -04:00
Wilson Snyder
05db8ce6c8
Internals: Move iterators to AstNVisitor to avoid null this.
2018-05-10 20:55:37 -04:00
Wilson Snyder
2c30aecc5b
Merge from master
2018-03-10 16:51:34 -05:00
Wilson Snyder
770045676f
Internals: Split some extremely long lines. No functional change.
2018-03-10 16:32:04 -05:00
Wilson Snyder
54a101acbe
Internals: Fix -DLEAK_CHECKS failing due to visitor destructor being too late.
2018-03-10 12:57:50 -05:00
Wilson Snyder
597d28b505
Fix internals to make null-pointer-check clean. Also add more const's. No functional change intended, but likely something will break.
2018-02-01 21:32:58 -05:00
Wilson Snyder
94e8cf1de9
Internals: Use explicit std:: instead of using namespace std. No functional change intended.
2018-02-01 21:24:41 -05:00
Wilson Snyder
8e65d93d6d
Copyright year update. No functional change.
2018-01-02 18:05:06 -05:00
Wilson Snyder
4901668f13
Add INFINITELOOP warning, bug1254.
2017-12-26 21:35:08 -05:00
Wilson Snyder
cb422a9a02
Internals: Number astgen from 1 as 0p looks like Op. No functional change.
2017-10-28 08:48:24 -04:00
Wilson Snyder
eb65984368
Tests: Additional display merge tests. No functional change.
2017-10-21 13:50:31 -04:00
Wilson Snyder
8281ee1520
Optimize arrayed if assignments
2017-10-04 22:10:44 -04:00
Wilson Snyder
c132d0e1fe
Fix extra duplicate multiclk blocks when dtypes differ
2017-10-02 22:58:34 -04:00
Wilson Snyder
1a6348f113
Optimize display+display statements.
2017-10-02 20:25:10 -04:00
Wilson Snyder
04ca6a4307
Fix compiler warning when WIDTH warning ignored on large compare.
2017-10-01 10:21:27 -04:00
Wilson Snyder
47e13cfdf4
Optimize concat/replicate+replicate.
2017-09-21 21:05:42 -04:00
Wilson Snyder
393b5d48b2
Better optimize Shift-And constructs.
2017-09-19 20:56:17 -04:00
Wilson Snyder
63361fc56e
Add performance information to --stats file.
2017-09-17 22:52:57 -04:00
Wilson Snyder
fee4aba9ec
Internals: Fix GCC constant warnings.
2017-09-15 18:26:09 -04:00
Wilson Snyder
70daadf987
Fix cpp-check warnings; support XML format 2
2017-07-06 20:25:59 -04:00
Wilson Snyder
9dc01cf540
Support arrayed parameter overrides, bug1153.
2017-05-02 19:16:54 -04:00
Wilson Snyder
8943ad5966
internals: Remove extra newlines on v3fatalSrc. No functional change.
2017-04-28 20:09:27 -04:00
Wilson Snyder
e6d7e7e329
Version bump
2017-01-15 12:13:13 -05:00
Wilson Snyder
2f34132275
Fix bad code when tracing array of structs, bug1122.
2017-01-06 18:44:37 -05:00
Wilson Snyder
a1e4d676c3
Fix parsing sensitivity with &&, bug934.
2016-12-21 18:23:14 -05:00
Wilson Snyder
7efa40966a
Internals: Remove second argument to visitors. No functional change intended.
2016-11-27 08:11:38 -05:00
Wilson Snyder
ad39931e87
Internals: Cleanup uses of accept in V3Width. No functional change.
2016-11-07 19:14:45 -05:00
Wilson Snyder
e52f5f1b63
Internals: Remove extraneous castNode() calls. No functional change.
2016-11-05 10:06:43 -04:00
Wilson Snyder
891214fa72
Fix enum values of 11-16 bits wide using .next/.prev, bug1062.
2016-06-15 22:46:34 -04:00
Wilson Snyder
9ae40d64f0
Support parameter type, bug376.
2016-03-14 21:51:31 -04:00
Wilson Snyder
a509b6a21c
Internals: Fix compares to null, ongoing part of bug1030. No functional change intended.
2016-02-08 22:15:44 -05:00
Johan Bjork
cb2d8259f2
Fix stats and debug print, bug1029
...
Signed-off-by: Wilson Snyder <wsnyder@wsnyder.org>
2016-01-28 22:20:31 -05:00
Wilson Snyder
b738d1960a
Copyright year update
2016-01-06 20:36:41 -05:00
Wilson Snyder
b0a249f338
Fix display %u, %v, %p, %z, bug989.
2015-11-10 21:12:15 -05:00
Wilson Snyder
4475060268
Ignore %l in , bug983.
2015-10-27 20:37:52 -04:00
Wilson Snyder
040b1b06d5
Support genvar indexes into arrayed cells, bug517.
2015-10-22 20:13:49 -04:00
Wilson Snyder
4fc9a906f6
Internals: Fix cppcheck warnings; add VL_DANGLING. No functional change.
2015-10-04 13:16:35 -04:00
Wilson Snyder
318ded4198
Internals: Cleanup cppcheck warnings.
2015-10-03 22:33:06 -04:00
Wilson Snyder
d0ec991bb2
Fix mis-optimizing public DPI functions, bug963.
2015-09-18 19:06:15 -04:00
Wilson Snyder
0ee5743853
Add --dump-treei-<srcfile>, bug894.
2015-03-12 19:48:04 -04:00
Wilson Snyder
4c91ade61d
Copyright year update
2015-01-07 18:25:53 -05:00
Wilson Snyder
ce4dfb4296
Fix misc string handling issues.
2014-11-28 20:24:42 -05:00
Wilson Snyder
43be4cf2b5
Add 'string' printing and comparisons, bug746, bug747, etc.
2014-11-28 15:01:50 -05:00
Wilson Snyder
62eb247c1e
Optimize SUB/ADD together.
2014-11-09 18:33:54 -05:00
Jie Xu
4e2884b509
Optimize e.g. {(b<<4)[7:4], (b<<4)[3:0]}. From assignmerge tree.
...
Signed-off-by: Wilson Snyder <wsnyder@wsnyder.org>
2014-11-05 20:58:36 -05:00
Wilson Snyder
8bfb5cc5e9
Internals: Add sameGateTree.
2014-11-02 19:52:49 -05:00
Wilson Snyder
cf6d07aafa
Add optimization of operators between concats, msg1447.
2014-10-22 21:44:41 -04:00
Wilson Snyder
6cf50e6579
Fix string corruption, bug780.
2014-06-08 21:36:18 -04:00
Wilson Snyder
5f8f474c0c
Fix shift with XOR mis-optimization, bug776.
2014-05-26 18:16:52 -04:00
Wilson Snyder
91e706ec1f
Fix X shift issue, bug772.
2014-05-24 07:05:23 -04:00
Wilson Snyder
6ce2a52c5f
Fix shift-right optmiization, bug763.
2014-05-10 16:38:20 -04:00
Wilson Snyder
621c51589a
Fix shift by x, bug760.
2014-05-04 08:50:44 -04:00
Glen Gibb
d34275150c
Support streaming operators, bug649.
...
Signed-off-by: Wilson Snyder <wsnyder@wsnyder.org>
2014-04-09 20:29:35 -04:00
Wilson Snyder
ff19dd94f9
Fix power operator calculation, bug730.
2014-04-05 15:44:49 -04:00
Wilson Snyder
28e35a64ea
Support parameter arrays, bug683.
2014-04-01 23:16:16 -04:00
Wilson Snyder
9e76078939
Fix signed shift right optimization, bug715.
2014-03-09 21:28:28 -04:00
Wilson Snyder
dce4519995
Optimizer: Put constants on left side of compares to match other AstBiOps and extend optimizations. No runtime result change intended.
2014-03-09 17:13:37 -04:00
Wilson Snyder
4422de0c6c
Copyright year update.
2014-01-06 19:28:57 -05:00
Wilson Snyder
bcba5075e8
Fix ordering of , msg1229.
2013-09-07 16:43:43 -04:00
Wilson Snyder
c24f7b1391
Support named function and task arguments.
2013-08-17 20:34:49 -04:00
Wilson Snyder
23bb045a72
Support interfaces and modports, bug102.
2013-05-27 21:39:19 -04:00
Wilson Snyder
175d59ecba
Fix GCC version runtime changes, bug651.
2013-05-23 20:19:51 -04:00
Wilson Snyder
f07f6a26a8
cppcheck fixes
2013-02-03 13:27:37 -05:00
Wilson Snyder
ffb187ae15
Fix enums in sensitivity lists
2013-02-02 14:37:18 -05:00
Wilson Snyder
bbeb382cbb
Internals: Rename range lo/hi to match IEEE.
2013-01-17 20:29:20 -05:00
Wilson Snyder
8127a79cb1
Fix nested packed arrays and structs, bug600.
...
IMPORTANT: Packed arrays are now represented as a single linear vector in
Verilated models this may affect packed arrays that are public or accessed via the VPI.
2013-01-14 21:49:22 -05:00
Wilson Snyder
13bf2f19ac
Internals: Have V3Unknown/Const use only dtypes for selects.
2013-01-13 14:54:12 -05:00
Wilson Snyder
a8bbf7231b
Copyright year update.
2013-01-01 09:42:59 -05:00
Wilson Snyder
c7a088faa5
Fix mis-optimized identical submodule subtract, bug581. Take 2.
2012-11-28 20:18:41 -05:00
Wilson Snyder
30f6c0e105
Fix mis-optimized identical submodule subtract, bug581.
2012-11-28 07:36:47 -05:00
Wilson Snyder
33e6a17747
Internals: Look at tree state instead of back for AstAttr. No functional change.
2012-07-28 10:52:29 -04:00
Wilson Snyder
1b439703ff
Fix leak issues, bug521
2012-05-30 23:17:55 -04:00
Wilson Snyder
c6e7d87960
Commentary - Remove author lines as amany contributors now
2012-05-24 19:19:48 -04:00
Wilson Snyder
53f50463bc
Internals: Add warnMore() for all continued messages.
2012-05-21 21:24:17 -04:00
Wilson Snyder
ac61548e6a
Optimize tristate structure OR(AND(x,y),AND(z,y)).
2012-05-08 19:20:23 -04:00
Wilson Snyder
87e8736823
IMPORTANT: Major internal changes for supporting complex data types.
...
Adds dtype() to every node, keep global table of dtypes and remove duplicates.
Final merge from dtype branch.
2012-04-29 10:14:13 -04:00
Wilson Snyder
c0da16bfcd
Internals: Create dtypeFrom. Merge from dtype. No functional change.
2012-04-29 09:42:17 -04:00
Wilson Snyder
5b532a1812
Fix generate if, broke in earlier committ, bug492. Merge from Bennett.
2012-04-25 18:17:10 -04:00
Wilson Snyder
2d8feabe54
Fix generate operators not short circuiting, bug413. Merge from Jeremy Bennett.
2012-04-19 22:53:52 -04:00
Wilson Snyder
50edef4ab2
Add Emacs indentation line. No functional change
2012-04-12 21:08:20 -04:00
Wilson Snyder
6a38d3bcf3
Add SELRANGE as warning instead of error, bug477.
2012-04-04 21:55:20 -04:00
Wilson Snyder
61cbdd1a19
Internals: Merge VFlag rename. No functional change.
2012-03-31 11:10:34 -04:00
Wilson Snyder
37839e2709
Cleanup trailing whitespace. No functional change
2012-03-20 16:01:53 -04:00
Wilson Snyder
8687dcbce1
Internals: Add isRanged, more debug. No functional change.
2012-03-04 16:18:41 -05:00
Wilson Snyder
d699247269
Internals: In AstBasicDType avoid use of Range for constants. No functional change.
2012-02-20 11:48:31 -05:00
Wilson Snyder
c2c7c7bd9a
Copyright year update
2012-01-15 10:26:28 -05:00
Wilson Snyder
fdeb6bcae0
Internals: Progress towards proper short-circuit evaluation
2011-12-22 08:33:16 -05:00
Wilson Snyder
df1da3dda9
Internals: Fix cppcheck warnings; no functional change intended
2011-08-04 21:58:45 -04:00
Wilson Snyder
55906486d8
Support 'real' numbers and related functions.
2011-07-24 15:01:51 -04:00
Wilson Snyder
ae4a261463
Internals: Rename UnaryMin to Negate. No functional change.
2011-07-08 06:03:07 -04:00
Wilson Snyder
a9ba4a9fcd
Internals: Cleanups in V3Signed towards reals; no functional change
2011-07-05 21:05:35 -04:00
Wilson Snyder
2923893d34
Support loop unrolling on width mismatches, bug 333
2011-03-12 07:45:04 -05:00
Wilson Snyder
9a697dc5f5
Accelerate bit-selected inversions.
2011-02-23 21:36:38 -05:00
Wilson Snyder
cfdb852843
Fix concatenates and vectored bufif1, bug326.
2011-02-23 21:21:59 -05:00
Wilson Snyder
71c1f00ec2
Copyright year update
2011-01-01 18:21:19 -05:00
Wilson Snyder
b43299c8da
Fix suppression of messages under debug
2010-12-30 08:41:23 -05:00
Wilson Snyder
2cb97f7475
For UNUSED, ignore black boxed sys calls
2010-12-30 07:55:31 -05:00
Wilson Snyder
ebdf8a5f3c
Internals: Constify tristates with ConstLive, unused so no functional change
2010-12-29 07:56:22 -05:00
Wilson Snyder
c8852d183f
Internals: Add V3Const preserving liveness, no functional change
2010-12-28 21:23:16 -05:00
Wilson Snyder
9f161b20ef
Internals: Avoid passing vars from V3Const visitor; no functional change
2010-12-28 20:46:13 -05:00
Wilson Snyder
3e4e8feb29
With --Wall, add DECLFILENAME warning on modules not matching filename.
2010-12-25 16:31:22 -05:00
Wilson Snyder
55da4fdbf6
Typo fixes.
2010-09-25 07:46:09 -04:00
Wilson Snyder
cdd06e7236
Support "break", "continue", "return".
2010-02-14 10:01:21 -05:00
Wilson Snyder
b1872a8e21
Internals: Add enum prefixes to reduce MSVC macro conflicts
2010-02-01 20:15:48 -05:00
Wilson Snyder
2da9d46ca6
Internals: Rename AstVar::initp to valuep as it's a constant, not initial value
2010-01-21 18:20:47 -05:00
Wilson Snyder
27e4503dc6
DPI: Constify new $sformatf
2010-01-17 20:06:08 -05:00
Wilson Snyder
0d1de96dbc
Internals: Add AstSFormatF
2010-01-17 15:53:12 -05:00
Wilson Snyder
788f69a8c9
DPI: Support strings in DPI Imports
2010-01-17 15:10:37 -05:00
Wilson Snyder
ab2702070b
Remove extra warning newlines
2010-01-15 20:07:16 -05:00
Wilson Snyder
43e1b27d16
CDC: 'posedge a or posedge b or edge a' should optimize to 'edge a or posedge b'
2010-01-14 14:17:11 -05:00
Wilson Snyder
729dfdfed7
Copyright year update
2010-01-05 21:15:06 -05:00
Wilson Snyder
dbce06500d
Support enums
2009-12-27 08:29:55 -05:00
Wilson Snyder
c7d8eb126f
Support and .
2009-11-23 21:24:55 -05:00
Wilson Snyder
8e6846d9da
Internals: Remove AstVar methods in preference of going via dtype
2009-11-15 08:52:19 -05:00
Wilson Snyder
e0bca07e06
Internals: Create AstNodeModule in prep for packages
2009-11-07 06:20:20 -05:00
Wilson Snyder
700c1f836d
Internals: Move array definitions to AstArrayDType instead of under AstVars.
...
Prep work for more complicated data types.
2009-11-04 22:31:53 -05:00
Wilson Snyder
4c26792c9b
Internals: Create data types and attach to AstVars, in prep for typedefs.
...
Added AstNodeDType and AstBasicDType and associated enums.
2009-11-02 08:06:04 -05:00
Wilson Snyder
f7efae93d5
Internals: Clean up the main flex/bison files to have some sanity.
...
(Hopefully) no functional change.
. V3Parse.h External consumer interface to V3ParseImp
. V3ParseImp Internals to parser, common to across flex & bison
... V3ParseGrammar Wrapper that includes V3ParseBison
..... V3ParseBison Bison output
... V3ParseLex Wrapper that includes lex output
..... V3Lexer.yy.cpp Flex output
2009-10-31 10:08:38 -04:00
Wilson Snyder
39444d83c5
Support little endian bit vectors ("reg [0:2] x;").
2009-10-25 16:53:55 -04:00
Wilson Snyder
dd4059beb8
Internals: Rework V3Param, V3Width and V3Const to return a AstNode* representing
...
any replacement edit they made to the passed in node. Assure all callers use it
and/or comment on non-use. Hopefully no function changed.
2009-10-14 20:13:04 -04:00
Wilson Snyder
03c5d06107
Visitors that just accept netlists should say so. No functional change
2009-10-01 22:33:11 -04:00
Wilson Snyder
b798f4fe71
Detect selection index unknown instead of internal erroring
2009-09-16 20:52:52 -04:00
Wilson Snyder
15b3c9797b
Fix constant functions with and begin/end
2009-07-21 14:31:16 -04:00
Wilson Snyder
aeeaaa53d4
Support constant function calls for parameters.
2009-07-17 14:13:11 -04:00
Wilson Snyder
510fe8e634
Explicitly size all parameters, even if not used for module cells
2009-07-16 14:49:34 -04:00
Wilson Snyder
6835aecdce
On WIDTH warnings, show variable name causing error.
2009-07-09 17:39:24 -04:00
Wilson Snyder
4569278c53
Reconsile parser with Verilog-Perl version, to enable more SV features
2009-05-07 18:28:05 -04:00
Wilson Snyder
7df730cedd
Verilator is now licensed under LGPL v3 and/or Artistic v2.0.
2009-05-04 17:07:57 -04:00
Wilson Snyder
cbb3351d97
Fix GCC 4.3.2 compile warnings.
2009-04-23 09:16:25 -04:00
Wilson Snyder
21b5a4e9e4
Add --debugi-<srcfile> option.
2009-01-21 16:56:50 -05:00