Commit Graph

318 Commits

Author SHA1 Message Date
Wilson Snyder b9d7819faa Internals: Fix some cppcheck issues. Some dump functions fixed. 2022-07-30 10:01:39 -04:00
Wilson Snyder 530817191e Support non-ANSI interface port declarations (#3439). 2022-05-25 00:50:50 -04:00
Wilson Snyder 3c4131d45d Fix 'with' operator with type casting (#3387). 2022-05-15 09:53:48 -04:00
Yoda Lee a6d678d41d
Fix hang in generate symbol references (#3391) (#3398) 2022-04-27 18:40:36 -04:00
Wilson Snyder 33105f017c Commentary 2022-03-30 20:17:59 -04:00
Wilson Snyder 90c61c79d6 Fix unnamedblk error on foreach (#3321). 2022-03-05 17:04:52 -05:00
github action 77fe7c426e Apply 'make format' 2022-02-16 05:11:38 +00:00
Raynard Qiao 331c2244fc
Fixed signed number operation (#3294) (#3308) 2022-02-16 00:10:34 -05:00
Wilson Snyder 15b32dc140 Internals: cpplint cleanups. No functional change. 2022-01-08 12:01:39 -05:00
Wilson Snyder b989ac6db5 Internals: Support linking recursive function calls (but not later stages) 2022-01-03 18:50:41 -05:00
Wilson Snyder 4d1f4bbf49 Backout last commit; is unstable. 2022-01-03 13:04:47 -05:00
Wilson Snyder e9ad665d32 Internals: Support linking recursive function calls (but not later stages) 2022-01-03 12:25:50 -05:00
Wilson Snyder 7e355e211c Fix dangling node on error 2022-01-02 20:54:13 -05:00
Wilson Snyder 2e2b82c052 Support class static members (#2233). 2022-01-02 15:09:07 -05:00
Wilson Snyder f1bb0544be Internals: Cleanups towards static class members. No functional change intended. 2022-01-02 15:03:57 -05: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 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 5e3016f34a Fix foreach on dotted reference. 2021-12-12 20:44:58 -05:00
Wilson Snyder f775feb7f0 Fix foreach on dotted reference. 2021-12-12 20:43:15 -05:00
Wilson Snyder 6b0601fd54 Support lower dimension looping in foreach loops (#3172). 2021-12-11 20:39:58 -05:00
Wilson Snyder 984ee624ed Fix break under foreach loop (#3230).
Internals: Move Foreach handling into V3Width.
2021-12-11 15:06:33 -05:00
Adrien Le Masle 00ef0519f5
Fix top level parameter overwrite when a package has same parameter (#3241) (#3247) 2021-12-11 14:55:59 -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 b1b92b7dd4 Fix hang on recursive definition error (#3199). 2021-11-23 07:27:41 -05:00
Wilson Snyder 37e3c6da70 Internals: Add more const. No functional change intended. 2021-11-13 13:50:44 -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 8ecdc85cf7 Internals: C++11 style cleanups. No functional change. 2021-07-11 18:42:01 -04:00
Geza Lore 708abe0dd1 Introduce model interface class, make $root part or Syms (#3036)
This patch implements #3032. Verilator creates a module representing the
SystemVerilog $root scope (V3LinkLevel::wrapTop). Until now, this was
called the "TOP" module, which also acted as the user instantiated model
class. Syms used to hold a pointer to this root module, but hold
instances of any submodule. This patch renames this root scope module
from "TOP" to "$root", and introduces a separate model class which is
now an interface class. As the root module is no longer the user
interface class, it can now be made an instance of Syms, just like any
other submodule. This allows absolute references into the root module to
avoid an additional pointer indirection resulting in a potential speedup
(about 1.5% on OpenTitan). The model class now also contains all non
design specific generated code (e.g.: eval loops, trace config, etc),
which additionally simplifies Verilator internals.

Please see the updated documentation for the model interface changes.
2021-06-30 16:35:40 +01:00
Wilson Snyder 512fe0a2d1 Internals: Add const. No functional change. 2021-06-20 18:33:13 -04:00
Wilson Snyder c11cd18491 In XML, show pinIndex information (#2877). 2021-06-19 13:41:41 -04:00
Wilson Snyder 13ddd0bc1c Fix error on unsupported recursive functions (#2957). 2021-06-13 12:38:31 -04:00
Geza Lore c207e98306
Implement a distinct constant pool (#3013)
What previously used to be per module static constants created in
V3Table and V3Prelim are now merged globally within the whole model and
emitted as part of a separate constant pool. Members of the constant
pool are global variables which are declared lazily when used (similar to
loose methods).
2021-06-13 15:05:55 +01:00
Udi Finkelstein 0ea5af40c5
Add PINNOTFOUND warning in place of "Pin not found" error (#2868) 2021-04-01 18:17:42 -04:00
Wilson Snyder ba1f53a070 Improve DEFPARAM warning text. 2021-03-14 20:37:50 -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
Wilson Snyder 6ff1911110 Tests: Cover some internal code coverage issues 2021-03-07 13:52:37 -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 c39a8b439a Internals: Use emplace instead of insert(make_pair(...)). No functional change intended. 2020-12-18 18:24:47 -05:00
Wilson Snyder b04a1caeac In warnings, rename cells to instances to match IEEE 2020-12-12 22:43:55 -05:00
Wilson Snyder 53c4c7d540 Fix error format (#2095). 2020-12-12 22:26:50 -05:00
Wilson Snyder 18f8c8a14f Fix error when dotted refers to missing module (#2095). 2020-12-12 20:25:00 -05:00