Commit Graph

226 Commits

Author SHA1 Message Date
Geza Lore 1de33b9fb7 Support localparams in tasks/functions 2021-07-23 20:34:49 +01:00
Geza Lore 4ab4c0c8ba Emit parameter values as 'static constexpr' instead of enum
All parameters that are required in the output are now emitted as
'static constexpr, except for string or array of strings parameters,
which  are still emitted as 'static const' (required as std::string is
not a literal type, so cannot be constexpr).  This simplifies handling
of parameters and supports 'real' parameters.
2021-07-23 17:20:26 +01:00
Wilson Snyder 8ecdc85cf7 Internals: C++11 style cleanups. No functional change. 2021-07-11 18:42:01 -04:00
Geza Lore af27702188 Fix type parameter resolution with hash collision.
We incorrectly treated two different struct types the same when passed
as an actual parameter to a `parameter type` parameter in an instance,
if the actual parameter expression both hash to the same value and the
structs have the same struct name. This is now corrected.

Fixes #3055.
2021-07-01 16:52:29 +01:00
Wilson Snyder 512fe0a2d1 Internals: Add const. No functional change. 2021-06-20 18:33:13 -04:00
Geza Lore fd35492226
Split V3Hashed to V3Hasher and V3DupFinder (#2967)
V3Hasher is responsible for computing AstNode hashes, while V3DupFinder
can be used to find duplicate trees based on hashes. Interface of
V3DupFinder simplified somewhat. No functional change intended at this
point, but hash computation might differ in minor details, this however
should have no perceivable effect on output/runtime.

Implements (#2964)
2021-05-21 01:41:46 +01:00
Wilson Snyder 5b4448de23 Internals: Add some std::'s. No functional change intended. 2021-03-26 23:22:52 -04:00
Wilson Snyder 689d5b5090 Internals: Add std:: to make_pair. No functional change. 2021-03-12 18:17:49 -05:00
Wilson Snyder 3a55600913 Internals: Restyle with C++11 using replacing typedef 2021-03-12 18:10:45 -05:00
Wilson Snyder 404b323f8c Internals: Remove some unnecessary typedefs. No functional change. 2021-03-12 17:26:53 -05:00
Yutetsu TAKATSUKASA 5b280c1911
Fix hierarchical verilation with explicit setting of default parameter value (#2738)
* Test hierarchical block that is explicitly set its default parameter value.

* Fix hierarchical verilation when a hierarchical block is instantiated with explicit setting of the default value.

Parameterized hierarchical block must have mangled name even when all parameters have default value,
otherwise the parameterized module will be hidden by protect-lib wrapper.

* rename variable names. No functional change is intended.
2021-01-03 12:19:37 +09:00
Wilson Snyder 83d978c2cd Fix generate for unrolling to be signed (#2730). 2021-01-02 21:43:13 -05:00
Yutetsu TAKATSUKASA c0a6858c42
Refactor V3Param (#2736)
* Use unique_ptr to manage lifetime. Slightly changed variable name. No functional change is intended.

* Let ParameterizedHierBlocks::areSame() public. No functional change is intended.
2021-01-03 07:21:45 +09:00
Wilson Snyder bd602d0e2d Copyright year update 2021-01-01 10:29:54 -05:00
Wilson Snyder b7a533109d Fix cppcheck warnings. No functional change intended. 2020-12-23 15:22:02 -05:00
Wilson Snyder c39a8b439a Internals: Use emplace instead of insert(make_pair(...)). No functional change intended. 2020-12-18 18:24:47 -05:00
Wilson Snyder 81ce2cbc05 Internals: Params cleanups in prep for dedot. 2020-12-12 15:48:10 -05:00
Wilson Snyder 570631380b Internal: Misc cleanups. No functional change intended. 2020-12-06 13:49:44 -05:00
Wilson Snyder f0e691a1b8 Handle unsupported parameters through link phase 2020-12-05 11:30:14 -05:00
Wilson Snyder e14319b401 Internals: Refactor V3Param through code movement only. No functional change intended. 2020-11-28 12:04:29 -05:00
Wilson Snyder 963fd0664d Fix class-in-module issues 2020-11-27 09:42:51 -05:00
Wilson Snyder 4643d6e883 Internals: Refactor V3Param through code movement only. No functional change intended. 2020-11-27 09:17:44 -05:00
Wilson Snyder d89fc05da1 Internals: Refactor V3Param through code movement only. No functional change intended. 2020-11-27 09:04:56 -05:00
Wilson Snyder 84d7380588 Internals: Param immediate delete, in prep for next commit. No functional change intended. 2020-11-27 08:50:29 -05:00
Wilson Snyder 04febb1944 Internals: Move V3Param code. No functional change. 2020-11-26 15:03:55 -05:00
Wilson Snyder f2d8e45d72 For performance, use unordered_set/map where possible. No functional change intended. 2020-11-25 20:57:30 -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 fa77141519 Fix unpacked array parameters near functions (#2639). 2020-11-18 20:12:14 -05:00
Wilson Snyder b3760911e7 Internals: Param minor cleanups. No functional change intended. 2020-11-18 19:50:47 -05:00
Wilson Snyder 2f718b9ea0 Show IEEE reference in array port message, plus internal cleanups. 2020-11-17 21:10:50 -05:00
Wilson Snyder 1e7c61b23e Internals: Refactor huge func in V3Param. No functional change intended. 2020-11-16 22:35:51 -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 79d33bf1ee Use C++11 for loops, from clang-migrate. No functional change intended 2020-11-10 22:10:38 -05:00
Wilson Snyder 51b0963e61 Internals: Favor const for map keys. No functional change intended. 2020-10-30 18:00:40 -04:00
Wilson Snyder 5c070558ae Internals: Misc cleanups in prep for interface bugfix. No functional change intended. 2020-10-29 21:27:19 -04:00
Wilson Snyder 1899a875a4 Internals: Create VAccess class. No functional change intended. 2020-09-07 17:09:25 -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 9927e8b3ee clang-format uses C++11 style. No functional change. 2020-08-15 09:48:08 -04:00
Yutetsu TAKATSUKASA 953a442827
Support hierarchical verilation using protect lib (#2206) 2020-08-15 09:43:53 -04:00
Wilson Snyder a52f975bd7 Fix combining different-width parameters (#2484). 2020-07-26 17:54:23 -04:00
Wilson Snyder 1488f9130d Enable simple function localparams (#2461) 2020-07-15 19:31:19 -04:00
Wilson Snyder d42f9c095b Delay parsing of associative arrays until dtypes known. 2020-06-09 07:13:40 -04:00
Wilson Snyder 3963a50aef Internals: Refactor param array handling to use subroutine. No functional change intended. 2020-06-08 07:43:07 -04:00
Geza Lore 95534fa5c5
Remove unused headers (#2389) 2020-05-31 20:21:07 +01:00
Wilson Snyder 6a882f9dc6 Internal code coverage improvements. No functional change intended. 2020-05-23 10:34:58 -04:00
Wilson Snyder 4773a1e77c Misc internal coverage improvements. 2020-05-17 11:06:14 -04:00
Wilson Snyder 72bd91c7f1 Support $isunbounded and parameter $. (#2104) 2020-05-07 21:12:58 -04:00
Wilson Snyder f3308d236b clang-format remaining sources. No functional change. 2020-04-15 07:58:34 -04:00
Wilson Snyder 50535a1894 Internals: cppcheck 1.90 fixes. No functional change intended. 2020-04-05 18:57:47 -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 1ce360ed5b Add SPDX license identifiers. No functional change. 2020-03-21 11:24:24 -04:00
Wilson Snyder 5b83484f20 Remove dead genblk code & some cleanups. 2020-02-25 18:57:51 -05:00
Todd Strader 77f1b3eef4 Support parameter access from arrays of interfaces, #2155. 2020-02-06 19:19:23 -05: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 623c4ec103 Internals: Create VL_DO_DANGLING. No functional change intended. 2020-01-16 20:17:11 -05:00
Wilson Snyder f23fe8fd84 Update copyright year. 2020-01-06 18:05:53 -05:00
Wilson Snyder 5811ec07e6 Update URLs to https://verilator.org 2019-11-07 22:33:59 -05:00
Wilson Snyder 9f977ed419 Codacy/Cppcheck cleanups and badge. 2019-10-24 21:48:45 -04:00
Wilson Snyder 9bf6135f6d Remove some output tabs. 2019-10-05 17:35:08 -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
Todd Strader 4a14788c9b When showing an error, show the instance location 2019-07-26 12:52:38 -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 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
Todd Strader 6f2f668449 Fix dotted references to type parameter sizes, bug1458.
Signed-off-by: Wilson Snyder <wsnyder@wsnyder.org>
2019-06-11 19:00:24 -04:00
Wilson Snyder c0be8bcefb Internals: Remove some pointless V3Number temporaries. No functional change intended. 2019-05-29 23:18:47 -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
Wilson Snyder 59d7d9e8c3 Fix real parameter assignment, bug1427. 2019-05-17 20:50:57 -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 08d041cb93 Add error when use parameters without value, bug1424. 2019-04-30 19:16:41 -04:00
Wilson Snyder aaf5b7c2c0 Fix uninitialized data in unroller, bug1386. [Al Grant] 2019-01-06 16:56:56 -05:00
Wilson Snyder 8a4aeddbb0 Copyright year update. 2019-01-03 19:17:22 -05:00
Wilson Snyder 304a24d03a Internals: Fix many clang-tidy issues. No functional change intended. 2018-10-14 18:39:33 -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 e4d638c73d Internals: Cleanup string casts. No functional change. 2018-10-13 22:02:39 -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 4c7a397dc4 Merge from master 2018-06-16 18:05:26 -04:00
Wilson Snyder 047a08c999 Internals: Clean some UASSERTs. No functional change. 2018-06-16 18:00:21 -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 2f7002c5ec Merge from master 2018-04-10 22:11:49 -04:00
Todd Strader 9219ddaece Report interface ports connected to wrong interface, bug1294. 2018-04-04 21:03:43 -04:00
Wilson Snyder 2c30aecc5b Merge from master 2018-03-10 16:51:34 -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 a579e9273b Support self-recursive modules, bug659. 2017-11-18 17:42:35 -05:00
Wilson Snyder 21369bec95 Internals: Renames in prep for recursion. No functional change. 2017-11-18 17:40:10 -05:00
Wilson Snyder 0bdc57a14a Fix lost .tree debug file extensions in recent commit. 2017-10-01 22:17:37 -04:00
Wilson Snyder 63361fc56e Add performance information to --stats file. 2017-09-17 22:52:57 -04:00