Commit Graph

77 Commits

Author SHA1 Message Date
Wilson Snyder 5ca62de167 Fix filename backslash escapes in C code (#5947). 2025-04-29 19:27:38 -04:00
Wilson Snyder 6ba06498db Fix segfault in fork synchronization (#5906). 2025-04-04 08:15:39 -04:00
Geza Lore 96bffd49aa
Fix invalidating variable caches in SenExprBulider (#5834) (#5835) 2025-03-07 07:18:34 -05:00
Geza Lore 0133bc6b09
Do not use function locals in SenExprBuilder (#5822)
Function locals are not safe here because we might need to split up
the generated function. V3Localize can fix them later if safe.
2025-03-02 16:13:59 +00:00
Wilson Snyder 098ee6fa7a Internals: Cleanup some missing VL_RESTORERs. No functional change intended. 2025-02-27 21:18:27 -05:00
Wilson Snyder 8fbb725f34 Copyright year update. 2025-01-01 08:30:25 -05:00
Wilson Snyder 0c820c3068 Internals: Standardize template argument names. No functional change. 2024-11-29 20:20:38 -05:00
Krzysztof Bieganski afb8428db4
Support IEEE-compliant intra-assign delays (#3711) (#5441) 2024-09-06 18:13:52 -04:00
Krzysztof Bieganski 657d7f257b
Support named event locals (#5422)
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2024-08-30 17:10:47 +02:00
Arkadiusz Kozdra f78c4e8490
Fix compilation error on unreachable disable fork / wait fork (#5339)
Signed-off-by: Arkadiusz Kozdra <akozdra@antmicro.com>
2024-08-07 18:44:02 -04:00
Wilson Snyder 5d8da6b4ac Fix width extension on delays (#5045). 2024-04-13 08:16:59 -04:00
Wilson Snyder 8e44487354 Tests: update style 2024-04-13 08:02:25 -04:00
Geza Lore 98206a4f04
Improve V3List user interface (#4996) 2024-03-25 23:06:25 +00: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 5294140753 Fix delays using wrong timeunits when modules inlined (#4806). 2024-01-05 18:07:24 -05:00
Wilson Snyder e76f29e5ba Copyright year update 2024-01-01 03:19:59 -05:00
Krzysztof Boroński bd38c8fe3c
Fix # 0 delays for process resumption, etc. (#4697) 2023-12-01 13:08:58 -05:00
Krzysztof Bieganski b8417abee5
Fix dynamic NBAs with automatic vars (#4696)
This patch addresses two issues with NBAs in non-inlined functions/tasks:
- If the NBA writes to a local automatic var, the var could cease to exist before the NBA executes. This is normally addressed by fork dynscopes (#4356), but NBA-to-fork transformation happens way after `V3Fork` (in `V3Timing`). To solve this, we put NBAs that write to locals under forks in `V3Fork` already. This way, such locals will be put in dynscopes, and will still exist after the task containing the NBA exits.
- The above change means that any writes in forks other than `fork..join` should be handled by `V3Fork`. Thus, in `V3SchedTiming`, we only have to worry about read references, so we can simply copy all remaining locals. Because we copy, lifetimes are not an issue. This fixes a bug that allowed assignment intravals to be overwritten if they go out of scope in the containing function.
2023-11-16 11:21:23 +01:00
Wilson Snyder 9fd5634778 Internals: Remove unneeded private's. No functional change 2023-11-13 21:37:45 -05:00
Wilson Snyder 671a857560 Fix compiler warning on 'wait' with non-zero constant. 2023-11-12 08:44:55 -05: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
Krzysztof Bieganski 7b12f6a1dd
Support NBAs in non-inlined functions/tasks (#4496) (#4572) 2023-10-20 20:01:45 -04:00
Aleksander Kiryk 83a0085c4d
Support `wait fork` (#4586) 2023-10-20 07:13:57 -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
Krzysztof Bieganski 99ea16d7fd
Fix dynamic triggers for named events (#4571) 2023-10-16 11:06:41 -04:00
Aleksander Kiryk ad3bcbb1bb
Support `disable fork` (#4125) (#4569) 2023-10-16 14:02:29 +02: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 05d04a3959 Internals: Fix misnamed member. No functional change. 2023-09-15 23:02:34 -04:00
Wilson Snyder 10c1653e72 Fix ZERODLY to not warn on 'wait(0)'. 2023-09-15 08:53:29 -04:00
Krzysztof Bieganski ffbbd438ae
Internals: Use runtime type info instead of `dynamic_cast` for faster graph type checks (#4397) 2023-08-31 18:00:53 -04:00
Ryszard Rozak e24197fd16
Don't move function calls before the expression (#4413) 2023-08-28 15:44:41 +02:00
Ryszard Rozak 90079c2974
Fix nested assignments on the LHS (#4435) 2023-08-23 12:08:22 +02:00
Krzysztof Boroński b752faa107
Fix jumping over object initialization (#4411) 2023-08-11 18:28:37 +02:00
Krzysztof Bieganski 9caa79a7ea
Internals: Remove the name field from `AstVarRef` (#4395) 2023-08-03 02:52:52 -04:00
Aleksander Kiryk 1549ff9185
Support more types in wait (#4374) 2023-07-24 08:14:01 -04:00
Krzysztof Boroński 4bdda3f240
Improve propagation of process requirement and decouple it from suspendability (#4321) 2023-07-14 17:12:02 +02:00
Wilson Snyder ff4923cf67 Internals: Make V3MemberMap towards removing member cache (#4350) 2023-07-08 12:27:50 -04:00
Krzysztof Bieganski d5d1cc47e0
Fix multiple edge timing controls in class methods (#4318) (#4320) (#4344)
Multiple edge timing controls in class methods would cause compilation errors on
the generated C++ code. This is because the `SenExprBuilder` used for these
would get recreated per timing control, resulting in duplicate variable names.
The fix is to have a single `SenExprBuilder` per scope.
2023-07-07 08:19:49 -04:00
Wilson Snyder 294d78e0e2 Backout unstable dbb35ab8 (#4318) (#4320) 2023-07-05 14:26:28 -04:00
Krzysztof Bieganski 35d6da391b
Fix multiple edge timing controls in class methods (#4318) (#4320)
Multiple edge timing controls in class methods would cause compilation errors on the generated C++ code. This is because the `SenExprBuilder` used for these would get recreated per timing control, resulting in duplicate variable names. The fix is to have a single `SenExprBuilder` per scope.
2023-07-05 10:36:10 +00:00
Aleksander Kiryk 32019d2bc4
Fix state update for always processes (#4311) 2023-06-29 09:21:49 -04:00
Ryszard Rozak 4522834f7a
Fix duplicate fork names (#4295) 2023-06-22 06:51:53 -04:00
Krzysztof Bieganski 058233fc87
Set the global `usesTiming` flag if forks exist (#4274) 2023-06-06 09:35:12 -04:00
Aleksander Kiryk db7935faf3
Add std::process class (#4212) 2023-06-01 10:02:08 -04:00
Krzysztof Bieganski 77502aeb97
Add warning that timing controls in DPI exports are unsupported (#4238)
Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2023-05-30 09:00:10 -04:00
Krzysztof Bieganski 519792d02b
Fix to commit coroutines immediately on `wait` statements (#4229)
Event-triggered coroutines live in two stages: 'uncommitted' and 'ready'. First
they land in 'uncommitted', meaning they can't be resumed yet. Only after
coroutines from the 'ready' queue are resumed, the 'uncommitted' ones are moved
to the 'ready' queue, and can be resumed. This is to avoid self-triggering in
situations like waiting for an event immediately after triggering it.

However, there is an issue with `wait` statements. If you have a `wait(b)`, it's
being translated into a loop that awaits a change in `b` as long as `b` is
false. If `b` is false at first, the coroutine is put into the `uncommitted`
queue. If `b` is set to true before it's committed, the coroutine won't get
resumed.

This patch fixes that by immediately committing event controls created from
`wait` statements. That means the coroutine from the example above will get
resumed from now on.
2023-05-25 20:20:44 -04:00
Krzysztof Boroński 167a30be1c
Fix deep traversal of class inheritance timing (#4216) 2023-05-23 09:01:57 -04:00
Krzysztof Bieganski 729f8b9334
Move suspendable detection to a separate visitor (#4208)
This makes the implementation of the detection and propagation of the
suspendable property simpler and easier to read. More importantly, there are no
more jumps around the AST with the `visit` functions, which in some cases could
result in incorrect visitor context while in the `visit` function. See the added
test, which would cause Verilator to segfault before this patch.

In testing, verilation performance was not shown to be affected by this change.
Though there is a slight performance improvement from this patch, due to adding
one more check before refreshing class member cache.

Signed-off-by: Krzysztof Bieganski <kbieganski@antmicro.com>
2023-05-17 17:09:33 +00:00