Commit Graph

587 Commits

Author SHA1 Message Date
Todd Strader 94e545bdca
Fix interface and struct pattern collision (#5640) (#5639) 2024-11-27 17:20:21 -05:00
Wilson Snyder f5ee7aa0ab
Internals: Decouple Bison class/package symbol table parsing from Link symbol table. (#5629)
Not intended to change non-error cases, but side-effects are likely.
2024-11-24 18:19:19 -05:00
Greg Davill 904be103df
Support parameter names in pattern initialization (#5593) (#5596) 2024-11-14 07:25:58 -05:00
Wilson Snyder 8e82440a55 Fix extranous local:: error 2024-11-13 19:15:10 -05:00
Wilson Snyder 46a5f04840 Internals: Link 'std' in LinkFind 2024-11-11 09:44:08 -05:00
Wilson Snyder 15d1751b23 Internals: Defer `class extends` resolution until link 2024-11-10 19:34:00 -05:00
Wilson Snyder b71d49e55a Internals: Defer `$unit` package resolution until link 2024-11-10 18:36:12 -05:00
github action b74a8f133f Apply 'make format' 2024-11-10 21:54:54 +00:00
Wilson Snyder 873048c21c Fix 'local::' parsing in wrong scope 2024-11-10 16:51:34 -05:00
Wilson Snyder 75e9986d39 Fix local:: mis-allowed in `class extends` 2024-11-10 16:43:21 -05:00
Wilson Snyder 4257fcf9d0 Change parsing of cells to be non-symbol table sensitive. 2024-11-10 12:08:37 -05:00
Wilson Snyder 3fae11595a Support `pure constraint`. 2024-11-09 12:05:26 -05:00
Todd Strader 76fe224e7c
Fix complex user type problem with --x-assign (#5543) 2024-10-18 19:52:25 -04:00
Wilson Snyder fd9f5ab34e Fix not reporting class reference with extra parameters (#5467). 2024-10-04 05:38:36 -04:00
Wilson Snyder d06f986b51 Add elaboration dot-error message context, plus debug improvements 2024-10-04 05:38:05 -04:00
Wilson Snyder d0ec6092b3 Change package import/export to link post-parsing, prep for later commit. 2024-09-28 20:55:22 -04:00
Wilson Snyder 5c923d6629 Fix to avoid IMPLICIT creation if data type of same name. 2024-09-28 17:58:26 -04:00
Wilson Snyder 1dc6fd3d93 Internals: Move interface error to later phase, prep for later commit. No functional change intended. 2024-09-28 17:37:44 -04:00
Wilson Snyder 2584befa5a Internals: Show tree traversal in V3LinkDot Resolve debug. No functional change intended. 2024-09-22 10:46:04 -04:00
Wilson Snyder 5f39c69d19 Delay parameter type assignment determination until elaboration 2024-09-21 20:27:41 -04:00
Wilson Snyder 774ec42be4 Internals: Experimental cleanup; avoid :: on package symbol tables 2024-09-20 20:39:49 -04:00
Wilson Snyder 80cba789f4 Internals: Remove V3LinkParse's need of class links. No functional change intended. 2024-09-20 18:26:23 -04:00
Wilson Snyder fb04765c0e Fix class reference with pin that is a class reference (#5454). 2024-09-17 17:38:18 -04:00
Wilson Snyder 195a665293 Internals: Fix V3LinkDot debug message print 2024-09-15 21:18:51 -04:00
Arkadiusz Kozdra ef259f63ca
Fix randomize treated as std::randomize in classes (#5436) 2024-09-10 09:10:36 -04:00
Arkadiusz Kozdra 409efa1249 Internals: Factor out creating clocking event. No functional change.
Signed-off-by: Arkadiusz Kozdra <akozdra@antmicro.com>
2024-09-04 07:57:51 -04:00
Arkadiusz Kozdra ed7040adc0
Fix dot fallback finding wrong symbols (#5394) 2024-08-22 15:49:08 -04:00
Krzysztof Bieganski 930f35acc9
Support `constraint_mode` (#5338) 2024-08-21 06:16:44 -04:00
Bartłomiej Chmiel a730daabef
Support 'parameter type' in hierarchical blocks (#5309) (#5333) 2024-08-21 05:30:59 -04:00
Krzysztof Bieganski 6cb0a41857
Support inline random variable control (#5317)
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2024-08-13 14:20:31 -04:00
Arkadiusz Kozdra 367249ec84
Add parsing but otherwise ignore std::randomize (#5354) 2024-08-09 17:21:32 -04:00
Krzysztof Boroński 45ee949cc4
Internals: Disambiguate variable references under `with` clauses of `randomize()` methods (#5277) 2024-08-02 11:45:17 -04:00
Krzysztof Bieganski 2f5c58b345
Support `rand_mode` (#5273)
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2024-07-31 22:30:48 +01:00
Arkadiusz Kozdra 1600cc01a4
Internals: clean up begin blocks and lifetimes in foreach loops (#5306)
According to IEEE 1800-2023 12.7.3, the loop creates an implicit block
around it, containing declarations of the loop variables with automatic
lifetime.

No functional change intended.

Signed-off-by: Arkadiusz Kozdra <akozdra@antmicro.com>
2024-07-26 05:50:29 -04:00
Wilson Snyder 981d3ce782 Add suggestions on misspelled PLI functions. 2024-07-20 07:20:10 -04:00
Krzysztof Boroński 3cf9606ea9
Support inline constraints for class randomization methods (#5234)
Signed-off-by: Krzysztof Boronski <kboronski@antmicro.com>
2024-07-12 16:18:18 +02:00
Arkadiusz Kozdra 2cfec0ecc3
Support clocking blocks in virtual interfaces (#5235) 2024-07-09 18:31:58 -04:00
Arkadiusz Kozdra 72993ec3dd
Support cross-module clockvars access (#5184) 2024-06-30 15:19:02 -04:00
Wilson Snyder f96e99542c Internals: Fix cppcheck warnings. No functional change. 2024-06-13 21:29:03 -04:00
Arkadiusz Kozdra 442c9bc316
Support parsing and otherwise ignoring inline constraints (#5126) 2024-06-13 08:38:20 -04:00
Arkadiusz Kozdra 1dbf1be3e6
Support `inout` clocking items (#5160) 2024-06-07 08:30:58 -04:00
Geza Lore 9b729b80e0
Plug memory leaks (#5016) 2024-03-23 22:12:43 +00:00
Wilson Snyder 4a439beae5 Add error on missing pure virtual functions (#4961). 2024-03-11 18:56:30 -04:00
Wilson Snyder 3786f59e03 Change to IEEE 1800-2023 warning mentions 2024-03-02 10:15:19 -05:00
Wilson Snyder 7ada5195d8
Fix `this` in member initialization (#4710). (#4876) 2024-02-04 19:44:10 -05:00
Wilson Snyder a6ad85244f Backout (#4710) due to leak 2024-02-04 18:13:22 -05:00
Wilson Snyder f13f2296de Fix `this` in member initialization (#4710). 2024-02-04 16:09:01 -05:00
Wilson Snyder 74ec50f933 Support interface class diamond relationship. 2024-01-23 22:07:35 -05:00
Wilson Snyder 3a5248a919 Internals: Mark structs final/VL_NOT_FINAL. No functional change intended. 2024-01-20 15:06:46 -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
Jordan McConnon 56d6791205
Support invoking interface methods on virtual interface variables (#4774) (#4775) 2023-12-21 07:49:07 -05:00
Ryszard Rozak 1ececf1127
Support multiple parameters in virtual interfaces (#4745) 2023-12-07 13:56:16 +01:00
Wilson Snyder 39d9bd4d47 Internals: V3LinkDot fix missing restorer. 2023-12-06 08:29:33 -05:00
Ryszard Rozak eb2cfe1d19
Support parameterized virtual interaces (#4047) (#4743) 2023-12-06 08:02:04 -05:00
Krzysztof Boroński cc982ec7fe
Fix range access to fields under classes that depend on parameter resolution (#4681)
Signed-off-by: Krzysztof Boronski <kboronski@antmicro.com>
2023-11-15 14:24:41 +01:00
Wilson Snyder 9fd5634778 Internals: Remove unneeded private's. No functional change 2023-11-13 21:37:45 -05:00
Wilson Snyder 99dbd23f1b
Support passing constraints to --xml-only output (still otherwise unsupported) (#4683) 2023-11-11 20:20:37 -05:00
Wilson Snyder f3ae4b8786 Fix spelling 2023-11-10 23:25:53 -05:00
Ryszard Rozak a764c70b4a
Fix handling of static keyword in methods (#4649) 2023-10-31 08:15:54 -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 7ba6647c4f Internals: Cleanup some V3Graph constructors/funcs and docs. No functional change. 2023-10-28 20:11:28 -04:00
Geza Lore 30318a6654 C++11 cleanup 2023-10-28 11:26:48 +01:00
Ryszard Rozak 84125d7c92
Fix virtual methods (#4616) 2023-10-24 15:51:46 +02:00
Geza Lore d330100542 Create implicit nets for inputs of gate primitives.
Prior to this we failed to create implicit nets for inputs of gate
primitives, which is required by the standard (IEEE 1800-2017 6.10).
Note: outputs were covered due to being modeled as the LHS of
assignments, which do create implicit nets.
2023-10-21 22:45:26 +01:00
Wilson Snyder a773a52559 Cleanup some IEEE references 2023-10-19 19:26:36 -04: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
Anthony Donlon 4fdaa46328
Fix using functions/tasks following class definition inside module (#4553) 2023-10-15 13:01:32 -04:00
Anthony Donlon 4427f03b08
Fix error message for invalid parameter overrides (#4559) 2023-10-15 12:59:36 -04:00
Wilson Snyder 684aba0e90 Fix purity calculation during V3Const simplifying Ast 2023-10-15 06:25:42 -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
Wilson Snyder 9f75068059 Cleanup some error messages to properly quote 2023-09-23 08:52:50 -04:00
Wilson Snyder 6e589377f4 Fix reference to extended class in parameterized class (#4466). 2023-09-14 20:07:49 -04:00
Wilson Snyder 2c84b37bf7 Internals: Rename some V3LinkDot variables. No functional change. 2023-09-14 20:06:20 -04:00
Wilson Snyder 839a8fa4d9 Fix error on enum with VARHIDDEN of cell (#4482). 2023-09-12 17:47:57 -04:00
Wilson Snyder 11b5dae88d Support let 2023-09-07 21:45:51 -04:00
Wilson Snyder c8c980c49d Fix mis-warning on #() in classes' own functions. 2023-09-02 08:33:56 -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
Wilson Snyder 10dd675371 Fix false UNUSEDPARAM on generate localparam (#4427). 2023-08-25 07:59:29 -04:00
Krzysztof Boroński ef4794e36d
Support parenthesesless calls to static methods (#4432) 2023-08-22 06:06:34 +01:00
Anthony Donlon 768b78e7d0
Fix checking for parameter and port connections in the wrong place (#4428) 2023-08-20 08:55:16 -04:00
Aleksander Kiryk 4afa14b612
Internals: Remove m_pkgp and m_classp from WidthVisitor (#4402) 2023-08-05 03:07:23 -04:00
Krzysztof Bieganski 9caa79a7ea
Internals: Remove the name field from `AstVarRef` (#4395) 2023-08-03 02:52:52 -04:00
Wilson Snyder 06521f6cf1 Tests: Fix some missing coverage, and cleanup some error messages 2023-07-27 06:53:43 -04:00
Wilson Snyder f94c1b32e5 Internals: Make V3MemberMap to remove member cache (#4350) 2023-07-08 12:40:27 -04:00
Wilson Snyder ff4923cf67 Internals: Make V3MemberMap towards removing member cache (#4350) 2023-07-08 12:27:50 -04:00
Ryszard Rozak 24a9f7c650
Fix references to members of results of static methods (#4327) 2023-06-30 13:23:34 +02:00
Ryszard Rozak ba47c01a01
Fix implicit calls of base class constructors with optional arguments (#4319) 2023-06-27 16:08:38 +02:00
Ryszard Rozak c3e5db5f04
Fix names of foreach blocks (#4264) 2023-06-06 16:24:42 +02:00
Krzysztof Boroński 0e24f36fef
Use STATIC lifetime for variables created from clocking items (#4262)
Signed-off-by: Krzysztof Boronski <kboronski@antmicro.com>
2023-06-01 17:49:27 +02:00
Ryszard Rozak 15f8ebc562
Fix static methods with prototypes (#4220) 2023-05-31 21:18:32 -04:00
Wilson Snyder e9135598b3 Fix method calls on function return values. 2023-05-29 18:51:27 -04:00
Ryszard Rozak 9da3aacd08
Fix bit selections under parameterized classes (#4210) 2023-05-18 20:01:36 -04:00
Ryszard Rozak 279216048b
Fix dotted references in parameterized classes (#4206) 2023-05-16 07:40:02 -04:00
Ryszard Rozak 2ce7a348df
Fix references to members of parameterized base classes (#4196) 2023-05-15 19:50:04 -04:00
Wilson Snyder a3640c1767 Support get_randstate/set_randstate class method function. 2023-05-06 19:09:19 -04:00
Ethan Sifferman 64ab537b68
Add NEWERSTD warning when using feature in newer language standard (#4168) (#4172). 2023-05-05 22:36:51 -04:00
Wilson Snyder d308a561e4 Fix detection of wire/reg duplicates 2023-05-05 20:16:27 -04:00
Ryszard Rozak 266dc7679a
Don't link AstRefDType if it has parameterized class ref (#4164) (#4170) 2023-05-04 15:09:01 +02: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 ee5c0a2902
Support parameterized class references in extends statement (#4146) 2023-04-24 17:25:53 -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 a10b51705f
Fix class param extends A=B (#4128)
Visit global class params even if a class extends a param
2023-04-17 09:08:57 -03:00
github action fc70876aa9 Apply 'make format' 2023-04-10 23:38:20 +00:00
Srinivasan Venkataramanan 722ab9306a
Support class method calls without parenthesis (#3902) (#4082) 2023-04-10 19:37:24 -04:00
Ryszard Rozak a3f9221a67
Fix importing symbols from base class (#4084) 2023-04-04 20:56:18 -04:00
Wilson Snyder 86156dd05b Revert false-positive static error (#4072) (#4077) 2023-04-01 18:54:37 -04:00
Wilson Snyder 3a01c32bf9 Revert false-positive static error (#4072) (#4077) 2023-04-01 15:45:34 -04:00
Wilson Snyder 69121633cf Support class srandom and class random stability. 2023-04-01 10:50:27 -04:00
Krzysztof Bieganski 0b96789e65
Add error on static access to non-static class member (#4072)
Before this patch, it was possible to access non-static class members using
static access, which resulted in C++ compilation errors. This adds
verilation-time checks for such situations.
2023-03-27 10:46:51 -04:00
Wilson Snyder 2b21697b86 Support class extends of package::class. 2023-03-18 17:26:36 -04:00
Wilson Snyder d6c5d40f9b Internals: Add VNVisitorConst class. 2023-03-17 19:59:09 -04:00
Wilson Snyder 2488b5a97f Fix pullup/pulldown to create implicit wires. 2023-03-14 21:14:27 -04:00
Krzysztof Boroński f68c16a5e6
Fix symbol entries when inheriting classes (#3995) (#3996) 2023-03-06 07:43:58 -05:00
Wilson Snyder e21198cb2d Add warning on missing class reference #() 2023-03-03 21:06:52 -05:00
github action 08a433260c Apply 'make format' 2023-03-01 05:44:35 +00:00
Wilson Snyder 7fc278f6db Fix import of extends typedefs 2023-03-01 00:30:45 -05:00
Wilson Snyder c82a098f2e Internals: Parse class extends :: 2023-02-14 21:23:55 -05:00
Wilson Snyder 4d29487e75 Fix -Wpedantic on std::process. 2023-02-11 10:55:06 -05:00
Ryszard Rozak d34aa10faf
Fix class field linking when a super classes is a param (#3949) 2023-02-10 07:44:14 -05:00
Wilson Snyder 70eceae3d8 Fix core dump on bad dotted reference. 2023-02-05 12:45:14 -05:00
Aleksander Kiryk 31130c4b4a
Fix std:: to be parsed first (#3864) (#3928) 2023-02-03 09:04:16 -05:00
Ryszard Rozak 33468fa0e7
Fix class extend parameter dot case (#3926) 2023-02-02 17:59:47 -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
Ryszard Rozak 7f3e178b68
Fix paramaterized class function linkage (#3917)
* Visit function arguments even if the function is unlinkable
* Don't use m_unlinedScopep in AstLambdaArgRef handling
2023-01-30 22:20:56 -05:00
Wilson Snyder 248bd173d3 Support interface classes and class implements. 2023-01-28 18:06:37 -05:00
Wilson Snyder 8d2be855f5 Internals: Parsing and tests for class interfaces 2023-01-28 16:30:47 -05:00
Wilson Snyder f20997a2f0 Support global clocking and $global_clock. 2023-01-28 12:31:52 -05:00
Wilson Snyder bea225e191 Fix duplicate name check on extern symbols 2023-01-28 11:55:44 -05:00
Ryszard Rozak 91c44d7830
Support class extending its parameter (#3904) 2023-01-25 20:33:18 -05:00
Ryszard Rozak 4a8cfe367d
Support function calls without parenthesis (#3903) (#3902)
Signed-off-by: Ryszard Rozak <rrozak@antmicro.com>
2023-01-24 15:36:30 +01:00
Ryszard Rozak b56e7f6910
Support static function variables (#3830) 2023-01-23 08:35:10 -05:00
Ryszard Rozak be53eec5ca
Support property calls without parenthesis (#3879) (#3893) 2023-01-20 07:25:37 -05:00
Wilson Snyder 035bf13e4a Fix foreach unnamedblk duplicate error (#3885). 2023-01-18 21:48:06 -05:00
Wilson Snyder b24d7c83d3 Copyright year update 2023-01-01 10:18:39 -05:00
Wilson Snyder 24198ef0ed Internal line coverage fix 2022-12-29 14:18:45 -05:00
Larry Doolittle 80a144797d
Commentary: Fix more spelling (#3828) 2022-12-26 10:30:41 +01:00
Krzysztof Bieganski bb44d4e4f2
Support clocking blocks (#3674) 2022-12-23 07:34:49 -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
Ryszard Rozak 68f8617f79
Support member selects in with clauses (#3775) 2022-11-23 13:15:10 -05:00
Wilson Snyder f44cd9cd48 Internals: Fix constructor style. 2022-11-20 17:40:38 -05:00
Geza Lore 3abb65d732 Strengthen AstNode types to AstNodeExpr
Declare every AstNode children and variables as AstNodeExpr where we
statically know this is the appropriate sub-type.
2022-11-20 19:31:28 +00:00
Ryszard Rozak 3ddfa214e3
Fix $unit as base package for other packages (#3755) 2022-11-16 18:58:57 -05:00
Wilson Snyder c6ecd60993 Support pre_randomize and post_randomize. 2022-11-13 11:59:40 -05:00
Wilson Snyder 6736e92cdb Internals: Fix some ugly line breaks. No functional change. 2022-11-11 22:33:17 -05:00
Wilson Snyder 16586d1d37 Fix tracing parameters overridden with -G (#3723). 2022-11-10 20:30:10 -05:00