Commit Graph

193 Commits

Author SHA1 Message Date
Wilson Snyder d85b909054 Internals: Use std:: for mem and str functions. 2022-09-14 21:10:19 -04:00
Wilson Snyder ea55db7286 Internals: Cleanup some string constructors. No functional change. 2022-08-30 01:02:39 -04:00
Mariusz Glebocki 2b12fe5773
Internals: Construct V3Number with correct type instead of changing it manually. (#3529) 2022-08-08 08:17:02 -04:00
Geza Lore 96a4b3e5a5 Update clang-format config and apply
- Regroup and sort #include directives (like we used to, but automatic)
- Set AlwaysBreakTemplateDeclarations to true
2022-08-05 12:00:24 +01:00
Wilson Snyder 33105f017c Commentary 2022-03-30 20:17:59 -04:00
Wilson Snyder e02f97854c Deprecate 'vluint64_t' and similar types (#3255). 2022-03-27 15:27:40 -04:00
Wilson Snyder f36461e696 Internals: Remove dead code 2022-01-02 18:38:07 -05:00
Wilson Snyder ca42be982c Copyright year update. 2022-01-01 08:26:40 -05:00
Wilson Snyder cd737065f2 Internals: More const. No functional change intended. 2021-11-26 17:55:36 -05:00
Iru Cai 4ed00c563c
Support displaying x and z in $display task (#3107) (#3109) 2021-09-02 08:10:52 -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
Wilson Snyder b8e804f05b Internals: Some clang-tidy cleanups. No functional change intended. 2021-07-25 13:38:27 -04:00
Yutetsu TAKATSUKASA 22e0f3edbe
Introduce small object optimization to V3Number (#3034) 2021-06-30 21:20:56 +09:00
Wilson Snyder 512fe0a2d1 Internals: Add const. No functional change. 2021-06-20 18:33:13 -04:00
Geza Lore 24b3816f5e Improve distribution of V3Hash/V3Hasher
- Better combining, without multiplication, which means a 0 hash value
is now allowed.
- Do not OR in bottom bits (this was used to avoid a 0 hash but had the
side effect of hashing 0 and 1 to the same value, which are actually
common inputs.
- Hash whole content of V3Number. This does not seem to be noticeable in
runtime, but quite often the bottom word can be a special value like
zero while the rest of the content varies.
2021-06-09 21:17:02 +01:00
Geza Lore 8814111724
Rework Ast hashing to be stable (#2974)
Rework Ast hashing to be stable

Eliminated reliance on pointer values in AstNode hashes in order to make
them stable. This requires moving the sameHash functions into a visitor,
as nodes pointed to via members (and not child nodes) need to be hashed
themselves.

The hashes are now stable (as far as I could test them), and the impact
on verilation time is small enough not to be reliably measurable.
2021-05-21 14:34:27 +01:00
Geza Lore f6c0108c86
Optimize large lookup tables to static data (#2926)
Implements #2925
2021-05-08 20:04:56 +01:00
Geza Lore 008b8d5b56 Speed up sparse V3Number multiplication 2021-05-02 12:34:12 +01:00
Wilson Snyder 47dcbd4b8a Internal: Remove deprecated/insecure functions. No functional change intended. 2021-03-06 10:34:03 -05:00
Wilson Snyder 9650aefa42 Internals: Cleanup unneeded {}. No functional change 2021-02-21 21:25:21 -05: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 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 8e06b1e925 Misc internal coverage cleanups 2020-12-07 23:15:29 -05:00
Wilson Snyder 9bd5cd4ef3 Internals: Track null separately from '0 2020-12-05 16:49:10 -05:00
Wilson Snyder d77beecc6e Fix $countbits(..., 'z) 2020-11-27 21:34:40 -05:00
Wilson Snyder abfee1270f Improve internal code coverage 2020-11-18 22:21:48 -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 66d1754d19 Fix constant x propagation of xor. 2020-09-18 17:47:22 -04:00
Wilson Snyder 45eccaecaf Fix Travis/GCC warnings. 2020-08-27 18:48:26 -04:00
Wilson Snyder 6013b54f7b clang-tidy cleanups. No functional change intended. 2020-08-16 14:55:46 -04:00
Wilson Snyder d75a8624c1 C++11: constexpr replacing defines. No functional change intended. 2020-08-16 14:19:12 -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 c0127599df C++11: Use nullptr. No functional change. 2020-08-16 11:44:05 -04:00
Wilson Snyder 98cd925fda Fix non-32 bit conversion to float (#2495). 2020-08-06 21:56:43 -04:00
Wilson Snyder 6ce878cb0d Fix some clang-tidy warnings 2020-06-01 23:16:17 -04:00
Geza Lore 95534fa5c5
Remove unused headers (#2389) 2020-05-31 20:21:07 +01:00
Geza Lore 9712ceedd7 Internals: Remove empty statements. No functional change intended.
Remove stray semicolons, mostly by capturing them in macros accurately.
This removes a ton on lint warnings from CLion.
2020-05-30 19:13:18 +01:00
Wilson Snyder fbc814b54a Internal code coverage fixes 2020-05-29 19:35:54 -04:00
Wilson Snyder 5089ac6119 Remove VL_ULL as ULL now in MSVC & C++11 2020-05-28 20:32:07 -04:00
Maarten De Braekeleer e8f27be200 Fix Visual Studio compiler issues (#2375)
* Make sure compiler creates same object file as target of rule
* MSVC requires a string return
* Case ranges are a gnu extension which MSVC does not understand
* _dupenv_s also returns 0 if the var could not be found
See https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/dupenv-s-wdupenv-s?view=vs-2019
2020-05-28 17:39:20 -04:00
Wilson Snyder 6a882f9dc6 Internal code coverage improvements. No functional change intended. 2020-05-23 10:34:58 -04:00
Wilson Snyder 6fd7f45cef Internals: Remove dead needHInlines code 2020-05-16 07:53:27 -04:00
Wilson Snyder f005b7fd87 Support scan %* format 2020-05-11 22:13:59 -04:00
Wilson Snyder 897b9ccfe2 Fix display of huge double. 2020-05-10 16:03:46 -04:00
Yossi Nivin f9a0cf0cff
Support $countbits (#2287) 2020-05-10 14:27:22 -04:00
Wilson Snyder 5f7ae1fbce wip 2020-05-07 21:04:26 -04:00
Wilson Snyder 7d7e67b49b Show Verilog reference on V3Number asserts. 2020-05-04 19:57:21 -04:00
Wilson Snyder c6d1a9858a Use clang-format 10.0.0 2020-04-28 18:47:59 -04:00
Wilson Snyder f3308d236b clang-format remaining sources. No functional change. 2020-04-15 07:58:34 -04:00