Geza Lore
9dc0cf5a7c
Internals: Use a V3Graph for the hierarchical plan ( #6545 )
...
I stared this because the emitted makefiles for hierarchical verilation
were non-deterministic (iterating unordered_map indexed by pointers).
Then I realized that the V3HierPlan is just a dependency graph encoded
in a slightly idiosyncratic way. We do have a data structure to use for
that instead.
With that the output should always be deterministic + have nicer dumps.
2025-10-09 21:41:23 +02:00
Geza Lore
838b8a2bec
Internals: Remove dead code, fix or sign off coverage
...
Remove/fix/signoff uncontroversial code coverage holes. Also added a
couple TODOs that should be investigated at some point
2025-10-08 08:24:06 +01:00
Geza Lore
e9c48cd1ce
Internals: Optimize temporary memory allocations ( #6517 )
...
This patch gets rid of over 80% of temporary dynamic memory allocations
(when a malloced node is immediately freed with no other malloc in
between). It also gets rid of over 20% of all calls to malloc.
It's worth ~3% average verilation speed up with tcmalloc, and more
without tcmalloc.
2025-10-01 15:01:30 +01:00
Wilson Snyder
5f23bf95f6
Internals: Refactor V3EmitUtil to not be base class. No functional change.
2025-08-25 22:05:40 -04:00
Geza Lore
67da797816
Internals: Cleanup cppcheck warnings ( #6317 )
...
`make cppcheck-4` is now clean.
2025-08-20 18:21:24 +01:00
Geza Lore
9d2adf3e49
Internals: Enable EmitV to output formatted code to std::ostream ( #6239 )
...
Introduce V3OutStream as a V3OutFormatter that writes to a stream
instead of a file. This can be used to emit formatted code fragments
e.g. in debug prints and graph dumps.
2025-07-30 13:41:21 +02:00
Wilson Snyder
2c5e9a785a
Standardize indent of emitted makefile
2025-06-26 17:36:15 -04:00
Wilson Snyder
4c4fdb5dfe
Internals: Refactor some JSON and error code
2025-05-13 22:26:15 -04:00
Wilson Snyder
d22608a49f
Internals: Refactor common V3JsonFile. No functional change.
2025-05-09 22:00:29 -04:00
Wilson Snyder
8fbb725f34
Copyright year update.
2025-01-01 08:30:25 -05:00
Wilson Snyder
34e4cffb62
Add stats on output size
2024-03-24 10:50:53 -04:00
Wilson Snyder
354a534d68
Add '--decorations node' for inserting debug comments into emitted code.
2024-01-24 21:51:47 -05:00
Wilson Snyder
e76f29e5ba
Copyright year update
2024-01-01 03:19:59 -05:00
Chih-Mao Chen
98252634fc
Include systemc instead of systemc.h in model header files ( #4622 ) ( #4623 )
...
This may require that SystemC programs add:
using namespace sc_core;
using namespace sc_dt;
2023-10-26 14:36:18 -04:00
Kamil Rakoczy
798d7346cf
Internals: Add VL_MT_SAFE attribute to functions that requires locking. ( #3805 )
2023-03-17 20:24:15 -04:00
Kamil Rakoczy
bbf53bd5af
Add VL_MT_SAFE attribute to several functions. ( #3729 )
2023-03-16 19:48:56 -04:00
Wilson Snyder
b24d7c83d3
Copyright year update
2023-01-01 10:18:39 -05:00
Wilson Snyder
c0499da28b
Spelling fixes
2022-12-23 11:32:38 -05:00
Wilson Snyder
5f583b0680
Fix clang warning from previous commits.
2022-11-27 06:27:51 -05:00
Wilson Snyder
833780fac1
Internal: cppcheck fixes. No functional change intended.
2022-11-27 05:52:40 -05:00
Wilson Snyder
818347f99b
Internals: Fix some unnecessary member paddings. No functional change intended.
2022-11-13 09:26:46 -05:00
Geza Lore
0c70a0dcbf
Remove redundant 'virtual' keywords from overridden methods
...
'virtual' is redundant when 'override' is present, so keep only
'override'.
Add t/t_dist_cppstyle.pl to check for this.
2022-09-16 15:19:38 +01:00
Wilson Snyder
d85b909054
Internals: Use std:: for mem and str functions.
2022-09-14 21:10:19 -04:00
Wilson Snyder
9d9d647c1f
Fix indentation of --protect import function SV code.
2022-08-29 22:28:02 -04:00
Wilson Snyder
d47a37fb76
Internals: Cleanup constructors etc. No functional change.
2022-08-29 22:17:27 -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
William D. Jones
108c900387
Fix unique_ptr memory header for MinGW64 ( #3493 ).
2022-07-13 06:38:03 -04:00
Mariusz Glebocki
2873dbe154
Optimize file writing by using a memory buffer. ( #3461 )
2022-07-04 10:23:31 -04:00
Kamil Rakoczy
660d1059b0
With --no-decoration, remove output whitespace ( #3460 )
...
Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com>
2022-06-10 07:26:33 -04:00
Wilson Snyder
e931c6230a
Run EmitV test after all stages, and fix resulting fallout
2022-01-09 18:11:24 -05:00
Wilson Snyder
24a0d2a0c9
Internals: Favor member assignment initialization. No functional change intended.
2022-01-01 11:46:49 -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
Wilson Snyder
8ecdc85cf7
Internals: C++11 style cleanups. No functional change.
2021-07-11 18:42:01 -04:00
Geza Lore
60d5f0e86b
Emit model implementation as loose methods. ( #3006 )
...
This patch introduces the concept of 'loose' methods, which semantically
are methods, but are declared as global functions, and are passed an
explicit 'self' pointer. This enables these methods to be declared
outside the class, only when they are needed, therefore removing the
header dependency. The bulk of the emitted model implementation now uses
loose methods.
2021-06-13 14:33:11 +01:00
Geza Lore
f4c1a7efeb
Emit: Fix indent tracking when // inside string literal ( #2990 )
...
// was so far unconditionally treated as comment.
c443e229ee introduced a string literal in
the output that contained a http:// url, which broke the indent
tracking. No functional change intended
2021-05-29 23:46:15 +01:00
Wilson Snyder
3a55600913
Internals: Restyle with C++11 using replacing typedef
2021-03-12 18:10:45 -05:00
Wilson Snyder
be31fdcfe4
Use Google-style-guide header guard naming, to avoid __ prefix.
2021-03-03 21:57:07 -05:00
Wilson Snyder
bd602d0e2d
Copyright year update
2021-01-01 10:29:54 -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
1b0a48ea02
Internals: Use C++11 = default where obvious. No functional change intended.
2020-11-16 19:56:16 -05:00
Wilson Snyder
d75a8624c1
C++11: constexpr replacing defines. No functional change intended.
2020-08-16 14:19:12 -04:00
Wilson Snyder
78aee6f4e7
C++11: Use sized enums (+4% performance).
2020-08-16 12:05:35 -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
033e7ac020
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
6ce878cb0d
Fix some clang-tidy warnings
2020-06-01 23:16:17 -04:00
Wilson Snyder
f3308d236b
clang-format remaining sources. No functional change.
2020-04-15 07:58:34 -04:00
Wilson Snyder
1ce360ed5b
Add SPDX license identifiers. No functional change.
2020-03-21 11:24:24 -04:00
Wilson Snyder
f23fe8fd84
Update copyright year.
2020-01-06 18:05:53 -05:00