Ryszard Rozak
353a4b7b4a
Fix parameters referencing interface fields ( #1593 ) ( #5910 )
2025-04-02 09:43:12 -04:00
Wilson Snyder
5e69faff46
Fix clang 20 warnings
2025-03-27 19:01:25 -04:00
Wilson Snyder
c508fd5d24
Internals: Remove single-statement braces. No functional change.
2025-03-19 22:55:11 -04:00
Wilson Snyder
39bdd427d6
Fix unresolved typedefs as parameters ( #5850 ).
2025-03-19 18:02:56 -04:00
Wilson Snyder
45add07205
Internals: Minor V3Param cleanups. No functional change.
2025-03-12 07:58:26 -04:00
Wilson Snyder
8157f21c3e
Internals: Refactor hasGParam. No functional change intended.
2025-03-09 16:10:38 -04:00
Wilson Snyder
432d5f851d
Internals: Cleanup some misnamed nodep's. No functional change.
2025-01-24 20:52:31 -05:00
Wilson Snyder
8fbb725f34
Copyright year update.
2025-01-01 08:30:25 -05:00
Todd Strader
41a038b79b
Fix interface bracketed array parameter access ( #5678 ) ( #5677 )
2024-12-13 12:00:49 -05:00
Wilson Snyder
f631587a20
Internals: Rename classOrPackageSkip as kept confusing with member accessor. No functional change.
2024-11-29 16:57:18 -05:00
Wilson Snyder
93090c56ee
Fix mis-aliasing of instances with mailbox parameter types ( #5632 partial).
2024-11-29 09:20:02 -05:00
Wilson Snyder
7efa0fc82a
Internals: Rewrite skipRefp to avoid recursion and fix const-ness. No functional change intended.
2024-11-29 08:10:51 -05:00
Wilson Snyder
d165671225
Improve error when no parameter type value ( #5645 partial)
2024-11-28 14:09:06 -05:00
Han Qi
bf2b4e1b6a
Fix equivalence checking when replacing type parameters ( #5213 ) ( #5255 )
2024-10-03 21:19:07 +01:00
Todd Strader
1665d15d4d
Fix user-type parameter overlap ( #5469 )
2024-09-20 14:29:31 -04:00
Wilson Snyder
f0fb0b05ff
Internals: Misc V3Param cleanups.
2024-09-20 08:59:10 -04:00
Wilson Snyder
f0cd6dd95c
Fix REALCVT warning on integral timescale conversions ( #5378 ).
2024-08-24 08:01:28 -04:00
Bartłomiej Chmiel
a730daabef
Support 'parameter type' in hierarchical blocks ( #5309 ) ( #5333 )
2024-08-21 05:30:59 -04:00
Wilson Snyder
0ff77fc352
Internals: Remove extra single-line {}. No functional change.
2024-03-27 17:57:49 -04:00
Wilson Snyder
3786f59e03
Change to IEEE 1800-2023 warning mentions
2024-03-02 10:15:19 -05:00
Wilson Snyder
22687a6901
Internals: Use C++14 quoted literal std::string
2024-01-28 21:00:20 -05:00
Wilson Snyder
3a5248a919
Internals: Mark structs final/VL_NOT_FINAL. No functional change intended.
2024-01-20 15:06:46 -05:00
Andrew Nolte
ab47fc6656
Fix localparam elaboration ( #3858 ) ( #4794 )
2024-01-11 07:49:07 -05:00
Szymon Gizler
5f52c066e5
Internals: Add serializeOnly() and dumpTreeEitherLevel() ( #4815 ) ( #4715 ). No functional change intended.
2024-01-09 10:35:13 -05:00
Wilson Snyder
e76f29e5ba
Copyright year update
2024-01-01 03:19:59 -05:00
Ryszard Rozak
b60117c713
Fix typedefs pointing to parameterized classes ( #4747 )
...
* Skip handling of ClassOrPackageRef nodes that point to Typedefs
2023-12-08 07:13:38 -05:00
Ryszard Rozak
eb2cfe1d19
Support parameterized virtual interaces ( #4047 ) ( #4743 )
2023-12-06 08:02:04 -05:00
Anthony Donlon
88fcbf5f1d
Fix interface parameters used in loop generate constructs ( #4664 ) ( #4665 )
2023-11-04 13:19:35 -04:00
Anthony Donlon
d0d39c13e7
Fix linking parameterized hierarchical blocks and recursive hierarchical blocks ( #4654 )
2023-11-03 07:55:53 -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
Geza Lore
d60f180f43
Avoid double traversal of maps
...
The typical find/if-not-exists-insert pattern can be achieved with 1
lookup instead of 2 using emplace with a sentinel value. Also maps value
initialize their values when inserted with the [] operator, this is
defined and so there is no need to explicitly insert zeroes for integer
values.
2023-10-28 13:41:43 +01:00
Geza Lore
30318a6654
C++11 cleanup
2023-10-28 11:26:48 +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
Wilson Snyder
431bb1ed16
Support compiling Verilator with gcc/clang precompiled headers ( #4579 )
2023-10-17 22:49:28 -04:00
Ryszard Rozak
e99fd2892b
Make VNDeleter a member of VNVisitor. No function change. ( #4573 )
2023-10-17 09:26:53 +02:00
Anthony Donlon
4427f03b08
Fix error message for invalid parameter overrides ( #4559 )
2023-10-15 12:59:36 -04:00
Mariusz Glebocki
28bd7e5b19
Rework multithreading handling to separate by code units that use/never use it. ( #4228 )
2023-09-24 22:12:23 -04:00
Anthony Donlon
63db60f646
Fix using type in parameterized classes without #() ( #4281 ) ( #4440 )
...
* Check whether a class is parameterized or not with AstClass::isParameterized method
* Fix usage conflict of user2 pointer in V3Param.cpp
2023-08-26 12:06:26 -01:00
Ryszard Rozak
51266898ec
Fix comparison of string parameters ( #4308 )
2023-06-27 10:40:45 +02:00
Ryszard Rozak
9ee5fd0585
Fix handling of ref types in initial values of type parameters ( #4304 )
2023-06-20 14:10:07 -04:00
Ryszard Rozak
4f7e155e59
Fix class parameters of enum types ( #4219 )
2023-05-24 15:51:03 +02:00
Ryszard Rozak
0198a3fc52
Use unchanged copy of parameterized class for instantation ( #4179 )
2023-05-11 09:56:15 +02:00
Ryszard Rozak
5aecfa98a1
Internals: Add param value string to hash in V3Param.cpp ( #4186 )
2023-05-10 17:52:17 -04:00
Wilson Snyder
add68130b8
Internals: Rename to dumpLevel(), to avoid confusion with make-a-dump()
2023-05-03 18:04:10 -04:00
Ryszard Rozak
09e856d2f3
Fix deleting unused parameterized classes ( #4150 )
2023-04-28 07:20:25 -04:00
Ryszard Rozak
84a46939b3
Fix class extend param references ( #4136 )
...
Signed-off-by: Ryszard Rozak <rrozak@antmicro.com>
2023-04-20 07:11:35 -04:00
Ryszard Rozak
d1b80ffa29
Support parameterized return types of methods ( #4122 )
2023-04-14 08:52:43 -04:00
Ryszard Rozak
f95ce886f1
Fix duplicating parameter class types ( #4115 )
2023-04-14 06:51:33 -04:00
Wilson Snyder
a8ce272e4a
Commentary: spelling
2023-03-14 08:39:54 -04:00
Ryszard Rozak
45f955f175
Fix self references to parameterized classes ( #3962 )
2023-02-17 11:17:35 -05:00
Wilson Snyder
f8b0e359b9
Support class parameters without initial values.
2023-02-13 22:06:52 -05:00
Wilson Snyder
10d0088f73
Fix generate case with empty body statements.
2023-02-12 18:14:18 -05:00
Ryszard Rozak
0e955d503e
Handle references of static members of type aliases of a parametrized class ( #3922 )
...
Signed-off-by: Ryszard Rozak <rrozak@antmicro.com>
2023-02-02 08:36:11 +01:00
github action
41e5f6b7d5
Apply 'make format'
2023-01-19 23:22:37 +00:00
James Shi
c1c0aa61f9
Fix signed/unsigned parameter types ( #3866 )
2023-01-19 18:00:32 -05:00
Wilson Snyder
b24d7c83d3
Copyright year update
2023-01-01 10:18:39 -05:00
Ryszard Rozak
bf4a844f2b
Fix self references when param class instantiated ( #3833 )
2022-12-30 06:05:01 -05:00
github action
f6b101d98b
Apply 'make format'
2022-12-26 09:31:25 +00:00
Larry Doolittle
80a144797d
Commentary: Fix more spelling ( #3828 )
2022-12-26 10:30:41 +01:00
Wilson Snyder
c0499da28b
Spelling fixes
2022-12-23 11:32:38 -05:00
Larry Doolittle
f27cf4c804
Commentary: Fix spelling in C++ comments ( #3797 ) ( #3798 )
2022-12-02 18:46:38 -05:00
Wilson Snyder
f0a7abcef8
Internals: Use named accessors instead of op1p etc. No functional change intended.
2022-11-29 18:17:50 -05:00
Wilson Snyder
2c7f1ef40f
Internals: Cleanup debug dumps so can grep-out leading-dashed lines
2022-11-27 08:31:22 -05:00
Wilson Snyder
833780fac1
Internal: cppcheck fixes. No functional change intended.
2022-11-27 05:52:40 -05:00
Wilson Snyder
352d0b4582
Internals: Fix constructor style.
2022-11-20 13:11:01 -05:00
Arkadiusz Kozdra
627a144b83
Support access to constructs inside type parameters ( #3702 )
...
This changeset brings support for accesses like:
class Cls#(type TYPE1);
TYPE1::some_method();
endclass
It is done by delaying dot resolution on type parameters until they get
resolved by V3Param, and doing a more thorough reference skip.
2022-10-21 09:00:40 -04:00
Krzysztof Bieganski
22243d1e49
Support class type params without defaults ( #3693 )
2022-10-19 21:59:26 -04:00
Wilson Snyder
10fc1f757c
Internals: cppcheck cleanups. No functional change intended.
2022-10-02 23:04:55 -04:00
Geza Lore
78e659a142
Reduce size of FileLine
...
Multiple tricks to reduce the size of class FileLine from 72 to 40
bytes:
- Reduce file name index from 32 to 16 bits. This still allows 64K
unique input files, which is hopefully enough.
- Intern message/warning enable bitset and use a 16-bit index, again
allowing 64K unique sets which is hopefully enough.
- Put the m_waive flag into the sign bit of one of the line numbers.
- Use explicit reference counting to avoid overhead of shared_ptr.
Added assertions to ensure interned data fits within it's index space.
This saves ~5-10% peak memory consumption at no measurable run-time cost
on various designs.
2022-09-24 20:16:21 +01:00
Geza Lore
63c694f65f
Streamline dump control options
...
- Rename `--dump-treei` option to `--dumpi-tree`, which itself is now a
special case of `--dumpi-<tag>` where tag can be a magic word, or a
filename
- Control dumping via static `dump*()` functions, analogous to `debug()`
- Make dumping independent of the value of `debug()` (so dumping always
works even without the debug flag)
- Add separate `--dumpi-graph` for dumping V3Graphs, which is again a
special case of `--dumpi-<tag>`
- Alias `--dump-<tag>` to `--dumpi-<tag> 3` as before
2022-09-22 17:24:41 +01:00
Geza Lore
ce03293128
Generate AstNode accessors via astgen
...
Introduce the @astgen directives parsed by astgen, currently used for
the generation child node (operand) accessors. Please see the updated
internal documentation for details.
2022-09-21 13:56:03 +01: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
ea55db7286
Internals: Cleanup some string constructors. No functional change.
2022-08-30 01:02:39 -04:00
Wilson Snyder
6a5f77b278
Internals: Cleanup some string/model constructors. No functional change.
2022-08-29 23:50:32 -04:00
Arkadiusz Kozdra
0a3a15a66e
Support class parameters ( #2231 ) ( #3541 )
2022-08-28 10:24:55 -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
b9d7819faa
Internals: Fix some cppcheck issues. Some dump functions fixed.
2022-07-30 10:01:39 -04:00
Geza Lore
0b74e9b354
Ensure topological ordering of module list.
...
At the end of V3Param, fix up the module list to be topologically
sorted. We need to do this at the end as a later instantiation of a
recursive module might instantiate an earlier specialization, which we
cannot know until we processed everything. The rest of the compiler
depends on the module list being topologically sorted.
Fixes #3393
2022-04-23 13:25:27 +01:00
Geza Lore
8189416d0c
Partial cleanup of V3Param. No functional change.
2022-04-23 13:03:52 +01:00
Geza Lore
5f0e1fae7f
Simplify and clarify reporting of enclosing instance
...
Rename AstNodeModule::hierName -> someInstanceName and explain that this
is only used for user messages.
Rename AstNode::locationStr -> instanceStr and simplify implementation.
In particular, do not report an instance if we can't find a reasonable
guess.
2022-04-22 23:38:23 +01:00
github action
b7f2bb0e80
Apply 'make format'
2022-04-12 10:54:48 +00:00
HungMingWu
08e0a397d3
Fix debugi-V3Param null pointer fault ( #3380 ) ( #3381 )
...
Signed-off-by: HungMingWu <u9089000@gmail.com>
2022-04-12 06:53:52 -04:00
Wilson Snyder
3f7bf3d2dc
Fix MSVC localtime_s ( #3124 ).
2022-03-27 13:59:18 -04:00
Geza Lore
3737d209f6
Keep recursive module list topologically ( #3324 ).
...
Fixes (#3324 ).
2022-03-05 15:04:13 +00:00
Wilson Snyder
e6857df5c6
Internals: Rename Ast on non-node classes ( #3262 ). No functional change.
...
This commit has the following replacements applied:
s/\bAstUserInUseBase\b/VNUserInUseBase/g;
s/\bAstAttrType\b/VAttrType/g;
s/\bAstBasicDTypeKwd\b/VBasicDTypeKwd/g;
s/\bAstDisplayType\b/VDisplayType/g;
s/\bAstNDeleter\b/VNDeleter/g;
s/\bAstNRelinker\b/VNRelinker/g;
s/\bAstNVisitor\b/VNVisitor/g;
s/\bAstPragmaType\b/VPragmaType/g;
s/\bAstType\b/VNType/g;
s/\bAstUser1InUse\b/VNUser1InUse/g;
s/\bAstUser2InUse\b/VNUser2InUse/g;
s/\bAstUser3InUse\b/VNUser3InUse/g;
s/\bAstUser4InUse\b/VNUser4InUse/g;
s/\bAstUser5InUse\b/VNUser5InUse/g;
s/\bAstVarType\b/VVarType/g;
2022-01-02 14:03:20 -05:00
Wilson Snyder
f96d336b97
Internals: Pre-elaboration progress towards class parameters.
2022-01-01 12:50:43 -05:00
Wilson Snyder
ca42be982c
Copyright year update.
2022-01-01 08:26:40 -05:00
Wilson Snyder
77c005835d
Internals: Const cleanup. No functional change.
2021-12-12 15:12:45 -05:00
Wilson Snyder
cd737065f2
Internals: More const. No functional change intended.
2021-11-26 17:55:36 -05:00
Wilson Snyder
2742a8c813
Internals: No need for variable name on immediate visitors. No functional change intended.
2021-11-26 10:52:45 -05:00
Wilson Snyder
05e12ab60e
Internals: More const. No functional change intended.
2021-11-26 10:52:45 -05:00
Wilson Snyder
899de9a282
Add --lib-create, similar to --protect-lib but without protections ( #3200 ).
2021-11-14 09:39:31 -05:00
Wilson Snyder
37e3c6da70
Internals: Add more const. No functional change intended.
2021-11-13 13:50:44 -05:00
Wilson Snyder
4cb5c1e1db
Internals: More const. No functional change.
2021-11-13 11:38:12 -05:00
Geza Lore
381c87a1eb
Remove VN_CAST_CONST and VN_AS_CONST.
...
The _CONST suffix on these macros is only lexical notation, pointer
constness can be preserved by overloading the underlying
implementations appropriately. Given that the compiler will catch
invalid const usage (trying to assign a non-const pointer to a const
pointer variable, etc.), and that the declarations of symbols should
make their constness obvious, I see no reason to keep the _CONST
flavours.
2021-10-24 11:43:48 +01:00
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
b8e804f05b
Internals: Some clang-tidy cleanups. No functional change intended.
2021-07-25 13:38:27 -04:00