Commit Graph

290 Commits

Author SHA1 Message Date
Wilson Snyder 5c0ad5bd1f
Internals: cppcheck fixes. No functional change. (#6687) 2025-11-12 18:54:22 -05:00
Geza Lore cb5f038060
Internals: Optimzie unlinking rest of list after head (tail) (#6643)
AstNode::unlinkFrBackWithNext is O(n) if the subject node is not the
head of the list. We sometimes want to unlink the rest of the list
starting at the node after the head (e.g.: in
V3Sched::util::splitCheck), this patch makes that O(1) as well.
2025-11-05 15:55:30 +00:00
Geza Lore c471323601 Internals: Remove unused AstNode::swapWith 2025-10-21 12:41:50 +01:00
Geza Lore aaa49273cf Internals: Fix coverage exclusion markers 2025-10-01 21:22:16 +01:00
Wilson Snyder 3b623dc12e Internals: Refactor to create VCMethod (#3715). No functional change intended. 2025-09-27 08:22:17 -04:00
Geza Lore 800af37975
Internals: Refactor generate construct Ast handling (#6280) (#6470)
Internals: Refactor generate construct Ast handling (#6280)

We introduce AstNodeGen, the common base class of AstGenBlock,
AstGenCase, AstGenFor, and AstGenIf, which together represent all SV
generate constructs. Subsequently remove AstNodeFor, AstNodeCase
(AstCase is now directly derived from AstNodeStmt) and adjust internals
to work on the new representation.

Output is identical modulo hashes do to changed AstNode type ids, no
functional change intended.

Step towards #6280.
2025-09-23 19:49:01 +01:00
Geza Lore e0e8503151
Internals: Make all AstBegin constructor arguments explicit (#6464) 2025-09-20 13:16:03 -04:00
Geza Lore 5161cea8cd
Internals: Improve astgen type enums to be switch statement friendly (#6362)
- Remove _ENUM_END, so -Wswitch does not demand it's covered. Use the
  new NUM_TYPES constexpr member instead.
- Remove 'at' prefix. This seems historical and is not particularly  useful.
- Fix some cppcheck warts while at it
2025-09-03 13:56:11 +01:00
Wilson Snyder ac2859bf24
Internals: Upgrade to clang-format-18 (#6333) 2025-08-25 20:47:48 -04:00
Igor Zaworski b95a974ff1
Support generic interfaces (#6272) 2025-08-22 06:44:35 -04:00
Wilson Snyder 997d5ecdf1 Internals: Cleanup cppcheck c casts. No functional change intended. 2025-08-21 20:06:43 -04:00
Geza Lore 327d55d13d
Internals: Fix remaining cppcheck errors (#6319)
Fixed the non const-related issue and added suppressions for the const
ones. With that `make cppcheck` should be clean.
2025-08-21 09:43:37 +01:00
Geza Lore a0edd4e907
Internals: Improve cppcheck flow and fix up issues (#6311)
Added cppcheck-suppressions.txt in the repo root. You can add new
patterns in there instead of having to parse the XML output.

Also configure to add the -D__GNUC__ preprocessor macro, which makes it
understand UASSERT (it understands the 'noreturn' function attribute).

Added some case by case specific suppressions and fixed up other code,
especially in V3Ast*h and V3Dfg*.h, including code generated by astgen
that had some no-ops that irks cppcheck.

One thing it does not seem to like is `const` class members with default
initializers in the class. It will assume that's always the value, even
if overridden in the constructor. We had few so removed them.

With that a lot of files in `src/` are now clean or only have a handful
of issues. Therefore, I have also deleted cppcheck_filtered, and made it
produce human readable output straight to the terminal.

Regarding cleaning up the reported nits, I kind of got bored after
V3[A-E] so pausing here. Apologies for the merge conflicts.

Tested with cppcheck 2.13.0
2025-08-19 22:02:10 +01:00
Paul Swirhun bd2cb989d1 Support bit queue streaming (#5830) (#6103). 2025-07-27 15:29:56 -04:00
Wilson Snyder 470f99694e Revert d8dbb08a: Support bit queue streaming (#5830) (#6103) 2025-07-26 17:59:52 -04:00
Wilson Snyder f3560837ec Add error on missing forward declarations (#6207). 2025-07-26 17:11:35 -04:00
Paul Swirhun d8dbb08a95
Support bit queue streaming (#5830) (#6103) 2025-07-26 16:53:51 -04:00
Wilson Snyder 916a89761e Add `--work` library-selection option (#5891 partial). 2025-06-29 20:17:27 -04:00
Todd Strader 5fcd0e52e7
Fix casting to arrays of enums (#6044) 2025-05-27 21:14:09 -04:00
Wilson Snyder 46c7b69c64 Internals: UINFO now includes newline itself. No functional change. 2025-05-22 20:29:32 -04:00
Wilson Snyder 66667b6172
Support SARIF JSON diagnostic output with `--diagnostics-sarif`. (#6017) 2025-05-17 15:46:15 -04:00
Wilson Snyder 4c4fdb5dfe Internals: Refactor some JSON and error code 2025-05-13 22:26:15 -04:00
Wilson Snyder a3662cc3f5 Internals: Refactor to create replaceWithKeepDType. No functional change. 2025-05-05 06:31:06 -04:00
Wilson Snyder 27ad648c16 Commentary: Indicate V3Number width() criticality. 2025-05-04 16:24:36 -04:00
Wilson Snyder e7adae6f81 Internals: Cleanup some vlSelf code. No functional change intended. 2025-04-26 09:51:02 -04:00
Wilson Snyder 7521c2c644 Standardize some error messages. 2025-03-23 19:51:54 -04:00
Wilson Snyder c508fd5d24 Internals: Remove single-statement braces. No functional change. 2025-03-19 22:55:11 -04:00
Todd Strader f7ccc013e7
Improve V3EmitV for interfaces (#5796) 2025-02-21 16:49:14 -05:00
Wilson Snyder 44f49669a3 Support side effects of form `variable[index_function()]++`. 2025-01-08 19:37:20 -05:00
Wilson Snyder 8fbb725f34 Copyright year update. 2025-01-01 08:30:25 -05:00
Todd Strader 74d5d008bb
Fix VPI + SYMRSVDWORD intersection (#5686) 2024-12-19 15:15:28 -05:00
Wilson Snyder d750ffc129 Internals: Fix debug dump of deleted nodes. 2024-11-29 08:51:32 -05:00
Wilson Snyder 8db9db7e25 Internals: Rename same() function. No functional change. 2024-11-28 15:01:58 -05:00
Wilson Snyder 4d95f6f7b8 Add `--waiver-multiline` for context-sensitive `--waiver-output`. 2024-11-11 20:00:26 -05:00
Wilson Snyder 0419ed0430 Fix initializing static array in dynamic arrays and queues (#5287). 2024-07-24 06:06:57 -04:00
Wilson Snyder 607c19a67d Fix isPure to be superset of isOutputter.
This may cause some additional SIDEEFFECT warnings that previously were not shown.
2024-06-16 21:43:30 -04:00
Szymon Gizler 8301fdc6d3
Add JSON AST dumps (#5020) 2024-03-28 07:32:18 -04:00
Wilson Snyder 0262819c20 Fix object assignment from conditionals (#4968). 2024-03-16 09:12:18 -04:00
Wilson Snyder 5f8c06c805 Internals: Add AstNode::isNull(). No functional change. 2024-03-16 09:12:18 -04:00
Yutetsu TAKATSUKASA da9521a351
Internals: Add --debug-width option for developers to check width consistency (#4923) 2024-03-02 08:57:26 -05:00
Szymon Gizler d667b73e8d Add --json-only and related JSON dumping (#4715) (#4831). 2024-02-09 17:50:09 -05:00
Wilson Snyder 89cfa0737f Internals: Fix cppcheck warnings 2024-01-17 19:48:07 -05:00
Wilson Snyder e76f29e5ba Copyright year update 2024-01-01 03:19:59 -05:00
Wilson Snyder 58d9a5ebac Use newline instead of endl, for fewer stream flushes 2023-11-24 11:45:52 -05:00
Wilson Snyder 1986e62477 Internals: Remove unused append dumpTreeFile option 2023-11-21 22:32:13 -05:00
Wilson Snyder 99dbd23f1b
Support passing constraints to --xml-only output (still otherwise unsupported) (#4683) 2023-11-11 20:20:37 -05:00
Anthony Donlon 2733d43ea7
Fix identifiers that end with '_' on Windows (#4655) 2023-11-02 17:53:52 -04:00
Geza Lore 3c144ada53
Delete AstNode user5 (#4638)
This saves about 5% memory. V3AstUserAllocator is appropriate for most use
cases, performance is marginally up as we are mostly D-cache bound on
large designs.
2023-10-29 01:12:27 +01:00
Wilson Snyder b5828a7ce9 Fix header order botched by clang-format in recent commit. 2023-10-18 06:37:46 -04:00
github action 770cd24f27 Apply 'make format' 2023-10-18 02:50:27 +00:00