Support s_eventually (#7291)#7508
Conversation
Signed-off-by: Bartłomiej Chmiel <bchmiel@antmicro.com>
Why is any fork required and more so why fork every cycle? I'd think this can become a SERE that determines match (or not)? Why the |
|
On every Line 303 in bb1bfab |
wsnyder
left a comment
There was a problem hiding this comment.
Anything should be convertable to an appropriate state machine, but I guess I'll accept the we already fork argument and punt the performance down the road.
| // SPDX-FileCopyrightText: 2026 Antmicro | ||
| // SPDX-License-Identifier: CC0-1.0 | ||
|
|
||
| `define stop $stop |
There was a problem hiding this comment.
Add verilog format on/off around these please
| @@ -0,0 +1,4 @@ | |||
| [4] stmt, s_eventually before final, fileline: 23 | |||
There was a problem hiding this comment.
Please remove line number from message so is less sensitive to small changes in .v file.
| assert property (@(negedge clk) disable iff (cyc < MAX - 1) s_eventually (cyc == MAX)) `PROPERTY_CHECK("s_eventually during final") | ||
|
|
||
| assert property (@(negedge clk) disable iff (cyc < MAX - 1) s_eventually (cyc == MAX + 1)) `PROPERTY_CHECK("s_eventually after final") | ||
|
|
There was a problem hiding this comment.
Suggest a test where have say 1000 cycles and each s_eventually terminates after say 2 cycles. This is to make sure we clean up properly (e.g. don't for some reason get 1000 forks every cycle).
| = VN_AS(getMemberp(v3Global.rootp()->stdPackagep(), "process"), Class); | ||
| AstFunc* const selfMethodp = VN_AS(getMemberp(processClassp, "self"), Func); |
There was a problem hiding this comment.
Please make a rootp()->stdPackageProcessp and stdPackageClassp and use here and in V3LinkJump where this seems to have come from, to avoid duplication.
| iterateChildren(nodep); | ||
| FileLine* const flp = nodep->fileline(); | ||
|
|
||
| const auto readRef |
| void visit(AstSEventually* nodep) override { | ||
| UASSERT(v3Global.rootp()->stdPackagep(), "Should be imported"); | ||
| AstSenTree* const sentreep = newSenTree(nodep); | ||
| if (!sentreep->sensesp()) { |
There was a problem hiding this comment.
Is there a test for this? I'll turn on coverage.
|
Patch coverage from PR workflow #2450 (code coverage of lines changed relative to 5d1b4fe): lines: 98.25% (112 of 114 lines) branches: 90.00% (18 of 20 branches) Report: 25050153549 |
Implements strong eventually (
s_eventually, IEEE 1800-2023 16.12.13) in the context of property expression.The algorithm lowers this code:
into:
Resolves #7291